annotate 0.7.0/lib/help/fastp.nf @ 21:4ce0e079377d tip

planemo upload
author kkonganti
date Mon, 15 Jul 2024 12:01:00 -0400
parents 0e7a0053e4a6
children
rev   line source
kkonganti@17 1 // Help text for fastp within CPIPES.
kkonganti@17 2
kkonganti@17 3 def fastpHelp(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 'fastp_run': [
kkonganti@17 12 clihelp: 'Run fastp tool. Default: ' +
kkonganti@17 13 (params.fastp_run ?: false),
kkonganti@17 14 cliflag: null,
kkonganti@17 15 clivalue: null
kkonganti@17 16 ],
kkonganti@17 17 'fastp_failed_out': [
kkonganti@17 18 clihelp: 'Specify whether to store reads that cannot pass the filters. ' +
kkonganti@17 19 "Default: ${params.fastp_failed_out}",
kkonganti@17 20 cliflag: null,
kkonganti@17 21 clivalue: null
kkonganti@17 22 ],
kkonganti@17 23 'fastp_merged_out': [
kkonganti@17 24 clihelp: 'Specify whether to store merged output or not. ' +
kkonganti@17 25 "Default: ${params.fastp_merged_out}",
kkonganti@17 26 cliflag: null,
kkonganti@17 27 clivalue: null
kkonganti@17 28 ],
kkonganti@17 29 'fastp_overlapped_out': [
kkonganti@17 30 clihelp: 'For each read pair, output the overlapped region if it has no mismatched base. ' +
kkonganti@17 31 "Default: ${params.fastp_overlapped_out}",
kkonganti@17 32 cliflag: '--overlapped_out',
kkonganti@17 33 clivalue: (params.fastp_overlapped_out ?: '')
kkonganti@17 34 ],
kkonganti@17 35 'fastp_6': [
kkonganti@17 36 clihelp: "Indicate that the input is using phred64 scoring (it'll be converted to phred33, " +
kkonganti@17 37 'so the output will still be phred33). ' +
kkonganti@17 38 "Default: ${params.fastp_6}",
kkonganti@17 39 cliflag: '-6',
kkonganti@17 40 clivalue: (params.fastp_6 ? ' ' : '')
kkonganti@17 41 ],
kkonganti@17 42 'fastp_reads_to_process': [
kkonganti@17 43 clihelp: 'Specify how many reads/pairs are to be processed. Default value 0 means ' +
kkonganti@17 44 'process all reads. ' +
kkonganti@17 45 "Default: ${params.fastp_reads_to_process}",
kkonganti@17 46 cliflag: '--reads_to_process',
kkonganti@17 47 clivalue: (params.fastp_reads_to_process ?: '')
kkonganti@17 48 ],
kkonganti@17 49 'fastp_fix_mgi_id': [
kkonganti@17 50 clihelp: 'The MGI FASTQ ID format is not compatible with many BAM operation tools, ' +
kkonganti@17 51 'enable this option to fix it. ' +
kkonganti@17 52 "Default: ${params.fastp_fix_mgi_id}",
kkonganti@17 53 cliflag: '--fix_mgi_id',
kkonganti@17 54 clivalue: (params.fastp_fix_mgi_id ? ' ' : '')
kkonganti@17 55 ],
kkonganti@17 56 'fastp_A': [
kkonganti@17 57 clihelp: 'Disable adapter trimming. On by default. ' +
kkonganti@17 58 "Default: ${params.fastp_A}",
kkonganti@17 59 cliflag: '-A',
kkonganti@17 60 clivalue: (params.fastp_A ? ' ' : '')
kkonganti@17 61 ],
kkonganti@17 62 'fastp_adapter_fasta': [
kkonganti@17 63 clihelp: 'Specify a FASTA file to trim both read1 and read2 (if PE) by all the sequences ' +
kkonganti@17 64 'in this FASTA file. ' +
kkonganti@17 65 "Default: ${params.fastp_adapter_fasta}",
kkonganti@17 66 cliflag: '--adapter_fasta',
kkonganti@17 67 clivalue: (params.fastp_adapter_fasta ?: '')
kkonganti@17 68 ],
kkonganti@17 69 'fastp_f': [
kkonganti@17 70 clihelp: 'Trim how many bases in front of read1. ' +
kkonganti@17 71 "Default: ${params.fastp_f}",
kkonganti@17 72 cliflag: '-f',
kkonganti@17 73 clivalue: (params.fastp_f ?: '')
kkonganti@17 74 ],
kkonganti@17 75 'fastp_t': [
kkonganti@17 76 clihelp: 'Trim how many bases at the end of read1. ' +
kkonganti@17 77 "Default: ${params.fastp_t}",
kkonganti@17 78 cliflag: '-t',
kkonganti@17 79 clivalue: (params.fastp_t ?: '')
kkonganti@17 80 ],
kkonganti@17 81 'fastp_b': [
kkonganti@17 82 clihelp: 'Max length of read1 after trimming. ' +
kkonganti@17 83 "Default: ${params.fastp_b}",
kkonganti@17 84 cliflag: '-b',
kkonganti@17 85 clivalue: (params.fastp_b ?: '')
kkonganti@17 86 ],
kkonganti@17 87 'fastp_F': [
kkonganti@17 88 clihelp: 'Trim how many bases in front of read2. ' +
kkonganti@17 89 "Default: ${params.fastp_F}",
kkonganti@17 90 cliflag: '-F',
kkonganti@17 91 clivalue: (params.fastp_F ?: '')
kkonganti@17 92 ],
kkonganti@17 93 'fastp_T': [
kkonganti@17 94 clihelp: 'Trim how many bases at the end of read2. ' +
kkonganti@17 95 "Default: ${params.fastp_T}",
kkonganti@17 96 cliflag: '-T',
kkonganti@17 97 clivalue: (params.fastp_T ?: '')
kkonganti@17 98 ],
kkonganti@17 99 'fastp_B': [
kkonganti@17 100 clihelp: 'Max length of read2 after trimming. ' +
kkonganti@17 101 "Default: ${params.fastp_B}",
kkonganti@17 102 cliflag: '-B',
kkonganti@17 103 clivalue: (params.fastp_B ?: '')
kkonganti@17 104 ],
kkonganti@17 105 'fastp_dedup': [
kkonganti@17 106 clihelp: 'Enable deduplication to drop the duplicated reads/pairs. ' +
kkonganti@17 107 "Default: ${params.fastp_dedup}",
kkonganti@17 108 cliflag: '--dedup',
kkonganti@17 109 clivalue: (params.fastp_dedup ? ' ' : '')
kkonganti@17 110 ],
kkonganti@17 111 'fastp_dup_calc_accuracy': [
kkonganti@17 112 clihelp: 'Accuracy level to calculate duplication (1~6), higher level uses more memory ' +
kkonganti@17 113 '(1G, 2G, 4G, 8G, 16G, 24G). Default 1 for no-dedup mode, and 3 for dedup mode. ' +
kkonganti@17 114 "Default: ${params.fastp_dup_calc_accuracy}",
kkonganti@17 115 cliflag: '--dup_calc_accuracy',
kkonganti@17 116 clivalue: (params.fastp_dup_calc_accuracy ?: '')
kkonganti@17 117 ],
kkonganti@17 118 'fastp_poly_g_min_len': [
kkonganti@17 119 clihelp: 'The minimum length to detect polyG in the read tail. ' +
kkonganti@17 120 "Default: ${params.fastp_poly_g_min_len}",
kkonganti@17 121 cliflag: '--poly_g_min_len',
kkonganti@17 122 clivalue: (params.fastp_poly_g_min_len ?: '')
kkonganti@17 123 ],
kkonganti@17 124 'fastp_G': [
kkonganti@17 125 clihelp: 'Disable polyG tail trimming. ' +
kkonganti@17 126 "Default: ${params.fastp_G}",
kkonganti@17 127 cliflag: '-G',
kkonganti@17 128 clivalue: (params.fastp_G ? ' ' : '')
kkonganti@17 129 ],
kkonganti@17 130 'fastp_x': [
kkonganti@17 131 clihelp: "Enable polyX trimming in 3' ends. " +
kkonganti@17 132 "Default: ${params.fastp_x}",
kkonganti@17 133 cliflag: 'x=',
kkonganti@17 134 clivalue: (params.fastp_x ? ' ' : '')
kkonganti@17 135 ],
kkonganti@17 136 'fastp_poly_x_min_len': [
kkonganti@17 137 clihelp: 'The minimum length to detect polyX in the read tail. ' +
kkonganti@17 138 "Default: ${params.fastp_poly_x_min_len}",
kkonganti@17 139 cliflag: '--poly_x_min_len',
kkonganti@17 140 clivalue: (params.fastp_poly_x_min_len ?: '')
kkonganti@17 141 ],
kkonganti@17 142 'fastp_cut_front': [
kkonganti@17 143 clihelp: "Move a sliding window from front (5') to tail, drop the bases in the window " +
kkonganti@17 144 'if its mean quality < threshold, stop otherwise. ' +
kkonganti@17 145 "Default: ${params.fastp_cut_front}",
kkonganti@17 146 cliflag: '--cut_front',
kkonganti@17 147 clivalue: (params.fastp_cut_front ? ' ' : '')
kkonganti@17 148 ],
kkonganti@17 149 'fastp_cut_tail': [
kkonganti@17 150 clihelp: "Move a sliding window from tail (3') to front, drop the bases in the window " +
kkonganti@17 151 'if its mean quality < threshold, stop otherwise. ' +
kkonganti@17 152 "Default: ${params.fastp_cut_tail}",
kkonganti@17 153 cliflag: '--cut_tail',
kkonganti@17 154 clivalue: (params.fastp_cut_tail ? ' ' : '')
kkonganti@17 155 ],
kkonganti@17 156 'fastp_cut_right': [
kkonganti@17 157 clihelp: "Move a sliding window from tail, drop the bases in the window and the right part " +
kkonganti@17 158 'if its mean quality < threshold, and then stop. ' +
kkonganti@17 159 "Default: ${params.fastp_cut_right}",
kkonganti@17 160 cliflag: '--cut_right',
kkonganti@17 161 clivalue: (params.fastp_cut_right ? ' ' : '')
kkonganti@17 162 ],
kkonganti@17 163 'fastp_W': [
kkonganti@17 164 clihelp: "Sliding window size shared by --fastp_cut_front, --fastp_cut_tail and " +
kkonganti@17 165 '--fastp_cut_right. ' +
kkonganti@17 166 "Default: ${params.fastp_W}",
kkonganti@17 167 cliflag: '--cut_window_size',
kkonganti@17 168 clivalue: (params.fastp_W ?: '')
kkonganti@17 169 ],
kkonganti@17 170 'fastp_M': [
kkonganti@17 171 clihelp: "The mean quality requirement shared by --fastp_cut_front, --fastp_cut_tail and " +
kkonganti@17 172 '--fastp_cut_right. ' +
kkonganti@17 173 "Default: ${params.fastp_M}",
kkonganti@17 174 cliflag: '--cut_mean_quality',
kkonganti@17 175 clivalue: (params.fastp_M ?: '')
kkonganti@17 176 ],
kkonganti@17 177 'fastp_q': [
kkonganti@17 178 clihelp: 'The quality value below which a base should is not qualified. ' +
kkonganti@17 179 "Default: ${params.fastp_q}",
kkonganti@17 180 cliflag: '-q',
kkonganti@17 181 clivalue: (params.fastp_q ?: '')
kkonganti@17 182 ],
kkonganti@17 183 'fastp_u': [
kkonganti@17 184 clihelp: 'What percent of bases are allowed to be unqualified. ' +
kkonganti@17 185 "Default: ${params.fastp_u}",
kkonganti@17 186 cliflag: '-u',
kkonganti@17 187 clivalue: (params.fastp_u ?: '')
kkonganti@17 188 ],
kkonganti@17 189 'fastp_n': [
kkonganti@17 190 clihelp: "How many N's can a read have. " +
kkonganti@17 191 "Default: ${params.fastp_n}",
kkonganti@17 192 cliflag: '-n',
kkonganti@17 193 clivalue: (params.fastp_n ?: '')
kkonganti@17 194 ],
kkonganti@17 195 'fastp_e': [
kkonganti@17 196 clihelp: "If the full reads' average quality is below this value, then it is discarded. " +
kkonganti@17 197 "Default: ${params.fastp_e}",
kkonganti@17 198 cliflag: '-e',
kkonganti@17 199 clivalue: (params.fastp_e ?: '')
kkonganti@17 200 ],
kkonganti@17 201 'fastp_l': [
kkonganti@17 202 clihelp: 'Reads shorter than this length will be discarded. ' +
kkonganti@17 203 "Default: ${params.fastp_l}",
kkonganti@17 204 cliflag: '-l',
kkonganti@17 205 clivalue: (params.fastp_l ?: '')
kkonganti@17 206 ],
kkonganti@17 207 'fastp_max_len': [
kkonganti@17 208 clihelp: 'Reads longer than this length will be discarded. ' +
kkonganti@17 209 "Default: ${params.fastp_max_len}",
kkonganti@17 210 cliflag: '--length_limit',
kkonganti@17 211 clivalue: (params.fastp_max_len ?: '')
kkonganti@17 212 ],
kkonganti@17 213 'fastp_y': [
kkonganti@17 214 clihelp: 'Enable low complexity filter. The complexity is defined as the percentage ' +
kkonganti@17 215 'of bases that are different from its next base (base[i] != base[i+1]). ' +
kkonganti@17 216 "Default: ${params.fastp_y}",
kkonganti@17 217 cliflag: '-y',
kkonganti@17 218 clivalue: (params.fastp_y ? ' ' : '')
kkonganti@17 219 ],
kkonganti@17 220 'fastp_Y': [
kkonganti@17 221 clihelp: 'The threshold for low complexity filter (0~100). Ex: A value of 30 means ' +
kkonganti@17 222 '30% complexity is required. ' +
kkonganti@17 223 "Default: ${params.fastp_Y}",
kkonganti@17 224 cliflag: '-Y',
kkonganti@17 225 clivalue: (params.fastp_Y ?: '')
kkonganti@17 226 ],
kkonganti@17 227 'fastp_U': [
kkonganti@17 228 clihelp: 'Enable Unique Molecular Identifier (UMI) pre-processing. ' +
kkonganti@17 229 "Default: ${params.fastp_U}",
kkonganti@17 230 cliflag: '-U',
kkonganti@17 231 clivalue: (params.fastp_U ? ' ' : '')
kkonganti@17 232 ],
kkonganti@17 233 'fastp_umi_loc': [
kkonganti@17 234 clihelp: 'Specify the location of UMI, can be one of ' +
kkonganti@17 235 'index1/index2/read1/read2/per_index/per_read. ' +
kkonganti@17 236 "Default: ${params.fastp_umi_loc}",
kkonganti@17 237 cliflag: '--umi_loc',
kkonganti@17 238 clivalue: (params.fastp_umi_loc ?: '')
kkonganti@17 239 ],
kkonganti@17 240 'fastp_umi_len': [
kkonganti@17 241 clihelp: 'If the UMI is in read1 or read2, its length should be provided. ' +
kkonganti@17 242 "Default: ${params.fastp_umi_len}",
kkonganti@17 243 cliflag: '--umi_len',
kkonganti@17 244 clivalue: (params.fastp_umi_len ?: '')
kkonganti@17 245 ],
kkonganti@17 246 'fastp_umi_prefix': [
kkonganti@17 247 clihelp: 'If specified, an underline will be used to connect prefix and UMI ' +
kkonganti@17 248 '(i.e. prefix=UMI, UMI=AATTCG, final=UMI_AATTCG). ' +
kkonganti@17 249 "Default: ${params.fastp_umi_prefix}",
kkonganti@17 250 cliflag: '--umi_prefix',
kkonganti@17 251 clivalue: (params.fastp_umi_prefix ?: '')
kkonganti@17 252 ],
kkonganti@17 253 'fastp_umi_skip': [
kkonganti@17 254 clihelp: 'If the UMI is in read1 or read2, fastp can skip several bases following the UMI. ' +
kkonganti@17 255 "Default: ${params.fastp_umi_skip}",
kkonganti@17 256 cliflag: '--umi_skip',
kkonganti@17 257 clivalue: (params.fastp_umi_skip ?: '')
kkonganti@17 258 ],
kkonganti@17 259 'fastp_p': [
kkonganti@17 260 clihelp: 'Enable overrepresented sequence analysis. ' +
kkonganti@17 261 "Default: ${params.fastp_p}",
kkonganti@17 262 cliflag: '-p',
kkonganti@17 263 clivalue: (params.fastp_p ? ' ' : '')
kkonganti@17 264 ],
kkonganti@17 265 'fastp_P': [
kkonganti@17 266 clihelp: 'One in this many number of reads will be computed for overrepresentation analysis ' +
kkonganti@17 267 '(1~10000), smaller is slower. ' +
kkonganti@17 268 "Default: ${params.fastp_P}",
kkonganti@17 269 cliflag: '-P',
kkonganti@17 270 clivalue: (params.fastp_P ?: '')
kkonganti@17 271 ]
kkonganti@17 272 ]
kkonganti@17 273
kkonganti@17 274 toolspecs.each {
kkonganti@17 275 k, v -> tool.text['--' + k] = "${v.clihelp}"
kkonganti@17 276 tool.helpparams[k] = [ cliflag: "${v.cliflag}", clivalue: v.clivalue ]
kkonganti@17 277 }
kkonganti@17 278
kkonganti@17 279 return tool
kkonganti@17 280 }