Error in fasta to fastq conversion
Hi All,
Thanks for the suggestions. I used the code from these posts to convert the fasta file into fastq.
- convert FASTA into FASTQ using linux
- BioPython: convert fasta to fastq without quality score input file
Here is a part of the original fasta file:
>cel1_count=3
TGCCTTGTCTGTCCTAAAAATC
>cel2_count=9
GTTAAGTGGGAAACGATGT
>cel3_count=7
CCGACCTTGAAATACCAC
>cel4_count=7
TAGAAATCCACTATGCTTTGG
>cel5_count=5
CGCGGGTGAGCAGCCTGGTAGCTCGTC
And the resulting fastq file:
@cel1_count=3
TGCCTTGTCTGTCCTAAAAATC
+
IIIIIIIIIIIIIIIIIIIIII
@cel2_count=9
GTTAAGTGGGAAACGATGT
+
IIIIIIIIIIIIIIIIIII
@cel3_count=7
CCGACCTTGAAATACCAC
+
IIIIIIIIIIIIIIIIII
@cel4_count=7
TAGAAATCCACTATGCTTTGG
+
IIIIIIIIIIIIIIIIIIIII
@cel5_count=5
CGCGGGTGAGCAGCCTGGTAGCTCGTC
+
IIIIIIIIIIIIIIIIIIIIIIIIIII
Using the fastq file in miRExpress, the tool returned an error: Illegal Character: IIIIIIIIII
Using the original fasta file in mirdeep2, the tool also returned an error: the first line of the file is not in accordance with fasta specification. Make sure that the file is according to specifications and does not contain whitespaces.
Is there a way to ensure that the original fasta file is checked and marked to fasta specification? I am hoping that may solve the Illegal Character issue.
Thanks!
• 2,304 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Can you post the first 20 lines of your FASTQ file? You can use
I'm sorry but Huh? OP has a FASTA file, not a FASTQ file.
He also has a FASTQ file that he got using the Perl script he linked. But miRExpress complained it had illegal characters. So wanted to see if the FASTQ file formed correctly.
Ah, I see. The part that the second tool gives an error on the fasta indicates that there are problems with the FASTA headers. I'd have asked for
grep "^>" fasta_file.fasta | head -n 20Hello Gabe Anderson!
Questions similar to yours can already be found at:
We have closed your question to allow us to keep similar content in the same thread.
If you disagree with this please tell us why in a reply below. We'll be happy to talk about it.
Cheers!
I used codes from both links you specified. I got the fasta files converted to fastq, alright. Now, I have to deal with the illegal character complain, that was why i was asking for other options. Anyway, I feel the challenge is with the original fasta file considering that the error still extist after trying two fasta conversion tools.
Is there a way to ensure that my fasta file is to standard and does not contain errors?
Thanks!
ok, I'll reopen the question but please: 1) change the title to something like: "error in fasta to fastq conversion" 2) edit the text to say that you already checked the previous solutions, and how your case is different 3) Add an example of both fastq and fasta files. Probably you just have some empty spaces in the headers or the sequence.
Thanks for the patience and good luck in finding an answer to your question.
The conversion is not the problem, but the next program, "I" should be valid for all encodings. Try to make a simple debugging fastq file with only one entry, then replace the IIIII with other characters in a text editor e.g. AAAA-zzzz.
Check that there are no other characters, e.g. whitespace or CR, check that the number of bases and quality scores is identical. Check the file encoding and change your locale to C, try to open the fastq file in other programs.