Skip to content

Commit 0ee1f65

Browse files
Merge pull request #241 from AdamaJava/tidyup_qsnp
Tidyup qsnp
2 parents d0ac96c + 0a2243f commit 0ee1f65

23 files changed

+27
-2005
lines changed

qsnp/src/org/qcmg/snp/Main.java

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ public final class Main {
2727

2828
private static String logFile;
2929
private static Ini iniFile;
30-
// private static org.ini4j.Ini iniFile;
3130

3231
/**
3332
* Performs a single merge based on the supplied arguments. Errors will
@@ -53,7 +52,6 @@ public static void main(final String[] args) throws Exception {
5352
int setup(String [] args) throws Exception{
5453
Options options = new Options(args);
5554
if (options.hasHelpOption() || null == args || args.length == 0) {
56-
// System.out.println(Messages.USAGE);
5755
options.displayHelp();
5856
} else if (options.hasVersionOption()) {
5957
System.err.println(Messages.getVersionMessage());
@@ -88,20 +86,17 @@ int setup(String [] args) throws Exception{
8886

8987

9088
// examine annotate mode
91-
String annotateMode = IniFileUtil.getEntry(iniFile, "parameters", "annotateMode");
9289
String runMode = IniFileUtil.getEntry(iniFile, "parameters", "runMode");
9390

9491
// RETRIEVE INPUT & OUTPUT FILES FROM INI
9592
//output
9693
String vcfOutputFilename = IniFileUtil.getOutputFile(iniFile, "vcf");
9794
//input
98-
String pileupFilename = IniFileUtil.getInputFile(iniFile, "pileup");
9995
String controlVCFFilename = IniFileUtil.getInputFile(iniFile, "controlVcf");
10096
String testVCFFilename = IniFileUtil.getInputFile(iniFile, "testVcf");
10197
String controlBamFilename = IniFileUtil.getInputFile(iniFile, "controlBam");
10298
String testBamFilename = IniFileUtil.getInputFile(iniFile, "testBam");
10399
String referenceFilename = IniFileUtil.getInputFile(iniFile, "ref");
104-
String mutectFilename = IniFileUtil.getInputFile(iniFile, "mutect");
105100

106101
StringBuilder errorString = new StringBuilder();
107102

@@ -111,7 +106,6 @@ int setup(String [] args) throws Exception{
111106
if (null == vcfOutputFilename || ! FileUtils.canFileBeWrittenTo(vcfOutputFilename)) {
112107
errorString.append("No vcf output file specified in ini file");
113108
logger.error("No vcf output file specified in ini file");
114-
// return 1;
115109
}
116110

117111
if (errorString.length() > 0) {
@@ -144,42 +138,14 @@ int setup(String [] args) throws Exception{
144138
throw new SnpException("MISSING_ENTRIES_IN_INI_FILE");
145139
}
146140

147-
} else if ("torrent".equalsIgnoreCase(runMode)) {
148-
149-
if (FileUtils.areInputFilesValid(testBamFilename, referenceFilename)) {
150-
new TorrentPipeline(iniFile, qexec, ! FileUtils.areInputFilesValid(controlBamFilename));
151-
} else {
152-
logger.error("run mode is torrent, but no pileup file exists in inputFiles section of ini file");
153-
throw new SnpException("MISSING_ENTRIES_IN_INI_FILE");
154-
}
155-
156-
} else if ("pileup".equalsIgnoreCase(runMode)) {
157-
158-
if (FileUtils.areInputFilesValid(pileupFilename)) {
159-
new PileupPipeline(iniFile, qexec, false); // not sure about single sample for pileup pipe...
160-
} else {
161-
logger.error("run mode is pileup, but no pileup file exists in inputFiles section of ini file");
162-
throw new SnpException("MISSING_ENTRIES_IN_INI_FILE");
163-
}
164-
165141
} else if ("vcf".equalsIgnoreCase(runMode)) {
166142

167143
if (FileUtils.areInputFilesValid(testVCFFilename)) {
168144
new VcfPipeline(iniFile, qexec, ! FileUtils.areInputFilesValid(controlVCFFilename));
169145
} else {
170146
logger.error("run mode is vcf, but no control vcf or test vcf entries exists in inputFiles section of ini file");
171147
throw new SnpException("MISSING_ENTRIES_IN_INI_FILE");
172-
}
173-
174-
} else if ("mutect".equalsIgnoreCase(runMode)) {
175-
176-
if (FileUtils.areInputFilesValid(mutectFilename)) {
177-
new MuTectPipeline(iniFile, qexec);
178-
} else {
179-
logger.error("run mode is mutect, but no mutect entry exists in inputFiles section of ini file");
180-
throw new SnpException("MISSING_ENTRIES_IN_INI_FILE");
181-
}
182-
148+
}
183149
} else {
184150
logger.error("Please specify a valid runType in the ini file : " + runMode);
185151
throw new SnpException("MISSING_ENTRIES_IN_INI_FILE");

0 commit comments

Comments
 (0)