Sample ID in feature table and meta data not in order

A. I got this error (below) for this code

physeq <- qza_to_phyloseq(

  • features = "/Users/parikramasapkota/Desktop/CedricWind/durp_unpooled_rhizosphere/dada2_table_16S.qza",
  • tree = "/Users/parikramasapkota/Desktop/CedricWind/durp_unpooled_rhizosphere/phylogeny-align-to-tree-mafft-fasttree/rooted_tree.qza",
  • taxonomy = "/Users/parikramasapkota/Desktop/CedricWind/durp_unpooled_rhizosphere/taxonomy.qza",
  • metadata = "/Users/parikramasapkota/Desktop/CedricWind/durp_unpooled_rhizosphere/metadata16S.tsv"
  • )
    Error in validObject(.Object) : invalid class “phyloseq” object:
    Component sample names do not match.
    Try sample_names()

As I was trying to look into detail, this was the error, I didn't know how I got "sa" infront of my sample ID

Hello Parikrama,

Phyloseq does not support SampleIDs that start with numbers, so during import it adds this prefix. (GitHub issue.)

This is something Phyloseq does automatically (and without telling you :frowning_face: )

The workaround is to rename your samples so they match.

1 Like

thank you! I will try doing that.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.