Extracting complete supplementary alignments for long reads from a bam file
0
0
Entering edit mode
20 months ago
aacomeau • 0

I'm trying to extract all supplementary alignments (specifically, reads that are split and aligned to different regions of the genome) from a bam file generated by mapping Oxford Nanopore reads to a reference genome with minimap2. I'm trying to extract these alignments using the following samtools (v1.15.1) command:

samtools view -f 2048 -o ${supp_align_bam} ${my_bam}

The above command outputs the correct number of alignments as indicated when I run the samtools stats command. However, there are many reads in the resulting bam file that only occur once. I thought that supplementary alignments are split alignments and therefore each read should be represented at least twice? I need to have all aligned parts of each 'split read'. My worry is that the -f 2048 filter does not include the best aligning region of the split reads (which would explain a read name occurring only once in this file). Any advice on what is occurring would be greatly appreciated!

ONT split reads alignment • 1.1k views
ADD COMMENT
0
Entering edit mode

I thought that supplementary alignments are split alignments and therefore each read should be represented at least twice?

with samtools view -f 2048 , you 'll only get suppl read (only one if there is only one split), BUT the primary/main alignment is lost, you can always later find reads by name.

ADD REPLY

Login before adding your answer.

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