* minor formatting changes

* support for "extended" output

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@428 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
kcibul 2009-04-15 15:11:05 +00:00
parent 12407b5b1a
commit 3fda8613c3
1 changed files with 11 additions and 4 deletions

View File

@ -25,9 +25,13 @@ public class SomaticCoverageWalker extends LocusWalker<Integer, Integer> {
@Argument(fullName = "normal_sample_name", shortName = "s2", required = true)
public String normalSampleName;
@Argument(fullName = "extended", shortName="ext", required=false, defaultValue = "false")
public boolean extendedOutput;
// --normal_sample_name TCGA-06-0188-10B-01W --tumor_sample_name TCGA-06-0188-01A-01W
public void initialize() {
out.println("track type=wiggle_0 name=SomaticCoverage viewLimits=0:1 graphType=heatmap");
out.println("track type=wiggle_0 name=SomaticCoverage viewLimits=0:1");
}
public String walkerType() { return "ByLocus"; }
@ -108,15 +112,18 @@ public class SomaticCoverageWalker extends LocusWalker<Integer, Integer> {
if (lastContigIndex != context.getLocation().getContigIndex() ||
lastPosition + 1 != context.getPosition()) {
lastContigIndex = context.getLocation().getContigIndex();
sb.append("fixedStep\t")
.append("chrom=").append(context.getContig()).append("\t")
.append("start=").append(context.getPosition()).append("\t")
sb.append("fixedStep").append(" ")
.append("chrom=").append(context.getContig()).append(" ")
.append("start=").append(context.getPosition()).append(" ")
.append("step=1")
.append("\n");
}
lastPosition = context.getPosition();
sb.append((isTumorCovered && isNormalCovered)?"1":"0");
if (extendedOutput) {
sb.append(" ").append(tumorDepth).append(" ").append(normalDepth);
}
// sb.append(context.getContig()).append(" ");
// sb.append(context.getPosition()).append(" ");