Hello,
We're trying to make a tool that takes the output of several iterations of VariantEval (each stratified differently), and then uses these data to make another report. It would be very convenient if our Walker could create/call 2 instances of the VariantEval walker internally. Something like:
public class VariantQC extends RodWalker<Integer, Integer> implements TreeReducible {
private VariantEval sampleStratifiedWalker;
private VariantEval locusStratifiedWalker;
<a href="/gatk/profile/Override">@Override</a>
public void initialize() {
super.initialize();
//configure the child walkers. these would need a fixed set of arguments, derived from this tool
sampleStratifiedWalker = new VariantEval();
sampleStratifiedWalker.initialize();
locusStratifiedWalker = new VariantEval();
locusStratifiedWalker.initialize();
}
<a href="/gatk/profile/Override">@Override</a>
public Integer map(RefMetaDataTracker tracker, ReferenceContext ref, AlignmentContext context) {
//call the child walkers in step with this one
sampleStratifiedWalker.map(tracker, ref, context);
locusStratifiedWalker.map(tracker, ref, context);
return null;
}
}
I would need to configure the 2 VariantEval instances with appropriate arguments/settings. For example, many of the settings for each VariantEval instance would be static; however, some settings might be a pass-through from the arguments passed to the VariantQC walker. So far as I can tell, arguments are set on walkers through CommandLineExecutable.loadArgumentsIntoObject(). It seems like with some work, perhaps I could use something in there to manually set arguments on my 2 VariantEval instances. The questions I have are:
1) Do any other tools take this kind of approach, i.e. having a Walker that calls other walkers?
2) Is there a better way to configure these child walkers?
Thanks in advance for any help,
Ben