added MAF-style output

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1163 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
kcibul 2009-07-03 15:10:19 +00:00
parent dcb8892568
commit 25c30b12bb
1 changed files with 33 additions and 16 deletions

View File

@ -50,6 +50,9 @@ public class SomaticMutationWalker extends LocusWalker<Integer, Integer> {
// @Argument(fullName = "output_failures", required = false, doc="produce output for failed sites")
public boolean OUTPUT_FAILURES = true;
@Argument(fullName = "output_format", shortName = "s3", required = true, doc="Format of output: bed or maf")
public String OUTPUT_FORMAT;
public void initialize() {
}
@ -260,6 +263,19 @@ public class SomaticMutationWalker extends LocusWalker<Integer, Integer> {
// if we're still here... we've got a somatic mutation! Output the results
// and stop looking for mutants!
if ("maf".equalsIgnoreCase(OUTPUT_FORMAT)) {
out.println(
"36\t" + //build
context.getContig() + "\t" +
context.getPosition() + "\t" +
context.getPosition() + "\t" +
upRef + "\t" +
upRef + "\t" +
altAllele + "\t" +
tumorSampleName + "\t" +
normalSampleName);
} else {
String msg =
(failedMidpointCheck?"__FAILED-MPCHECK":"") +
"TScore:" + tumorLod +
@ -277,6 +293,7 @@ public class SomaticMutationWalker extends LocusWalker<Integer, Integer> {
context.getPosition() + "\t"
+ msg.replace(' ','_')
);
}