umerijaz / microbiomeSeq

An R package for microbial community analysis in an environmental context
66 stars 26 forks source link

Problem running microbiomeSeq tutorial #38

Open dieunelderilus opened 5 years ago

dieunelderilus commented 5 years ago

Dear microbiomeSeq Developers and Users

I am trying to runn the MicrobiomeSeq tutorial with the phyloseq data . I have a strange error message when I have to merge use merge_phylose , here is my commands from the beginning to the error message:

library(devtools) # Load the devtools package

install_github("umerijaz/microbiomeSeq") # Install the package

library(microbiomeSeq) #load the package library(phyloseq) abund_table<-read.csv("SPE_pitlatrine.csv",row.names=1,check.names=FALSE) TAX<-read.csv("All_Good_P2_C03_Taxonomy.csv",row.names=1,check.names=FALSE)

Transpose the data to have sample names on rows

abund_table<-t(abund_table) meta_table<-read.csv("ENV_pitlatrine.csv",row.names=1,check.names=FALSE) OTU_tree=read.tree("All_Good_P2_C03.tre.txt") OTU = otu_table(as.matrix(abund_table), taxa_are_rows = FALSE) TAX = tax_table(as.matrix(OTU_taxonomy)) SAM = sample_data(meta_table) OTU_tree <- compute.brlen(OTU_tree, method = "Grafen") physeq <- merge_phyloseq(phyloseq(OTU, TAX), SAM, OTU_tree) Error in validObject(.Object) : invalid class “phyloseq” object: Component taxa/OTU names do not match. Taxa indices are critical to analysis. Try taxa_names()

Any help please ?

AlfredUg commented 5 years ago

Heya @dieunelderilus, as pointed out in the error message, Component taxa/OTU names do not match. As such, you need to check and confirm that the rownames of your TAX object match with colnames of the OTU object before proceeding to the merging step.

dieunelderilus commented 5 years ago

ear Alfred

Thank you for quick response. Finally, with your suggestion I have run the first steps of the tutorials as bar plot and alpha diversity box plot. However I am getting an error when I am plotting the beta diversity. here is my two command lines and the output error :

