Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI issues #371

Merged
merged 13 commits into from
Jun 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

language: java

sudo: false
Expand All @@ -8,12 +9,12 @@ git:
before_install:
- sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules
- git submodule update --init --recursive
- cd milib && mvn clean install -DskipTests -B && cd ..
- rm -rf ./repseqio/.cache
- mv .cache ./repseqio/.cache
- cd repseqio/milib && mvn clean install -DskipTests -B && cd ..
- mvn clean install -DskipTests -B && cd ..
- cd repseqio && mvn clean install -DskipTests -B && cd ..
- mv ./repseqio/.cache .cache
- ./ensure-test-data.sh


script:
- mvn test -B && ./itests.sh test
Expand All @@ -29,4 +30,3 @@ cache:
directories:
- $HOME/.m2
- .cache
- src/test/resources/sequences/big
6 changes: 3 additions & 3 deletions itests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ function go_assemble {
if [[ $create_standard_results == true ]]; then
for s in sample_IGH test;
do
mixcr align -r ${s}_paired.vdjca.report ${s}_R1.fastq ${s}_R2.fastq ${s}_paired.vdjca
mixcr align -s hs -r ${s}_paired.vdjca.report ${s}_R1.fastq ${s}_R2.fastq ${s}_paired.vdjca
go_assemble ${s}_paired
mixcr align -r ${s}_single.vdjca.report ${s}_R1.fastq ${s}_single.vdjca
mixcr align -s hs -r ${s}_single.vdjca.report ${s}_R1.fastq ${s}_single.vdjca
go_assemble ${s}_single
done
fi
Expand All @@ -104,6 +104,6 @@ fi

if [[ $run_tests == true ]]; then
echo "Running test case 1"
mixcr align -OvParameters.geneFeatureToAlign=VGeneWithP test_R1.fastq test_R2.fastq case1.vdjca
mixcr align -s hs -OvParameters.geneFeatureToAlign=VGeneWithP test_R1.fastq test_R2.fastq case1.vdjca
mixcr assemble case1.vdjca case1.clns
fi
13 changes: 12 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,25 @@
<groupId>io.repseq</groupId>
<artifactId>repseqio</artifactId>
<version>1.3-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>com.milaboratory</groupId>
<artifactId>milib</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>com.milaboratory</groupId>
<artifactId>milib</artifactId>
<version>${milib.version}</version>
</dependency>

<dependency>
<groupId>com.milaboratory</groupId>
<artifactId>milib</artifactId>
<version>${milib.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion repseqio
65 changes: 14 additions & 51 deletions src/main/java/com/milaboratory/mixcr/cli/ActionAlign.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@
import com.beust.jcommander.ParameterException;
import com.beust.jcommander.Parameters;
import com.beust.jcommander.validators.PositiveInteger;
import com.milaboratory.cli.Action;
import com.milaboratory.cli.ActionHelper;
import com.milaboratory.cli.ActionParametersWithOutput;
import com.milaboratory.cli.ProcessException;
import com.milaboratory.cli.*;
import com.milaboratory.core.PairedEndReadsLayout;
import com.milaboratory.core.Target;
import com.milaboratory.core.io.sequence.SequenceRead;
Expand Down Expand Up @@ -94,30 +91,15 @@ public ActionAlign() {
@Override
@SuppressWarnings("unchecked")
public void go(ActionHelper helper) throws Exception {
// FIXME remove in 2.2
if (actionParameters.printNonFunctionalWarnings())
System.out.println("WARNING: -wf / --non-functional-warnings option is deprecated, will be removed in 2.2 " +
"release. Use --verbose instead.");

// Saving initial timestamp
long beginTimestamp = System.currentTimeMillis();

// Getting aligner parameters
VDJCAlignerParameters alignerParameters = actionParameters.getAlignerParameters();

// FIXME remove in 2.3
if (actionParameters.getSaveOriginalReads()) {
System.out.println("WARNING: -g / --save-reads option is deprecated, will be removed in 2.3 " +
"release. Use -OsaveOriginalReads=true.");
alignerParameters.setSaveOriginalReads(true);
}

// FIXME remove in 2.3
if (actionParameters.getSaveReadDescription()) {
System.out.println("WARNING: -a / --save-description option is deprecated, will be removed in 2.3 " +
"release. Use -OsaveOriginalReads=true.");
if (actionParameters.getSaveOriginalReads() || actionParameters.getSaveReadDescription())
alignerParameters.setSaveOriginalReads(true);
}

if (!actionParameters.overrides.isEmpty()) {
// Perform parameters overriding
Expand All @@ -126,12 +108,6 @@ public void go(ActionHelper helper) throws Exception {
throw new ProcessException("Failed to override some parameter.");
}

// FIXME remove in 2.2
if (actionParameters.allowDifferentVJLoci != null && actionParameters.allowDifferentVJLoci) {
System.out.println("Warning: usage of --diff-loci is deprecated. Use -OallowChimeras=true instead.");
alignerParameters.setAllowChimeras(true);
}

// Creating aligner
VDJCAligner aligner = VDJCAligner.createAligner(alignerParameters,
actionParameters.isInputPaired(), !actionParameters.getNoMerge());
Expand Down Expand Up @@ -341,11 +317,6 @@ public static class AlignParameters extends ActionParametersWithOutput {
names = {"-b", "--library"})
public String library = "default";

// TODO remove in 2.2 release
@Parameter(description = "Print warnings for non-functional V/D/J/C genes",
names = {"-wf", "--non-functional-warnings"})
public Boolean nonFunctionalWarnings = null;

@Parameter(description = "Verbose warning messages.",
names = {"--verbose"})
public Boolean verbose = null;
Expand All @@ -367,14 +338,17 @@ public static class AlignParameters extends ActionParametersWithOutput {
public String jsonReport = null;

@Parameter(description = "Species (organism), as specified in library file or taxon id. " +
"Possible values: hs, HomoSapiens, musmusculus, mmu, hsa, 9606, 10090 etc..",
names = {"-s", "--species"})
"Possible values: hs, HomoSapiens, musmusculus, mmu, hsa, 9606, 10090 etc.",
names = {"-s", "--species"},
required = true)
public String species = "hs";

@Deprecated
@DeprecatedParameter(value = "Use --chains only for exportAlignments and exportClones", version = "2.2")
@Parameter(description = "Specifies immunological chain gene(s) for alignment. If many, separate by comma ','. " +
"Available chains: IGH, IGL, IGK, TRA, TRB, TRG, TRD, etc...",
names = {"-c", "--chains"})
public String chains = "ALL";
public String chains = "ALL"; //FIXME remove in 2.3

@Parameter(description = "Processing threads",
names = {"-t", "--threads"}, validateWith = PositiveInteger.class)
Expand All @@ -389,20 +363,21 @@ public static class AlignParameters extends ActionParametersWithOutput {
public Boolean noMerge;

@Deprecated
@DeprecatedParameter("Use -OsaveOriginalReads=true.")
@Parameter(description = "Copy read(s) description line from .fastq or .fasta to .vdjca file (can then be " +
"exported with -descrR1 and -descrR2 options in exportAlignments action).",
names = {"-a", "--save-description"})
public Boolean saveReadDescription;
public Boolean saveReadDescription; //FIXME remove in 2.3

//TODO delete -v in 2.2
@Parameter(description = "Write alignment results for all input reads (even if alignment has failed).",
names = {"-v", "--write-all"})
names = {"--write-all"})
public Boolean writeAllResults;

@Deprecated
@DeprecatedParameter("Use -OsaveOriginalReads=true")
@Parameter(description = "Copy original reads (sequences + qualities + descriptions) to .vdjca file.",
names = {"-g", "--save-reads"})
public Boolean saveOriginalReads;
public Boolean saveOriginalReads; //FIXME remove in 2.3

@Parameter(description = "Write not aligned reads (R1).",
names = {"--not-aligned-R1"})
Expand All @@ -412,11 +387,6 @@ public static class AlignParameters extends ActionParametersWithOutput {
names = {"--not-aligned-R2"})
public String failedReadsR2 = null;

@Parameter(description = "Allow alignments with different chains of V and J hits.",
names = {"-i", "--diff-loci"}, hidden = true)
public Boolean allowDifferentVJLoci = null;


public String getSpecies() {
return species;
}
Expand Down Expand Up @@ -450,15 +420,8 @@ public Boolean getSaveOriginalReads() {
return saveOriginalReads != null && saveOriginalReads;
}

@Deprecated
public boolean printNonFunctionalWarnings() {
return nonFunctionalWarnings != null && nonFunctionalWarnings;
}

public boolean verbose() {
return (verbose != null && verbose) ||
// FIXME remove in 2.2
(nonFunctionalWarnings != null && nonFunctionalWarnings);
return verbose != null && verbose;
}

public boolean printWarnings() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ public ActionAssemblePartialAlignments() {

@Override
public void go(ActionHelper helper) throws Exception {
if (parameters.writePartial != null)
System.err.println("'-p' option is deprecated and will be removed in 2.2. " +
"Use '-d' option to drop not-overlapped partial reads.");

// Saving initial timestamp
long beginTimestamp = System.currentTimeMillis();
PartialAlignmentsAssemblerParameters assemblerParameters = PartialAlignmentsAssemblerParameters.getDefault();
Expand Down Expand Up @@ -126,10 +122,6 @@ public static class AssemblePartialAlignmentsParameters extends ActionParameters
names = {"-o", "--overlapped-only"})
public Boolean overlappedOnly;

@Parameter(description = "[Deprecated, enabled by default] Write partial sequences (for recurrent overlapping).",
names = {"-p", "--write-partial"})
public Boolean writePartial;

@Parameter(description = "Drop partial sequences which were not assembled. Can be used to reduce output file " +
"size if no additional rounds of 'assemblePartial' are required.",
names = {"-d", "--drop-partial"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ public class ActionExportParameters<T extends VDJCObject> extends ActionParamete
names = {"-c", "--chains"})
public String chains = "ALL";

@Deprecated
@Parameter(description = "Limit export to specific chain (e.g. TRA or IGH) (fractions will be recalculated)",
names = {"-l", "--loci"}, hidden = true)
public String chains_legacy = null;

@Parameter(description = "Specify preset of export fields (possible values: 'full', 'min'; 'full' by default)",
names = {"-p", "--preset"})
public String preset;
Expand Down Expand Up @@ -98,12 +93,6 @@ public String getInputFile() {
}

public Chains getChains() {
if (chains_legacy != null) {
if (!chains.equals("ALL"))
throw new ParameterException("Use -c without -l parameter.");
System.out.println("WARNING: using of -l (--loci) option is deprecated; use -c (--chains) instead.");
return Chains.parse(chains_legacy);
}
return Chains.parse(chains);
}

Expand Down