change fastq header
2
0
Entering edit mode
7.0 years ago
reza ▴ 300

i have a fastq file that have headers like "@HWI-ST916:209:XXXX:2:1101:1104:1915 1:N:0:", Now i want to convert them like "@HWI-ST916:209:XXXX:2:1101:1104:1915/1"

how can i do it?

thanks in advance

fastq • 3.4k views
ADD COMMENT
3
Entering edit mode
7.0 years ago
Sej Modha 5.3k

You could use sed:

sed 's/ 1:N:0:/\/1/g' inputfile
ADD COMMENT
2
Entering edit mode
7.0 years ago
cut -d ' ' -f 1 input.fastq
ADD COMMENT

Login before adding your answer.

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