annotate GrepFile.xml @ 0:fd6b71c81011 draft

Uploaded
author geert-vandeweyer
date Thu, 13 Feb 2014 08:37:16 -0500
parents
children 94ba1a8de091
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
1 <tool id="GrepFile" name="Grep File" version="0.0.1">
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
2 <description></description>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
3 <command interpreter="perl">GrepFile.pl
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
4 -i "$input"
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
5 -o "$output"
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
6
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
7 ## perl/case triggers
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
8 $perl
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
9
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
10 ## return extra lines after the match (eg fasta/fastq grepping)
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
11 #if $extralines.extra == "true":
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
12 -A $extralines.nr
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
13 #end if
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
14
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
15 ## grep from file or grep from provided pattern
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
16 #if $PatSource.fromfile == "true":
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
17 -t "file"
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
18 -f "$PatSource.patternfile"
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
19 #else:
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
20 -t "single"
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
21 -f "$PatSource.pattern"
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
22 #end if
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
23 </command>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
24 <inputs>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
25 <param name="input" type="data" label="Input file" help="text/tabular/fasta/sam/... file to extract the matches from"/>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
26 <conditional name="extralines">
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
27 <param name="extra" type="select" label="Fetch Extra Lines" help="Also fetch lines following the matched pattern (eg for fastq extraction based on readname)">
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
28 <option value="true" >Yes</option>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
29 <option value="false" selected="True">No</option>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
30 </param>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
31 <when value="true">
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
32 <param name="nr" type="integer" value="1" label="Extra lines to fetch" />
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
33 </when>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
34 </conditional>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
35 <conditional name="PatSource">
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
36 <param name="fromfile" type="select" label="Pattern Source" >
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
37 <option value="true" >Pattern File</option>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
38 <option value="false" >Single Pattern</option>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
39 </param>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
40 <when value="true"> <param name="patternfile" type="data" label="Pattern File" help="A text file with one pattern per line" />
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
41 </when>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
42 <when value="false">
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
43 <param name="pattern" type="text" label="Pattern" help="Provide a valid grep pattern" />
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
44
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
45 </when>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
46 </conditional>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
47 <param name="perl" type="select" label="Matching type">
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
48 <option value="">Exact string matching</option>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
49 <option value="-i">Case Insensitive matching (slower!)</option>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
50 <option value="-P">Interpret patterns as Perl Regex</option>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
51 </param>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
52
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
53 </inputs>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
54 <outputs>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
55 <data format="input" name="output" metadata_source="input"/>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
56 </outputs>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
57 <help>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
58
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
59 **What it does**
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
60
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
61 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.
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
62
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
63 </help>
fd6b71c81011 Uploaded
geert-vandeweyer
parents:
diff changeset
64 </tool>