List<Feature> features = fTrack.getFeatures(range.getChr(), range.getStart(), range.getEnd());
Predicate<Feature> pred = FeatureUtils.getOverlapPredicate(range.getChr(), range.getStart(), range.getEnd());
features = CollUtils.filter(features, pred);
IGVBEDCodec codec = new IGVBEDCodec();
for (Feature feat : features) {
String featString = codec.encode(feat);
writer.println(featString);
}
}
}
writer.flush();