Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--sam-RG flag adds RG line to header, but does not set RG tag on alignments #143

Open
joshuagryphon opened this issue Jan 24, 2025 · 0 comments

Comments

@joshuagryphon
Copy link

Hi folks,

I'm unsure whether to file this as a bug or a feature request:

I'm using the --sam-RG flag to set the read group for my alignment jobs. When I look at output from Bowtie, I do get a well-formed @RG line in the SAM header, but none of the reads have RG tags set. The SAMv1 spec (pdf) states both should be set, to enable matching of alignments to the corresponding group specified in the header. Quoting from the section specifying @RG lines in headers:

@RG
Read group identifier. Each @RG line must have a unique ID. The value of ID is used in the RG tags of alignment records. Must be unique among all read groups in header section. Read group IDs may be modified when merging SAM files in order to handle collisions.

My use case is that I need to run mulitple bowtie jobs, merge the outputs together, and still be able to trace alignments back to the job that created them. I had planned to set a unique read group for each job to do so.

Details:

  • bowtie version 1.3.1
  • Command call: bowtie -f --sam --sam-RG 'ID:test --best -x test_ebwt test_reads.fa
  • Sample output:
@HD	VN:1.0	SO:unsorted
@SQ	SN:test_synthetic	LN:1000000
@RG	ID:test
@PG	ID:Bowtie	VN:1.3.1	CL:"/app/.pixi/envs/dev/bin/bowtie-align-s --wrapper basic-0 -f --sam --sam-RG ID:test --best -x test_ebwt test_reads.fa"
test_r1	0	test_synthetic	500000	255	16M	*	0	0	AAAACTGCCAAGGGAC	IIIIIIIIIIIIIIII	XA:i:0	MD:Z:16	NM:i:0	XM:i:1
test_r2	0	test_synthetic	502651	255	16M	*	0	0	TGCGAGCCTACCCTAC	IIIIIIIIIIIIIIII	XA:i:1	MD:Z:15A0	NM:i:1	XM:i:1

Thanks for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant