# Importing sequence data with lower-case nucleotide characters. Constructing an RDP classifier as an example.

**URL:** https://forum.qiime2.org/t/importing-sequence-data-with-lower-case-nucleotide-characters-constructing-an-rdp-classifier-as-an-example/25158
**Category:** Community Contributions
**Tags:** taxonomy, feature-classifier, lower-case, sequences, rdp, import, rescript
**Created:** [January 6, 2023, 6:42pm UTC](https://forum.qiime2.org/t/importing-sequence-data-with-lower-case-nucleotide-characters-constructing-an-rdp-classifier-as-an-example/25158 "2023-01-06T18:42:48Z")
**Posts on this page:** 2
**Page:** 1

<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: [January 6, 2023, 6:42pm UTC](https://forum.qiime2.org/t/importing-sequence-data-with-lower-case-nucleotide-characters-constructing-an-rdp-classifier-as-an-example/25158/1 "2023-01-06T18:42:48Z")

</div>

Using `qiime2-2022.11` or later, we can now import DNA and RNA sequence files that contain lower-case sequence characters. Upon import, these nucleotide bases will be converted to the standard upper-case [IUPAC format](https://en.wikipedia.org/wiki/International_Union_of_Pure_and_Applied_Chemistry#Amino_acid_and_nucleotide_base_codes), using the new `MixedCase*` import formats. A few examples of which are listed below:

- `MixedCaseAlignedDNAFASTAFormat`
- `MixedCaseAlignedRNAFASTAFormat`
- `MixedCaseDNAFASTAFormat`
- `MixedCaseRNAFASTAFormat`

**Example use case: The Ribosomal Database Project ([RDP](https://sourceforge.net/projects/rdp-classifier/))**  
We'll import a recent version of the RDP SSU reference files, which have been generally pre-formatted for QIIME, and are available [here](https://sourceforge.net/projects/rdp-classifier/files/RDP_Classifier_TrainingData/). Specifically, the `RDPClassifier_16S_trainsetNo19_QiimeFormat.zip` file.

In the past, it was not possible to natively import these files into :qiime2:, as they contain lower-case nucleotide characters. We can now do so, following the procedure below:

**Download and unzip file** 📥  
_Note different platforms may use slightly different command for unzipping._

```auto
wget https://sourceforge.net/projects/rdp-classifier/files/RDP_Classifier_TrainingData/RDPClassifier_16S_trainsetNo19_QiimeFormat.zip

unzip RDPClassifier_16S_trainsetNo19_QiimeFormat.zip

cd RDPClassifier_16S_trainsetNo19_QiimeFormat

```

**Import representative sequence file** ◀  
_Use the appropriate file paths to your download location._

```auto
 qiime tools import \
    --input-path RefOTUs.fa \
    --output-path rdp_ref_seqs.qza \
    --type 'FeatureData[Sequence]' \
    --input-format 'MixedCaseDNAFASTAFormat'

```

**Import taxonomy file** ◀  
_Use the appropriate file paths to your download location._

```auto
qiime tools import \
    --input-path Ref_taxonomy.txt \
    --output-path rdp_ref_taxonomy.qza \
    --type 'FeatureData[Taxonomy]' \
    --input-format 'HeaderlessTSVTaxonomyFormat'

```

🏗 From here you can make use of [RESCRIPt](https://github.com/bokulich-lab/RESCRIPt), for any further reference sequence and taxonomy curation (_e.g._ extract a specific amplicon region). For now we'll just skip to making our RDP classifier.

**Let's train our RDP classifier** \*🚆 \*

```auto
qiime feature-classifier fit-classifier-naive-bayes \
    --i-reference-reads rdp_ref_seqs.qza \
    --i-reference-taxonomy rdp_ref_taxonomy.qza \
    --o-classifier rdp_classifier.qza 

```

There you go!

* * *

For more information, please see [RDP Staff](https://github.com/rdpstaff) and please cite the following:

- Wang, Q., G. M. Garrity, James M. Tiedje, and J. R. Cole. 2007. “Naive Bayesian Classifier for Rapid Assignment of rRNA Sequences into the New Bacterial Taxonomy.” _Applied and Environmental Microbiology_ 73 (16): 5261–67. [http://dx.doi.org/10.1128/AEM.00062-07](http://dx.doi.org/10.1128/AEM.00062-07)
- Wang, Qiong, and James R. Cole. 2024. “Updated RDP Taxonomy and RDP Classifier for More Accurate Taxonomic Classification.” _Microbiology Resource Announcements_, e0106323. [https://doi.org/10.1128/mra.01063-23](https://doi.org/10.1128/mra.01063-23)

If you curate with RESCRIPt:

- Robeson, Michael S., 2nd, Devon R. O’Rourke, Benjamin D. Kaehler, Michal Ziemski, Matthew R. Dillon, Jeffrey T. Foster, and Nicholas A. Bokulich. 2021. “RESCRIPt: Reproducible Sequence Taxonomy Reference Database Management.” _PLoS Computational Biology_ 17 (11): e1009581.  
[RESCRIPt: Reproducible sequence taxonomy reference database management](http://dx.doi.org/10.1371/journal.pcbi.1009581)

Happy :qiime2: -ing!

---

<div class="post-metadata">

### Author: ![crusher083](https://forum.qiime2.org/user_avatar/forum.qiime2.org/crusher083/32/9597_2.png) [@crusher083](https://forum.qiime2.org/u/crusher083)
#### Post date: [March 28, 2023, 1:28pm UTC](https://forum.qiime2.org/t/importing-sequence-data-with-lower-case-nucleotide-characters-constructing-an-rdp-classifier-as-an-example/25158/3 "2023-03-28T13:28:45Z")

</div>

An off-topic reply has been split into a new topic: [`MixedCaseDNAFASTA` not found](https://forum.qiime2.org/t/mixedcasednafasta-not-found/25946)

Please keep replies on-topic in the future.
