diff --git a/src/main/java/com/google/cloud/genomics/dataflow/functions/CombineShardsFn.java b/src/main/java/com/google/cloud/genomics/dataflow/functions/CombineShardsFn.java index 753d955..1ed0390 100644 --- a/src/main/java/com/google/cloud/genomics/dataflow/functions/CombineShardsFn.java +++ b/src/main/java/com/google/cloud/genomics/dataflow/functions/CombineShardsFn.java @@ -54,7 +54,7 @@ public static interface Options extends GCSOutputOptions, GCSOptions {} private static final Logger LOG = Logger.getLogger(CombineShardsFn.class.getName()); final PCollectionView> shards; - final PCollectionView eofContent; + final PCollectionView eofContents; Aggregator filesToCombineAggregator; Aggregator combinedFilesAggregator; Aggregator createdFilesAggregator; @@ -62,7 +62,7 @@ public static interface Options extends GCSOutputOptions, GCSOptions {} public CombineShardsFn(PCollectionView> shards, PCollectionView eofContent) { this.shards = shards; - this.eofContent = eofContent; + this.eofContents = eofContent; filesToCombineAggregator = createAggregator("Files to combine", new SumIntegerFn()); combinedFilesAggregator = createAggregator("Files combined", new SumIntegerFn()); createdFilesAggregator = createAggregator("Created files", new SumIntegerFn()); @@ -76,12 +76,12 @@ public void processElement(DoFn.ProcessContext c) throws Excepti c.getPipelineOptions().as(Options.class), c.element(), c.sideInput(shards), - c.sideInput(eofContent)); + c.sideInput(eofContents)); c.output(result); } String combineShards(Options options, String dest, - Iterable shards, byte[] eofContent) throws IOException { + Iterable srcShards, byte[] eofContent) throws IOException { LOG.info("Combining shards into " + dest); final Storage.Objects storage = Transport.newStorageClient( options @@ -89,7 +89,7 @@ String combineShards(Options options, String dest, .build() .objects(); - ArrayList sortedShardsNames = Lists.newArrayList(shards); + ArrayList sortedShardsNames = Lists.newArrayList(srcShards); Collections.sort(sortedShardsNames); // Write an EOF block (empty gzip block), and put it at the end. diff --git a/src/main/java/htsjdk/samtools/BAMShardIndexer.java b/src/main/java/htsjdk/samtools/BAMShardIndexer.java index 6821c6c..3ded45c 100644 --- a/src/main/java/htsjdk/samtools/BAMShardIndexer.java +++ b/src/main/java/htsjdk/samtools/BAMShardIndexer.java @@ -16,7 +16,7 @@ public class BAMShardIndexer { private final BAMIndexBuilder indexBuilder; // Index of the reference for which the index is being written - int reference; + int referenceIndex; public BAMShardIndexer(OutputStream output, SAMFileHeader header, int reference) { indexBuilder = new BAMIndexBuilder(header.getSequenceDictionary(), reference); @@ -24,7 +24,7 @@ public BAMShardIndexer(OutputStream output, SAMFileHeader header, int reference) final int numReferencesToWriteInTheHeader = isFirstIndexShard ? header.getSequenceDictionary().size() : 0; outputWriter = new BinaryBAMShardIndexWriter(numReferencesToWriteInTheHeader, output); - this.reference = reference; + this.referenceIndex = reference; } public void processAlignment(final SAMRecord rec) { @@ -40,7 +40,7 @@ public void processAlignment(final SAMRecord rec) { * @return count of records with no coordinates. */ public long finish() { - final BAMIndexContent content = indexBuilder.processReference(reference); + final BAMIndexContent content = indexBuilder.processReference(referenceIndex); outputWriter.writeReference(content); outputWriter.close(); return indexBuilder.getNoCoordinateRecordCount();