view makeWindowsBed.xml @ 47:2892111d91f8 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
author iuc
date Fri, 21 Feb 2025 21:40:09 +0000
parents 7ab85ac5f64b
children
line wrap: on
line source

<tool id="bedtools_makewindowsbed" name="bedtools MakeWindowsBed" version="@TOOL_VERSION@+galaxy0" profile="@PROFILE@">
    <description>make interval windows across a genome</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="bio_tools" />
    <expand macro="requirements" />
    <expand macro="stdio" />
    <command><![CDATA[
bedtools makewindows
#if $type.type_select == 'genome':
    @GENOME_FILE_MAKEWINDOWS@
#else:
    -b '$type.input'
#end if
#if $action.action_select == 'windowsize':
    -w $action.windowsize
    #if $action.step_size != '':
        -s $action.step_size
    #end if
#else:
    -n $action.number
#end if
$sourcename
> '$output'
    ]]></command>
    <inputs>
         <conditional name="type">
            <param name="type_select" type="select" label="Work with">
                <option value="bed" selected="true">Bed File</option>
                <option value="genome">Genome File</option>
            </param>
            <when value="bed">
                <param name="input" argument="-b" type="data" format="@STD_BEDTOOLS_INPUTS@" label="@STD_BEDTOOLS_INPUT_LABEL@ file"/>
            </when>
            <when value="genome">
                <expand macro="input_conditional_genome_file" />
            </when>
        </conditional>
        <conditional name="action">
            <param name="action_select" type="select" label="Work with">
                <option value="windowsize" selected="true">Set WindowSize</option>
                <option value="number">Give Number of Windows</option>
            </param>
            <when value="windowsize">
                <param name="windowsize" argument="-w" type="integer" value="1"
                    label="Divide each input interval (either a chromosome or a BED interval) to fixed-sized windows"
                    help="i.e. same number of nucleotide in each window" />
                <param name="step_size" argument="-s" type="integer" value="" optional="true" label="Step size" help="How many base pairs to step before creating a new window. Used to create 'sliding' windows. Defaults to window size (non-sliding windows)."/>
            </when>
            <when value="number">
                <param name="number" argument="-n" type="integer" value="1"
                    label="Divide each input interval (either a chromosome or a BED interval) to fixed number of windows"
                    help="I.e. same number of windows, with varying window sizes" />
            </when>
        </conditional>
        <param name="sourcename" type="select" label="ID Naming Options">
            <option value="" selected="true">Default</option>
            <option value="-i src">use the source interval's name</option>
            <option value="-i winnum">use the window number as the ID (e.g. 1,2,3,4...)</option>
            <option value="-i srcwinnum">use the source interval's name with the window number.</option>
        </param>
    </inputs>
    <outputs>
        <data name="output" format="bed" />
    </outputs>
    <tests>
        <test>
            <param name="type|type_select" value="genome" />
            <param name="type|genome_file_opts|genome_file_opts_selector" value="hist" />
            <param name="type|genome_file_opts|genome" value="mm9_chr1.len" ftype="tabular" />
            <param name="action|action_select" value="windowsize" />
            <param name="action|windowsize" value="1000000" />
            <output name="output" file="makeWindowBed_result1.bed" ftype="bed" />
        </test>
        <test>
            <param name="type|type_select" value="genome" />
            <param name="type|genome_file_opts|genome_file_opts_selector" value="hist" />
            <param name="type|genome_file_opts|genome" value="mm9_chr1.len" ftype="tabular" />
            <param name="action|action_select" value="windowsize" />
            <param name="action|windowsize" value="1000000" />
            <param name="action|step_size" value="50000" />
            <output name="output" file="makeWindowBed_result2.bed" ftype="bed" />
        </test>
        <test>
            <param name="type|type_select" value="genome" />
            <param name="type|genome_file_opts|genome_file_opts_selector" value="hist" />
            <param name="type|genome_file_opts|genome" value="mm9_chr1.len" ftype="tabular" />
            <param name="action|action_select" value="number" />
            <param name="action|number" value="100" />
            <output name="output" file="makeWindowBed_result3.bed" ftype="bed" />
        </test>
        <test>
            <param name="type|type_select" value="bed" />
            <param name="type|input" value="makeWindowBed1.bed" ftype="bed" />
            <param name="action|action_select" value="number" />
            <param name="action|number" value="15" />
            <output name="output" file="makeWindowBed_result4.bed" ftype="bed" />
        </test>
    </tests>
    <help><![CDATA[
**What it does**

Makes adjacent or sliding windows across a genome or BED file.

@REFERENCES@
    ]]></help>
    <expand macro="citations" />
</tool>