Error Cutadapt: FASTQ file is expected to start with '@
5
0
Entering edit mode
8.8 years ago
pingEde ▴ 40

Hello, I am trying to use cutadapt in order to remove my adaptor, but it reports:

error: Line 1 in FASTQ file is expected to start with '@', but found '\n'

The head of my file is:

@SRR1688545.1.1 1 length=28
AACTATGCCGACTAGGGATCGGGTGGTG
+SRR1688545.1.1 1 length=28
CCCFFFFFHHHHHJJJJJJJJJJHIJJJ
@SRR1688545.2.1 2 length=31
TGCCAAGGACGTTTTCATTAATCAAGAACGA
+SRR1688545.2.1 2 length=31
CCCFFFFFHHHHHJJJJJJJJJJJJJJJJJI

How to make the fastq file usable for cutadapt?

Thank you in advance

fastq cutadapt • 9.0k views
ADD COMMENT
0
Entering edit mode

what the output of head -n1 your.fastq or gunzip -c your.fastq.gz | head -n 1

ADD REPLY
0
Entering edit mode

the output is: @SRR1688545.1.1 1 length=28

I use this dataset http://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?exp=SRX793383&cmd=search&m=downloads&s=seq

thank you for your help

ADD REPLY
0
Entering edit mode

I'm having same error.. the output is: @SRR4042503.1.1 1 length=51 can you suggest what can be done ?

And for another fastq file it shows: "BZh91AY&SY??F?A?????????? h??]0??R$4( 8@ej]??5?$?M?Q}?ABAB???P?(@ ?" I have just uncompressed them after downloading from the databases.

ADD REPLY
0
Entering edit mode

what is the output of head -n1 RB.fastq | sed -n 'l'

with this sed command, you'll display all special characters (e.g. \t,\n,\r).

ADD REPLY
0
Entering edit mode

I am sorry but I did not see your response. the output is: @SRR1688545.1.1 1 length=28$

why there is the characters "$"?

ADD REPLY
0
Entering edit mode

It is the symbol for the standard line break. So far, everything seems to be OK. I thought it might be a problem with for instance a carriage return (how line breaks are coded in Windows).

ADD REPLY
0
Entering edit mode

Hi! I am getting the same error as noe:

cutadapt: error: Line 1 in FASTQ file is expected to start with '@', but found '\n'

However, my file was always in fastq format and was not converted from sra or any other format, so I don't think that's the issue.

head -n1 your.fastq this gives me @HS3:635:H2LMVBCXX:1:1101:3109:1994 2:N:0:ACAGTG

head -n1 RB.fastq | sed -n 'l gives me @HS3:635:H2LMVBCXX:1:1101:3109:1994 2:N:0:ACAGTG$

Any ideas?

ADD REPLY
0
Entering edit mode

Can you show us the command you used?

ADD REPLY
0
Entering edit mode

cutadapt --adapter CTGTAGGCACCATCAAT --error-rate 0.1 --minimum-length 15 --overlap 1 RB.fastq --output output.fastq

ADD REPLY
0
Entering edit mode

You might have the a file with non-ASCII character encoding. What is the output of the file command?

ADD REPLY
0
Entering edit mode
8.8 years ago
amango ▴ 10

Could be a few things, but are you sure the first line is not blank? Make sure the @ is the very first character of the file.

It's hard to tell what your file looks like from the format of your post, but the line starting "+SRR..." should not be on the same line as the sequence ("AACTA...").

ADD COMMENT
0
Entering edit mode
8.8 years ago
pingEde ▴ 40

Could it be a problem of the conversione from sra to fastq?

ADD COMMENT
0
Entering edit mode
8.8 years ago
gangireddy ▴ 160

Have you tried placing input file at the end of the command like

cutadapt --adapter CTGTAGGCACCATCAAT --error-rate 0.1 --minimum-length 15 --overlap 1 --output output.fastq RB.fastq

ADD COMMENT
0
Entering edit mode
8.8 years ago
pingEde ▴ 40

I used this command many times and I had not problem... I think that the problem is in the fastq

ADD COMMENT
0
Entering edit mode
8.8 years ago
pingEde ▴ 40

After the download of the sra file and the conversion in fastq, cutadapat worked!

ADD COMMENT

Login before adding your answer.

Traffic: 2118 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6