From 2e10a6fecd42d530a49e3a1ae370835fae6cbfa7 Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Mon, 26 Dec 2016 18:07:12 +0300 Subject: [PATCH 01/19] Next development cycle v2.0.4 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3e7973c7d..b26c4413e 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ com.milaboratory mixcr - 2.0.3 + 2.0.4-SNAPSHOT jar MiXCR From 0e3ccf5e78052e01110dece4a8cfc256f75b0d8c Mon Sep 17 00:00:00 2001 From: Stanislav Poslavsky Date: Thu, 12 Jan 2017 18:19:11 +0300 Subject: [PATCH 02/19] feature extractors work --- pom.xml | 2 +- .../mixcr/export/FeatureExtractors.java | 62 +++++++++++++++---- .../mixcr/export/FieldExtractorsTest.java | 1 + 3 files changed, 51 insertions(+), 14 deletions(-) diff --git a/pom.xml b/pom.xml index b26c4413e..3271c07b2 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ io.repseq repseqio - 1.2.4 + 1.2.5-SNAPSHOT diff --git a/src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java b/src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java index 246e0b6eb..cedeb9f11 100644 --- a/src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java +++ b/src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java @@ -8,10 +8,7 @@ import com.milaboratory.core.sequence.TranslationParameters; import com.milaboratory.mixcr.basictypes.VDJCHit; import com.milaboratory.mixcr.basictypes.VDJCObject; -import io.repseq.core.GeneFeature; -import io.repseq.core.GeneType; -import io.repseq.core.ReferencePoints; -import io.repseq.core.VDJCGene; +import io.repseq.core.*; import static com.milaboratory.mixcr.export.FieldExtractors.NULL; @@ -32,7 +29,14 @@ static abstract class WithHeader extends FieldWithParameters alignment = object.getBestHit(geneType).getAlignment(i); + smallTargetRage = alignment.convertToSeq1Range(range); + if (smallTargetRage != null) + break; + } + + if (smallTargetRage == null) return "-"; - Range smallTargetRage = partitioning.getRelativeRange(alignedFeature, smallGeneFeature); + GeneFeature intersection = GeneFeature.intersection(bigGeneFeature, alignedFeature); - for (int i = 0; i < hit.numberOfTargets(); i++) { + for (int i = 0; i < hit.numberOfTargets(); ++i) { Alignment alignment = hit.getAlignment(i); if (alignment == null || !alignment.getSequence1Range().contains(smallTargetRage)) @@ -118,13 +140,27 @@ protected String extractValue(VDJCObject object, GeneFeature[] parameters) { Mutations mutations = alignment.getAbsoluteMutations().extractRelativeMutationsForRange(smallTargetRage); if (parameters.length == 2) { - int shift = partitioning.getRelativePosition(bigGeneFeature, smallGeneFeature.getFirstPoint()); + int shift = object.getPartitionedTarget(i).getPartitioning().getRelativePosition(intersection, smallGeneFeature.getFirstPoint()); if (shift < 0) continue; + + int offset = germlinePartitioning.getRelativePosition(bigGeneFeature, intersection.getFirstPoint()); + if (offset < 0) + throw new RuntimeException(); + + shift += offset; mutations = mutations.move(shift); + +// int shift = germlinePartitioning.getRelativePosition(bigGeneFeature, smallGeneFeature.getFirstPoint()); +// if (shift < 0) +// continue; +// mutations = mutations.move(shift); +// mutations = mutations.extractRelativeMutationsForRange(bigRange); +// if (mutations == null) +// continue; } - return convert(mutations, gene.getFeature(bigGeneFeature), object.getFeature(smallGeneFeature).getSequence(), partitioning.getTranslationParameters(bigGeneFeature)); + return convert(mutations, gene.getFeature(bigGeneFeature), object.getFeature(smallGeneFeature).getSequence(), germlinePartitioning.getTranslationParameters(bigGeneFeature)); } return "-"; } diff --git a/src/test/java/com/milaboratory/mixcr/export/FieldExtractorsTest.java b/src/test/java/com/milaboratory/mixcr/export/FieldExtractorsTest.java index 940a028dd..2ef5a7a2c 100644 --- a/src/test/java/com/milaboratory/mixcr/export/FieldExtractorsTest.java +++ b/src/test/java/com/milaboratory/mixcr/export/FieldExtractorsTest.java @@ -31,6 +31,7 @@ import com.milaboratory.mixcr.basictypes.Clone; import com.milaboratory.mixcr.basictypes.VDJCAlignments; import com.milaboratory.mixcr.basictypes.VDJCObject; +import com.milaboratory.mixcr.cli.Main; import com.milaboratory.mixcr.cli.Util; import io.repseq.core.GeneType; import org.junit.Ignore; From 04d7cb1397712c36f5140dc2d041746594fb96bc Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Thu, 12 Jan 2017 19:39:28 +0300 Subject: [PATCH 03/19] Feature extraction fix WIP --- .../basictypes/VDJCAlignmentsFormatter.java | 25 +++++++++++++++++-- .../mixcr/export/FeatureExtractors.java | 25 ++++++++++++------- 2 files changed, 39 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/milaboratory/mixcr/basictypes/VDJCAlignmentsFormatter.java b/src/main/java/com/milaboratory/mixcr/basictypes/VDJCAlignmentsFormatter.java index 12bcd57c9..2cdf4012c 100644 --- a/src/main/java/com/milaboratory/mixcr/basictypes/VDJCAlignmentsFormatter.java +++ b/src/main/java/com/milaboratory/mixcr/basictypes/VDJCAlignmentsFormatter.java @@ -113,6 +113,20 @@ public boolean accept(SequencePartitioning object) { return object.isAvailable(ReferencePoint.VEnd) && object.getPosition(ReferencePoint.VEnd) != object.getPosition(ReferencePoint.VEndTrimmed); } }; + public static final Filter IsDPLeft = new Filter() { + @Override + public boolean accept(SequencePartitioning object) { + return object.isAvailable(ReferencePoint.DBegin) && object.getPosition(ReferencePoint.DBegin) != object.getPosition(ReferencePoint.DBeginTrimmed); + } + }; + public static final Filter IsDPRight = new Filter() { + @Override + public boolean accept(SequencePartitioning object) { + return object.isAvailable(ReferencePoint.DEnd) && object.getPosition(ReferencePoint.DEnd) != object.getPosition(ReferencePoint.DEndTrimmed); + } + }; + public static final Filter NotDPLeft = FilterUtil.not(IsDPLeft); + public static final Filter NotDPRight = FilterUtil.not(IsDPRight); public static final Filter NotVP = FilterUtil.not(IsVP); @@ -130,8 +144,15 @@ public boolean accept(SequencePartitioning object) { pd(ReferencePoint.VEndTrimmed, "V>", -1, NotVP), pd(ReferencePoint.VEnd, "V>", -1, IsVP), - pd(ReferencePoint.DBeginTrimmed, "", -1), + + pd(ReferencePoint.DBeginTrimmed, "", -1, NotDPRight), + pd(ReferencePoint.DEnd, "D>", IsDPRight), + pd(ReferencePoint.JBeginTrimmed, "", -1), diff --git a/src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java b/src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java index cedeb9f11..2eeb793d1 100644 --- a/src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java +++ b/src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java @@ -130,7 +130,7 @@ protected String extractValue(VDJCObject object, GeneFeature[] parameters) { if (smallTargetRage == null) return "-"; - GeneFeature intersection = GeneFeature.intersection(bigGeneFeature, alignedFeature); + GeneFeature intersectionBigAligned = GeneFeature.intersection(bigGeneFeature, alignedFeature); for (int i = 0; i < hit.numberOfTargets(); ++i) { Alignment alignment = hit.getAlignment(i); @@ -138,17 +138,23 @@ protected String extractValue(VDJCObject object, GeneFeature[] parameters) { if (alignment == null || !alignment.getSequence1Range().contains(smallTargetRage)) continue; - Mutations mutations = alignment.getAbsoluteMutations().extractRelativeMutationsForRange(smallTargetRage); + Mutations mutations; if (parameters.length == 2) { - int shift = object.getPartitionedTarget(i).getPartitioning().getRelativePosition(intersection, smallGeneFeature.getFirstPoint()); - if (shift < 0) + mutations = alignment.getAbsoluteMutations().extractAbsoluteMutationsForRange(smallTargetRage); + + ReferencePoint baIntersectionBegin = intersectionBigAligned.getFirstPoint(); + + int referencePosition = germlinePartitioning.getRelativePosition(alignedFeature, baIntersectionBegin); + int bigFeaturePosition = germlinePartitioning.getRelativePosition(bigGeneFeature, baIntersectionBegin); + + if (bigFeaturePosition < 0 || referencePosition < 0) continue; - int offset = germlinePartitioning.getRelativePosition(bigGeneFeature, intersection.getFirstPoint()); - if (offset < 0) - throw new RuntimeException(); + int shift = bigFeaturePosition - referencePosition; + + if (shift < 0) + mutations = mutations.getRange(Mutations.pabs(mutations.firstMutationWithPosition(-shift)), mutations.size()); - shift += offset; mutations = mutations.move(shift); // int shift = germlinePartitioning.getRelativePosition(bigGeneFeature, smallGeneFeature.getFirstPoint()); @@ -158,7 +164,8 @@ protected String extractValue(VDJCObject object, GeneFeature[] parameters) { // mutations = mutations.extractRelativeMutationsForRange(bigRange); // if (mutations == null) // continue; - } + } else + mutations = alignment.getAbsoluteMutations().extractRelativeMutationsForRange(smallTargetRage); return convert(mutations, gene.getFeature(bigGeneFeature), object.getFeature(smallGeneFeature).getSequence(), germlinePartitioning.getTranslationParameters(bigGeneFeature)); } From 4e23297b24c8099959411ec703d86b02f0fa3b7c Mon Sep 17 00:00:00 2001 From: Stanislav Poslavsky Date: Mon, 30 Jan 2017 14:10:45 +0300 Subject: [PATCH 04/19] minor fix for export when fields are given in the file --- .../java/com/milaboratory/mixcr/cli/ActionExportParameters.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/milaboratory/mixcr/cli/ActionExportParameters.java b/src/main/java/com/milaboratory/mixcr/cli/ActionExportParameters.java index bb94d734e..d174012a3 100644 --- a/src/main/java/com/milaboratory/mixcr/cli/ActionExportParameters.java +++ b/src/main/java/com/milaboratory/mixcr/cli/ActionExportParameters.java @@ -195,6 +195,7 @@ public static ArrayList parseFile(OutputMode outputMode, Class c String line; while ((line = reader.readLine()) != null) { line = line.trim(); + line = line.replace("\"", ""); if (!line.isEmpty()) options.addAll(Arrays.asList(line.split(" "))); } From dce8757f9af6f1001306d948da7b6c23355f8ef8 Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Mon, 30 Jan 2017 15:32:54 +0300 Subject: [PATCH 05/19] CHANGELOG --- CHANGELOG_CURRENT | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG_CURRENT b/CHANGELOG_CURRENT index e69de29bb..4f38ea9a5 100644 --- a/CHANGELOG_CURRENT +++ b/CHANGELOG_CURRENT @@ -0,0 +1,3 @@ +Fix for NPE in `-nMutations ...` `-aaMutations ...` +Correct visualization of D gene P segments in exportAlignmentsPretty +minor: Fix for error in export when fields are given in the file \ No newline at end of file From f9d11976539aada6f91240a57189c87c4bbfa515 Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Mon, 30 Jan 2017 16:14:52 +0300 Subject: [PATCH 06/19] repseqio 1.2.5 release --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 3271c07b2..1ae76cde0 100644 --- a/pom.xml +++ b/pom.xml @@ -44,14 +44,14 @@ UTF-8 - 1.7 + 1.7.1 io.repseq repseqio - 1.2.5-SNAPSHOT + 1.2.5 From 0fcaafdcd9fbe3843654318f3c477bdd7c37dc47 Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Mon, 30 Jan 2017 16:51:20 +0300 Subject: [PATCH 07/19] Probable fix for problem with GeneFeature.intersection method. --- pom.xml | 2 +- .../java/com/milaboratory/mixcr/export/FeatureExtractors.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 1ae76cde0..f261c4c25 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ io.repseq repseqio - 1.2.5 + 1.2.6-SNAPSHOT diff --git a/src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java b/src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java index 2eeb793d1..67d3ab537 100644 --- a/src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java +++ b/src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java @@ -130,7 +130,7 @@ protected String extractValue(VDJCObject object, GeneFeature[] parameters) { if (smallTargetRage == null) return "-"; - GeneFeature intersectionBigAligned = GeneFeature.intersection(bigGeneFeature, alignedFeature); + GeneFeature intersectionBigAligned = GeneFeature.intersectionStrict(bigGeneFeature, alignedFeature); for (int i = 0; i < hit.numberOfTargets(); ++i) { Alignment alignment = hit.getAlignment(i); From c369a103a08664d89164859bc66210d11234ac6a Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Tue, 31 Jan 2017 17:13:09 +0300 Subject: [PATCH 08/19] Fix for exception in default exportClones. --- .../mixcr/export/FeatureExtractors.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java b/src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java index 67d3ab537..40a9ded14 100644 --- a/src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java +++ b/src/main/java/com/milaboratory/mixcr/export/FeatureExtractors.java @@ -31,10 +31,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]))); - for (GeneFeature feature : 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))); //todo bigfeature nofloating bounds } @@ -92,6 +88,15 @@ static abstract class MutationsExtractor extends WithHeader { super(command, description, nArgs, hPrefix, sPrefix); } + @Override + void validate(GeneFeature[] features) { + super.validate(features); + for (GeneFeature feature : 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))); + } + @Override protected String extractValue(VDJCObject object, GeneFeature[] parameters) { GeneFeature smallGeneFeature = parameters[0]; From af7eec6e65ac91a75d46d17f8ea7dfc1dd0bd4ec Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Sat, 4 Feb 2017 14:07:27 +0300 Subject: [PATCH 09/19] Prepare for travis-ci --- .gitmodules | 3 +++ .travis.yml | 19 +++++++++++++++++++ repseqio | 1 + 3 files changed, 23 insertions(+) create mode 100644 .travis.yml create mode 160000 repseqio diff --git a/.gitmodules b/.gitmodules index e69de29bb..6e4efa51e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "repseqio"] + path = repseqio + url = https://github.com/repseqio/repseqio.git diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..7b739c0b1 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,19 @@ +language: java + +sudo: false + +git: + submodules: false + +before_install: + - sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules + - git submodule update --init --recursive + - cd repseqio/milib && mvn clean install -DskipTests && cd .. + - mvn clean install -DskipTests && cd .. + +jdk: + - openjdk7 + +cache: + directories: + - $HOME/.m2 \ No newline at end of file diff --git a/repseqio b/repseqio new file mode 160000 index 000000000..199a917a8 --- /dev/null +++ b/repseqio @@ -0,0 +1 @@ +Subproject commit 199a917a81c2f9faf89802f4ad359c1c58946b30 From 4e195bb4648b2f4b3569dd8d9be0d9d398c99f2a Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Sat, 4 Feb 2017 14:10:53 +0300 Subject: [PATCH 10/19] Bump. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7b739c0b1..308771fb1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,4 +16,4 @@ jdk: cache: directories: - - $HOME/.m2 \ No newline at end of file + - $HOME/.m2 From ccacdd6e4fa788dbc6f749014b43ee0a0b044454 Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Sat, 4 Feb 2017 14:17:27 +0300 Subject: [PATCH 11/19] Batch-mode submodule build. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 308771fb1..10c0dc31e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,8 @@ git: before_install: - sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules - git submodule update --init --recursive - - cd repseqio/milib && mvn clean install -DskipTests && cd .. - - mvn clean install -DskipTests && cd .. + - cd repseqio/milib && mvn clean install -DskipTests -B && cd .. + - mvn clean install -DskipTests -B && cd .. jdk: - openjdk7 From 2ae00d1e430dfb020e6bd61da1bc7ac2ac96c72f Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Sat, 4 Feb 2017 14:27:28 +0300 Subject: [PATCH 12/19] Test output cleanup. Cache of repseqio .cache folder. --- .travis.yml | 1 + .../partialassembler/PartialAlignmentsAssemblerTest.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 10c0dc31e..8b5b8da4f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,3 +17,4 @@ jdk: cache: directories: - $HOME/.m2 + - ./repseqio/.cache diff --git a/src/test/java/com/milaboratory/mixcr/partialassembler/PartialAlignmentsAssemblerTest.java b/src/test/java/com/milaboratory/mixcr/partialassembler/PartialAlignmentsAssemblerTest.java index a78082fae..70b022cf8 100644 --- a/src/test/java/com/milaboratory/mixcr/partialassembler/PartialAlignmentsAssemblerTest.java +++ b/src/test/java/com/milaboratory/mixcr/partialassembler/PartialAlignmentsAssemblerTest.java @@ -250,8 +250,8 @@ public static TestResult processData(PairedRead[] data, InputTestData input) thr try (final VDJCAlignmentsReader reader = inputAlignments.resultReader()) { assembler.searchOverlaps(reader); } - assembler.writeReport(new ReportHelper(System.out)); - System.out.println("\n"); + //assembler.writeReport(new ReportHelper(System.out)); + //System.out.println("\n"); } From 86aed5ba7ac7119c51e9d13506c52264cfe099a5 Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Sat, 4 Feb 2017 14:30:48 +0300 Subject: [PATCH 13/19] toprev --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8b5b8da4f..9fbf327bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,11 @@ git: before_install: - sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules - git submodule update --init --recursive + - rm -rf ./repseqio/.cache + - mv .cache ./repseqio/.cache - cd repseqio/milib && mvn clean install -DskipTests -B && cd .. - mvn clean install -DskipTests -B && cd .. + - mv ./repseqio/.cache .cache jdk: - openjdk7 @@ -17,4 +20,4 @@ jdk: cache: directories: - $HOME/.m2 - - ./repseqio/.cache + - .cache From 24f10437e167045611f5a5e8c02c535f6c459dd3 Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Sat, 4 Feb 2017 14:47:09 +0300 Subject: [PATCH 14/19] To previous. --- .../partialassembler/PartialAlignmentsAssemblerTest.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/test/java/com/milaboratory/mixcr/partialassembler/PartialAlignmentsAssemblerTest.java b/src/test/java/com/milaboratory/mixcr/partialassembler/PartialAlignmentsAssemblerTest.java index 70b022cf8..e4d82f3a5 100644 --- a/src/test/java/com/milaboratory/mixcr/partialassembler/PartialAlignmentsAssemblerTest.java +++ b/src/test/java/com/milaboratory/mixcr/partialassembler/PartialAlignmentsAssemblerTest.java @@ -8,7 +8,6 @@ import com.milaboratory.core.sequence.SequenceBuilder; import com.milaboratory.core.sequence.SequenceQuality; import com.milaboratory.mixcr.basictypes.*; -import com.milaboratory.mixcr.cli.ReportHelper; import com.milaboratory.mixcr.util.RunMiXCR; import com.milaboratory.mixcr.vdjaligners.VDJCAlignerParameters; import com.milaboratory.mixcr.vdjaligners.VDJCParametersPresets; @@ -214,9 +213,8 @@ public static TestResult processData(PairedRead[] data, InputTestData input) thr params.alignerParameters.setAllowPartialAlignments(true); final RunMiXCR.AlignResult inputAlignments = RunMiXCR.align(params); - inputAlignments.report.writeReport(new ReportHelper(System.out)); - System.out.println("\n"); - + //inputAlignments.report.writeReport(new ReportHelper(System.out)); + //System.out.println("\n"); for (VDJCAlignments al : inputAlignments.alignments) { for (GeneType gt : GeneType.VJC_REFERENCE) { From 895ef450d23d63e2caa4eb9673f30b39efa23ed2 Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Sat, 4 Feb 2017 14:49:34 +0300 Subject: [PATCH 15/19] Travis CI Build Status --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 139f212a4..c12871e5f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://travis-ci.org/milaboratory/mixcr.svg)](https://travis-ci.org/milaboratory/mixcr) + ## Overview MiXCR is a universal software for fast and accurate analysis of raw T- or B- cell receptor repertoire sequencing data. From c307eeec4edb572c273565f2e818f673525477fa Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Sat, 4 Feb 2017 15:17:06 +0300 Subject: [PATCH 16/19] Build script. --- build.sh | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100755 build.sh diff --git a/build.sh b/build.sh new file mode 100755 index 000000000..59ad4a494 --- /dev/null +++ b/build.sh @@ -0,0 +1,83 @@ +#!/bin/bash + +# Linux readlink -f alternative for Mac OS X +function readlinkUniversal() { + targetFile=$1 + + cd `dirname $targetFile` + targetFile=`basename $targetFile` + + # iterate down a (possible) chain of symlinks + while [ -L "$targetFile" ] + do + targetFile=`readlink $targetFile` + cd `dirname $targetFile` + targetFile=`basename $targetFile` + done + + # compute the canonicalized name by finding the physical path + # for the directory we're in and appending the target file. + phys_dir=`pwd -P` + result=$phys_dir/$targetFile + echo $result +} + +os=`uname` +delta=100 + +dir="" + +case $os in + Darwin) + dir=$(dirname "$(readlinkUniversal "$0")") + ;; + Linux) + dir="$(dirname "$(readlink -f "$0")")" + ;; + FreeBSD) + dir=$(dirname "$(readlinkUniversal "$0")") + ;; + *) + echo "Unknown OS." + exit 1 + ;; +esac + +if [[ ! -f ${dir}/repseqio/milib/pom.xml ]]; +then + echo "Please init git submodules. Try:" + echo "git submodule update --init --recursive" + exit 1 +fi + +function error_exit { + echo -e "$1" + exit "${2:-1}" +} + +GREEN='\033[0;32m' +RED='\033[0;31m' +NC='\033[0m' # No Color + +echo "Building MiLib." +cd ${dir}/repseqio/milib +mvn clean install -DskipTests -B || error_exit "${RED}Problem building MiLib!${NC}" 1 + +echo "Building RepSeq.IO util/lib" +cd ${dir}/repseqio +mvn clean install -DskipTests -B || error_exit "${RED}Problem building RepSeq.IO util!${NC}" 1 + +echo "Building MiXCR." +cd ${dir} +mvn clean install -DskipTests -B || error_exit "${RED}Problem building MiXCR util!${NC}" 1 + +echo -e "${GREEN}Build successfull!${NC}" +echo "The following is the output of \"mixcr -v\" command:" +${dir}/mixcr -v || error_exit "${RED}Something went wrong!${NC}" 1 +echo -e "${GREEN}Everything seems OK!${NC}" +echo "" +echo "Add mixcr script from this folder to your PATH variable or add symlink to your bin folder." +echo "" +echo "MiXCR is free for Academic use. For commertial use please contact licensing@milaboratory.com ." +echo "" +echo "If you discover bugs or have any questions, contact us at https://github.com/milaboratory/mixcr/issues ." From e8134b72f7f11519ef12296216dd01b764d211fe Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Sat, 4 Feb 2017 15:23:34 +0300 Subject: [PATCH 17/19] Build instructions. --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index c12871e5f..59fef64e7 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,27 @@ For more details see documentation. Detailed documentation can be found at https://mixcr.readthedocs.io/ +## Build + +Dependancy: + +- Maven 3 (https://maven.apache.org/) + +To build MiXCR from source: + +- Refresh git submodules + + ``` + git submodule update --init --recursive + ``` + +- Run build script. First build may take several minuties to download sequences for built-in V/D/J/C gene libraries from NCBI. + + ``` + ./build.sh + ``` + + ## License Copyright (c) 2014-2015, Bolotin Dmitry, Chudakov Dmitry, Shugay Mikhail From 6d8d63fbe4345e0edcc535279deba3095698e573 Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Sat, 4 Feb 2017 15:36:23 +0300 Subject: [PATCH 18/19] Repseqio 1.2.6 release version. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f261c4c25..238120ef1 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ io.repseq repseqio - 1.2.6-SNAPSHOT + 1.2.6 From 04140fb88e627b081d5124afe0188a8579f152de Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Sat, 4 Feb 2017 15:39:38 +0300 Subject: [PATCH 19/19] Release v2.0.4 --- CHANGELOG | 8 ++++++++ CHANGELOG_CURRENT | 3 --- pom.xml | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 4ed7d17fe..23727c437 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,12 @@ +MiXCR 2.0.4 ( 4 Feb 2017) +======================== + +-- Fix for NPE in `-nMutations ...` `-aaMutations ...` +-- Correct visualization of D gene P segments in exportAlignmentsPretty +-- minor: Fix for error in export when fields are given in the file + + MiXCR 2.0.3 (26 Dec 2016) ======================== diff --git a/CHANGELOG_CURRENT b/CHANGELOG_CURRENT index 4f38ea9a5..e69de29bb 100644 --- a/CHANGELOG_CURRENT +++ b/CHANGELOG_CURRENT @@ -1,3 +0,0 @@ -Fix for NPE in `-nMutations ...` `-aaMutations ...` -Correct visualization of D gene P segments in exportAlignmentsPretty -minor: Fix for error in export when fields are given in the file \ No newline at end of file diff --git a/pom.xml b/pom.xml index 238120ef1..f228e010b 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ com.milaboratory mixcr - 2.0.4-SNAPSHOT + 2.0.4 jar MiXCR