I am trying to develop a tool based on R script. The tool should provided several methods for correlation calculation. Then there should be a parameter with options for different methods. I have set the parameter, but “there is no options available” on my local galaxy.
Here is my code:
<param name="method" type="select" label="methods for correlation calculation"/>
<option value="pearson">Pearson </option>
<option value="spearman">Spearman </option>
<option value="kendall">kendall </option>
</param>
In the corresponding R script:
spec_list$expr <- c(‘expr’, ‘f’, ‘1’, ‘character’)
spec_list$method <- c(‘method’, ‘m’, 1, ‘character’)
spec_list$correlationMatrix <- c(‘correlationMatrix’, ‘c’, 1, ‘character’)
spec <- t(as.data.frame(spec_list))
opt <- getopt(spec)
…
if(!is.null(opt$method)){
corMatrix <- cor(expr, method=opt$method)
}