public void checkPrintFiles() { LinkedHashMap<String, File> nameFile = new LinkedHashMap<String, File>(); nameFile.put("Reference directory", referenceDir); nameFile.put("Pipeline.jar", pJar); nameFile.put("Pipeline properties", truncPipePropFile); nameFile.put("Coverage QC bed", bedForCoverageQC); nameFile.put("Variant calling bed", bedForVarCalling); nameFile.put("Fasta genome reference", fastaReference); nameFile.put("Unfiltered bam", unfilteredBam); nameFile.put("Final bam", finalBam); nameFile.put("Final vcf", finalVcf); if (webRootForLinks != null) nameFile.put("Web links dir", webRootForLinks); nameFile.put("Final output dir", outputDirectory); boolean missingFile = false; System.out.println("\nResources (name exists path):"); for (String name : nameFile.keySet()) { File f = nameFile.get(name); boolean fExists = true; if (f == null) { fExists = false; missingFile = true; } else { fExists = f.exists(); if (fExists == false) missingFile = true; } System.out.println(name + "\t" + fExists + "\t" + f); } if (missingFile) Misc.printErrAndExit("\nMissing resources! See above."); }
public void checkPrintFields() { LinkedHashMap<String, String> nameField = new LinkedHashMap<String, String>(); nameField.put("Job ID", jobId); nameField.put("Sample ID", sampleId); nameField.put("Submitter", submitter); nameField.put("Analysis Type", analysisType); nameField.put("Minimum Align Depth", minimumReadDepth); nameField.put("Threads", threads); nameField.put("SnpEff Genome", snpEffGenome); // set output of booleans nameField.put("Upload Vars to NGSWeb", uploadVarsToNGSWeb + ""); boolean missingField = false; System.out.println("Fields:"); for (String name : nameField.keySet()) { String f = nameField.get(name); if (f == null || f.length() == 0) missingField = true; System.out.println(name + "\t" + f); } if (missingField) Misc.printErrAndExit("\nMissing Fields! See above."); }