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:
Hi all, I am trying to do something that should be really easy, but I can't figure out how to do it.
I have my phyloseq object and I want to extract only few samples and with them I want to create another phyloseq object (because I want to make some plot with only these specific samples and it seems to me the only way to do it).
Hi all, I am trying to do something that should be really easy, but I can't figure out how to do it.
I have my phyloseq object and I want to extract only few samples and with them I want to create another phyloseq object (because I want to make some plot with only these specific samples and it seems to me the only way to do it).
So I tried:
new_phy_obj <- prune_samples(sample_names(df_with_all_samples) == c("sampletosubset1", "sampletosubset2", "sampletosubset3"), df_with_all_samples)
But I got this message: Error in validObject(.Object) : invalid class “otu_table” object: OTU abundance data must have non-zero dimensions.
I also tried: samples_to_subset <- c("sampletosubset1", "sampletosubset2", "sampletosubset3") new_phy_obj <- prune_samples(samples_to_subset, df_with_all_samples)
And I tried many other ways, but I always get the same message.
Could somebody help me?
Thanks a lot,