use of filter.ReadNegativeStrandFilter in project ASCIIGenome by dariober.
the class UtilsTest method canCountReadsInWindow2.
@Test
public void canCountReadsInWindow2() throws InvalidGenomicCoordsException, IOException {
GenomicCoords gc = new GenomicCoords("chr7:5524838-5611878", 80, samSeqDict, fastaFile);
List<SamRecordFilter> filters = new ArrayList<SamRecordFilter>();
assertEquals(100377, Utils.countReadsInWindow("test_data/ear045.oxBS.actb.bam", gc, filters));
filters.add(new AlignedFilter(true));
assertEquals(100265, Utils.countReadsInWindow("test_data/ear045.oxBS.actb.bam", gc, filters));
filters = new ArrayList<SamRecordFilter>();
filters.add(new AlignedFilter(true));
filters.add(new ReadNegativeStrandFilter(false));
assertEquals(50157, Utils.countReadsInWindow("test_data/ear045.oxBS.actb.bam", gc, filters));
filters = new ArrayList<SamRecordFilter>();
filters.add(new AlignedFilter(true));
filters.add(new ReadNegativeStrandFilter(true));
assertEquals(50108, Utils.countReadsInWindow("test_data/ear045.oxBS.actb.bam", gc, filters));
filters = FlagToFilter.flagToFilterList(80, 1026);
assertEquals(2729, Utils.countReadsInWindow("test_data/ear045.oxBS.actb.bam", gc, filters));
filters = FlagToFilter.flagToFilterList(80, 1026);
filters.add(new MappingQualityFilter(30));
assertEquals(1592, Utils.countReadsInWindow("test_data/ear045.oxBS.actb.bam", gc, filters));
}
Aggregations