view utils_filter-annotated-entries.xml @ 6:4d16cf9414cf draft default tip

planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/segmentation_fold commit 3a3c1d069e0a079d8ea7c0b4ac856ef24141b1aa
author erasmus-medical-center
date Fri, 24 Feb 2017 04:18:22 -0500
parents b7cf9b172cfe
children
line wrap: on
line source

<tool id="smf_utils_filter-annotated-entries" name="filter-annotated-entries" version="@VERSION@-1">
    <description>Split entries into two files based on whether they overlap annotations in a bed file</description>
    
    <macros>
        <import>macros.xml</import>
    </macros>
    
    <expand macro="requirements" />
    <expand macro="version_command" />
    
    <command detect_errors="aggressive"><![CDATA[
        segmentation-fold-utils
            filter-annotated-entries
                --regex '${regex.replace("'","\\'")}'
                '$dbn_input_file'
                '$bed_input_file'
                '$dbn_output_file_overlapping'
                '$dbn_output_file_non_overlapping'
    ]]></command>

    <inputs>
        <param name="dbn_input_file"
               type="data"
               format="dbn,txt"
               label="Input DBN file"
               help="The 'fasta'-headers should contain the genomic position being used to find overlapping reads in the BAM file"/>
        <param name="bed_input_file"
               type="data"
               format="bed"
               label="The resultes will be filtered based on overlap with annotations in this BED file"/>
        <param name="regex"
               type="text"
               argument="--regex"
               value='>.*?(chr[^:]):([0-9]+)-([0-9]+)'
               label="Regex to capture the targeted location in DBN file"
               help="Do not change this value unless you're using customized software in the pipeline - default: '>.*?(chr[^:]):([0-9]+)-([0-9]+)'" />
    </inputs>

    <outputs>
        <data name="dbn_output_file_overlapping"
              format="dbn"
              label="${tool.name} on ${dbn_input_file.hid}: ${dbn_input_file.name} - overlapping entries"/>
        <data name="dbn_output_file_non_overlapping"
              format="dbn"
              label="${tool.name} on ${dbn_input_file.hid}: ${dbn_input_file.name} - non overlapping entries"/>
    </outputs>
    
    <tests>
        <test>
            <param name="dbn_input_file" value="DBNFile.test_02.in.dbn" ftype="dbn"/>
            <param name="bed_input_file" value="DBNFile.test_02.in.bed" ftype="bed"/>
            <param name="regex" value='>.*?(chr[^:]):([0-9]+)-([0-9]+)'/>

            <output name="dbn_output_file_overlapping">
                <assert_contents>
                    <has_line_matching expression="&gt;chr1:0-10 x unknown-01 \(overlap in .*?: firstbase,1-2-3-4-5,6-7-8-9-10\)"/>
                    <has_line line="AAAAAAAAAA"/>
                </assert_contents>
            </output>
            <output name="dbn_output_file_non_overlapping">
                <assert_contents>
                    <has_line_matching expression="&gt;chr1:25-36 x unknown-01 \(aligned reads .*?: 1\)"/>
                    <has_line line="AAAAAAAAAAA"/>
                    
                    <has_line_matching expression="&gt;chr1:45-56 x unknown-01 \(aligned reads .*?: 2\)"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    
    <help><![CDATA[
Filter based on whether the entries in the DBN file are already annotated or not
    ]]></help>
    
    <expand macro="citations" />
</tool>