Phyloseq: How to add sample table to phyloseq object
0
0
Entering edit mode
Brian Smith ▴ 120
@brian-smith-6197
Last seen 4.1 years ago
United States

Hi,

My QIIME biom output only has OTU and taxa tables (see below). How can I add a sample_table to my phyloseq object?

thanks!

 

> myboject = import_biom(biomfile, parseFunction = parse_taxonomy_greengenes)

> myobject

phyloseq-class experiment-level object

otu_table()   OTU Table:         [ 3576 taxa and 132 samples ]

tax_table()   Taxonomy Table:    [ 3576 taxa by 7 taxonomic ranks ]

phyloseq sample_table phyloseq • 4.9k views
ADD COMMENT
0
Entering edit mode

Perhaps 4.7 years late but here is the answer to your question:

myobject@samdata <- sampledata(metadata)

where metadata is, of course, your metadata (sample data) previously imported into your R session and properly formated. This metadata file must have the names of the samples as row names, and the samples order must match the exact same order from your OTU/taxa table.

Oscar.

ADD REPLY

Login before adding your answer.

Traffic: 623 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6