annotate 0.7.0/lib/help/mashsketch.nf @ 20:133571bf891f

planemo upload
author kkonganti
date Mon, 15 Jul 2024 11:42:00 -0400
parents 0e7a0053e4a6
children
rev   line source
kkonganti@17 1 // Help text for mash sketch within CPIPES.
kkonganti@17 2
kkonganti@17 3 def mashsketchHelp(params) {
kkonganti@17 4
kkonganti@17 5 Map tool = [:]
kkonganti@17 6 Map toolspecs = [:]
kkonganti@17 7 tool.text = [:]
kkonganti@17 8 tool.helpparams = [:]
kkonganti@17 9
kkonganti@17 10 toolspecs = [
kkonganti@17 11 'mashsketch_run': [
kkonganti@17 12 clihelp: 'Run `mash screen` tool. Default: ' +
kkonganti@17 13 (params.mashsketch_run ?: false),
kkonganti@17 14 cliflag: null,
kkonganti@17 15 clivalue: null
kkonganti@17 16 ],
kkonganti@17 17 'mashsketch_l': [
kkonganti@17 18 clihelp: 'List input. Lines in each <input> specify paths to sequence files, ' +
kkonganti@17 19 'one per line. ' +
kkonganti@17 20 "Default: ${params.mashsketch_l}",
kkonganti@17 21 cliflag: '-l',
kkonganti@17 22 clivalue: (params.mashsketch_l ? ' ' : '')
kkonganti@17 23 ],
kkonganti@17 24 'mashsketch_I': [
kkonganti@17 25 clihelp: '<path> ID field for sketch of reads (instead of first sequence ID). ' +
kkonganti@17 26 "Default: ${params.mashsketch_I}",
kkonganti@17 27 cliflag: '-I',
kkonganti@17 28 clivalue: (params.mashsketch_I ?: '')
kkonganti@17 29 ],
kkonganti@17 30 'mashsketch_C': [
kkonganti@17 31 clihelp: '<path> Comment for a sketch of reads (instead of first sequence comment). ' +
kkonganti@17 32 "Default: ${params.mashsketch_C}",
kkonganti@17 33 cliflag: '-C',
kkonganti@17 34 clivalue: (params.mashsketch_C ?: '')
kkonganti@17 35 ],
kkonganti@17 36 'mashsketch_k': [
kkonganti@17 37 clihelp: '<int> K-mer size. Hashes will be based on strings of this many ' +
kkonganti@17 38 'nucleotides. Canonical nucleotides are used by default (see ' +
kkonganti@17 39 'Alphabet options below). (1-32) ' +
kkonganti@17 40 "Default: ${params.mashsketch_k}",
kkonganti@17 41 cliflag: '-k',
kkonganti@17 42 clivalue: (params.mashsketch_k ?: '')
kkonganti@17 43 ],
kkonganti@17 44 'mashsketch_s': [
kkonganti@17 45 clihelp: '<int> Sketch size. Each sketch will have at most this many non-redundant ' +
kkonganti@17 46 'min-hashes. ' +
kkonganti@17 47 "Default: ${params.mashsketch_s}",
kkonganti@17 48 cliflag: '-s',
kkonganti@17 49 clivalue: (params.mashsketch_s ?: '')
kkonganti@17 50 ],
kkonganti@17 51 'mashsketch_i': [
kkonganti@17 52 clihelp: 'Sketch individual sequences, rather than whole files, e.g. for ' +
kkonganti@17 53 'multi-fastas of single-chromosome genomes or pair-wise gene ' +
kkonganti@17 54 'comparisons. ' +
kkonganti@17 55 "Default: ${params.mashsketch_i}",
kkonganti@17 56 cliflag: '-i',
kkonganti@17 57 clivalue: (params.mashsketch_i ? ' ' : '')
kkonganti@17 58 ],
kkonganti@17 59 'mashsketch_S': [
kkonganti@17 60 clihelp: '<int> Seed to provide to the hash function. (0-4294967296) [42] ' +
kkonganti@17 61 "Default: ${params.mashsketch_S}",
kkonganti@17 62 cliflag: '-S',
kkonganti@17 63 clivalue: (params.mashsketch_S ?: '')
kkonganti@17 64 ],
kkonganti@17 65
kkonganti@17 66 'mashsketch_w': [
kkonganti@17 67 clihelp: '<num> Probability threshold for warning about low k-mer size. (0-1) ' +
kkonganti@17 68 "Default: ${params.mashsketch_w}",
kkonganti@17 69 cliflag: '-w',
kkonganti@17 70 clivalue: (params.mashsketch_w ?: '')
kkonganti@17 71 ],
kkonganti@17 72 'mashsketch_r': [
kkonganti@17 73 clihelp: 'Input is a read set. See Reads options below. Incompatible with ' +
kkonganti@17 74 '--mashsketch_i. ' +
kkonganti@17 75 "Default: ${params.mashsketch_r}",
kkonganti@17 76 cliflag: '-r',
kkonganti@17 77 clivalue: (params.mashsketch_r ? ' ' : '')
kkonganti@17 78 ],
kkonganti@17 79 'mashsketch_b': [
kkonganti@17 80 clihelp: '<size> Use a Bloom filter of this size (raw bytes or with K/M/G/T) to ' +
kkonganti@17 81 'filter out unique k-mers. This is useful if exact filtering with ' +
kkonganti@17 82 '--mashsketch_m uses too much memory. However, some unique k-mers may pass ' +
kkonganti@17 83 'erroneously, and copies cannot be counted beyond 2. Implies --mashsketch_r. ' +
kkonganti@17 84 "Default: ${params.mashsketch_b}",
kkonganti@17 85 cliflag: '-b',
kkonganti@17 86 clivalue: (params.mashsketch_b ?: '')
kkonganti@17 87 ],
kkonganti@17 88 'mashsketch_m': [
kkonganti@17 89 clihelp: '<int> Minimum copies of each k-mer required to pass noise filter for ' +
kkonganti@17 90 'reads. Implies --mashsketch_r. ' +
kkonganti@17 91 "Default: ${params.mashsketch_r}",
kkonganti@17 92 cliflag: '-m',
kkonganti@17 93 clivalue: (params.mashsketch_m ?: '')
kkonganti@17 94 ],
kkonganti@17 95 'mashsketch_c': [
kkonganti@17 96 clihelp: '<num> Target coverage. Sketching will conclude if this coverage is ' +
kkonganti@17 97 'reached before the end of the input file (estimated by average ' +
kkonganti@17 98 'k-mer multiplicity). Implies --mashsketch_r. ' +
kkonganti@17 99 "Default: ${params.mashsketch_c}",
kkonganti@17 100 cliflag: '-c',
kkonganti@17 101 clivalue: (params.mashsketch_c ?: '')
kkonganti@17 102 ],
kkonganti@17 103 'mashsketch_g': [
kkonganti@17 104 clihelp: '<size> Genome size (raw bases or with K/M/G/T). If specified, will be used ' +
kkonganti@17 105 'for p-value calculation instead of an estimated size from k-mer ' +
kkonganti@17 106 'content. Implies --mashsketch_r. ' +
kkonganti@17 107 "Default: ${params.mashsketch_g}",
kkonganti@17 108 cliflag: '-g',
kkonganti@17 109 clivalue: (params.mashsketch_g ?: '')
kkonganti@17 110 ],
kkonganti@17 111 'mashsketch_n': [
kkonganti@17 112 clihelp: 'Preserve strand (by default, strand is ignored by using canonical ' +
kkonganti@17 113 'DNA k-mers, which are alphabetical minima of forward-reverse ' +
kkonganti@17 114 'pairs). Implied if an alphabet is specified with --mashsketch_a ' +
kkonganti@17 115 'or --mashsketch_z. ' +
kkonganti@17 116 "Default: ${params.mashsketch_n}",
kkonganti@17 117 cliflag: '-n',
kkonganti@17 118 clivalue: (params.mashsketch_n ? ' ' : '')
kkonganti@17 119 ],
kkonganti@17 120 'mashsketch_a': [
kkonganti@17 121 clihelp: 'Use amino acid alphabet (A-Z, except BJOUXZ). Implies ' +
kkonganti@17 122 '--mashsketch_n --mashsketch_k 9. ' +
kkonganti@17 123 "Default: ${params.mashsketch_a}",
kkonganti@17 124 cliflag: '-a',
kkonganti@17 125 clivalue: (params.mashsketch_a ? ' ' : '')
kkonganti@17 126 ],
kkonganti@17 127 'mashsketch_z': [
kkonganti@17 128 clihelp: '<text> Alphabet to base hashes on (case ignored by default; ' +
kkonganti@17 129 'see --mashsketch_Z). K-mers with other characters will be ' +
kkonganti@17 130 'ignored. Implies --mashsketch_n. ' +
kkonganti@17 131 "Default: ${params.mashsketch_z}",
kkonganti@17 132 cliflag: '-z',
kkonganti@17 133 clivalue: (params.mashsketch_z ?: '')
kkonganti@17 134 ],
kkonganti@17 135 'mashsketch_Z': [
kkonganti@17 136 clihelp: 'Preserve case in k-mers and alphabet (case is ignored by default). ' +
kkonganti@17 137 'Sequence letters whose case is not in the current alphabet will be ' +
kkonganti@17 138 'skipped when sketching. ' +
kkonganti@17 139 "Default: ${params.mashsketch_Z}",
kkonganti@17 140 cliflag: '-Z',
kkonganti@17 141 clivalue: (params.mashsketch_Z ?: '')
kkonganti@17 142 ]
kkonganti@17 143 ]
kkonganti@17 144
kkonganti@17 145 toolspecs.each {
kkonganti@17 146 k, v -> tool.text['--' + k] = "${v.clihelp}"
kkonganti@17 147 tool.helpparams[k] = [ cliflag: "${v.cliflag}", clivalue: v.clivalue ]
kkonganti@17 148 }
kkonganti@17 149
kkonganti@17 150 return tool
kkonganti@17 151 }