Skip to content

Commit

Permalink
remove CramCompressionRecord.tagIds (#1345)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmthibault79 authored and cmnbroad committed May 6, 2019
1 parent 4f62add commit 0b9fe0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,20 +253,20 @@ public int compare(final byte[] o1, final byte[] o2) {
}

Arrays.sort(record.tags, comparator);
record.tagIds = new byte[record.tags.length * 3];
final byte[] tagIds = new byte[record.tags.length * 3];

int tagIndex = 0;
for (int i = 0; i < record.tags.length; i++) {
record.tagIds[i * 3] = (byte) record.tags[tagIndex].keyType3Bytes.charAt(0);
record.tagIds[i * 3 + 1] = (byte) record.tags[tagIndex].keyType3Bytes.charAt(1);
record.tagIds[i * 3 + 2] = (byte) record.tags[tagIndex].keyType3Bytes.charAt(2);
tagIds[i * 3] = (byte) record.tags[tagIndex].keyType3Bytes.charAt(0);
tagIds[i * 3 + 1] = (byte) record.tags[tagIndex].keyType3Bytes.charAt(1);
tagIds[i * 3 + 2] = (byte) record.tags[tagIndex].keyType3Bytes.charAt(2);
tagIndex++;
}

MutableInt count = map.get(record.tagIds);
MutableInt count = map.get(tagIds);
if (count == null) {
count = new MutableInt();
map.put(record.tagIds, count);
map.put(tagIds, count);
}
count.value++;
record.tagIdsIndex = count;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ public class CramCompressionRecord {
public int templateSize;

public ReadTag[] tags;
public byte[] tagIds;
public MutableInt tagIdsIndex;

public int sliceIndex = 0;
Expand Down

0 comments on commit 0b9fe0d

Please sign in to comment.