Thanks Pierre. It's working well for me. Below is an example of coverage before and after processing.
Before
After:
• 0 views
•
link
Hi,
I have several bam files and am working with a 15bp deletion at a specific region. There are reads that support the deletion and there are reads that partially cover the deleted region.
I want to filter out those reads (as shown in circle in the attached IGV snapshot) that partially cover the deleted region from the bam files. I am new in this area, so any suggestions of suitable tool or way to do that is much appreciated.
using samjdk:
java -jar dist/samjdk.jar -e 'if(record.getReadUnmappedFlag() || !record.getContig().equals("chr12")) return true; final int start=100; final int end=115; int x= record.getStart(); if(x>=start && x<=end) return false; x= record.getEnd(); if(x>=start && x<=end) return false; return true;' input.bam
Thanks Pierre. It's working well for me. Below is an example of coverage before and after processing.
Before
After:
Log in to answer this question.
I am not sure if it is as accurate, but the inverse (selecting reads with a 15bp deletion) would be definitely easier.