filter bam file
2
0
Entering edit mode
8.5 years ago
hana ▴ 190

Hi

I have merged bam file which has 24-101 bp reads. I would like to find the alternative splice events using MISO. I need to filter the reds in my merged bam file and keep only reads with 100 bp length. Is there any way to do that?

Thanks in advance

RNA-Seq • 1.8k views
ADD COMMENT
2
Entering edit mode
8.5 years ago

samtools view -h my.bam | awk '{if($0~/^@/ || length($10) == $Desired_length){print $0}}' | samtools view -bS - > my_new.bam

ADD COMMENT
1
Entering edit mode
8.5 years ago
Asaf 10k

Try: samtools view -m 100

ADD COMMENT

Login before adding your answer.

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