joey711 / phyloseq

phyloseq is a set of classes, wrappers, and tools (in R) to make it easier to import, store, and analyze phylogenetic sequencing data; and to reproducibly share that data and analysis with others. See the phyloseq front page:
http://joey711.github.io/phyloseq/
584 stars 187 forks source link

LEFSE analysis in R #1242

Open Fla1487 opened 5 years ago

Fla1487 commented 5 years ago

Dear All,

I have a bit problem with the LESFE analysis starting from a phyloseq object.

I tried to use the LEFSE package from ying14/yingtools2: Ying's R Tools, following the exemple code. Below you will find the command and the result:

lefse.tbl <- lefse(phy_obj1,class="Type") Error in data.table(otutab, keep.rownames = TRUE) : could not find function "data.table"

I do not understand the problem.

Additionally, I would like perform LEFSE analysis on galaxy, how can I obtain th txt file to upload? is it a good idea?

Thank you in advance.

cjfields commented 5 years ago

@Fla1487 this isn't really a phyloseq question, but the problem appears to be that you are missing the data.table function. Have you loaded this (e.g. library(data.table)) ?

Fla1487 commented 5 years ago

Thank you so much, I have then charged the indicated package. Below the command and the output in R:

lefse.tbl <- lefse(phy_obj1,class="Type", levels = "Genus") [1] "Wrote lefse.res" Error in file(file, "rt") : cannot open the connection In addition: Warning messages: 1: Column sample joining factor and character vector, coercing into character vector 2: In file(file, "rt") : cannot open file 'lefse.res': No such file or directory

As output I obtain a txt file, that I can use on Galaxy LEFSE. I have checked this file, but it does not have the suggested format.

is it the result of R LEFSE function? or Can I have obtain the plot in R?

Thank you again

Fla1487 commented 5 years ago

Moreover, I have tried with the lefse2 (modified according to https://github.com/ying14/yingtools2/wiki/Using-the-%60lefse%60-wrapper-function)

Below the result:

lefse.tbl <- lefse2(phy_obj1, class="Type", subclass = "Hurleyscore") Error in gsub(" ", "", taxon) : object 'taxon' not found Called from: gsub(" ", "_", taxon)

Thank you so much

cjfields commented 5 years ago

Again, not sure if this specific venue (issue tracker for phyloseq) is the appropriate place to ask this? The yingtools2 repo tracker seems more appropriate.

Fla1487 commented 5 years ago

how can I change the section? I think that this trouble impacts also on phyloseq (it uses a phyloseq object)

how do you explain these problems?

marselr2 commented 4 years ago

Hi @Fla1487

Did you solve this problem? Or did you move the question to another section?

I have the same error message in the lefse2 function and I don't know how to solve it.

Thank you!!

how can I change the section? I think that this trouble impacts also on phyloseq (it uses a phyloseq object)

how do you explain these problems?

Fla1487 commented 4 years ago

Unfortunatly, I do not solve this problem. R and Lefse analysis do not work on windows. I have even tried on ubuntu, but I did not obtain any result. To perform Lefse, I have used the online softare microbiome analyst, I will prefer doing anything in R.

cjfields commented 4 years ago

@Fla1487 have you asked @ying14 about this (issue in the above repo)? It's more direct.

Fla1487 commented 4 years ago

no I didn't I tried both lefse and lefse 2. I tried unsuccesfully to upload the txt file on galaxy.

marselr2 commented 4 years ago

@Fla1487

I have oppened an issue in the yingtools2 repo:

https://github.com/ying14/yingtools2/issues/16

guokai8 commented 3 years ago

Maybe you can try my package: microbial. It's on CRAN now. Kai

Fla1487 commented 3 years ago

Maybe you can try my package: microbial. It's on CRAN now. Kai

Thank you so much, I will try your package

Fla1487 commented 3 years ago

Maybe you can try my package: microbial. It's on CRAN now. Kai

Maybe, the package is not released for R in windows or it does not work in R > 4.0???

guokai8 commented 3 years ago

Please try to use devtools::install_github(‘guokai8/microbial’). And it should work. Best, Kai

Fla1487 commented 3 years ago

Please try to use devtools::install_github(‘guokai8/microbial’). And it should work. Best, Kai

Thank you so much...now it works... I will try your package on a new dataset...