This is a test version of Biostars. For the public version, visit https://www.biostars.org.
change fastq header

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

2 answers

You could use sed:

sed 's/ 1:N:0:/\/1/g' inputfile
cut -d ' ' -f 1 input.fastq

Log in to answer this question.