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

Issues merging phyloseq files- samples names do not match #1664

Closed lizzy0115 closed 1 year ago

lizzy0115 commented 1 year ago

Hi all- how do I assign the row names in map file to the SampleID sample names? Ive tried a few. different things I've read but nothing has seemed to work.

library(ape) library(ggplot2) library(phyloseq) mothur_data phyloseq-class experiment-level object otu_table() OTU Table: [ 4859 taxa and 84 samples ] tax_table() Taxonomy Table: [ 4859 taxa by 6 taxonomic ranks ] phy_tree() Phylogenetic Tree: [ 4859 tips and 4858 internal nodes ] sample_names(mothur_data) [1] "1.5" "2.1" "2.10" "2.12" "2.2" "2.3" "2.4" "2.5" "2.6" "2.7" [11] "2.8" "3.1" "3.10" "3.11" "3.12" "3.2" "3.3" "3.4" "3.5" "3.6" [21] "3.7" "3.8" "4.10" "4.11" "4.12" "4.2" "4.3" "4.4" "4.5" "4.6" [31] "4.8" "4.9" "5.10" "5.2" "5.3" "5.4" "5.5" "5.6" "5.7" "5.8" [41] "6.1" "6.10" "6.11" "6.2" "6.3" "6.4" "6.5" "6.6" "6.7" "6.8" [51] "6.9" "7.1" "7.2" "7.3" "7.4" "7.5" "7.6" "7.7" "7.8" "7.9" [61] "8.1" "8.10" "8.11" "8.12" "8.2" "8.3" "8.4" "8.5" "8.6" "8.7" [71] "8.8" "8.9" "9.10" "9.12" "9.13" "9.2" "9.3" "9.4" "9.5" "9.6" [81] "9.7" "9.8" "9.9" "NTC" sample_names(mothur_map) [1] "sa1" "sa2" "sa3" "sa4" "sa5" "sa6" "sa7" "sa8" "sa9" "sa10" [11] "sa11" "sa12" "sa13" "sa14" "sa15" "sa16" "sa17" "sa18" "sa19" "sa20" [21] "sa21" "sa22" "sa23" "sa24" "sa25" "sa26" "sa27" "sa28" "sa29" "sa30" [31] "sa31" "sa32" "sa33" "sa34" "sa35" "sa36" "sa37" "sa38" "sa39" "sa40" [41] "sa41" "sa42" "sa43" "sa44" "sa45" "sa46" "sa47" "sa48" "sa49" "sa50" [51] "sa51" "sa52" "sa53" "sa54" "sa55" "sa56" "sa57" "sa58" "sa59" "sa60" [61] "sa61" "sa62" "sa63" "sa64" "sa65" "sa66" "sa67" "sa68" "sa69" "sa70" [71] "sa71" "sa72" "sa73" "sa74" "sa75" "sa76" "sa77" "sa78" "sa79" "sa80" [81] "sa81" "sa82" "sa83" "sa84" mothur_map Sample Data: [84 samples by 4 sample variables]: SampleID Treatment Sex Parasites sa1 1.5 C U N sa2 2.1 P U N sa3 2.2 P U Y sa4 2.3 P U N sa5 2.4 P U N sa6 2.5 P U N sa7 2.6 P U N sa8 2.7 P U N sa9 2.8 P U N sa10 2.10 P U