Bamtools : Extract Sense And Anti-Sense Reads
0
3
Entering edit mode
10.4 years ago

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

• 3.3k views
ADD COMMENT
0
Entering edit mode

Looks correct. You can just double check a few if you really want to put your mind at ease.

ADD REPLY

Login before adding your answer.

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