Entering edit mode
11.1 years ago
Nicolas Rosewick
11k
Hi,
I want to use bamtools to divide my bam file into two files : Alignment on the reference strand and alignment on the reverse strand.
So with bamtools I use :
bamtools filter -script filter.txt -in in.bam -out out.bam
Is it right to do it this way to extract read aligning on the reference strand using this filter ? :
{
"filters" : [
{"id" : "FirstinPair",
"isFirstMate" : "true"
},
{"id" : "R",
"isReverseStrand" : "false"
},
{"id" : "S",
"isReverseStrand" : "true"
},
{"id" : "SecondinPair",
"isFirstMate" : "false"
},
{"id" : "P",
"isPaired" : "true"
}
],
"rule": "(P&FirstinPair & R) | (P&SecondinPair & S)"
}
and here for reverse strand :
{
"filters" : [
{"id" : "FirstinPair",
"isFirstMate" : "true"
},
{"id" : "R",
"isReverseStrand" : "false"
},
{"id" : "S",
"isReverseStrand" : "true"
},
{"id" : "SecondinPair",
"isFirstMate" : "false"
},
{"id" : "P",
"isPaired" : "true"
}
],
"rule": "( P & FirstinPair & S) | ( P & SecondinPair & R)"
}
Thanks
Looks correct. You can just double check a few if you really want to put your mind at ease.