private static Map<Integer, AlignmentSpan> addAllSpans(final Map<Integer, AlignmentSpan> spanMap, final Map<Integer, AlignmentSpan> addition) { for (final Map.Entry<Integer, AlignmentSpan> entry:addition.entrySet()) { addSpan(entry.getKey(), entry.getValue().getStart(), entry.getValue().getCount(), entry.getValue().getSpan(), spanMap); } return spanMap; }
private static Map<Integer, AlignmentSpan> addAllSpans(final Map<Integer, AlignmentSpan> spanMap, final Map<Integer, AlignmentSpan> addition) { for (final Map.Entry<Integer, AlignmentSpan> entry:addition.entrySet()) { addSpan(entry.getKey(), entry.getValue().getStart(), entry.getValue().getSpan(), entry.getValue().getCount(), spanMap); } return spanMap; }
Map<Integer, AlignmentSpan> getReferences(final Slice slice, final CompressionHeader header, final ValidationStringency validationStringency) throws IOException { final Map<Integer, AlignmentSpan> spanMap = new HashMap<>(); switch (slice.sequenceId) { case SAMRecord.NO_ALIGNMENT_REFERENCE_INDEX: spanMap.put(SAMRecord.NO_ALIGNMENT_REFERENCE_INDEX, AlignmentSpan.UNMAPPED_SPAN); break; case Slice.MULTI_REFERENCE: final Map<Integer, AlignmentSpan> spans = slice.getMultiRefAlignmentSpans(header, validationStringency); addAllSpans(spanMap, spans); break; default: addSpan(slice.sequenceId, slice.alignmentStart, slice.alignmentSpan, slice.nofRecords, spanMap); break; } return spanMap; }
private Map<Integer, AlignmentSpan> getReferences(final Slice slice, final CompressionHeader header, final ValidationStringency validationStringency) { final Map<Integer, AlignmentSpan> spanMap = new HashMap<>(); switch (slice.sequenceId) { case SAMRecord.NO_ALIGNMENT_REFERENCE_INDEX: spanMap.put(SAMRecord.NO_ALIGNMENT_REFERENCE_INDEX, AlignmentSpan.UNMAPPED_SPAN); break; case Slice.MULTI_REFERENCE: final Map<Integer, AlignmentSpan> spans = slice.getMultiRefAlignmentSpans(header, validationStringency); addAllSpans(spanMap, spans); break; default: addSpan(slice.sequenceId, slice.alignmentStart, slice.alignmentSpan, slice.nofRecords, spanMap); break; } return spanMap; }