View source: R/deseq_results_into_list.R
deseq_results_into_list | R Documentation |
This function only works with categorical contrasts
deseq_results_into_list( deseq_results, trait, physeq_obj = NULL, taxon_lvls_added = "all", sort_p.val = TRUE )
deseq_results |
a |
trait |
A |
physeq_obj |
the phyloseq object you used, if any |
taxon_lvls_added |
A |
sort_p.val |
a |
A list
of pairwise contrasts based on the factor levels of the trait
variable
library(phyloseq) library(DESeq2) filepath <- system.file("extdata", "study_1457_split_library_seqs_and_mapping.zip", package="phyloseq") kostic <- microbio_me_qiime(filepath) kostic = subset_samples(kostic, DIAGNOSIS != "None") diagdds = phyloseq_to_deseq2(kostic, ~ OSH_DIAGNOSIS) # calculate geometric means prior to estimate size factors gMeans = apply(counts(diagdds), 1, function(x, na.rm=TRUE) exp(sum(log(x[x > 0]), na.rm=na.rm) / length(x))) # do the glm modelling diagdds2 = estimateSizeFactors(diagdds, geoMeans = gMeans) diagdds = DESeq(diagdds2, fitType="local") res_list_with_Phyloseq <- deseq_results_into_list(deseq_results = diagdds, trait = "OSH_DIAGNOSIS", physeq_obj = kostic, taxon_lvls_added = c("Phylum", "Class", "Genus") ) res_list_withOut_Phyloseq <- deseq_results_into_list(deseq_results = diagdds, trait = "OSH_DIAGNOSIS" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.