We've moved!
This site is now read-only. You can find our new documentation site and support forum for posting questions here.
Be sure to read our welcome blog!

Adding functions to Queue pipelines on the fly

jeremylp2jeremylp2 Member
edited November 2013 in Ask the GATK team

I'm wondering if there's a straightforward way to add (or not add) a function to a queue pipeline based on some condition that is known only after running an intermediate step of the pipeline. I realize the below won't work, but the logic would look something like this:

def script = {
foo.input = "foo_input"
foo.output = "foo_output"
if (foo_results_analysis(foo.output))

Of course, this doesn't work because the script is run and functions are added before the pipeline actually starts running. But this sort of functionality could be helpful if, for instance, you are trying to run repeated rounds of BQSR until you meet some convergence criterion (call SNPS, pull out high confidence subset and feed to BQSR as the "known" set, repeat until the set of SNP calls is stable). This is suggested in the BQSR documentation for cases in which a genome you are working on doesn't have a decent SNP database. Any suggestions on pipelining something like this?

Best Answer


Sign In or Register to comment.