view access.xml @ 2:1ab40b66c2ba draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cnvkit commit bced16a45d19b243a244a093c3b3504b2640d5e0
author iuc
date Mon, 22 Apr 2024 17:45:28 +0000
parents 9f18bcf53f92
children
line wrap: on
line source

<tool id="cnvkit_access" name="CNVkit Access"  version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
    <description>Calculate the sequence-accessible coordinates in chromosomes</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="xrefs"/>
    <expand macro="creators"/>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[  
        #import re
        ln -s '$fa_fname' ./genome.fasta &&
        #if $exclude
            #set $names = []
            #set $x=1
            #for $x, $exc in enumerate($exclude):
                #set $name_base = re.sub('[^\w\-_\.]', '_', $exc.element_identifier)
                #set $name = $name_base
                #silent $names.append( $name )
                ln -s '$exc' ${name}.bed  &&
            #end for
        #end if
        cnvkit.py access
            ./genome.fasta
            #if $exclude
                #for $name in $names:
                    --exclude  ${name}.bed
               #end for
            #end if
            #if str($min_gap_size)
                --min-gap-size $min_gap_size
            #end if
            --output access-excludes.bed
    ]]></command>
    <inputs>
        <param name="fa_fname" type="data" format="fasta" label="Genome FASTA file" help="Reference genome fasta file" />
        <param argument="--min-gap-size" optional="true" type="integer" label="Minimum gap size between accessible sequence regions" min="0" value="5000" help="Regions separated by less than this distance will be joined together" />
        <param argument="--exclude" type="data" optional="true" format="bed" multiple="true" label="Additional regions to exclude" help="" />
    </inputs>
    <outputs>
        <data name="out_sample_access" format="bed" label="${tool.name} on ${on_string}: Sequence-accessible coordinates" from_work_dir="access-excludes.bed" />
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="fa_fname" ftype="fasta" value="genome.fasta" />
            <param name="min_gap_size" value="2500" />
            <param name="exclude" ftype="bed" value="excludes.bed" />
            <output name="out_sample_access" file="access-excludes.bed" /> 
        </test>
        <test expect_num_outputs="1">
            <param name="fa_fname" ftype="fasta" value="genome.fasta" />
            <param name="min_gap_size" value="2500" />
            <param name="exclude" ftype="bed" value="excludes.bed,excludes_1.bed" />
            <output name="out_sample_access" file="access-excludes.bed" /> 
        </test>
    </tests>
    <help><![CDATA[
           The access command computes the locations of the accessible sequence regions for a given reference genome
           based on these masked-out sequences, treating long spans of ā€˜Nā€™ characters as the inaccessible regions
           and outputting the coordinates of the regions between them.
    ]]></help>
    <expand macro="citations" />
</tool>