# RESCRIPt - missing sequences or mis-formatted taxonomies?

**URL:** <https://forum.qiime2.org/t/rescript-missing-sequences-or-mis-formatted-taxonomies/21068>\
**Category:** Library Support\
**Tags:** rescript, taxonomy\
**Created:** [October 14, 2021, 5:50pm UTC](https://forum.qiime2.org/t/rescript-missing-sequences-or-mis-formatted-taxonomies/21068 "2021-10-14T17:50:43Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![SoilRotifer](https://forum.qiime2.org/user_avatar/forum.qiime2.org/soilrotifer/32/21071_2.png) [@SoilRotifer](https://forum.qiime2.org/u/SoilRotifer)\
**Post date:** [October 14, 2021, 7:48pm UTC](https://forum.qiime2.org/t/rescript-missing-sequences-or-mis-formatted-taxonomies/21068/3 "2021-10-14T19:48:49Z")

</div>

Very good questions @ctekellogg! 🥇

> [@ctekellogg](#):
>
> `grep -c taxonomy.tsv -e Copepoda`  
> 51
> 
> `zgrep -c taxmap_slv_ssu_ref_138.1.txt.gz -e Copepoda`  
> 1821
> 
> Sooo..... despite having the same _total_ number of sequences, for some reason a whole host of copepod sequences are either missing or perhaps their taxonomies aren't parsed correctly and thus falsely appear to be missing.

🤔 There are a couple of reasons for this apparent disparity:

1. The command you ran will by default only write-out a 7-rank taxonomy. That is: `domain, phylum, class, order, family, genus`. Although rank-propagation is on by default, the ranks written out at the end of the pipeline may not include those intervening ranks with the label `Copepoda`. _That is what is happening in this case. See below._ ⚠
  - You can specify which ranks you'd like to download by using the `--p-ranks` flag. That is, we can list all SILVA available ranks like so: `--p-ranks domain superkingdom kingdom subkingdom superphylum phylum subphylum infraphylum superclass class subclass infraclass superorder order suborder superfamily family subfamily genus`. 🗒

2. Somewhat related, if you were to use the pre-generated files from the [Data resources page](https://docs.qiime2.org/2021.8/data-resources/) there might be more inconsistencies due to the SILVA data used (NR99) and the QA/QC approach we took. For the sake of completeness for future readers the general example pipeline is [here](https://forum.qiime2.org/t/processing-filtering-and-evaluating-the-silva-database-and-other-reference-sequence-data-with-rescript/15494). 🚧

To sanity check that the parsing is working as expected I ran the commands below. _Note: added `--p-no-download-sequences` to save time by not downloading the sequences. The resulting seq file will be empty._

```auto
qiime rescript get-silva-data \
    --o-silva-sequences all-rank-full-silva-138-1-seqs.qza \
    --o-silva-taxonomy all-rank-full-silva-138-1-tax.qza \
    --p-ranks domain superkingdom kingdom subkingdom superphylum phylum subphylum infraphylum superclass class subclass infraclass superorder order suborder superfamily family subfamily genus \
    --p-include-species-labels 
    --p-target SSURef \
    --p-no-download-sequences 

qiime tools export \
    --input-path all-rank-full-silva-138-1-tax.qza \
    --output-path all-rank-full-silva-138-1-tax-export

grep -c all-rank-full-silva-138-1-tax-export/taxonomy.tsv -e Copepoda
1821

```

As you can see, all the Copepoda data is indeed captured and parsed by RESCRIPt as in your grep example (1821 sequences). You just have to specify the ranks you want to write out to file. Different reference databases by go by various rules, and list groups like `Copepoda` under different ranks. SILVA lists `Copepoda` under the sub-class (cs\_\_), infra-class (ci\_\_), and super-order (so\_\_), _e.g._:

> KF130106.1.1774 d\_\_Eukaryota; sk\_\_Holozoa; k\_\_Animalia; ks\_\_Animalia; sp\_\_Ecdysozoa; p\_\_Arthropoda; ps\_\_Crustacea; pi\_\_Crustacea; sc\_\_Crustacea; c\_\_Maxillopoda; cs\_\_Copepoda; ci\_\_Copepoda; so\_\_Copepoda; o\_\_Monstrilloida; os\_\_Monstrilloida; sf\_\_Monstrilloida; f\_\_Monstrilloida; fs\_\_Monstrilloida; g\_\_Monstrilloida; s\_\_uncultured\_eukaryote
> 
> AF530545.1.1712 d\_\_Eukaryota; sk\_\_Holozoa; k\_\_Animalia; ks\_\_Animalia; sp\_\_Ecdysozoa; p\_\_Arthropoda; ps\_\_Crustacea; pi\_\_Crustacea; sc\_\_Crustacea; c\_\_Maxillopoda; cs\_\_Copepoda; ci\_\_Copepoda; so\_\_Copepoda; o\_\_Siphonostomatoida; os\_\_Siphonostomatoida; sf\_\_Siphonostomatoida; f\_\_Siphonostomatoida; fs\_\_Siphonostomatoida; g\_\_Siphonostomatoida; s\_\_Copepoda\_environmental

As you can see from the extracted taxonomic examples above... the information was there all along, but not available within the standard 7-rank taxonomy output. So, just set the ranks you want 🤯

_Note: the more rank information you keep the longer it'll take to make your classifier, and it'll be larger too._

I hope this helps. 🙂

---

_[View the full topic](https://forum.qiime2.org/t/rescript-missing-sequences-or-mis-formatted-taxonomies/21068)._
