Skip to content

Commit b10f2a0

Browse files
committed
Merge branch 'hotfix/v1.7.2'
2 parents 961cf9d + 20fb430 commit b10f2a0

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

CHANGELOG

+7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11

2+
MiXCR 1.7.2 ( 5 May 2016)
3+
========================
4+
5+
-- Fixed bug leading to mis-filtering of certain combinations of Alpha-Delta-V genes with Alpha-J
6+
or Delta-J genes
7+
8+
29
MiXCR 1.7.1 ( 9 Mar 2016)
310
========================
411

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
<groupId>com.milaboratory</groupId>
3434
<artifactId>mixcr</artifactId>
35-
<version>1.7.1</version>
35+
<version>1.7.2</version>
3636
<packaging>jar</packaging>
3737
<name>MiXCR</name>
3838

src/main/java/com/milaboratory/mixcr/basictypes/VDJCAlignments.java

+13-2
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,24 @@ public NSequenceWithQuality[] getOriginalSequences() {
103103
public final boolean hasSameVJLoci(final int top) {
104104
VDJCHit[] vHits = hits.get(GeneType.Variable),
105105
jHits = hits.get(GeneType.Joining);
106-
for (int v = 0; v < top && v < vHits.length; ++v)
107-
for (int j = 0; j < top && j < jHits.length; ++j)
106+
for (int v = 0; v < actualTop(vHits, top); ++v)
107+
for (int j = 0; j < actualTop(jHits, top); ++j)
108108
if (vHits[v].getAllele().getLocus() == jHits[j].getAllele().getLocus())
109109
return true;
110110
return false;
111111
}
112112

113+
private static int actualTop(VDJCHit[] hits, int top) {
114+
if (hits.length <= top)
115+
return hits.length;
116+
float score = hits[top].getScore() - Float.MIN_VALUE;
117+
while (top < hits.length &&
118+
hits[top].getScore() >= score) {
119+
++top;
120+
}
121+
return top;
122+
}
123+
113124
@Override
114125
public boolean equals(Object o) {
115126
if (this == o) return true;

0 commit comments

Comments
 (0)