Skip to content

Commit

Permalink
Improve RefPanel logging and refactor eagle map check
Browse files Browse the repository at this point in the history
  • Loading branch information
seppinho committed Aug 13, 2019
1 parent 49a2189 commit 9903f19
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions src/main/java/genepi/imputationserver/steps/Imputation.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,22 @@ public boolean run(WorkflowContext context) {

context.println("Reference Panel: ");
context.println(" Name: " + reference);
context.println(" ID: " + panel.getId());
context.println(" Build: " + panel.getBuild());
context.println(" Location: " + panel.getHdfs());
context.println(" Legend: " + panel.getLegend());
context.println(" Version: " + panel.getVersion());

if (!panel.checkEagleMap()) {
context.error("Eagle map file not found.");
return false;
context.println(" Eagle Map: " + panel.getMapEagle());
context.println(" Eagle BCFs: " + panel.getRefEagle());
context.println(" Minimac Map: " + panel.getMapMinimac());
for (Map.Entry<String, String> entry : panel.getPopulations().entrySet()) {
context.println(" Populations: " + entry.getKey() + "/" + entry.getValue());
}
for (Map.Entry<String, String> entry : panel.getSamples().entrySet()) {
context.println(" Samples: " + entry.getKey() + "/" + entry.getValue());
}
for (Map.Entry<String, String> entry : panel.getQcFilter().entrySet()) {
context.println(" QC Filters: " + entry.getKey() + "/" + entry.getValue());
}

// execute one job per chromosome
Expand Down Expand Up @@ -158,6 +167,16 @@ protected void readConfigFile() {
if (result.needsPhasing) {
context.println("Input data is unphased.");

if (!panel.checkEagleMap()) {
context.error("Eagle map file not found.");
return false;
}

if (!panel.checkEagleBcf()) {
context.error("Eagle bcf files not found.");
return false;
}

// eagle
context.println(" Setting up eagle reference and map files...");
job.setMapEagleHdfs(panel.getMapEagle());
Expand Down

0 comments on commit 9903f19

Please sign in to comment.