view MergeSTR/mergeSTR.xml @ 1:8e8cf43f6836 draft default tip

planemo upload for repository https://github.com/Kulivox/TRToolsGalaxyWrapper commit df706bf76531920d935ec6d2eb41b9b1420aa390
author michal_klinka
date Sun, 15 May 2022 15:23:59 +0000
parents ecf8c4f9f8ba
children
line wrap: on
line source

<?xml version="1.0" ?>
<tool id="mergeSTR" name="MergeSTR" version="@tool_version@">
     <description>MergeSTR merges multiple VCF files produced by the same TR
        genotyper into a single VCF file.
    </description>

    <macros>
        <import>macros.xml</import>
    </macros>

    <expand macro="requirements"/>
    <version_command>mergeSTR --version</version_command>
    <command detect_errors="exit_code"><![CDATA[
    @INDEX_VCFS@
    #set $inputs = [str(vcf['vcf']) for vcf in $required_arguments.vcfs]
    #set $temp_inputs = $get_new_vcf_names($inputs)
    #set $indexed_inputs_comma_separated = ",".join($temp_inputs)

    $index_vcfs($inputs, $temp_inputs)

    mergeSTR

## vcfs definition
#if $required_arguments.vcfs:
   --vcfs $indexed_inputs_comma_separated
#end if
## end vcfs definition
## out definition
#if $required_arguments.out:
   --out $required_arguments.out
#end if
## end out definition
## vcftype definition
#if $required_arguments.vcftype:
   --vcftype $required_arguments.vcftype
#end if
## end vcftype definition
## update_sample_from_file definition
#if $special_merge_options.update_sample_from_file:
   --update-sample-from-file
#end if
## end update_sample_from_file definition
## verbose definition
#if $optional_arguments.verbose:
   --verbose
#end if
## end verbose definition
## quiet definition
#if $optional_arguments.quiet:
   --quiet
#end if
## end quiet definition
## version definition
#if $versione869.version:
   --version
#end if
## end version definition
1>$stdout 2>$stderr
]]></command>


    <inputs>
        <section name="required_arguments" title="Required arguments"
                 expanded="false">
            <repeat name="vcfs" title="VCF files to merge">
                <param argument="--vcf" type="data" format="vcf_bgzip" label="VCF file" help="VCF file to analyze"/>
            </repeat>
            <param argument="--out" type="text" optional="false" label="out"
                   help="Prefix to name output files"/>
            <param argument="--vcftype" type="select" optional="true"
                   label="vcftype"
                   help="Genotyper that was used to create this VCF input">
                <expand macro="vcfTypes"/>
            </param>
        </section>
        <section name="special_merge_options" title="Special merge options"
                 expanded="false">
            <param argument="--update-sample-from-file" type="boolean"
                   optional="true" label="update_sample_from_file"
                   help="Use file names, rather than sample header names, when merging"/>
        </section>
        <section name="optional_arguments" title="Optional arguments"
                 expanded="false">
            <param argument="--verbose" type="boolean" optional="true"
                   label="verbose" help="Print out extra info"/>
            <param argument="--quiet" type="boolean" optional="true"
                   label="quiet" help="Don't print out anything"/>
        </section>
        <section name="versione869" title="Version" expanded="false">
            <param argument="--version" type="boolean" optional="true"
                   label="version"
                   help="show program's version number and exit"/>
        </section>
    </inputs>


    <outputs>
        <data name="stdout" label="STDOUT and output files" format="txt">
            <discover_datasets format="vcf" pattern="(?P&lt;designation&gt;.+)\.vcf$" visible="true"/>
        </data>
        <data name="stderr" label="STDERR output" format="txt"/>
    </outputs>


    <tests>
        <test>
            <section name="required_arguments">
            <param name="out" value="test_result"/>
            <param name="vcftype" value="hipstr"/>
            <repeat name="vcfs">
                <param name="vcf" value="NA12878_chr21_hipstr.sorted.vcf.gz"/>
            </repeat>
            <repeat name="vcfs">
                <param name="vcf" value="NA12891_chr21_hipstr.sorted.vcf.gz"/>
            </repeat>
        </section>
        <section name="optional_arguments">
            <param name="verbose" value="true"/>
        </section>
        <output name="stdout" file="stdout.txt">
            <discovered_dataset designation="test_result">
                <!-- The vcf output itself can't be directly compared, because it contains the command that executed it, and that command is different for every run -->
                <assert_contents>
                    <has_size value="3106435" delta="100"/>
                    <has_text text="##fileformat=VCFv4.1"/>
                    <has_n_lines n="9658"/>
                </assert_contents>
            </discovered_dataset>   
        </output>
        <output name="stderr" file="stderr.txt"/>
        </test>
    </tests>


    <help>sage: pygalgen [-h] --vcfs VCFS --out OUT [--vcftype VCFTYPE] [--update-sample-from-file] [--verbose] [--quiet]
                [--version]

options:
  -h, --help            show this help message and exit

Required arguments:
  --vcfs VCFS           Comma-separated list of VCF files to merge (must be sorted, bgzipped and indexed)
  --out OUT             Prefix to name output files
  --vcftype VCFTYPE     ##!!## Name trh could not be loaded

Special merge options:
  --update-sample-from-file
                        Use file names, rather than sample header names, when merging

Optional arguments:
  --verbose             Print out extra info
  --quiet               Don't print out anything

Version:
  --version             show program's version number and exit
    </help>


    <citations>
        <citation type="bibtex">@misc{TRTools: a toolkit for genome-wide
            analysis of tandem repeats,
            author = {Nima Mousavi, Jonathan Margoliash, Neha Pusarla, Shubham
            Saini, Richard Yanicky, Melissa Gymrek},
            year = {2020},
            title = {TRTools},
            publisher = {GitHub},
            journal = {GitHub repository},
            url = {https://github.com/gymreklab/trtools},
            }
        </citation>
    </citations>
</tool>