Skip to content

Commit

Permalink
Merge branch 'hotfix/v1.7.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
dbolotin committed May 5, 2016
2 parents 961cf9d + 20fb430 commit b10f2a0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@

MiXCR 1.7.2 ( 5 May 2016)
========================

-- Fixed bug leading to mis-filtering of certain combinations of Alpha-Delta-V genes with Alpha-J
or Delta-J genes


MiXCR 1.7.1 ( 9 Mar 2016)
========================

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<groupId>com.milaboratory</groupId>
<artifactId>mixcr</artifactId>
<version>1.7.1</version>
<version>1.7.2</version>
<packaging>jar</packaging>
<name>MiXCR</name>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,24 @@ public NSequenceWithQuality[] getOriginalSequences() {
public final boolean hasSameVJLoci(final int top) {
VDJCHit[] vHits = hits.get(GeneType.Variable),
jHits = hits.get(GeneType.Joining);
for (int v = 0; v < top && v < vHits.length; ++v)
for (int j = 0; j < top && j < jHits.length; ++j)
for (int v = 0; v < actualTop(vHits, top); ++v)
for (int j = 0; j < actualTop(jHits, top); ++j)
if (vHits[v].getAllele().getLocus() == jHits[j].getAllele().getLocus())
return true;
return false;
}

private static int actualTop(VDJCHit[] hits, int top) {
if (hits.length <= top)
return hits.length;
float score = hits[top].getScore() - Float.MIN_VALUE;
while (top < hits.length &&
hits[top].getScore() >= score) {
++top;
}
return top;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
Expand Down

0 comments on commit b10f2a0

Please sign in to comment.