Forgot the onTraversalDone. That was dumb.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2692 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
chartl 2010-01-26 21:02:46 +00:00
parent 04e1832968
commit 2c8d7b0c44
1 changed files with 11 additions and 0 deletions

View File

@ -56,6 +56,17 @@ public class AlleleBalanceHistogramWalker extends RodWalker<Map<String,Double>,
return getAlleleBalanceBySample(record,ref,context);
}
public void onTraversalDone(Map<String,Set<Double>> finalSets) {
for ( String s : finalSets.keySet() ) {
StringBuilder output = new StringBuilder();
output.append(String.format("%s",s));
for ( double d : finalSets.get(s) ) {
output.append(String.format("\t%.2f",d));
}
out.print(String.format("%s%n",output));
}
}
private HashMap<String,Double> getAlleleBalanceBySample(VCFRecord vcf, ReferenceContext ref, AlignmentContext context) {
Map<String, StratifiedAlignmentContext> sampleContext = StratifiedAlignmentContext.splitContextBySample(context.getBasePileup(),null,null);
HashMap<String,Double> balances = new HashMap<String,Double>();