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

Running sleuth causes infinite data.table warning #252

Open
tiagobrc opened this issue Sep 14, 2020 · 4 comments
Open

Running sleuth causes infinite data.table warning #252

tiagobrc opened this issue Sep 14, 2020 · 4 comments

Comments

@tiagobrc
Copy link

tiagobrc commented Sep 14, 2020

Hi,

When running Sleuth_prep, a series of warnings are being shown on the screen, and previous scripts are not working anymore, as these warnings repeat for a long time.
Do you have any clues about this?

Testes in different computers and R versions and got the same result.

Thanks!

so <- sleuth_prep(s2c.mln, target_mapping =  t2g,
                  aggregation_column = 'ext_gene', extra_bootstrap_summary = TRUE,
                  read_bootstrap_tpm = TRUE, max_bootstrap = 10, gene_mode=TRUE,
                  transform_fun_counts= function(x) log2(x + 0.5))
.The melt generic in data.table has been passed a data.frame and will attempt to redirect to the relevant reshape2 method; please note that reshape2 is deprecated, and this redirection is now deprecated as well. To continue using melt methods from reshape2 while both libraries are attached, e.g. melt.list, you can prepend the namespace like reshape2::melt(bs_tpm_df). In the next version, this warning will become an error.
@tiagobrc
Copy link
Author

Reverting the data.table package to an older version solves the problem.

@lmcewen
Copy link

lmcewen commented Nov 21, 2020

I also came across this issue too when I use gene_mode = TRUE and aggregation_column = 'ext_gene' (works if I do not use that, so for the transcript level). What version of data.table did you end up using? Although I think the error is pretty informative, the functions in bootstrap.R that have data.table::melt should be changed to reshape2::melt.

@tiagobrc
Copy link
Author

tiagobrc commented Nov 1, 2021

Hi @lmcewen, this response is 1 year late, so sorry about that. I haven't tested all the data.table versions.

The command I use was:

so <- sleuth_prep(sample_to_covariates = s2c, target_mapping =  t2g,
                  aggregation_column = 'ext_gene', extra_bootstrap_summary = TRUE, gene_mode = TRUE, read_bootstrap_tpm = TRUE, max_bootstrap = 20, pval_aggregate=FALSE, transform_fun_counts = function(x) log2(x + 0.5))

And it gives me the output:

'gene_mode' is TRUE. Sleuth will do counts aggregation at the gene level for downstream normalization, transformation, and modeling steps, as well as for plotting and results.
It appears that you are running Sleuth from within Rstudio.
Because of concerns with forking processes from a GUI, 'num_cores' is being set to 1.
If you wish to take advantage of multiple cores, please consider running sleuth from the command line.reading in kallisto results
dropping unused factor levels
..................
normalizing est_counts
42216 targets passed the filter
normalizing tpm
merging in metadata
aggregating by column: ext_gene
19706 genes passed the filter
287 target_ids are missing annotations for the aggregation_column: ext_gene.
These target_ids will be dropped from the gene-level analysis.
If you did not expect this, check your 'target_mapping' table for missing values.summarizing bootstraps
.The melt generic in data.table has been passed a data.frame and will attempt to redirect to the relevant reshape2 method; please note that reshape2 is deprecated, and this redirection is now deprecated as well. To continue using melt methods from reshape2 while both libraries are attached, e.g. melt.list, you can prepend the namespace like reshape2::melt(bs_tpm_df). In the next version, this warning will become an error.
The melt generic in data.table has been passed a data.frame and will attempt to redirect to the relevant reshape2 method; please note that reshape2 is deprecated, and this redirection is now deprecated as well. To continue using melt methods from reshape2 while both libraries are attached, e.g. melt.list, you can prepend the namespace like reshape2::melt(bs_df). In the next version, this warning will become an error.The dcast generic in data.table has been passed a data.frame and will attempt to redirect to the reshape2::dcast; please note that reshape2 is deprecated, and this redirection is now deprecated as well. Please do this redirection yourself like reshape2::dcast(scaled_bs). In the next version, this warning will become an error..
The melt generic in data.table has been passed a data.frame and will attempt to redirect to the relevant reshape2 method; please note that reshape2 is deprecated, and this redirection is now deprecated as well. To continue using melt methods from reshape2 while both libraries are attached, e.g. melt.list, you can prepend the namespace like reshape2::melt(bs_tpm_df). In the next version, this warning will become an error.
The melt generic in data.table has been passed a data.frame and will attempt to redirect to the relevant reshape2 method; please note that reshape2 is deprecated, and this redirection is now deprecated as well. To continue using melt methods from reshape2 while both libraries are attached, e.g. melt.list, you can prepend the namespace like reshape2::melt(bs_df). In the next version, this warning will become an error.The dcast generic in data.table has been passed a data.frame and will attempt to redirect to the reshape2::dcast; please note that reshape2 is deprecated, and this redirection is now deprecated as well. Please do this redirection yourself like reshape2::dcast(scaled_bs). In the next version, this warning will become an error..
The melt generic in data.table has been passed a data.frame and will attempt to redirect to the relevant reshape2 method; please note that reshape2 is deprecated, and this redirection is now deprecated as well. To continue using melt methods from reshape2 while both libraries are attached, e.g. melt.list, you can prepend the namespace like reshape2::melt(bs_tpm_df). In the next version, this warning will become an error.
The melt generic in data.table has been passed a data.frame and will attempt to redirect to the relevant reshape2 method; please note that reshape2 is deprecated, and this redirection is now deprecated as well. To continue using melt methods from reshape2 while both libraries are attached, e.g. melt.list, you can prepend the namespace like reshape2::melt(bs_df). In the next version, this warning will become an error.The dcast generic in data.table has been passed a data.frame and will attempt to redirect to the reshape2::dcast; please note that reshape2 is deprecated, and this redirection is now deprecated as well. Please do this redirection yourself like reshape2::dcast(scaled_bs). In the next version, this warning will become an error..
The melt generic in data.table has been passed a data.frame and will attempt to redirect to the relevant reshape2 method; please note that reshape2 is deprecated, and this redirection is now deprecated as well. To continue using melt methods from reshape2 while both libraries are attached, e.g. melt.list, you can prepend the namespace like reshape2::melt(bs_tpm_df). In the next version, this warning will become an error.

Here, sleuth keeps printing the same messages over and over again but eventually it finishes just fine. The data.table version does not matter as I previously thought. I think in the future, this might break the code.

@lassancejm
Copy link

Reviving this thread, as I am encountering the same error. Any update on whether this will be fixed? Or what is a suitable workaround?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants