diff find_in_reference.xml @ 0:fe0327a3ba81

Uploaded
author jjohnson
date Sat, 04 Jan 2014 09:03:57 -0500
parents
children 856033fb26e8
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/find_in_reference.xml	Sat Jan 04 09:03:57 2014 -0500
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<tool id="find_in_reference" name="find in reference" version="0.0.1">
+  <description>filter peptides that are present in proteins</description>
+  <command interpreter="python">find_in_reference.py  --input "$input" 
+  --reference "$reference" 
+  #if $column.set == 'yes':
+    --input_column $column.input_column
+    --reference_column $column.reference_column
+  #end if
+  #if 'novel' in $outputs.__str__ or not 'found' in $outputs.__str__:
+    --output "$novel"
+  #end if
+  #if 'found' in $outputs.__str__:
+    --filtered "$found"
+  #end if
+  </command>
+  <inputs>
+    <param name="input" type="data" format="tabular" label="Input file to be filtered" 
+           help="e.g. tophat junctions.bed run without GTF option or no-novel-junctions"/> 
+    <param name="reference" type="data" format="tabular" label="reference file to search" 
+           help="e.g. tophat junctions.bed run with GTF option and no-novel-junctions"/> 
+    <conditional name="column">
+      <param name="set" type="select" label="select columns to compare">
+        <option value="no" selected="true">Use last column of input and reference</option>
+        <option value="yes">Choose the column of input and reference to compare</option>
+      </param>
+      <when value="no"/>
+      <when value="yes">
+        <param name="input_column" type="data_column" data_ref="input" label="column in input (defaults to last column)" 
+           help=""/>
+        <param name="reference_column" type="data_column" data_ref="reference" label="column in reference (defaults to last column)" 
+           help=""/>
+      </when>
+    </conditional>
+    <param name="outputs" type="select" multiple="true" display="checkboxes" label="Choose outputs">
+      <option value="novel" selected="true">lines with no match in reference</option>
+      <option value="found">lines with match in reference</option>
+    </param>
+  </inputs>
+  <stdio>
+    <exit_code range="1:" level="fatal" description="Error" />
+  </stdio>
+  <outputs>
+    <data name="found" metadata_source="input" format_source="input" label="${tool.name} on ${on_string}: found">
+      <filter>'found' in str(outputs)</filter>
+    </data>
+    <data name="novel" metadata_source="input" format_source="input" label="${tool.name} on ${on_string}: novel">
+      <filter>'novel' in str(outputs) or not 'found' in str(outputs)</filter>
+    </data>
+  </outputs>
+  <tests>
+    <test>
+      <param name="input" value="human_peptides.tabular" ftype="tabular" dbkey="hg19"/>
+      <param name="reference" value="human_proteins.tabular" ftype="tabular" dbkey="hg19"/>
+      <output name="novel" file="novel_peptides.tabular"/>
+    </test>
+  </tests>
+  <help>
+**Find in Reference**
+
+Filters lines of a tabular input file by checking if the selected input column 
+is a substring of the selected column of any line in the reference file.  
+
+This can be used to check if peptides sequences are present in a set of reference proteins,  
+as a means of filtering out uninteresting peptide sequences.
+
+  </help>
+</tool>