Change ASV ID´s to SILVA´s

Hello,

I want to know if there’s a way to change my ASV´s ID´s for SILVA lD´s, I mean instead of labels like this ¨1e9af8da3c23804218b7f4bbc800ddb7¨, change it for SILVA taxonomy id´s (AACY020397599) corresponding my taxonomy.

Thank you in advance.

Hi!
I don’t think that you can do it inside of the Qiime2, but with some knowledge of Python it can be done after taxonomic classification. So you will need first to obtain all IDs from Silva database. The IDs can be found in, for exmaple
/SILVA_132_QIIME_release/taxonomy/16S_only/99/taxonomy_7_levels.txt
After it you can modify you table.qza by unpacking it and converting to csv table, and replace hashes by IDs. But you will get an error if you will try to convert it back into biom format since you will have repeated IDs (several ASVs can be assigned to the same taxa), so you will need also attach to IDs some unique names, you can use hashes or partial hashes.
To run analysis in Qiime with modified table you will need also to modify in similar way taxonomy.qza and rep-seqs.qza files. On this step it is important to make sure that names are identical in all files.

1 Like

the issue is that ASVs and SILVA IDs will not be perfectly synonymous, so there is no way to directly convert.

HOWEVER, it sounds like maybe what you are looking for is closed-reference OTU clustering. This will cluster your ASVs with the reference sequences with which they are most similar, within a certain % identity. The output will consist of a table of SILVA OTU IDs and their abundances in each sample, instead of ASV IDs, and you can then use the SILVA reference sequences, taxonomy, and tree for downstream analysis. You should set the same % identity as the OTU identity threshold used to cluster the reference sequences (e.g., SILVA 97% OTUs), and use the consensus taxonomy for those OTUs.

You can find a closed-ref OTU clustering tutorial here: https://docs.qiime2.org/2019.7/tutorials/otu-clustering/#closed-reference-clustering

1 Like