Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when destranding during exporting bigwig #169

Open
alexg9010 opened this issue May 3, 2021 · 0 comments
Open

error when destranding during exporting bigwig #169

alexg9010 opened this issue May 3, 2021 · 0 comments

Comments

@alexg9010
Copy link
Member

Error in `:=`(score, numCs/coverage) :
  Check that is.data.table(DT) == TRUE. Otherwise, := and `:=`(...) are defined for use in j, once only and in particular ways. See help(":=").
Calls: lapply ... <Anonymous> -> lapply -> FUN -> FUN -> [ -> [.data.frame -> :=
Execution halted

The problem is that the destranding function (

if(destrand) dt <- methylKit:::.CpG.dinuc.unifyOld(dt)
dt[,score := numCs/coverage]
) converts the data.table to a data.frame and subsequent data.table column assignment via reference does not work.

easy solution would be to convert the function results into data.table again before proceeding

if(destrand) dt <- as.data.table(methylKit:::.CpG.dinuc.unifyOld(dt))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant