Question: how to change fastq header??
0
gravatar for ngs_star
23 months ago by
ngs_star0
USA
ngs_star0 wrote:

Hello. I have a fastq file with this header.

@HISEQ:209:C7FUUANXX:2:1101:1265:83081/1
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
@HISEQ:209:C7FUUANXX:2:1101:1279:58268/1
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

But I need to add "1:N:0:13" to the read descriptor so it looks like this. How can I add this to every line that starts with @HISEQ? Thanks.

@HISEQ:209:C7FUUANXX:2:1101:1265:83081/1 1:N:0:13
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

@HISEQ:209:C7FUUANXX:2:1101:1279:58268/1 1:N:0:13
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
fastq header • 1.3k views
ADD COMMENTlink modified 23 months ago • written 23 months ago by ngs_star0
2

What have you tried? How well do you know sed? Please show us you have invested at least some effort in the task as well as in drafting this post.

Please use the formatting bar (especially the code option) to present your post better. I've done it for you this time.
code_formatting

ADD REPLYlink modified 23 months ago • written 23 months ago by RamRS28k
0
gravatar for ngs_star
23 months ago by
ngs_star0
USA
ngs_star0 wrote:

Hi Ram. I googled myself for a couple of hours and I think I got it. Here is what I used.

Find a line that starts with @HISEQ and add " 1:N:0:13" to the end of that line. There is a space included.

sed -i '/^@HISEQ/ s/$/ 1:N:0:13/' filename.fastq

the output of this command was

@HISEQ:209:C7FUUANXX:2:1101:1265:83081/1 1:N:0:13
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@HISEQ:209:C7FUUANXX:2:1101:1279:58268/1 1:N:0:13
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ADD COMMENTlink written 23 months ago by ngs_star0

Is this the original fastq file? Your SEQ (line1) and QUAL (line3) are of different length.

ADD REPLYlink modified 23 months ago • written 23 months ago by ATpoint36k

Likely just a fake example that OP typed up. Must have gone overboard with the qual line :-)

ADD REPLYlink written 23 months ago by genomax87k
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: 1798 users visited in the last hour