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

Merging metadata with otu table in a phyloseq object #1628

Open lynneitelson opened 1 year ago

lynneitelson commented 1 year ago

Hi!

when i make a phyloseq object like this:

``ps2 <- phyloseq(otu_table(seqtab, taxa_are_rows=FALSE), tax_table(taxa1))"

It works just fine and by using "sample_names" i see that the names are 1,2,3,4,mock,ng

image

When i add my metadata the following error occurrs:

``ps2 <- phyloseq(sample_data(metadata),otu_table(seqtab, taxa_are_rows=FALSE), tax_table(taxa1))"

image

The sa metadata_ps.csv The sample names of the original phyloseq object and the metadata are the same so i can't seem to figure out the problem.

metadata_ps.csv

Thankyou,

Lynne

gmteunisse commented 1 year ago

Hi Lynne, some general things you can check are:

If you want more tailored advice, I recommend you to also upload a partial otu_table and tax_table, so we can see where the problem might occur.