ChiLiubio / microeco

An R package for data analysis in microbial community ecology
GNU General Public License v3.0
198 stars 56 forks source link

trans_diff$new with method "DESeq2" causes error. #412

Open 145218415 opened 2 weeks ago

145218415 commented 2 weeks ago

Hi, thanks for building and maintaining this fantastic package.

I am wanting to use the DESeq2 method in your trans_diff function but come across the following error:

t1 <- trans_diff$new(dataset = me, method = "DESeq2", group = "chimio", alpha = 0.05)

293 input features ... Available feature number: Error in initialize(...) : The input otu_table must be data.frame format!

me

microtable-class object: sample_table have 50 rows and 14 columns otu_table have 1121 rows and 50 columns tax_table have 1121 rows and 7 columns phylo_tree have 1121 tips rep_fasta have 1121 sequences Taxa abundance: calculated for Kingdom,Phylum,Class,Order,Family,Genus,Species Alpha diversity: calculated for Observed,Chao1,se.chao1,ACE,se.ACE,Shannon,Simpson,InvSimpson,Fisher,Pielou,Coverage,PD Beta diversity: calculated for bray,jaccard,wei_unifrac,unwei_unifrac

class(me$otu_table)

[1] "data.frame"

The data I am using works on other methods such as lefse, t.test, metastat, rf, but not ancombc2 which gives the same error.

Any thoughts on what could be causing this and how I can fix it ?

Thanks in advance !

ChiLiubio commented 2 weeks ago

Hi. Could you please attach your me object so that I can totally reproduce your issue? To save it, please follow the steps in the tutorial (https://chiliubio.github.io/microeco_tutorial/notes.html#save-function) and attach the compressed object. Thanks.

145218415 commented 2 weeks ago

I restarted everything (updated Rstudio) and now it is working. Just to let you know, when the error occurred, it was also happening with the mt object from the tutorial. So probably a conflict with loaded libraries. Sorry for the waste of time, and thanks again for your fantastic tool and your reactivity !