how can we count that how many alignments contains a deletion?please guide me
1
0
Entering edit mode
2.5 years ago
ikramb450 • 0

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

deletion alginment • 2.3k views
ADD COMMENT
1
Entering edit mode

Find count of reads in BAM file that fall within BED region

UPDATE: I think the post was edit. The original was somehing like "how to count the number of reads in a deletion"

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode
samtools view -c in.bam "chr1:234-567"
ADD REPLY
0
Entering edit mode

thank u so much

ADD REPLY
0
Entering edit mode

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

ADD REPLY
1
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
5
Entering edit mode

sure, here is a video of David Bowie.

ADD REPLY
1
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
1
Entering edit mode
2.5 years ago
tomas4482 ▴ 430

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.

ADD COMMENT
0
Entering edit mode

its very helpful for me thank you so much

ADD REPLY

Login before adding your answer.

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