From f54ce660db8ffd604c995c3d29ce3b3af51d5c1c Mon Sep 17 00:00:00 2001 From: Bolotin Dmitriy Date: Wed, 10 Apr 2019 17:55:15 +0300 Subject: [PATCH 1/9] Next development cycle v3.0.7 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a598cb85f..aff958cec 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,7 @@ com.milaboratory mixcr - 3.0.6 + 3.0.7-SNAPSHOT jar MiXCR From ab06e6b67d6186ecabab211f48fe54283be46c5e Mon Sep 17 00:00:00 2001 From: Bolotin Dmitriy Date: Wed, 17 Apr 2019 19:57:33 +0300 Subject: [PATCH 2/9] Fixes for wrong alignment-scoring-based filtering in pre-clustering. Chains -> chains --- .../java/com/milaboratory/mixcr/assembler/CloneAssembler.java | 3 ++- .../java/com/milaboratory/mixcr/export/FieldExtractors.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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/export/FieldExtractors.java b/src/main/java/com/milaboratory/mixcr/export/FieldExtractors.java index 967b7681e..43ab3e43a 100644 --- a/src/main/java/com/milaboratory/mixcr/export/FieldExtractors.java +++ b/src/main/java/com/milaboratory/mixcr/export/FieldExtractors.java @@ -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(); From e1965c1f662fef2d29934d7b0ab636c52e1f20f8 Mon Sep 17 00:00:00 2001 From: Bolotin Dmitriy Date: Mon, 29 Apr 2019 10:30:20 +0300 Subject: [PATCH 3/9] Better error message for mutation extraction from alignment-attached gene features. --- .../java/com/milaboratory/mixcr/cli/Main.java | 18 ++++++++++-------- .../mixcr/export/FeatureExtractors.java | 15 +++++++++++++-- 2 files changed, 23 insertions(+), 10 deletions(-) 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 handle(ParseResult parseResult) throws CommandLine.Execut List 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); } }; diff --git a/src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java b/src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java index 272a8844c..18c15c3f0 100644 --- a/src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java +++ b/src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java @@ -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) { @@ -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 From 54e81d41f33a9b3a1f6ee8e301da53d05350c082 Mon Sep 17 00:00:00 2001 From: Stanislav Poslavsky Date: Wed, 8 May 2019 13:30:43 +0300 Subject: [PATCH 4/9] Fix rare bug in exporting of imputed features. --- .../mixcr/basictypes/VDJCObject.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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; From 0736959506edfa0a74d37e34530ad34b6ec2f7de Mon Sep 17 00:00:00 2001 From: Stanislav Poslavsky Date: Wed, 8 May 2019 14:11:39 +0300 Subject: [PATCH 5/9] upd changelog --- CHANGELOG_CURRENT | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG_CURRENT b/CHANGELOG_CURRENT index e69de29bb..b5da13956 100644 --- a/CHANGELOG_CURRENT +++ b/CHANGELOG_CURRENT @@ -0,0 +1 @@ +Fix rare bug in export of imputed gene features. \ No newline at end of file From 846613bb94cde37a33d0c4c6ebc77e2a468ff846 Mon Sep 17 00:00:00 2001 From: Bolotin Dmitriy Date: Sun, 19 May 2019 20:53:18 +0300 Subject: [PATCH 6/9] microfix for changelog --- CHANGELOG_CURRENT | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG_CURRENT b/CHANGELOG_CURRENT index b5da13956..dd8bb12b5 100644 --- a/CHANGELOG_CURRENT +++ b/CHANGELOG_CURRENT @@ -1 +1,2 @@ -Fix rare bug in export of imputed gene features. \ No newline at end of file + +Fix rare bug in export of imputed gene features \ No newline at end of file From 83dd57e21969f62927fdc14fca1095b20f5577fa Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Sun, 19 May 2019 21:49:39 +0300 Subject: [PATCH 7/9] Fix for oversplitting in assembleContigs (#519) * Possible fix for oversplitting in assembleContigs . * Changelog --- CHANGELOG_CURRENT | 4 ++-- .../mixcr/assembler/fullseq/FullSeqAssembler.java | 3 ++- .../resources/parameters/full_seq_assembler_parameters.json | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG_CURRENT b/CHANGELOG_CURRENT index dd8bb12b5..98749d3fa 100644 --- a/CHANGELOG_CURRENT +++ b/CHANGELOG_CURRENT @@ -1,2 +1,2 @@ - -Fix rare bug in export of imputed gene features \ No newline at end of file +Fixes clone oversplitting in assembleContigs in noizy (e.g. single-cell) data with substanial fraction of sequences with errors in `CDR3` +Fixes rare bug in export of imputed gene feature sequences \ No newline at end of file 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/resources/parameters/full_seq_assembler_parameters.json b/src/main/resources/parameters/full_seq_assembler_parameters.json index 854d8cf36..dd925fa14 100644 --- a/src/main/resources/parameters/full_seq_assembler_parameters.json +++ b/src/main/resources/parameters/full_seq_assembler_parameters.json @@ -8,7 +8,7 @@ "alignedSequenceEdgeDelta": 3, "alignmentEdgeRegionSize": 7, "minimalNonEdgePointsFraction": 0.25, - "subCloningRegion": "CDR3", + "subCloningRegion": null, "trimmingParameters": { "averageQualityThreshold": 20.0, "windowSize": 8 From 198fd3df4beb12f52db5104bb259092c5e917286 Mon Sep 17 00:00:00 2001 From: Bolotin Dmitriy Date: Mon, 20 May 2019 01:53:42 +0300 Subject: [PATCH 8/9] Chanelog --- CHANGELOG_CURRENT | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG_CURRENT b/CHANGELOG_CURRENT index 98749d3fa..3d5ab2355 100644 --- a/CHANGELOG_CURRENT +++ b/CHANGELOG_CURRENT @@ -1,2 +1,4 @@ Fixes clone oversplitting in assembleContigs in noizy (e.g. single-cell) data with substanial fraction of sequences with errors in `CDR3` -Fixes rare bug in export of imputed gene feature sequences \ No newline at end of file +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 \ No newline at end of file From 5717b66ca6997664d8a4cb20162efa7deec6537b Mon Sep 17 00:00:00 2001 From: Bolotin Dmitriy Date: Mon, 20 May 2019 01:56:21 +0300 Subject: [PATCH 9/9] Release v3.0.7 --- CHANGELOG | 10 ++++++++++ CHANGELOG_CURRENT | 4 ---- pom.xml | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) 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/CHANGELOG_CURRENT b/CHANGELOG_CURRENT index 3d5ab2355..e69de29bb 100644 --- a/CHANGELOG_CURRENT +++ b/CHANGELOG_CURRENT @@ -1,4 +0,0 @@ -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 \ No newline at end of file diff --git a/pom.xml b/pom.xml index aff958cec..68a6a5f70 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,7 @@ com.milaboratory mixcr - 3.0.7-SNAPSHOT + 3.0.7 jar MiXCR