I would like to return some values from a loop with or without using a function. My current script is like this, here I am interested in retrieving the value "parameter" and the individual values might be something like this - general_option=true, targeted_option=true, minReads=2, mxVariants=10, target_interval=/path/to/file.txt, minimumReads=4, cap_dup=2;
def analysis_parameters(general_option, targeted_option, minReads, mxVariants, target_interval, minimumReads, cap_dup):
if general_option is 'true':
parameters=['--minReads='+minReads+' --maxVariants='+mxVariants]
return parameters
elif targeted_option is 'true':
parameters=['--regions='+target_interval+' --minReads='+minimumReads+' --filterDuplicates='+cap_dup]
return parameters
Any help is very much appreciated.