use of au.edu.wehi.idsv.FileSystemContext in project gridss by PapenfussLab.
the class ComputeCoverage method initIntervalCoverageAccumulator.
private IntervalCoverageAccumulator initIntervalCoverageAccumulator() {
SAMSequenceDictionary dictionary = getReference().getSequenceDictionary();
if (VCF == null) {
return new IntervalCoverageAccumulator(COVERAGE_METHOD, dictionary, BIN_SIZE, null);
} else {
try (VCFFileReader vcfReader = new VCFFileReader(VCF, false)) {
try (CloseableIterator<VariantContext> it = vcfReader.iterator()) {
GenomicProcessingContext pc = new GenomicProcessingContext(new FileSystemContext(TMP_DIR.get(0), MAX_RECORDS_IN_RAM), REFERENCE_SEQUENCE, getReference());
Iterator<IdsvVariantContext> idsvIt = Iterators.transform(it, variant -> IdsvVariantContext.create(pc, null, variant));
Iterator<VariantContextDirectedEvidence> bpit = Iterators.filter(idsvIt, VariantContextDirectedEvidence.class);
return new IntervalCoverageAccumulator(COVERAGE_METHOD, dictionary, BIN_SIZE, bpit);
}
}
}
}
use of au.edu.wehi.idsv.FileSystemContext in project gridss by PapenfussLab.
the class SimulationGenerator method getProcessingContext.
protected GenomicProcessingContext getProcessingContext() {
GenomicProcessingContext pc = new GenomicProcessingContext(new FileSystemContext(TMP_DIR.get(0), new File("."), MAX_RECORDS_IN_RAM), REFERENCE, null);
pc.setCommandLineProgram(this);
return pc;
}
Aggregations