use of filter.FirstOfPairFilter in project ASCIIGenome by dariober.
the class UtilsTest method canCountReadsInWindow.
@Test
public void canCountReadsInWindow() throws InvalidGenomicCoordsException, IOException {
GenomicCoords gc = new GenomicCoords("chr7:5522436-5613572", 80, samSeqDict, fastaFile);
List<SamRecordFilter> filters = new ArrayList<SamRecordFilter>();
// Same as
filters.add(new MappingQualityFilter(30));
// samtools view -q 30 -f 64
filters.add(new FirstOfPairFilter(true));
long t0 = System.currentTimeMillis();
for (int i = 0; i < 10; i++) {
assertEquals(42770, Utils.countReadsInWindow("test_data/ear045.oxBS.actb.bam", gc, filters));
}
long t1 = System.currentTimeMillis();
System.out.println("TIME TO FILTER: " + (t1 - t0));
gc = new GenomicCoords("chr7:5524838-5611878", 80, samSeqDict, fastaFile);
}
Aggregations