changeset 0:fd6b71c81011 draft

Uploaded
author geert-vandeweyer
date Thu, 13 Feb 2014 08:37:16 -0500
parents
children dba6ffec8e2e
files GrepFile.xml
diffstat 1 files changed, 64 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/GrepFile.xml	Thu Feb 13 08:37:16 2014 -0500
@@ -0,0 +1,64 @@
+<tool id="GrepFile" name="Grep File" version="0.0.1">
+  <description></description>
+  <command  interpreter="perl">GrepFile.pl
+	-i "$input"
+	-o "$output"
+	
+	## perl/case triggers
+	$perl
+	 
+	## return extra lines after the match (eg fasta/fastq grepping)
+	#if $extralines.extra == "true":
+		-A $extralines.nr
+	#end if
+
+	## grep from file or grep from provided pattern
+	#if $PatSource.fromfile == "true":
+		-t "file"
+		-f "$PatSource.patternfile"
+	#else:
+		-t "single"
+		-f "$PatSource.pattern"
+	#end if
+  </command>
+  <inputs>
+    <param name="input" type="data" label="Input file" help="text/tabular/fasta/sam/... file to extract the matches from"/>
+    <conditional name="extralines">
+      <param name="extra" type="select" label="Fetch Extra Lines" help="Also fetch lines following the matched pattern (eg for fastq extraction based on readname)">
+        <option value="true" >Yes</option>
+        <option value="false" selected="True">No</option>
+      </param>
+      <when value="true">
+	<param name="nr" type="integer" value="1" label="Extra lines to fetch" />
+      </when>
+    </conditional>
+   <conditional name="PatSource">
+      <param name="fromfile" type="select" label="Pattern Source" >
+        <option value="true" >Pattern File</option>
+        <option value="false" >Single Pattern</option>
+      </param>
+      <when value="true"> 	<param name="patternfile" type="data" label="Pattern File" help="A text file with one pattern per line" />
+     </when>
+      <when value="false">
+	<param name="pattern" type="text" label="Pattern" help="Provide a valid grep pattern" />
+	
+      </when>
+    </conditional>
+    <param name="perl" type="select" label="Matching type">
+	<option value="">Exact string matching</option>
+	<option value="-i">Case Insensitive matching (slower!)</option>
+	<option value="-P">Interpret patterns as Perl Regex</option>
+    </param>
+
+  </inputs>
+  <outputs>
+    <data format="input" name="output" metadata_source="input"/>
+  </outputs>
+    <help>
+
+**What it does**
+
+This tool extends the grepping options available in galaxy. It allowes extracting lines following a match, grepping from a file of patterns, and perl-based matching.
+
+    </help>
+</tool>