Modifying FASTQ header
My FASTQ header:
Desired FASTQ header:
There are two steps I wish to perform, the first is to remove the extra Illumina details after the ' 1', the second is to convert ' 1' to '/1'.
Are there any programs available that can do this? I have looked at Seqkit and FASTX-Toolkit, neither do what I am after.
I have considered using sed commands, with the regex
:N:0:\w+\+\w+ Is there a better command?
Using BBMap suite:
$ more test.fq
$ reformat.sh -Xmx2g in=test.fq out=stdout.fq trd=t | reformat.sh -Xmx2g in=stdin.fq out=final.fq addslash=t int=f
replace test.fq with your own file.
seqkit replace -p "(^\S+)\s([0-9]+).+" -r '$1/$2' file.fastq
I think there is no right or wrong with your
:N:0:\w+\+\w+, if it works, then just use it.
- you might want to use
[ATCG]+ instead of
- you can add
$ at the end for anchoring
Traffic: 1526 users visited in the last hour