Permalink
Browse files

fixes NPE in VDJCHit#getIdentity. This fixes #345

  • Loading branch information...
dbolotin committed Feb 10, 2018
1 parent e4f2aa8 commit de4f2f6b2deda92f3f569d3c5b2ed368e6613a50
Showing with 5 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +1 −0 CHANGELOG_CURRENT
  3. +1 −1 pom.xml
  4. +2 −0 src/main/java/com/milaboratory/mixcr/basictypes/VDJCHit.java
@@ -7,3 +7,4 @@ doc/_build
.flooignore
out
test_target
src/test/resources/sequences/big
@@ -0,0 +1 @@
Fixed `NPE` in VDJCHit#getIdentity. Commands like `mixcr exportClones ... -cBestIdentityPercent ...` affected.
@@ -32,7 +32,7 @@
<groupId>com.milaboratory</groupId>
<artifactId>mixcr</artifactId>
<version>2.1.9</version>
<version>2.1.10-SNAPSHOT</version>
<packaging>jar</packaging>
<name>MiXCR</name>
@@ -125,6 +125,8 @@ public float getIdentity() {
float identity = 0;
int tSize = 0;
for (Alignment<NucleotideSequence> alignment : alignments) {
if (alignment == null)
continue;
AlignmentHelper h = alignment.getAlignmentHelper();
identity += h.identity() * h.size();
tSize += h.size();

0 comments on commit de4f2f6

Please sign in to comment.