bowtie2 icon indicating copy to clipboard operation
bowtie2 copied to clipboard

HD header line should include "GO:query" field

Open eboyden opened this issue 3 years ago • 2 comments

Bowtie2 (2.4.4) outputs the @HD line in the header as follows:

@HD VN:1.0 SO:unsorted

Many downstream tools e.g. fgbio require query-grouped / name-collated reads but rely on the @HD header line to determine this, and it would be great to not have to unnecessarily resort (or manually modify this line). Since PE alignments are necessarily query-grouped, would it be possible to add the GO:query field to this line (and accordingly update VN to 1.5 or later to support this)?

eboyden avatar Dec 14 '21 18:12 eboyden

Thank you for your suggestion, I have made the change as and pushed it to the bug_fixes branch for testing.

@HD	VN:1.5	SO:unsorted	GO:query
@SQ	SN:gi|9626243|ref|NC_001416.1|	LN:48502
@PG	ID:bowtie2	PN:bowtie2	VN:2.4.4	CL:"/bowtie2/bowtie2-align-s -x example/index/lambda_virus example/reads/longreads.fq -u1"
r1	16	gi|9626243|ref|NC_001416.1|	12259	42	194M	*	0	0	GGGCCGCCATTGATGCGAAAAGCCGGGGGCTGACTGACCGGCAGGCAGAACGGGAAGCCACGGAACAGCGCCTGAAGGAACAGTATGGCGATAATCCGCTGGCGCTGAATAACGTCGTGTCAGAGCAGAAAAAGACCTGGGCGGCTGAAGACCAGCTTCGCGGGAACTGGATGGCAGGCCTGAAGTCCGGCTGG	8+25;+39E.:<73=(@*.6AH0;>1%20$EH/-.4A<.1-F8:<:1>A029F3";&AE#**E6;H5@2)-+B.7,49AF#,,",B!959=-1.E-&0%(@=&AB19A03))@+6/44D&?")>!6B#2=C,612/7,=+8,A&14+$&,(B66*(BDH79$"27!3<H=A4/71)4:)0>4/*>-@3,E%&%7	AS:i:-3	XN:i:0	XM:i:1	XO:i:0	XG:i:0	NM:i:1	MD:Z:116A77	YT:Z:UU

ch4rr0 avatar Jan 05 '22 16:01 ch4rr0

Yes, this seems to work as intended. Thanks!

eboyden avatar Jan 07 '22 03:01 eboyden

FYI -- this has been released to production.

ch4rr0 avatar Nov 09 '23 18:11 ch4rr0