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
How to test abundance difference #951
Comments
If you are looking for differential abundance of all OTUs, I recommend that you try using the DAtest (github.com/Russel88/DAtest). It is easy to use and has a very thorough description. Regards, |
Following the standard differential abundance methods inspired from RNA-seq
studies, you can use DESeq2
see the tutorial here:
http://joey711.github.io/phyloseq-extensions/DESeq2.html
…On Sun, Jun 3, 2018 at 11:54 AM, Dandydane ***@***.***> wrote:
Library phyoloseq Data= Globalpatterns
GP = filter_taxa(GlobalPatterns, function(x) sum(x > 3) > (0.2*length(x)),
TRUE)
Define a human versus non-human categorical variable, and add this new
variable to sample data:
sample_data(GP)$human = factor( get_variable(GP, "SampleType") %in%
c("Feces", "Mock", "Skin", "Tongue") )
Standardize abundances to the median sequencing depth
total = median(sample_sums(GP))
standf = function(x, t=total) round(t * (x / sum(x)))
gps = transform_sample_counts(GP, standf)
Filter the taxa using a cutoff of 3.0 for the Coefficient of Variation
gpsf = filter_taxa(gps, function(x) sd(x)/mean(x) > 3.0, TRUE)
Subset the data to Bacteroidetes, used in some plots
gpsfb = subset_taxa(gpsf, Phylum=="Bacteroidetes")Plotting the the data
title = "plot_bar; Bacteroidetes-only"
plot_bar(gpsfb, "SampleType", "Abundance", title=title)
Question: What code do i need to write, to test difference in abundance of
Bacteroidetes for specific sampletype like feces with ect ANOVA with
current example?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#951>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABJcvfFMG4jHWbW6ewWGQ0RzHepQWjnUks5t5DD5gaJpZM4UYMZf>
.
--
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/
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Library phyoloseq Data= Globalpatterns
GP = filter_taxa(GlobalPatterns, function(x) sum(x > 3) > (0.2*length(x)), TRUE)
Define a human versus non-human categorical variable, and add this new variable to sample data:
sample_data(GP)$human = factor( get_variable(GP, "SampleType") %in% c("Feces", "Mock", "Skin", "Tongue") )
Standardize abundances to the median sequencing depth
Filter the taxa using a cutoff of 3.0 for the Coefficient of Variation
gpsf = filter_taxa(gps, function(x) sd(x)/mean(x) > 3.0, TRUE)
Subset the data to Bacteroidetes, used in some plots
gpsfb = subset_taxa(gpsf, Phylum=="Bacteroidetes")
Plotting the the dataQuestion: What code do i need to write, to test difference in abundance of Bacteroidetes for specific sampletype like feces with ect ANOVA with current example?
The text was updated successfully, but these errors were encountered: