diff utils_filter-annotated-entries.xml @ 4:63df1e23f4ff draft

planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/segmentation_fold_galaxy_wrapper commit 00690c63c51a7f7563f2428c313d7fa75f2657e5-dirty
author yhoogstrate
date Thu, 28 Jul 2016 10:25:37 -0400
parents
children b7cf9b172cfe
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utils_filter-annotated-entries.xml	Thu Jul 28 10:25:37 2016 -0400
@@ -0,0 +1,84 @@
+<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>
+    
+    <requirements>
+        <requirement type="package" version="2.7.10">python</requirement>
+        <requirement type="package" version="1.9">numpy</requirement>
+        <requirement type="package" version="0.8.2.1">pysam</requirement>
+        <requirement type="package" version="0.6.1">htseq</requirement>
+        <requirement type="package" version="2.0.1">segmentation-fold-utils</requirement>
+    </requirements>
+    <expand macro="stdio" />
+    
+    <version_command>@VERSION_COMMAND_UTILS@</version_command>
+    
+    <command><![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>