Thank you! Can I use this tool for nanopore sequence?
Hello, I am using cutadapt for trimming the adaptor sequences from fastq file:
I constantly get the following error:
cutadapt: error: Line 1 in FASTQ file is expected to start with '@', but found '\r\n'
Can anyone help me regarding this?
running
head -n1 myfastq.fastq | sed -n 'l' gives me
@41404e26-7b94-4142-b3a5-0ec9334993d5 runid=62c17cb4e69123bd793be3870\ 6e23549626a5271 read=33 ch=100 start_time=2017-01T14:10:44Z\r$
2 answers
\r\n is the line break used in Windows or DOS system. Maybe cutadapt doesn't support it (I didn't try).
You can use fastp to cut adapters, which can handle different kinds of line breaks (\n,\r or \r\n).
You can use fastp to preprocess your Illumina sequencing data (no matter RNASeq / DNASeq, no matter PE/SE). It can trim adapters automatically for both PE and SE data, which means that you don't have to input the adapter sequences.
Besides trimming adapters, this tool also performs quality filtering and other operations to improve your data quality. And most of the features are automated. All you have to do is to install fastp, and run:
fastp -i in.R1.fq.gz -I in.R2.fq.gz -o out.R1.fq.gz -O out.R2.fq.gz
This tool is very fast (written in C++, with multithreading supported), you can get it from: https://github.com/OpenGene/fastp
I didn't try it since I don't have such data.
Would you please send me a sample of nanopore data so that I can fit this tool for nanopore sequence?
My email: chen@haplox.com
As many Bioinformatics programs, it is complaining about text files in DOS format ("\r\n" marks a new line), those programs expects the file to be in Unix format ("\n" is the new line). You can convert your file with the Unix command dos2unix.
Log in to answer this question.