how to change fastq header??
1
0
Entering edit mode
5.6 years ago
ngs_star • 0

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 • 4.3k views
ADD COMMENT
2
Entering edit mode

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 REPLY
0
Entering edit mode
5.6 years ago
ngs_star • 0

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 COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 1306 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