Way to check if there is local trimmed alihned reads BOWTIE2
1
0
Entering edit mode
9.4 years ago
manekineko ▴ 150

Is there a way to check if there is a trimmed/clipped reads aligned and how much are they from my attempt of running bowtie2 --local mode?

bowtie2 • 1.3k views
ADD COMMENT
1
Entering edit mode
9.4 years ago
Sam ★ 4.8k

You can read the CIGAR code in the SAM file. Look for H and S which represent hard clipping and soft clipping. The number in front of the H and S indicates the number of clipping.

ADD COMMENT
1
Entering edit mode

Something like the following gives you the total number of soft- and hard-clipped reads

samtools view my.bam | cut -f6 | sed -n '/^[0-9]\+[SH]\|[0-9]\+[SH]$/p' | wc -l
ADD REPLY
0
Entering edit mode

Thanks, I want to check as my reads are quite short 20-25, and I used --local and seed -L 8, but in the IGV I do not see any clipped reads aligned near exon-intron sites? I'm running you command now .....

ADD REPLY
0
Entering edit mode

You might have to fiddle with your scoring parameters and filter for those short reads. See Bowtie2-manual --local and --score-min. Otherwise clipped reads might just not be reported.

ADD REPLY

Login before adding your answer.

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