This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Bamtools : Extract Sense And Anti-Sense Reads

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.

0 answers

No answers yet.

Log in to answer this question.