While generating YAML now warning and skipping TSV rows that don't have all values.

Fixed log message typo in PipelineTest.


git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5320 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
kshakir 2011-02-25 20:50:03 +00:00
parent 81414a21dd
commit 15ce375787
2 changed files with 32 additions and 21 deletions

View File

@ -257,7 +257,7 @@ object PipelineTest extends BaseTest with Logging {
Assert.fail("Test %s expected exception %s but none was thrown".format(name, expectedException.toString))
} else {
if (CommandLineProgram.result != 0)
throw new RuntimeException("Error running the GATK with arguments: " + args)
throw new RuntimeException("Error running Queue with arguments: " + args)
}
}

View File

@ -82,32 +82,32 @@ awk '
bamFile = columnFields[key]
if (referenceFile == "") {
print "Column header reference_file missing from " tsvFile > "/dev/stderr"
print "ERROR: Column header reference_file missing from " tsvFile > "/dev/stderr"
exitWithError = 1
}
if (intervalList == "") {
print "Column header interval_list missing from " tsvFile > "/dev/stderr"
print "ERROR: Column header interval_list missing from " tsvFile > "/dev/stderr"
exitWithError = 1
}
if (sampleId == "") {
print "Column header sample_id missing from " tsvFile > "/dev/stderr"
print "ERROR: Column header sample_id missing from " tsvFile > "/dev/stderr"
exitWithError = 1
}
if (squidProject == "") {
print "Column header squid_project missing from " tsvFile > "/dev/stderr"
print "ERROR: Column header squid_project missing from " tsvFile > "/dev/stderr"
exitWithError = 1
}
if (collaboratorId == "") {
print "Column header collaborator_id missing from " tsvFile > "/dev/stderr"
print "ERROR: Column header collaborator_id missing from " tsvFile > "/dev/stderr"
exitWithError = 1
}
if (bamFile == "") {
print "Column header *bam_file* missing from " tsvFile > "/dev/stderr"
print "ERROR: Column header *bam_file* missing from " tsvFile > "/dev/stderr"
exitWithError = 1
}
@ -115,7 +115,6 @@ awk '
exit 1
}
refseqDir = "/humgen/gsa-hpprojects/GATK/data/Annotations/refseq/"
dbsnpDir = "/humgen/gsa-hpprojects/GATK/data/"
@ -131,22 +130,34 @@ awk '
printf "{"
} else {
if (NR == 2) {
# Based on the reference of the first sample, specify the dbsnps and refseq tables.
missingValue = 0
if ($referenceFile == "") missingValue = 1
if ($intervalList == "") missingValue = 1
if ($sampleId == "") missingValue = 1
if ($squidProject == "") missingValue = 1
if ($collaboratorId == "") missingValue = 1
if ($bamFile == "") missingValue = 1
referencePartCount = split($referenceFile, referenceParts, "/")
referenceName = referenceParts[referencePartCount]
genotypeDbsnp = genotypeDbsnps[referenceName]
evalDbsnp = evalDbsnps[referenceName]
refseq = refseqs[referenceName]
printf '"$PROJECT_YAML_TEMPLATE"'
printf "\n samples: ["
if (missingValue) {
print "WARNING: Skipping row which does not have all values: " $0 > "/dev/stderr"
} else {
printf ","
if (NR == 2) {
# Based on the reference of the first sample, specify the dbsnps and refseq tables.
referencePartCount = split($referenceFile, referenceParts, "/")
referenceName = referenceParts[referencePartCount]
genotypeDbsnp = genotypeDbsnps[referenceName]
evalDbsnp = evalDbsnps[referenceName]
refseq = refseqs[referenceName]
printf '"$PROJECT_YAML_TEMPLATE"'
printf "\n samples: ["
} else {
printf ","
}
printf '"$SAMPLE_YAML_TEMPLATE"'
}
printf '"$SAMPLE_YAML_TEMPLATE"'
}
}
END {