ord.res <- ordination(physeq, which_distance = "bray", method = "NMDS", grouping_column = "count1", pvalue.cutoff = 0.05) Square root transformation Wisconsin double standardization Run 0 stress 0.1394103 Run 1 stress 0.1678136 Run 2 stress 0.182867 Run 3 stress 0.1598715 Run 4 stress 0.1921087 Run 5 stress 0.1770326 Run 6 stress 0.1567452 Run 7 stress 0.1566605 Run 8 stress 0.139401 ... New best solution ... Procrustes: rmse 0.001334347 max resid 0.007860605 ... Similar to previous best Run 9 stress 0.1653585 Run 10 stress 0.1599547 Run 11 stress 0.1567432 Run 12 stress 0.139404 ... Procrustes: rmse 0.001276878 max resid 0.00662439 ... Similar to previous best Run 13 stress 0.1598112 Run 14 stress 0.1609729 Run 15 stress 0.1722012 Run 16 stress 0.1566185 Run 17 stress 0.1394067 ... Procrustes: rmse 0.001316059 max resid 0.007713763 ... Similar to previous best Run 18 stress 0.1793411 Run 19 stress 0.1618037 Run 20 stress 0.1394824 ... Procrustes: rmse 0.004449223 max resid 0.03209823 *** Solution reached plot_ordination(physeq, ord.res,method = "NMDS", pvalue.cutoff = 0.05, show.pvalues = T, num.signi.groups = NULL) Error in plot_ordination(physeq, ord.res, method = "NMDS", pvalue.cutoff = 0.05, : unused arguments (method = "NMDS", pvalue.cutoff = 0.05, show.pvalues = T, num.signi.groups = NULL)

Please where I am wrong here in the plot_ordination ?

AlfredUg commented 5 years ago

Heya @dieunelderilus,

You will need to use plot.ordination instead of plot_ordination. It should work with that modification. This change will be reflected in the next version of the tutorial.

dieunelderilus commented 5 years ago

Thanks a lot for your response and suggestions

Regards

DD

Derilus Dieunel Graduate Student Department of Environmental Sciences University of Puerto Rico, Río Piedras

On Wed, Sep 25, 2019 at 3:39 AM Alfred Ssekagiri notifications@github.com wrote:

Heya @dieunelderilus https://github.com/dieunelderilus,

You will need to use plot.ordination instead of plot_ordination. It should work with that modification. This change will be reflected in the next version of the tutorial.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/umerijaz/microbiomeSeq/issues/38?email_source=notifications&email_token=AGLQOTVRZK3UKGMRJCAC72TQLMIRXA5CNFSM4IYBMNFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7Q5U7Q#issuecomment-534895230, or mute the thread https://github.com/notifications/unsubscribe-auth/AGLQOTXIYKVK2R3G25ASQ3TQLMIRXANCNFSM4IYBMNFA .

dieunelderilus commented 5 years ago

Dear Alfred

I have checked with the new suggestion but unfortunately it does not work. Here is the command and the errors:

plot.ordination(ord.res,method = "NMDS", pvalue.cutoff = 0.05, show.pvalues = T,

  • num.signi.groups = NULL) Error in plot.ordination(ord.res, method = "NMDS", pvalue.cutoff = 0.05, : unused argument (num.signi.groups = NULL) plot.ordination(ord.res, method = "NMDS", pvalue.cutoff = 0.05, show.pvalues = T) [1] groups p_value label <0 rows> (or 0-length row.names) Error in `$<-.data.frame`(`*tmp*`, "p_label", value = "p-value= ") : replacement has 1 row, data has 0

Any helps ? Regards

Derilus Dieunel Graduate Student Department of Environmental Sciences University of Puerto Rico, Río Piedras

On Wed, Sep 25, 2019 at 11:52 AM Dieunel Derilus dieunelderilus@gmail.com wrote:

Thanks a lot for your response and suggestions

Regards

DD

Derilus Dieunel Graduate Student Department of Environmental Sciences University of Puerto Rico, Río Piedras

On Wed, Sep 25, 2019 at 3:39 AM Alfred Ssekagiri notifications@github.com wrote:

Heya @dieunelderilus https://github.com/dieunelderilus,

You will need to use plot.ordination instead of plot_ordination. It should work with that modification. This change will be reflected in the next version of the tutorial.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/umerijaz/microbiomeSeq/issues/38?email_source=notifications&email_token=AGLQOTVRZK3UKGMRJCAC72TQLMIRXA5CNFSM4IYBMNFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7Q5U7Q#issuecomment-534895230, or mute the thread https://github.com/notifications/unsubscribe-auth/AGLQOTXIYKVK2R3G25ASQ3TQLMIRXANCNFSM4IYBMNFA .

elcega commented 3 years ago

Dear Alfred I have checked with the new suggestion but unfortunately it does not work. Here is the command and the errors: plot.ordination(ord.res,method = "NMDS", pvalue.cutoff = 0.05, show.pvalues = T, + num.signi.groups = NULL) Error in plot.ordination(ord.res, method = "NMDS", pvalue.cutoff = 0.05, : unused argument (num.signi.groups = NULL) plot.ordination(ord.res, method = "NMDS", pvalue.cutoff = 0.05, show.pvalues = T) [1] groups p_value label <0 rows> (or 0-length row.names) Error in $<-.data.frame(*tmp*, "p_label", value = "p-value= ") : replacement has 1 row, data has 0 Any helps ? Regards -------------------------- Derilus Dieunel Graduate Student Department of Environmental Sciences University of Puerto Rico, Río Piedras On Wed, Sep 25, 2019 at 11:52 AM Dieunel Derilus dieunelderilus@gmail.com wrote:

I got the same error, did you end up solving this by any chance? Thanks

AlfredUg commented 3 years ago

Heya, this error is raised as a result of no significant pairwise comparisons at a specified pvalue (the default is 0.05), try changing the pvalue to a value above 0.05, say 0.08, 0.1,....

-- PhD Bioinformatics fellow | BRecA https://www.breca.mak.ac.ug/ Bioinformatics Associate | H3ABioNet UVRI Node https://www.h3abionet.org/nodes/uvri GitHub https://github.com/AlfredUg | ORCHID https://orcid.org/0000-0002-6549-3550 | Linkedin https://www.linkedin.com/in/alfred-ssekagiri-576746b9/ | Twitter https://twitter.com/alfred_ug