Fastx_toolkit with nanopore data
Hi, I am trying to convert a fastq file (containing multiple sequences) to a fasta file using fastx_toolkit (Hannon lab). However I get this error message:
fastq_to_fasta: Error: invalid quality score data on line 68 (quality_tok = "ATATGCGTGCCATTG...etc)
I notice on another thread that you can put -Q33 to tell it you are using Illumina quality scores. Does anyone know if there is an equivalent flag to tell it I am using nanopore data?
If not can anyone recommend another way to convert these files?
Thank you!
• 5,262 views
•
link
1 answer
You can easily do that conversion using biopython:
from Bio import SeqIO
count = SeqIO.convert("input.fastq", "fastq", "output.fasta", "fasta")
print("Converted %i records" % count)
• 0 views
•
link
Log in to answer this question.
I think that this package could to what you want:
https://poretools.readthedocs.io/en/latest/index.html
It has a function called poretools fasta
You could try
Q33with Nanopore data which I am sure uses sanger fastq format.You could also use
reformat.sh in=your.fastq out=your.fastafrom BBMap suite to achieve the same result.Edit: If you are using FAST5 format files as input then use poretools as suggested by Iñigo Prada .
You might have to add
qin=33to thereformat.shmaking itreformat.sh qin=33 in=your.fastq out=your.fastaotherwise you might getWarning! Changed from ASCII-33 to ASCII-64 on input ;: 59 -> 28.