rescript edit-taxonomy error

Hi there!

I'm almost new qiime2 user. I'm trying to reach a good taxonomy classification for my analysis. I'm working with a classifier from gg training for the V3-V4 region... After some filtration process to remove unclassified sequences and all this stuff, I'm trying to rename some species (such as those classified as k__Bacteria; p__BRC1; c__PRR-11; o__; f__; g__; s__) with rescript edit-taxonomy. However qiimes gives me a warning: "c__PRR-11: command not found..."

Here is my script:
qiime rescript edit-taxonomy
--i-taxonomy taxonomy.qza
--p-search-strings p__BRC1; c__PRR-11; o__; f__; g__; s__
--p-replacements-strings p__ Incertae sedis; c__ Candidate; o__; f__; g__ Candidatus Sumerlaea; s__ chitinivorans
--o-edited-taxonomy taxonomy-fixed.qza

some help??

Hi @Anuka,

I assume your intent is to replace this entire string:
p__BRC1; c__PRR-11; o__; f__; g__; s__
with this entire string:
p__ Incertae sedis; c__ Candidate; o__; f__; g__ Candidatus Sumerlaea; s__,

If so, then you need to place each in quotes as follows:

qiime rescript edit-taxonomy
    --i-taxonomy taxonomy.qza \
    --p-search-strings 'p__BRC1; c__PRR-11; o__; f__; g__; s__' \
    --p-replacements-strings 'p__Incertae sedis; c__Candidate; o__; f__; g_Candidatus Sumerlaea; s__chitinivorans' \
    --o-edited-taxonomy taxonomy-fixed.qza

Otherwise it will try and replace each search string (separated by a space) with its corresponding string in the replacement string list. That is 'p__BRC1; will be replaced by 'p__Incertae sedis;, and so on....

Note any taxonomic labels that contain spaces should be encapsulated in quotes. That is, if you really wanted to replace p__BRC1 with p__Incertae sedis and g__ with g__Candidatus Sumerlaea, then you'd enter the following:

    --p-search-strings 'p__BRC1' 'g__' \
    --p-replacements-strings 'p__Incertae sedis' 'g__Candidatus Sumerlaea' \

Give this a try and let us know if it works. :slight_smile:


Hi!! I tried and it worked!! I also tried by a tsv file to change some names at the same time and it also worked using the whole entire string.

Thank you so much!!!

1 Like

:tada: I'm glad you got it to work! :raised_hands:

1 Like

It would be useful if the --help message would include this because it's also not mentioned in Processing, filtering, and evaluating the SILVA database (and other reference sequence data) with RESCRIPt :wink:

If a string with a space is provided via --m-replacement-map-file, does that work because the delimiter is automatically recognized as a tab instead or what happens?


1 Like

Ohh good catch! :softball: We'll work on incorporating this in the next release! I've added this example into the tutorial.

Yes the tab should be recognized as the delimiter when using the metadata file. If entering on the command line, you should be able to encapsulate each separate string in single-quotes.

1 Like