Skip to content

Commit

Permalink
removed unused setAttribute methods
Browse files Browse the repository at this point in the history
  • Loading branch information
gileshall committed Aug 1, 2023
1 parent f2f92d4 commit c9ad747
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions src/main/java/htsjdk/samtools/cram/structure/Slice.java
Original file line number Diff line number Diff line change
Expand Up @@ -735,38 +735,6 @@ public void setReferenceMD5(final CRAMReferenceRegion cramReferenceRegion) {
}
}

/**
* Hijacking attributes-related methods from SAMRecord:
*/

/**
* Set a value for the tag.
* @param tag tag ID as a short integer as returned by {@link SAMTag#makeBinaryTag(String)}
* @param value tag value
*/
public void setAttribute(final String tag, final Object value) {
setAttribute(SAMTag.makeBinaryTag(tag), value);
}

void setAttribute(final short tag, final Object value) {
setAttribute(tag, value, false);
}

void setAttribute(final short tag, final Object value, final boolean isUnsignedArray) {
if (value == null) {
if (this.sliceTags != null) this.sliceTags = this.sliceTags.remove(tag);
} else {
final SAMBinaryTagAndValue tmp;
if (!isUnsignedArray) {
tmp = new SAMBinaryTagAndValue(tag, value);
} else {
tmp = new SAMBinaryTagAndUnsignedArrayValue(tag, value);
}
if (this.sliceTags == null) this.sliceTags = tmp;
else this.sliceTags = this.sliceTags.insert(tmp);
}
}

/**
* Uses a Multiple Reference Slice Alignment Reader to determine the reference spans of a MULTI_REF Slice.
* Used for creating CRAI/BAI index entries.
Expand Down

0 comments on commit c9ad747

Please sign in to comment.