# SeqID for Classifier Contain both numerical and alphabetical characters

**URL:** <https://forum.qiime2.org/t/seqid-for-classifier-contain-both-numerical-and-alphabetical-characters/9907>\
**Category:** User Support\
**Created:** [May 22, 2019, 5:02pm UTC](https://forum.qiime2.org/t/seqid-for-classifier-contain-both-numerical-and-alphabetical-characters/9907 "2019-05-22T17:02:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![aalex](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/a/eb9ed0/32.png) [@aalex](https://forum.qiime2.org/u/aalex)\
**Post date:** [May 22, 2019, 5:02pm UTC](https://forum.qiime2.org/t/seqid-for-classifier-contain-both-numerical-and-alphabetical-characters/9907/1 "2019-05-22T17:02:06Z")

</div>

> [@Plugin Error: feature-classifier classify-sklearn](https://forum.qiime2.org/t/plugin-error-feature-classifier-classify-sklearn/1532/2):
>
> Hi @callaband, You are correct, this is almost certainly an issue with your fasta file. Before importing into QIIME 2, run the following command to convert lowercase to uppercase in the fasta file: tr 'acgt' 'ACGT' \< ~/MS\_set6/reference-hit.seqs.fa \> ~/MS\_set6/reference-hit.seqs.uppercase.fa And then proceed with the import and classification commands that you wrote above. (That command assumes that the sequence IDs do not contain any lowercase acgt characters, so please check first to make …

Hello,

I noticed on the linked forum post you brought up that the solution suggested assumes that sequence ID's are solely numerical. I have run into a similar problem, but have IDs for the sequences that are both numerical and alphabetical.

How can I circumvent this? And what are the character requirements for using the classifier?

Cheers!  
Andrea

---

<div class="post-metadata">

**Author:** ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)\
**Post date:** [May 22, 2019, 5:12pm UTC](https://forum.qiime2.org/t/seqid-for-classifier-contain-both-numerical-and-alphabetical-characters/9907/2 "2019-05-22T17:12:53Z")

</div>



---

<div class="post-metadata">

**Author:** ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)\
**Post date:** [May 22, 2019, 6:13pm UTC](https://forum.qiime2.org/t/seqid-for-classifier-contain-both-numerical-and-alphabetical-characters/9907/3 "2019-05-22T18:13:35Z")

</div>

Welcome to the forum @aalex!

> [@aalex](#):
>
> How can I circumvent this?

See the awk script used in this tutorial:

> [@Fungal ITS analysis tutorial](https://forum.qiime2.org/t/fungal-its-analysis-tutorial/7351):
>
> Fungal ITS analysis, mock communities, and more fun NOTE: This tutorial was written in a QIIME 2 2018.11 environment. It is not guaranteed to work with earlier or later versions of QIIME 2. This tutorial was compiled as a working exercise for a [QIIME 2 workshop](https://workshops.qiime2.org/microbiome-bioinformatics-qiime-2-2018-12-12/) in December 2018, and does not represent the only possible fungal ITS workflow with QIIME 2, or even a benchmarked protocol recommendation. See other tutorials, e.g., the [q2-itsxpress tutorial](https://forum.qiime2.org/t/q2-itsxpress-a-tutorial-on-a-qiime-2-plugin-to-trim-its-sequences/5780) for other fungal ITS analysis options in QII…

> [@aalex](#):
>
> And what are the character requirements for using the classifier?

Uppercase valid nucleotide base codes (degenerate codes are accepted).

---

<div class="post-metadata">

**Author:** ![aalex](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/a/eb9ed0/32.png) [@aalex](https://forum.qiime2.org/u/aalex)\
**Post date:** [May 22, 2019, 8:40pm UTC](https://forum.qiime2.org/t/seqid-for-classifier-contain-both-numerical-and-alphabetical-characters/9907/4 "2019-05-22T20:40:55Z")

</div>

Thank you for responding to me so quickly!

I'm not sure the script provided aids me in the problem I am encountering, though I do think I might have miscommunicated. I am not getting the ValueError from any of my sequences, or at least, from what I could gather.

 ![12%20PM](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/7/77ae768dc7f1b5563cfc5a297b8610ef9543d8fe.png)

This is the error I have seemed to encounter, but "I" only occurs as a character in the sequence ID's, which are formatted as such:

 ![47%20PM](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/d/de92aaa5e2f408d8af3a9ad94d571025d51f269c.png)

However, if I have understood the tutorial, it is just meant to remove the presence of lowercase letters from the sequence information.

What I was thinking to do is change all characters not in the list of acceptable characters to their lowercase counterpart with respect to the sequence ID. I am uncertain if this would be sufficient to address the error, and if it would allow me to continue onwards and train the classifier.

Sorry for all this!

---

<div class="post-metadata">

**Author:** ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)\
**Post date:** [May 22, 2019, 9:17pm UTC](https://forum.qiime2.org/t/seqid-for-classifier-contain-both-numerical-and-alphabetical-characters/9907/5 "2019-05-22T21:17:27Z")

</div>

> [@aalex](#):
>
> I do think I might have miscommunicated.

Yes it looks like you are getting a distinct error message from the topic you linked to. The issue in that topic was lowercase characters in the sequence. Your issue is an invalid character "I"

> [@aalex](#):
>
> This is the error I have seemed to encounter, but “I” only occurs as a character in the sequence ID’s, which are formatted as such:

Those sequence IDs contain "1" (one) characters, not "I" (eye) characters.

> [@aalex](#):
>
> What I was thinking to do is change all characters not in the list of acceptable characters to their lowercase counterpart with respect to the sequence ID. I am uncertain if this would be sufficient to address the error, and if it would allow me to continue onwards and train the classifier.

The sequence IDs are not relevant here — do not attempt to modify these, it will not fix your problem!

Instead look for "I" characters and convert these, or maybe remove that sequence — do you have amino acid sequences in your file? Because "I" is not a degenerate nucleotide base as far as I know.

Note: you also have gaps in your sequence(s), and apparently spaces between accessions? These gaps and spaces should be removed or they will likely cause other problems.

Let us know if that helps!

---

<div class="post-metadata">

**Author:** ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)\
**Post date:** [June 23, 2019, 3:24am UTC](https://forum.qiime2.org/t/seqid-for-classifier-contain-both-numerical-and-alphabetical-characters/9907/6 "2019-06-23T03:24:56Z")

</div>

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