plagnollab / DNASeq_pipeline

Pipeline in place at the UGI for DNA level analysis
10 stars 8 forks source link

Add extra switches from setup script #32

Open davenomiddlenamecurtis opened 9 years ago

davenomiddlenamecurtis commented 9 years ago

It would be good for the user to be able to add additional switches for the programs to use without having to adjust the main pipeline script.

One way to do this would be to have the setup script set an export an environment variable with the switches.

Another way, which is what I did, was to pass an extra argument from the setup script:

EXTRASWITCHES="-U ALLOW_SEQ_DICT_INCOMPATIBILITY" bash ${pipeline} --mode gvcf --supportFrame ${supportFrame} --reference ${reference} --inputFormat STDFQ --extraID $extraID --projectID ${projectID} --extraSwitches $EXTRASWITCHES

Then in the main switch statement I read all the extra switches (may be multiple arguments, so must be last in the line): --extraSwitches) shift extraSwitches=$* break;;

And then each program would add these switches to its own arguments, so I have this: echo " $HaplotypeCaller \ ... --GVCFGQBands 10 --GVCFGQBands 20 --GVCFGQBands 50 $extraSwitches\

There may be more elegant solutions.

pontikos commented 9 years ago

Good suggestion Dave. I will try to do this, this weekend.