comparison macros.xml @ 23:793ae03deb13 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/bcftools commit f6efda26965eb73c9107d367fd5ffdf246ed0dbc
author iuc
date Tue, 02 Dec 2025 08:04:56 +0000
parents 8b260d252ff4
children
comparison
equal deleted inserted replaced
22:8b260d252ff4 23:793ae03deb13
1 <macros> 1 <macros>
2 <token name="@TOOL_VERSION@">1.15.1</token> 2 <token name="@TOOL_VERSION@">1.22</token>
3 <token name="@VERSION_SUFFIX@">4</token> 3 <token name="@VERSION_SUFFIX@">0</token>
4 <token name="@PROFILE@">20.01</token> 4 <token name="@PROFILE@">24.1</token>
5 <xml name="bio_tools"> 5 <xml name="bio_tools">
6 <xrefs> 6 <xrefs>
7 <xref type="bio.tools">bcftools</xref> 7 <xref type="bio.tools">bcftools</xref>
8 </xrefs> 8 </xrefs>
9 </xml> 9 </xml>
10 <xml name="requirements"> 10 <xml name="requirements">
11 <requirements> 11 <requirements>
12 <requirement type="package" version="@TOOL_VERSION@">bcftools</requirement> 12 <requirement type="package" version="@TOOL_VERSION@">bcftools</requirement>
13 <requirement type="package" version="1.15.1">htslib</requirement> 13 <requirement type="package" version="1.22.1">htslib</requirement>
14 <yield /> 14 <yield />
15 </requirements> 15 </requirements>
16 </xml> 16 </xml>
17 <xml name="samtools_requirement"> 17 <xml name="samtools_requirement">
18 <requirement type="package" version="1.15.1">samtools</requirement> 18 <requirement type="package" version="1.22.1">samtools</requirement>
19 </xml> 19 </xml>
20 <xml name="matplotlib_requirement"> 20 <xml name="matplotlib_requirement">
21 <requirement type="package" version="3.5.3">matplotlib</requirement> 21 <requirement type="package" version="3.10.7">matplotlib</requirement>
22 </xml> 22 </xml>
23 <xml name="version_command"> 23 <xml name="version_command">
24 <version_command>bcftools 2&gt;&amp;1 | grep 'Version:'</version_command> 24 <version_command>bcftools 2&gt;&amp;1 | grep 'Version:'</version_command>
25 </xml> 25 </xml>
26 26
28 <citations> 28 <citations>
29 <citation type="doi">10.1093/bioinformatics/btp352</citation> 29 <citation type="doi">10.1093/bioinformatics/btp352</citation>
30 <yield /> 30 <yield />
31 </citations> 31 </citations>
32 </xml> 32 </xml>
33 <token name="@BCFTOOLS_WIKI@">https://github.com/samtools/bcftools/wiki</token> 33 <token name="@BCFTOOLS_HOWTOS@">https://samtools.github.io/bcftools/howtos/index.html</token>
34 <token name="@BCFTOOLS_MANPAGE@">http://samtools.github.io/bcftools/bcftools.html</token> 34 <token name="@BCFTOOLS_MANPAGE@">https://www.htslib.org/doc/bcftools.html</token>
35 <token name="@THREADS@"> 35 <token name="@THREADS@">
36 --threads \${GALAXY_SLOTS:-4} 36 --threads \${GALAXY_SLOTS:-4}
37 </token>
38 <token name="@PREPARE_ENV@">
39 <![CDATA[
40 export BCFTOOLS_PLUGINS=`which bcftools | sed 's,bin/bcftools,libexec/bcftools,'`;
41 ]]>
42 </token> 37 </token>
43 <xml name="macro_input"> 38 <xml name="macro_input">
44 <!-- 39 <!--
45 REQUIRES https://github.com/galaxyproject/galaxy/pull/14605/files 40 REQUIRES https://github.com/galaxyproject/galaxy/pull/14605/files
46 <param name="input_files" type="data" format="vcf,vcf.gz,vcf_bgzip,bcf" label="Other VCF/BCF Datasets" multiple="True" /> 41 <param name="input_files" type="data" format="vcf,vcf.gz,vcf_bgzip,bcf" label="Other VCF/BCF Datasets" multiple="True" />
292 <param name="invert_targets_file" type="boolean" truevalue="^" falsevalue="" 287 <param name="invert_targets_file" type="boolean" truevalue="^" falsevalue=""
293 label="Invert Targets" 288 label="Invert Targets"
294 help="inverts the query/filtering applied by the targets" /> 289 help="inverts the query/filtering applied by the targets" />
295 </xml> 290 </xml>
296 291
297 <xml name="macro_restriction_spec" token_type="region" token_label_type="Region"> 292 <xml name="macro_restriction_spec" tokens="type,label_type">
298 <repeat name="@TYPE@s" title="@LABEL_TYPE@ Filter" default="1" min="1"> 293 <repeat name="@TYPE@_specs" title="@LABEL_TYPE@ Filter" default="1" min="1">
299 <param name="chrom" type="text" label="@LABEL_TYPE@ chromosome"> 294 <param name="chrom" type="text" label="@LABEL_TYPE@ chromosome">
300 <validator type="expression" message="A chromosome identifier is required when specifying a @LABEL_TYPE@ filter">value.strip()</validator> 295 <validator type="expression" message="A chromosome identifier is required when specifying a @LABEL_TYPE@ filter">value.strip()</validator>
301 </param> 296 </param>
302 <param name="start" type="text" label="@LABEL_TYPE@ start position"> 297 <param name="start" type="text" label="@LABEL_TYPE@ start position">
303 <validator type="expression" message="an integer number is required">not value or value.isdigit()</validator> 298 <validator type="expression" message="an integer number is required">not value or value.isdigit()</validator>
304 </param> 299 </param>
305 <param name="stop" type="text" label="@LABEL_TYPE@ end position"> 300 <param name="stop" type="text" label="@LABEL_TYPE@ end position">
306 <validator type="expression" message="an integer number is required">not value or value.isdigit()</validator> 301 <validator type="expression" message="an integer number is required">not value or value.isdigit()</validator>
307 </param> 302 </param>
303 </repeat>
304 </xml>
305
306 <xml name="macro_restrictions_file" tokens="type,label_type">
307 <param name="@TYPE@s_file" type="data" format="tabular" label="@LABEL_TYPE@s File" help="restrict to @LABEL_TYPE@s listed in a file" />
308 </xml>
309
310 <xml name="__macro_restrict__" tokens="type,label_select,label_type,pos_is_default,rec_is_default">
311 <conditional name="@TYPE@s">
312 <param name="@TYPE@s_src" type="select" label="@LABEL_SELECT@">
313 <option value="__none__">Do not restrict to @LABEL_TYPE@s</option>
314 <option value="@TYPE@s">Specify one or more @LABEL_TYPE@(s) directly</option>
315 <option value="@TYPE@s_file">Operate on @LABEL_TYPE@s specified in a history dataset</option>
316 </param>
317 <when value="__none__"/>
318 <when value="@TYPE@s">
319 <expand macro="macro_restriction_spec" type="@TYPE@" label_type="@LABEL_TYPE@" />
308 <yield /> 320 <yield />
309 </repeat> 321 <param argument="--@TYPE@s-overlap" type="select" label="Consider variant calls with partial overlap with @LABEL_TYPE@(s) if ..." help="Set to 0 if the record has to have POS inside a region; set to 1 if also overlapping records with POS outside a region should be included (this includes indels with POS at the end of a region, which are technically outside the region); or set to 2 to include only true overlapping variation (compare the full VCF representation 'TA>T-' vs the true sequence variation 'A>-').">
310 </xml> 322 <option value="0" selected="@POS_IS_DEFAULT@">0: the variant's POS falls in the region</option>
311 323 <option value="1" selected="@REC_IS_DEFAULT@">1: any part of the variant's representation overlaps the region</option>
312 <xml name="macro_restrictions_file" token_type="region" token_label_type="Region"> 324 <option value="2">2: the variant's actual sequence change falls in the region</option>
313 <param name="@TYPE@s_file" type="data" format="tabular" label="@LABEL_TYPE@s File" help="restrict to @LABEL_TYPE@s listed in a file" /> 325 </param>
314 </xml> 326 </when>
315 327 <when value="@TYPE@s_file">
316 <xml name="macro_restrict" token_type="region" token_label_type="Region" > 328 <expand macro="macro_restrictions_file" type="@TYPE@" label_type="@LABEL_TYPE@" />
329 <yield />
330 <param argument="--@TYPE@s-overlap" type="select" label="@LABEL_TYPE@ overlap" help="Include if POS in the region (0), record overlaps (1), variant overlaps (2)">
331 <option value="0" selected="@POS_IS_DEFAULT@">0: POS in the region</option>
332 <option value="1" selected="@REC_IS_DEFAULT@">1: Record overlaps</option>
333 <option value="2">2: Variant overlaps</option>
334 </param>
335 </when>
336 </conditional>
337 </xml>
338
339 <xml name="__macro_restrict_simple__" tokens="type,label_select,label_type">
317 <conditional name="@TYPE@s"> 340 <conditional name="@TYPE@s">
318 <param name="@TYPE@s_src" type="select" label="@LABEL_TYPE@s"> 341 <param name="@TYPE@s_src" type="select" label="@LABEL_SELECT@">
319 <option value="__none__">Do not restrict to @LABEL_TYPE@s</option> 342 <option value="__none__">Do not restrict to @LABEL_TYPE@s</option>
320 <option value="@TYPE@s">Specify one or more @LABEL_TYPE@(s) directly</option> 343 <option value="@TYPE@s">Specify one or more @LABEL_TYPE@(s) directly</option>
321 <option value="@TYPE@s_file">Operate on @LABEL_TYPE@s specified in a history dataset</option> 344 <option value="@TYPE@s_file">Operate on @LABEL_TYPE@s specified in a history dataset</option>
322 </param> 345 </param>
323 <when value="__none__"/> 346 <when value="__none__"/>
324 <when value="@TYPE@s"> 347 <when value="@TYPE@s">
325 <expand macro="macro_restriction_spec" type="@TYPE@" label_type="@LABEL_TYPE@" /> 348 <expand macro="macro_restriction_spec" type="@TYPE@" label_type="@LABEL_TYPE@" />
326 <yield /> 349 <yield />
327 </when> 350 </when>
328 <when value="@TYPE@s_file"> 351 <when value="@TYPE@s_file">
329 <expand macro="macro_restrictions_file" type="@TYPE@" label_type="@LABEL_TYPE@" /> 352 <expand macro="macro_restrictions_file" type="@TYPE@" label_type="@LABEL_TYPE@" />
330 <yield /> 353 <yield />
331 </when> 354 </when>
332 </conditional> 355 </conditional>
333 <param argument="--@TYPE@s-overlap" type="select" optional="true" label="@LABEL_TYPE@ overlap" help="Include if POS in the region (0), record overlaps (1), variant overlaps (2)"> 356 </xml>
334 <option value="0">0: POS in the region</option> 357
335 <option value="1">1: Record overlaps</option> 358 <xml name="macro_region_restrict" token_label_select="Regions">
336 <option value="2">2: Variant overlaps</option> 359 <expand macro="__macro_restrict__" type="region" label_select="@LABEL_SELECT@" label_type="Region" pos_is_default="false" rec_is_default="true" />
337 </param> 360 </xml>
361
362 <xml name="macro_region_restrict_simple" token_label_select="Regions">
363 <!-- To be used with subcommands that don't support the 'regions-overlap' option. Currently only mpileup? -->
364 <expand macro="__macro_restrict_simple__" type="region" label_select="@LABEL_SELECT@" label_type="Region" />
365 </xml>
366
367 <xml name="macro_target_restrict">
368 <expand macro="__macro_restrict__" type="target" label_select="Target" label_type="Target" pos_is_default="true" rec_is_default="false">
369 <expand macro="macro_invert_targets" />
370 </expand>
371 </xml>
372
373 <xml name="macro_target_restrict_simple">
374 <!-- To be used with subcommands that don't support the 'regions-overlap' option. Currently only mpileup and call? -->
375 <expand macro="__macro_restrict_simple__" type="target" label_select="Target" label_type="Target">
376 <expand macro="macro_invert_targets" />
377 </expand>
378 </xml>
379
380 <xml name="macro_mask_restrict">
381 <expand macro="__macro_restrict__" type="mask" label_select="Mask" label_type="Mask" pos_is_default="false" rec_is_default="true" />
338 </xml> 382 </xml>
339 383
340 <token name="@PARSE_INTERVALS@"> 384 <token name="@PARSE_INTERVALS@">
341 <![CDATA[ 385 <![CDATA[
342 #set $components = [] 386 #set $components = []
343 #for $i in $intervals: 387 #for $i in $intervals:
344 #set $chrom = str($i.chrom).strip() 388 #set $chrom = str($i.chrom).strip()
345 #set $start = str($i.start).strip() 389 #set $start = str($i.start).strip()
346 #set $stop = str($i.stop).strip() 390 #set $stop = str($i.stop).strip()
347 #if $start or $stop: 391 #if $start or $stop:
348 $components.append($chrom + ':' + ($start or '0') + '-' + $stop) 392 $components.append($chrom + ':' + ($start or '1') + '-' + $stop)
349 #else: 393 #else:
350 $components.append($chrom) 394 $components.append($chrom)
351 #end if 395 #end if
352 #end for 396 #end for
353 #set $intervals_spec = ','.join($components) 397 #set $intervals_spec = ','.join($components)
355 </token> 399 </token>
356 400
357 <token name="@MASK@"> 401 <token name="@MASK@">
358 <![CDATA[ 402 <![CDATA[
359 #if $section.conditional_soft_filter.selector == 'enabled' and $section.conditional_soft_filter.soft_filter 403 #if $section.conditional_soft_filter.selector == 'enabled' and $section.conditional_soft_filter.soft_filter
360 #if $section.conditional_soft_filter.masks.masks_src == 'regions': 404 #if $section.conditional_soft_filter.masks.masks_src != '__none__':
361 #set $intervals = $section.conditional_soft_filter.masks.masks 405 #if $section.conditional_soft_filter.masks.masks_src == 'masks':
362 @PARSE_INTERVALS@ 406 #set $intervals = $section.conditional_soft_filter.masks.mask_specs
363 --mask '$intervals_spec' 407 @PARSE_INTERVALS@
364 #elif $section.conditional_soft_filter.masks.masks_src == 'masks_file' and $section.conditional_soft_filter.masks.masks_file: 408 --mask '$intervals_spec'
365 #if $masks_path is not None: 409 #elif $section.conditional_soft_filter.masks.masks_src == 'masks_file':
366 --mask-file '$masks_path'
367 #else:
368 --mask-file '$section.conditional_soft_filter.masks.masks_file' 410 --mask-file '$section.conditional_soft_filter.masks.masks_file'
369 #end if 411 #end if
370 #end if
371 #if $section.conditional_soft_filter.masks_overlap
372 --mask-overlap $section.conditional_soft_filter.masks_overlap 412 --mask-overlap $section.conditional_soft_filter.masks_overlap
373 #end if 413 #end if
374 #end if 414 #end if
375 415
376 ]]> 416 ]]>
377 </token> 417 </token>
378 418
379 <token name="@REGIONS@"> 419 <token name="@REGIONS@">
380 <![CDATA[ 420 <![CDATA[
381 #if $section.regions.regions_src == 'regions': 421 #if $section.regions.regions_src != '__none__':
382 #set $intervals = $section.regions.regions 422 #if $section.regions.regions_src == 'regions':
383 @PARSE_INTERVALS@ 423 #set $intervals = $section.regions.region_specs
384 --regions '$intervals_spec' 424 @PARSE_INTERVALS@
385 #elif $section.regions.regions_src == 'regions_file' and $section.regions.regions_file: 425 --regions '$intervals_spec'
386 #if $regions_path is not None: 426 #elif $section.regions.regions_src == 'regions_file':
387 --regions-file '$regions_path' 427 #if $regions_path is not None:
388 #else: 428 --regions-file '$regions_path'
389 --regions-file '$section.regions.regions_file' 429 #else:
390 #end if 430 --regions-file '$section.regions.regions_file'
391 #end if 431 #end if
392 #if $section.regions_overlap 432 #end if
393 --regions-overlap $section.regions_overlap 433 #if 'regions_overlap' in $section.regions:
394 #end if 434 --regions-overlap $section.regions.regions_overlap
395 435 #end if
436 #end if
396 ]]> 437 ]]>
397 </token> 438 </token>
398 439
399 <token name="@TARGETS@"> 440 <token name="@TARGETS@">
400 <![CDATA[ 441 <![CDATA[
401 #if $targets_path: 442 #if $section.targets.targets_src != '__none__':
402 --targets-file "${section.targets.invert_targets_file}${targets_path}" 443 #if $section.targets.targets_src == 'targets':
403 #elif $section.targets.targets_src == 'targets': 444 #set $intervals = $section.targets.target_specs
404 #set $intervals = $section.targets.targets 445 @PARSE_INTERVALS@
405 @PARSE_INTERVALS@ 446 --targets '${section.targets.invert_targets_file}$intervals_spec'
406 --targets '${section.targets.invert_targets_file}$intervals_spec' 447 #elif $section.targets.targets_src == 'targets_file':
407 #elif $section.targets.targets_src == 'targets_file' and $section.targets.targets_file: 448 #if $targets_path:
408 --targets-file "${section.targets.invert_targets_file}${section.targets.targets_file}" 449 --targets-file '${section.targets.invert_targets_file}${targets_path}'
409 #end if 450 #else:
410 #if $section.targets_overlap 451 --targets-file '${section.targets.invert_targets_file}${section.targets.targets_file}'
411 --targets-overlap $section.targets_overlap 452 #end if
453 #end if
454 #if 'targets_overlap' in $section.targets:
455 --targets-overlap $section.targets.targets_overlap
456 #end if
412 #end if 457 #end if
413 ]]> 458 ]]>
414 </token> 459 </token>
415 460
416 <token name="@PREPARE_REGIONS_FILE@"> 461 <token name="@PREPARE_REGIONS_FILE@">
417 <![CDATA[ 462 <![CDATA[
418 #set $regions_path = None 463 #set $regions_path = None
419 #if 'regions' in $section 464 #if 'regions' in $section
420 #if $section.regions.regions_src == 'regions_file' and $section.regions.regions_file: 465 #if $section.regions.regions_src == 'regions_file':
421 #if $section.regions.regions_file.ext.startswith('bed'): 466 #if $section.regions.regions_file.ext.startswith('bed'):
422 #set $regions_path = 'regions_file.bed' 467 #set $regions_path = 'regions_file.bed'
423 ln -s '$section.regions.regions_file' $regions_path && 468 ln -s '$section.regions.regions_file' $regions_path &&
424 #end if 469 #end if
425 #end if 470 #end if
459 help="Comma-separated list of samples to annotate (or exclude) or - to include all samples"> 504 help="Comma-separated list of samples to annotate (or exclude) or - to include all samples">
460 <validator type="regex" message="Comma-separated list of samples or - to include all samples">^(-|\w+(,\w+)*)?$</validator> 505 <validator type="regex" message="Comma-separated list of samples or - to include all samples">^(-|\w+(,\w+)*)?$</validator>
461 </param> 506 </param>
462 <param name="invert_samples" type="boolean" truevalue="^" falsevalue="" checked="false" label="Invert Samples" 507 <param name="invert_samples" type="boolean" truevalue="^" falsevalue="" checked="false" label="Invert Samples"
463 help="Inverts the query/filtering applied by Samples (adds &quot;^&quot; prefix to exclude)" /> 508 help="Inverts the query/filtering applied by Samples (adds &quot;^&quot; prefix to exclude)" />
464 <param argument="--samples_file" type="data" format="tabular" optional="true" label="Samples file" 509 <param argument="--samples_file" type="data" format="tabular" optional="true" label="Samples file" help="File of samples to include" />
465 help="File of samples to include" />
466 <param name="invert_samples_file" type="boolean" truevalue="^" falsevalue="" checked="false" label="Invert Samples file" 510 <param name="invert_samples_file" type="boolean" truevalue="^" falsevalue="" checked="false" label="Invert Samples file"
467 help="inverts the query/filtering applied by Samples file" /> 511 help="inverts the query/filtering applied by Samples file" />
512 </xml>
513
514 <xml name="macro_samples_enhanced" token_all_samples="" token_file_help="File listing samples to include one per line.">
515 <conditional name="specify_samples">
516 <param name="how" type="select" label="How do you want to select samples?">
517 <option value="-s">Specify samples manually</option>
518 <option value="-S">Provide sample file</option>
519 <option value="@ALL_SAMPLES@" selected="true">No selection; just use all samples found in input</option>
520 </param>
521 <when value="-s">
522 <param argument="--samples" name="samples_spec" type="text" optional="false" label="Sample(s)" help="Specify a single sample by name or a comma-separated list of sample names.">
523 <validator type="expression" message="Please specify a single sample by name or a comma-separated list of sample names">value.strip() and value[0] not in "^," and ",," not in value</validator>
524 </param>
525 <param name="invert_samples" type="boolean" truevalue="^" falsevalue="" label="Exclude these samples instead of including them?" help="Equivalent to prefixing the list of samples with &quot;^&quot; on the command line."/>
526 </when>
527 <when value="-S">
528 <param argument="--samples_file" type="data" format="tabular" optional="@IS_OPTIONAL@" label="Samples file" help="@FILE_HELP@" />
529 <param name="invert_samples" type="boolean" truevalue="^" falsevalue="" label="Exclude the samples listed in the file instead of including them?" help="Equivalent to prefixing the file with &quot;^&quot; on the command line."/>
530 </when>
531 <when value="@ALL_SAMPLES@" />
532 </conditional>
468 </xml> 533 </xml>
469 <token name="@SAMPLES@"> 534 <token name="@SAMPLES@">
470 #set $samples_defined = False 535 #set $samples_defined = False
471 #if str($section.samples) != '': 536 #if str($section.samples) != '':
472 #set $samples_defined = True 537 #set $samples_defined = True
476 #set $samples_defined = True 541 #set $samples_defined = True
477 --samples-file "${section.invert_samples_file}${section.samples_file}" 542 --samples-file "${section.invert_samples_file}${section.samples_file}"
478 #end if 543 #end if
479 </token> 544 </token>
480 545
481 <xml name="macro_sample"> 546 <xml name="macro_sample" token_help="Apply variants of the given sample">
482 <param name="sample" type="text" optional="true" label="Sample" help="Apply variants of the given sample" /> 547 <param name="sample" type="text" optional="true" label="Sample" help="@HELP@" />
483 </xml> 548 </xml>
484 <token name="@SAMPLE@"> 549 <token name="@SAMPLE@">
485 #if $section.sample: 550 #if $section.sample:
486 --sample '${section.sample}' 551 --sample '${section.sample}'
487 #end if 552 #end if