Skip to content

Commit

Permalink
Chains#parse moved to repseq.io
Browse files Browse the repository at this point in the history
  • Loading branch information
dbolotin committed Mar 28, 2017
1 parent 185c727 commit 86df8be
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 29 deletions.
2 changes: 1 addition & 1 deletion repseqio
2 changes: 1 addition & 1 deletion src/main/java/com/milaboratory/mixcr/cli/ActionAlign.java
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ public boolean printWarnings() {
}

public Chains getChains() {
return Util.parseLoci(chains);
return Chains.parse(chains);
}

public boolean getWriteAllResults() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ TLongHashSet getReadIds() {
}

public Chains getChain() {
return Util.parseLoci(chain);
return Chains.parse(chain);
}

@SuppressWarnings("unchecked")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public static final class AParameters extends ActionParameters {
public String csContain = null;

public Chains getChain() {
return Util.parseLoci(chain);
return Chains.parse(chain);
}

public Filter<Clone> getFilter() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ public Chains getChains() {
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 Util.parseLoci(chains_legacy);
return Chains.parse(chains_legacy);
}
return Util.parseLoci(chains);
return Chains.parse(chains);
}

@SuppressWarnings("unchecked")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private String getOutput() {
}

public Chains getChains() {
return Util.parseLoci(chains);
return Chains.parse(chains);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ protected List<String> getOutputFiles() {
}

public Chains getChains() {
return Util.parseLoci(chains);
return Chains.parse(chains);
}

public VDJCAlignmentsReader getInput() throws IOException {
Expand Down
22 changes: 1 addition & 21 deletions src/main/java/com/milaboratory/mixcr/cli/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,7 @@ private Util() {
}

public static final DecimalFormat PERCENT_FORMAT = new DecimalFormat("#.##");

public static Chains parseLoci(String lociString) {
String[] split = lociString.split(",");
Chains chains = new Chains();
for (String s : split)
chains = chains.merge(parseLocus(s));
return chains;
}

private static Chains parseLocus(String value) {
switch (value.toLowerCase().trim()) {
case "tcr":
return Chains.TCR;
case "ig":
return Chains.IG;
case "all":
return Chains.ALL;
}
return new Chains(value);
}


public static void writeReport(String input, String output,
String commandLineArguments,
String reportFileName,
Expand Down

0 comments on commit 86df8be

Please sign in to comment.