Question: Error Cutadapt: FASTQ file is expected to start with '@
0
gravatar for pingEde
2.4 years ago by
pingEde20
European Union
pingEde20 wrote:

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

ADD COMMENTlink modified 2.4 years ago by Michael Dondrup44k • written 2.4 years ago by pingEde20

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

ADD REPLYlink modified 2.4 years ago • written 2.4 years ago by Pierre Lindenbaum111k

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 REPLYlink written 2.4 years ago by pingEde20

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 REPLYlink written 2.4 years ago by michael.ante2.6k

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 REPLYlink written 2.4 years ago by pingEde20

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 REPLYlink written 2.4 years ago by michael.ante2.6k

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 REPLYlink written 23 months ago by Katie D0

Can you show us the command you used?

ADD REPLYlink written 2.4 years ago by James Ashmore2.5k

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

ADD REPLYlink written 2.4 years ago by pingEde20

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

ADD REPLYlink written 2.4 years ago by Matt Shirley8.5k
0
gravatar for amango
2.4 years ago by
amango10
amango10 wrote:

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 COMMENTlink written 2.4 years ago by amango10
0
gravatar for pingEde
2.4 years ago by
pingEde20
European Union
pingEde20 wrote:

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

ADD COMMENTlink written 2.4 years ago by pingEde20
0
gravatar for gangireddy
2.4 years ago by
gangireddy160
gangireddy160 wrote:

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 COMMENTlink modified 2.4 years ago • written 2.4 years ago by gangireddy160
0
gravatar for pingEde
2.4 years ago by
pingEde20
European Union
pingEde20 wrote:

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

ADD COMMENTlink written 2.4 years ago by pingEde20
0
gravatar for pingEde
2.4 years ago by
pingEde20
European Union
pingEde20 wrote:

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

ADD COMMENTlink written 2.4 years ago by pingEde20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1861 users visited in the last hour