diff --git a/CHANGELOG b/CHANGELOG
index 1849c5b0f..53e89c538 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,14 @@
+MiXCR 3.0.7 (20 May 2019)
+========================
+
+-- Fixes clone oversplitting in assembleContigs in noizy (e.g. single-cell) data with substanial
+ fraction of sequences with errors in `CDR3`
+-- Fixes wrong alignment-scoring-based filtering in pre-clustering procedure
+-- Fixes rare bug in export of imputed gene feature sequences
+-- minor: Better error message for mutation extraction from alignment-attached gene features
+
+
MiXCR 3.0.6 (10 Apr 2019)
========================
diff --git a/pom.xml b/pom.xml
index a598cb85f..68a6a5f70 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
com.milaboratory
mixcr
- 3.0.6
+ 3.0.7
jar
MiXCR
diff --git a/src/main/java/com/milaboratory/mixcr/assembler/CloneAssembler.java b/src/main/java/com/milaboratory/mixcr/assembler/CloneAssembler.java
index b3745c2cd..0cdd29408 100644
--- a/src/main/java/com/milaboratory/mixcr/assembler/CloneAssembler.java
+++ b/src/main/java/com/milaboratory/mixcr/assembler/CloneAssembler.java
@@ -694,7 +694,8 @@ public List build() {
continue;
for (int j = 0; j < 3; j++) {
- if (accs[i].getBestScore(GeneType.VJC_REFERENCE[j]) < maxScores[j]) {
+ if (accs[i].getBestGene(GeneType.VJC_REFERENCE[j]) != null &&
+ accs[i].getBestScore(GeneType.VJC_REFERENCE[j]) < maxScores[j]) {
dropped.accept(accs[i]);
accs[i] = null;
break;
diff --git a/src/main/java/com/milaboratory/mixcr/assembler/fullseq/FullSeqAssembler.java b/src/main/java/com/milaboratory/mixcr/assembler/fullseq/FullSeqAssembler.java
index 16c416e11..6189b9023 100644
--- a/src/main/java/com/milaboratory/mixcr/assembler/fullseq/FullSeqAssembler.java
+++ b/src/main/java/com/milaboratory/mixcr/assembler/fullseq/FullSeqAssembler.java
@@ -64,6 +64,7 @@
import static io.repseq.core.GeneType.Variable;
/**
+ *
*/
public final class FullSeqAssembler {
private static int ABSENT_PACKED_VARIANT_INFO = -1;
@@ -1518,6 +1519,6 @@ else if (right == -1)
}
private boolean inSplitRegion(int p) {
- return splitRegion == null || splitRegion.contains(p);
+ return splitRegion != null && splitRegion.contains(p);
}
}
diff --git a/src/main/java/com/milaboratory/mixcr/basictypes/VDJCObject.java b/src/main/java/com/milaboratory/mixcr/basictypes/VDJCObject.java
index 1e6b0dce8..714b942fe 100644
--- a/src/main/java/com/milaboratory/mixcr/basictypes/VDJCObject.java
+++ b/src/main/java/com/milaboratory/mixcr/basictypes/VDJCObject.java
@@ -464,8 +464,11 @@ public CaseSensitiveNucleotideSequence getIncompleteFeature(GeneFeature geneFeat
if (lHit == rHit) {
Alignment lAl = lHit.getAlignment(lLast.iTarget);
if (lAl.getSequence1Range().contains(rPositionInRef)) {
- IncompleteSequencePart part = new IncompleteSequencePart(lHit, false, lLast.iTarget, lLast.begin,
- aabs(lAl.convertToSeq2Position(rPositionInRef)));
+ int aabs = aabs(lAl.convertToSeq2Position(rPositionInRef));
+ if (aabs < lLast.begin)
+ return null;
+
+ IncompleteSequencePart part = new IncompleteSequencePart(lHit, false, lLast.iTarget, lLast.begin, aabs);
if (part.begin == part.end)
leftParts.remove(leftParts.size() - 1);
else
@@ -481,8 +484,11 @@ public CaseSensitiveNucleotideSequence getIncompleteFeature(GeneFeature geneFeat
Alignment rAl = lHit.getAlignment(rLast.iTarget);
if (rAl.getSequence1Range().contains(lPositionInRef)) {
- IncompleteSequencePart part = new IncompleteSequencePart(rHit, false, rLast.iTarget,
- aabs(rAl.convertToSeq2Position(lPositionInRef)), rLast.end);
+ int aabs = aabs(rAl.convertToSeq2Position(lPositionInRef));
+ if (aabs > rLast.end)
+ return null;
+
+ IncompleteSequencePart part = new IncompleteSequencePart(rHit, false, rLast.iTarget, aabs, rLast.end);
if (part.begin == part.end)
rightParts.remove(0);
else
@@ -567,7 +573,7 @@ private static final class IncompleteSequencePart {
final int begin, end;
IncompleteSequencePart(VDJCHit hit, boolean germline, int iTarget, int begin, int end) {
- assert begin <= end;
+ assert begin <= end : "" + begin + " - " + end;
this.hit = hit;
this.germline = germline;
this.iTarget = iTarget;
diff --git a/src/main/java/com/milaboratory/mixcr/cli/Main.java b/src/main/java/com/milaboratory/mixcr/cli/Main.java
index 3467fbfea..c2a76a8a2 100644
--- a/src/main/java/com/milaboratory/mixcr/cli/Main.java
+++ b/src/main/java/com/milaboratory/mixcr/cli/Main.java
@@ -64,18 +64,20 @@ protected List