filter bam file
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
• 2,208 views
•
link
2 answers
samtools view -h my.bam | awk '{if($0~/^@/ || length($10) == $Desired_length){print $0}}' | samtools view -bS - > my_new.bam
• 0 views
•
link
Try: samtools view -m 100
• 0 views
•
link
Log in to answer this question.