Search in sources :

Example 1 with BQSRReadTransformer

use of org.broadinstitute.hellbender.transformers.BQSRReadTransformer in project gatk by broadinstitute.

the class ApplyBQSRSparkFn method apply.

public static JavaRDD<GATKRead> apply(JavaRDD<GATKRead> reads, final Broadcast<RecalibrationReport> reportBroadcast, final SAMFileHeader readsHeader, ApplyBQSRArgumentCollection args) {
    return reads.mapPartitions(readsIterator -> {
        final RecalibrationReport report = reportBroadcast.getValue();
        final BQSRReadTransformer transformer = new BQSRReadTransformer(readsHeader, report, args);
        final Iterable<GATKRead> readsIterable = () -> readsIterator;
        return Utils.stream(readsIterable).map(read -> transformer.apply(read)).collect(Collectors.toList()).iterator();
    });
}
Also used : GATKRead(org.broadinstitute.hellbender.utils.read.GATKRead) BQSRReadTransformer(org.broadinstitute.hellbender.transformers.BQSRReadTransformer) RecalibrationReport(org.broadinstitute.hellbender.utils.recalibration.RecalibrationReport)

Aggregations

BQSRReadTransformer (org.broadinstitute.hellbender.transformers.BQSRReadTransformer)1 GATKRead (org.broadinstitute.hellbender.utils.read.GATKRead)1 RecalibrationReport (org.broadinstitute.hellbender.utils.recalibration.RecalibrationReport)1