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

issues importing data- sp1, sp2 etc column added to taxonomy table #1683

Open KaraS106 opened 1 year ago

KaraS106 commented 1 year ago

Hello phyloseq-ers- I am having issues importing my data (created in QIIME2) into phyloseq. I've been really trying to figure this out on my own-but this is my last resort! Ok- so I think I have imported my ASV table into phyloseq successfully with:

ASV <- qza_to_phyloseq(features = "table.qza") asv_table= tax

My metadata (which I made in excel) looks mostly ok- however an extra column with "1, 2, 3... etc" was added. I used this code: METADATA = sample_data(metadata_poop) I'll share a screenshot of output

The trickiest part has been adding my taxonomy table- It seems like other people have ran into the same issue- when I import my table- an extra column was added with "sp1, sp2, sp3...etc"; additionally a header was added named v1, v2 v3. I was able to get rid of the v1, v2, v3 header using this code: TAX = tax_table(as.matrix(taxonomy_merge))

But the sp1, sp2 column remains! (screen shot shared) This is making merging impossible! My advisor is getting impatient with me and I really want to crack this puzzle! Any advice would be greatly appreciated. I am also fairly new to coding/bioinformatics - so you can assume that I don't know much!

Thanks pals!

Screenshot 2023-05-23 at 7 01 54 AM Screenshot 2023-05-24 at 8 11 29 AM
ycl6 commented 1 year ago

Hi @KaraS106 What the data structure like in taxonomy_merge?

The row names of the TAX table should be the same as that in your OTU/ASV table (usually the rows), and the row names of the SAMPLE table should be the same in the OTU/ASV table (usually the columns).