Sequencing index information from BAM
2
0
Entering edit mode
4.2 years ago

Hi all,

I am interested in retrieving sequencing barcodes (demultiplexing barcode, not UMI) from sorted BAMs. I thought that I could first convert BAM > FASTQ and look in the header (bedtools bamToFastq), but I don't see an index sequence (below). I am hoping that I can extract this information directly from the BAM.

Any help would be appreciated!

@NS500602:778:HHH5KBGXB:4:11605:4703:18870 GGCGAGGATGTGGAGAAAGGGGAACACTCCTCCATTGTTGGTGGGATTGCAAGCTTGTACAACCACTCTGGAAAT + AAAAAEEEEEEAEEAEEEEAEEEEEEE/AEAEEEAEEEEA<e eeeaeaeeeeeeeeeeeee="" aeeeaa6eeeee<="" p="">

BAM FASTQ Index • 1.1k views
ADD COMMENT
0
Entering edit mode

That is only possible if the read name contained the barcode originally or it has a BC value as an optional field. Also, you don't need to convert them to Fastq, you can read it with samtools, like:

samtools view FILE.bam | more

ADD REPLY
0
Entering edit mode

Great point, thanks!

ADD REPLY
4
Entering edit mode
4.2 years ago

you cannot find it from the BAM unless someone put this information in the BAM header.

ADD COMMENT
0
Entering edit mode

Ah, too bad. Thanks!

ADD REPLY
1
Entering edit mode
4.2 years ago

That information is generally not kept in a bam file. Your bet bet would be if it were part of the read name, but in your case, it's not. You would have to ask to see the sample sheet used to demultiplex the run

ADD COMMENT
0
Entering edit mode

Thanks for the advice!

ADD REPLY

Login before adding your answer.

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