Skip to content

Commit

Permalink
Merge branch 'release/v3.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
dbolotin committed Oct 30, 2018
2 parents f826d72 + 49a614d commit 485533c
Show file tree
Hide file tree
Showing 8 changed files with 185 additions and 86 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@

MiXCR 3.0.2 (30 Oct 2018)
========================

-- Additional fix for error in `exportAlignments` / `exportClones` with repeated non-parametrized
options
-- Added support for affine alignments in `assembleContigs`


MiXCR 3.0.1 (25 Oct 2018)
========================

Expand Down
4 changes: 3 additions & 1 deletion itests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,11 @@ fi

if [[ $run_tests == true ]]; then
echo "Running test case 1"
mixcr align -s hs -OvParameters.geneFeatureToAlign=VGeneWithP test_R1.fastq test_R2.fastq case1.vdjca
mixcr align -s hs -OvParameters.geneFeatureToAlign=VGeneWithP -OsaveOriginalReads=true test_R1.fastq test_R2.fastq case1.vdjca
mixcr assemble case1.vdjca case1.clns

mixcr exportAlignments -nFeatureImputed VDJRegion -descrsR1 -descrsR2 case1.vdjca case1.alignments.txt

echo "Running test case 2"
mixcr analyze shotgun -f --species hs --contig-assembly --impute-germline-on-export --starting-material rna test_R1.fastq test_R2.fastq case2

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.1</version>
<version>3.0.2</version>
<packaging>jar</packaging>
<name>MiXCR</name>

Expand Down

Large diffs are not rendered by default.

47 changes: 23 additions & 24 deletions src/main/java/com/milaboratory/mixcr/basictypes/ClnAWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import cc.redberry.pipe.OutputPort;
import cc.redberry.pipe.OutputPortCloseable;
import cc.redberry.pipe.util.CountingOutputPort;
import cc.redberry.pipe.util.StatusReporter;
import com.milaboratory.mixcr.util.MiXCRVersionInfo;
import com.milaboratory.primitivio.PipeDataInputReader;
import com.milaboratory.primitivio.PrimitivI;
Expand Down Expand Up @@ -258,34 +257,34 @@ public synchronized void writeAlignmentsAndIndex() {
// Writer
try ( // TODO parametrise
BasicVDJCAlignmentWriterFactory writerFactory = new BasicVDJCAlignmentWriterFactory(
Math.min(16, Runtime.getRuntime().availableProcessors()),
Math.min(4, Runtime.getRuntime().availableProcessors()),
true);
// Writer
BasicVDJCAlignmentWriterFactory.Writer writer =
writerFactory.createWriter(outputState, outputStream, false)) {

StatusReporter reporter = new StatusReporter();
reporter.addCustomProvider(new StatusReporter.StatusProvider() {
volatile String status;
volatile boolean isClosed = false;

@Override
public void updateStatus() {
status = "Busy encoders: " + writerFactory.getBusyEncoders() + " / " + writerFactory.getEncodersCount();
isClosed = writerFactory.isClosed();
}

@Override
public boolean isFinished() {
return isClosed;
}

@Override
public String getStatus() {
return status;
}
});
reporter.start();
// StatusReporter reporter = new StatusReporter();
// reporter.addCustomProvider(new StatusReporter.StatusProvider() {
// volatile String status;
// volatile boolean isClosed = false;
//
// @Override
// public void updateStatus() {
// status = "Busy encoders: " + writerFactory.getBusyEncoders() + " / " + writerFactory.getEncodersCount();
// isClosed = writerFactory.isClosed();
// }
//
// @Override
// public boolean isFinished() {
// return isClosed;
// }
//
// @Override
// public String getStatus() {
// return status;
// }
// });
// reporter.start();

List<VDJCAlignments> block = new ArrayList<>();
// Writing alignments and writing indices
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public interface PipelineConfigurationReader {
* Read pipeline configuration from file or return null
*/
static PipelineConfiguration fromFileOrNull(String fileName, IOUtil.MiXCRFileInfo fileInfo) {
if (fileInfo == null)
return null;
if (!fileInfo.valid)
return null;
try {
Expand Down
36 changes: 17 additions & 19 deletions src/main/java/com/milaboratory/mixcr/cli/CommandAnalyze.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,23 @@ public String description() {


enum _Chains implements WithNameWithDescription {
tcr("All T-cell receptor types (TRA/TRB/TRG/TRD)"),
bcr("All B-cell receptor types (IGH/IGK/IGL/TRD)"),
xcr("All T- and B-cell receptor types"),
tra("TRA chain"),
trb("TRB chain"),
trd("TRD chain"),
trg("TRG chain"),
igh("IGH chain"),
igk("IGK chain"),
igl("IGL chain");
tcr("All T-cell receptor types (TRA/TRB/TRG/TRD)", Chains.TCR),
bcr("All B-cell receptor types (IGH/IGK/IGL/TRD)", Chains.IG),
xcr("All T- and B-cell receptor types", Chains.ALL),
tra("TRA chain", Chains.TRA),
trb("TRB chain", Chains.TRB),
trd("TRD chain", Chains.TRD),
trg("TRG chain", Chains.TRG),
igh("IGH chain", Chains.IGH),
igk("IGK chain", Chains.IGK),
igl("IGL chain", Chains.IGL);
final String key, description;
final Chains chains;

_Chains(String description) {
_Chains(String description, Chains chains) {
this.key = this.toString();
this.description = description;
this.chains = chains;
}

@Override
Expand Down Expand Up @@ -215,14 +217,10 @@ static class _AdaptersCandidates extends EnumCandidates {
description = "Receptor type. Possible values: ${COMPLETION-CANDIDATES}",
required = false /* This will be overridden for amplicon */)
public void setChains(String chains) {
if (chains.equalsIgnoreCase("xcr"))
this.chains = Chains.ALL;
else {
Chains c = Chains.parse(chains.toUpperCase());
if (c == null)
throwValidationException("Illegal value " + chains + " for --receptor-type option.");
this.chains = c;
}
_Chains c = parse0(_Chains.class, chains);
if (c == null)
throwValidationException("Illegal value " + chains + " for --receptor-type option.");
this.chains = c.chains;
}

@Option(names = "--starting-material",
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/milaboratory/mixcr/cli/CommandExport.java
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ <E> List<FieldExtractor<E>> extractor(FieldData fd, Class<E> clazz, OutputMode m
for (Field f : FieldExtractors.getFields()) {
if (fd.field.equalsIgnoreCase(f.getCommand()) && f.canExtractFrom(clazz)) {
if (f.nArguments() == 0) {
if (fd.args.length != 0)
if (!(fd.args.length == 0 || (
fd.args.length == 1 && (fd.args[0].equalsIgnoreCase("true") || fd.args[0].equalsIgnoreCase("false")))))
throw new RuntimeException();
return Collections.singletonList(f.create(m, new String[0]));
} else {
Expand Down

0 comments on commit 485533c

Please sign in to comment.