Skip to content

Commit

Permalink
Now align will print library-level citation notice and warnings.
Browse files Browse the repository at this point in the history
This fixes #285
  • Loading branch information
dbolotin committed Dec 12, 2017
1 parent 59b4d89 commit 52cee0f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG_CURRENT
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Now export fields like `-nMutationsRelative` supports alignment-attached gene features (e.g. this allows to export all mutations of V gene inside CDR3 region: `-nMutationsRelative VCDR3Part VRegionWithP`)
Now `align` action prints library-level warnings and citation notice
minor: `--noMerge` option renamed to `--no-merge` in assemble action
2 changes: 1 addition & 1 deletion repseqio
18 changes: 14 additions & 4 deletions src/main/java/com/milaboratory/mixcr/cli/ActionAlign.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,10 @@
import com.milaboratory.mixcr.vdjaligners.VDJCAlignmentResult;
import com.milaboratory.mixcr.vdjaligners.VDJCParametersPresets;
import com.milaboratory.util.CanReportProgress;
import com.milaboratory.util.GlobalObjectMappers;
import com.milaboratory.util.SmartProgressReporter;
import io.repseq.core.*;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.util.*;

import static cc.redberry.pipe.CUtils.chunked;
Expand Down Expand Up @@ -121,6 +117,20 @@ public void go(ActionHelper helper) throws Exception {

System.out.println("Reference library: " + library.getLibraryId());

// Printing library level warnings, if specified for the library
if (!library.getWarnings().isEmpty()) {
System.out.println("Library warnings:");
for (String l : library.getWarnings())
System.out.println(l);
}

// Printing citation notice, if specified for the library
if (!library.getCitations().isEmpty()) {
System.out.println("Please cite:");
for (String l : library.getCitations())
System.out.println(l);
}

for (VDJCGene gene : library.getGenes(actionParameters.getChains())) {
if (gene.getGeneType() == GeneType.Variable) {
totalV++;
Expand Down

0 comments on commit 52cee0f

Please sign in to comment.