Skip to content

Commit

Permalink
Merge branch 'release/v3.0.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
dbolotin committed May 19, 2019
2 parents 3e0beb6 + 5717b66 commit 49c5599
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 20 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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)
========================

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

<groupId>com.milaboratory</groupId>
<artifactId>mixcr</artifactId>
<version>3.0.6</version>
<version>3.0.7</version>
<packaging>jar</packaging>
<name>MiXCR</name>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,8 @@ public List<CloneAccumulator> 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
import static io.repseq.core.GeneType.Variable;

/**
*
*/
public final class FullSeqAssembler {
private static int ABSENT_PACKED_VARIANT_INFO = -1;
Expand Down Expand Up @@ -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);
}
}
16 changes: 11 additions & 5 deletions src/main/java/com/milaboratory/mixcr/basictypes/VDJCObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,11 @@ public CaseSensitiveNucleotideSequence getIncompleteFeature(GeneFeature geneFeat
if (lHit == rHit) {
Alignment<NucleotideSequence> 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
Expand All @@ -481,8 +484,11 @@ public CaseSensitiveNucleotideSequence getIncompleteFeature(GeneFeature geneFeat

Alignment<NucleotideSequence> 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
Expand Down Expand Up @@ -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;
Expand Down
18 changes: 10 additions & 8 deletions src/main/java/com/milaboratory/mixcr/cli/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,20 @@ protected List<Object> handle(ParseResult parseResult) throws CommandLine.Execut
List<CommandLine> parsedCommands = parseResult.asCommandLineList();
CommandLine commandLine = parsedCommands.get(parsedCommands.size() - 1);
Object command = commandLine.getCommand();
if (command instanceof CommandSpec && ((CommandSpec) command).userObject() instanceof Runnable) {
try {
try {
if (command instanceof CommandSpec && ((CommandSpec) command).userObject() instanceof Runnable) {
((Runnable) ((CommandSpec) command).userObject()).run();
return new ArrayList<>();
} catch (ParameterException | CommandLine.ExecutionException ex) {
throw ex;
} catch (Exception ex) {
throw new CommandLine.ExecutionException(commandLine,
"Error while running command (" + command + "): " + ex, ex);
}
return super.handle(parseResult);
} catch (ParameterException ex) {
throw ex;
} catch (CommandLine.ExecutionException ex) {
throw ex;
} catch (Exception ex) {
throw new CommandLine.ExecutionException(commandLine,
"Error while running command (" + command + "): " + ex, ex);
}
return super.handle(parseResult);
}
};

Expand Down
15 changes: 13 additions & 2 deletions src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ void validate(GeneFeature[] features) {
if (features.length == 2 && !features[1].contains(features[0]))
throw new IllegalArgumentException(String.format("%s: Base feature %s does not contain relative feature %s",
command, GeneFeature.encode(features[1]), GeneFeature.encode(features[0])));

//todo bigfeature nofloating bounds
}

private String header0(String[] prefixes, GeneFeature[] features) {
Expand Down Expand Up @@ -122,6 +120,19 @@ void validate(GeneFeature[] features) {
if (feature.getGeneType() == null)
throw new IllegalArgumentException(String.format("%s: Gene feature %s covers several gene types " +
"(not possible to select corresponding alignment)", command, GeneFeature.encode(feature)));

if (features.length == 2 && features[1].isAlignmentAttached())
throw new IllegalArgumentException(
String.format(
"%s: Alignment attached base gene features not allowed (error in %s)",
command, GeneFeature.encode(features[1])));

if (features.length == 1 && features[0].isAlignmentAttached())
throw new IllegalArgumentException(
String.format(
"%s: Please use %s option instead and specify base gene feature to extract mutations " +
"from alignment-attached gene feature %s",
command, command + "Relative", GeneFeature.encode(features[0])));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ protected String extract(VDJCObject object) {
});
}

descriptorsList.add(new PL_O("-chains", "Chains", "Chains", "Chains") {
descriptorsList.add(new PL_O("-chains", "Chains", "Chains", "chains") {
@Override
protected String extract(VDJCObject object) {
return object.commonChains().toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"alignedSequenceEdgeDelta": 3,
"alignmentEdgeRegionSize": 7,
"minimalNonEdgePointsFraction": 0.25,
"subCloningRegion": "CDR3",
"subCloningRegion": null,
"trimmingParameters": {
"averageQualityThreshold": 20.0,
"windowSize": 8
Expand Down

0 comments on commit 49c5599

Please sign in to comment.