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/
577 stars 187 forks source link

Is it required to rarefy data before plotting beta diversity #1144

Open bioinfonext opened 5 years ago

bioinfonext commented 5 years ago

Hi,

could you please advise, should I rarefy data for plotting beta diversity? I read that for alpha diversity is it not needed.

spholmes commented 5 years ago

Please see the paper https://www.ncbi.nlm.nih.gov/pubmed/24699258

it is better to make a data transformation along the lines of the one done by DESeq2 or other generalized logs than rarefying.

On Mon, May 13, 2019 at 7:29 AM yogeshgupt notifications@github.com wrote:

Hi,

could you please advise, should I rarefy data for plotting beta diversity? I read that for alpha diversity is it not needed.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/joey711/phyloseq/issues/1144?email_source=notifications&email_token=AAJFZPKZPAIBGH7NLATKOGLPVF3MTA5CNFSM4HMQMQD2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GTOHI6Q, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJFZPIJNIDKUAVA2OLUMHTPVF3MTANCNFSM4HMQMQDQ .

-- Susan Holmes John Henry Samter Fellow in Undergraduate Education Professor, Statistics 2017-2018 CASBS Fellow, Sequoia Hall, 390 Serra Mall Stanford, CA 94305 http://www-stat.stanford.edu/~susan/

bioinfonext commented 5 years ago

Thanks a lot Prof. Susan.

bioinfonext commented 5 years ago

Hi Prof. Susan,

For beta diversity, you suggest to use vst normalisation method from DESeq2, but it is showing some error, could you please suggest what is the mistake I am doing here:

dds = phyloseq_to_deseq2(physeq, ~ Treatment) vsd <- vst(dds, blind=FALSE,fitType='local') pcoa.mds.uwuni <- ordinate(physeq = vsd, method = "PCoA", distance="unifrac",, weighted=FALSE) Error in ordinate(physeq = vsd, method = "PCoA", distance = "unifrac", : Expected a phyloseq object or otu_table object.

spholmes commented 5 years ago

Yogesh You are not obtaining a phyloseq object from your commands and you cannot combine vsn and unifrac (you should use vsn with manhattan or other distances). You should see previous issues on github about this problem: https://github.com/joey711/phyloseq/issues/492 https://github.com/joey711/phyloseq/issues/445

You can use simple proportions and Bray Curtis for some tasks if the library depths are similar.

You should use a more sophisticated methods such as the Bayesian Factor Analysis https://arxiv.org/abs/1601.05156 if you have unequal depths and want uncertainties.

Using NMDS (nonmetric MDS) on any distance or

rank thesholded data (as in the F1000Research paper) followed by PCA are the most robust approach. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4955027/ Different tasks require different levels of power and precision.

Best of luck, Susan

On Wed, May 15, 2019 at 7:50 AM yogeshgupt notifications@github.com wrote:

Hi Prof. Susan,

For beta diversity, you suggest to use vsd normalisation method from DESeq2, but it is showing some error, could you please suggest what is the mistake I am doing here:

dds = phyloseq_to_deseq2(physeq, ~ Treatment) vsd <- vst(dds, blind=FALSE,fitType='local') pcoa.mds.uwuni <- ordinate(physeq = vsd, method = "PCoA", distance="unifrac",, weighted=FALSE) Error in ordinate(physeq = vsd, method = "PCoA", distance = "unifrac", : Expected a phyloseq object or otu_table object.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/joey711/phyloseq/issues/1144?email_source=notifications&email_token=AAJFZPMTVAEKEZ5KWKLNFDLPVQPNHA5CNFSM4HMQMQD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVO5HOA#issuecomment-492688312, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJFZPIOQAD6ZUZ3LQS33LLPVQPNHANCNFSM4HMQMQDQ .

-- Susan Holmes John Henry Samter Fellow in Undergraduate Education Professor, Statistics 2017-2018 CASBS Fellow, Sequoia Hall, 390 Serra Mall Stanford, CA 94305 http://www-stat.stanford.edu/~susan/