This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how can we count that how many alignments contains a deletion?please guide me

How many alignments contain deletion ? in bam file.. how can we check this please someone help me ....

deletion alginment

I could't understand..... that how i can perform this..?

thank u so much

and how can we check that the how many alignments are spliced...?

this is another question. Look at the BAM specifcation, look at the CIGAR string.

thank u so much for guiding me in a very good way....

can u mention yous utube channel link or videos link...?

this is a song but i want bioinformatics linx related videos...!

I was assuming I'm gonna be rick rolled by you but actually not... :D

and there are 2 reads comes namely as read1 and read2 which one is on bed region

1 answer

Pysam in python and samtools can extract CIGAR string. D in CIGAR string refers to deletion.

You can subset all reads to aligned in BAM. Then test if "D" occurs in the CIGAR string read by read, return 1 if yes, 0 if others, append a new value for list countD. Last, sum all in countD. You should get a total num of deletion alignment.

I can't remember if there is any straightforward tool can do this job. For me, I'll write a python script to do it following the above logic.

its very helpful for me thank you so much

Log in to answer this question.