kkonganti@1
|
1 // Help text for waterfall_per_snp_cluster.pl (wsnp) within CPIPES.
|
kkonganti@1
|
2
|
kkonganti@1
|
3 def wsnpHelp(params) {
|
kkonganti@1
|
4
|
kkonganti@1
|
5 Map tool = [:]
|
kkonganti@1
|
6 Map toolspecs = [:]
|
kkonganti@1
|
7 tool.text = [:]
|
kkonganti@1
|
8 tool.helpparams = [:]
|
kkonganti@1
|
9
|
kkonganti@1
|
10 toolspecs = [
|
kkonganti@1
|
11 'wsnp_serocol': [
|
kkonganti@1
|
12 clihelp: 'Column number (non 0-based index) of the PDG metadata file ' +
|
kkonganti@1
|
13 'by which the serotypes are collected.' +
|
kkonganti@1
|
14 " Default: ${params.wsnp_serocol}",
|
kkonganti@1
|
15 cliflag: '--serocol',
|
kkonganti@1
|
16 clivalue: (params.wsnp_serocol ?: '')
|
kkonganti@1
|
17 ],
|
kkonganti@1
|
18 'wsnp_complete_sero': [
|
kkonganti@1
|
19 clihelp: 'Skip indexing serotypes when the serotype name in the column ' +
|
kkonganti@1
|
20 'number 49 (non 0-based) of PDG metadata file consists a "-". For example, if ' +
|
kkonganti@1
|
21 'an accession has a serotype= string as such in column ' +
|
kkonganti@1
|
22 'number 49 (non 0-based): ' +
|
kkonganti@1
|
23 '"serotype=- 13:z4,z23:-" ' +
|
kkonganti@1
|
24 'then, the indexing of that accession is skipped.' +
|
kkonganti@1
|
25 " Default: ${params.wsnp_complete_sero}",
|
kkonganti@1
|
26 cliflag: '--complete_serotype_name',
|
kkonganti@1
|
27 clivalue: (params.wsnp_complete_sero ? ' ' : '')
|
kkonganti@1
|
28 ],
|
kkonganti@1
|
29 'wsnp_not_null_serovar': [
|
kkonganti@1
|
30 clihelp: 'Only index the computed_serotype column ' +
|
kkonganti@1
|
31 'i.e. column number 49 (non 0-based), if the serovar column' +
|
kkonganti@1
|
32 ' is not NULL. ' +
|
kkonganti@1
|
33 " Default: ${params.wsnp_not_null_serovar}",
|
kkonganti@1
|
34 cliflag: '--not_null_serotype_name',
|
kkonganti@1
|
35 clivalue: (params.wsnp_not_null_serovar ?: '')
|
kkonganti@1
|
36 ],
|
kkonganti@1
|
37 'wsnp_i': [
|
kkonganti@1
|
38 clihelp: 'Force include this serovar. Ignores ' +
|
kkonganti@1
|
39 '--wsnp_complete_sero for only this serovar. ' +
|
kkonganti@1
|
40 'Mention multiple serovars separated by a ! (Exclamation mark). ' +
|
kkonganti@1
|
41 'Ex: --wsnp_complete_sero I 4,[5],12:i:-!Agona' +
|
kkonganti@1
|
42 " Default: ${params.wsnp_i}",
|
kkonganti@1
|
43 cliflag: '-i',
|
kkonganti@1
|
44 clivalue: (params.wsnp_i ? params.wsnp_i.split(/\!/).join(' -i ').trim().replace(/^\-i\s+/, '') : '')
|
kkonganti@1
|
45 ],
|
kkonganti@1
|
46 'wsnp_num': [
|
kkonganti@1
|
47 clihelp: 'Number of genome accessions to collect per SNP cluster.' +
|
kkonganti@1
|
48 " Default: ${params.wsnp_num}",
|
kkonganti@1
|
49 cliflag: '-num',
|
kkonganti@1
|
50 clivalue: (params.wsnp_num ?: '')
|
kkonganti@1
|
51 ]
|
kkonganti@1
|
52 ]
|
kkonganti@1
|
53
|
kkonganti@1
|
54 toolspecs.each {
|
kkonganti@1
|
55 k, v -> tool.text['--' + k] = "${v.clihelp}"
|
kkonganti@1
|
56 tool.helpparams[k] = [ cliflag: "${v.cliflag}", clivalue: v.clivalue ]
|
kkonganti@1
|
57 }
|
kkonganti@1
|
58
|
kkonganti@1
|
59 return tool
|
kkonganti@1
|
60 } |