From 71aa0e94ed0966976f14c5905b8f42418c342f36 Mon Sep 17 00:00:00 2001 From: mikesh Date: Tue, 17 Feb 2015 17:59:15 +0300 Subject: [PATCH] Some refactoring --- .../oncomigec/core/correct/CorrectorParameters.java | 4 ++-- .../com/milaboratory/oncomigec/pipeline/MigecCli.java | 10 +++++----- .../preproc/demultiplex/barcode/BarcodeSearcher.java | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/milaboratory/oncomigec/core/correct/CorrectorParameters.java b/src/main/java/com/milaboratory/oncomigec/core/correct/CorrectorParameters.java index a7794d0..9d4f478 100644 --- a/src/main/java/com/milaboratory/oncomigec/core/correct/CorrectorParameters.java +++ b/src/main/java/com/milaboratory/oncomigec/core/correct/CorrectorParameters.java @@ -73,7 +73,7 @@ public double getMaxBasePairsMaskedRatio() { public Element toXml() { Element e = new Element("CorrectorParameters"); e.addContent(new Element("classifierProbabilityThreshold").setText(Double.toString(classifierProbabilityThreshold))); - e.addContent(new Element("filterSingleMigs").setText(Boolean.toString(filterSingletons))); + e.addContent(new Element("filterSingletons").setText(Boolean.toString(filterSingletons))); e.addContent(new Element("singletonFilterRatio").setText(Double.toString(singletonFilterRatio))); e.addContent(new Element("minMigCoverage").setText(Integer.toString(minMigCoverage))); e.addContent(new Element("minMigCount").setText(Integer.toString(minMigCount))); @@ -86,7 +86,7 @@ public static CorrectorParameters fromXml(Element parent) { Element e = parent.getChild("CorrectorParameters"); return new CorrectorParameters( Double.parseDouble(e.getChildTextTrim("classifierProbabilityThreshold")), - Boolean.parseBoolean(e.getChildTextTrim("filterSingleMigs")), + Boolean.parseBoolean(e.getChildTextTrim("filterSingletons")), Double.parseDouble(e.getChildTextTrim("singletonFilterRatio")), Integer.parseInt(e.getChildTextTrim("minMigCoverage")), Integer.parseInt(e.getChildTextTrim("minMigCount")), diff --git a/src/main/java/com/milaboratory/oncomigec/pipeline/MigecCli.java b/src/main/java/com/milaboratory/oncomigec/pipeline/MigecCli.java index 398552a..bb0b9b2 100644 --- a/src/main/java/com/milaboratory/oncomigec/pipeline/MigecCli.java +++ b/src/main/java/com/milaboratory/oncomigec/pipeline/MigecCli.java @@ -81,7 +81,7 @@ public static void main(String[] args) throws Exception { OptionBuilder .withArgName("name") .hasArg(true) - .withDescription("name of MIGEC parameter preset " + + .withDescription("name of OncoMIGEC parameter preset " + "(currently Illumina-Exome or Torrent454-Exome, case-insensitive)") .withLongOpt(OPT_LOAD_PRESET) .create() @@ -90,7 +90,7 @@ public static void main(String[] args) throws Exception { OptionBuilder .withArgName("file") .hasArg(true) - .withDescription("MIGEC2 parameter file in XML format") + .withDescription("OncoMIGEC parameter file in XML format") .withLongOpt(OPT_IMPORT_PRESET) .create() ) @@ -226,7 +226,7 @@ public static void main(String[] args) throws Exception { // version if (commandLine.hasOption(OPT_VERSION_SHORT)) { - System.out.println("You are using MIGEC2 pipeline of version " + MY_VERSION); + System.out.println("You are using OncoMIGEC pipeline of version " + MY_VERSION); System.exit(0); } @@ -461,7 +461,7 @@ private static void checkPreprocess(MigecPipeline pipeline, File outputFolder, private static void runFirstStage(MigecPipeline pipeline, File outputFolder) { try { - print2("Running first stage of MiGEC"); + print2("Running first stage of OncoMiGEC"); pipeline.runFirstStage(); } catch (Exception e) { System.err.println("Error on first stage of analysis: " + e.toString()); @@ -491,7 +491,7 @@ private static void dumpVariants(MigecPipeline pipeline, File outputFolder, doub private static void runSecondStage(MigecPipeline pipeline, File outputFolder) { try { - print2("Running second stage of MiGEC"); + print2("Running second stage of OncoMiGEC"); pipeline.runSecondStage(); } catch (Exception e) { System.err.println("Error on second stage of analysis: " + e.toString()); diff --git a/src/main/java/com/milaboratory/oncomigec/preproc/demultiplex/barcode/BarcodeSearcher.java b/src/main/java/com/milaboratory/oncomigec/preproc/demultiplex/barcode/BarcodeSearcher.java index 9e6738f..45fc9de 100644 --- a/src/main/java/com/milaboratory/oncomigec/preproc/demultiplex/barcode/BarcodeSearcher.java +++ b/src/main/java/com/milaboratory/oncomigec/preproc/demultiplex/barcode/BarcodeSearcher.java @@ -69,7 +69,7 @@ private static String charToRegex(char c) { case 'N': return "[ATGC]"; default: - throw new IllegalArgumentException("Illegar nucleotide character"); + throw new IllegalArgumentException("Illegal nucleotide character"); } }