annotate GrepFile.xml @ 3:94ba1a8de091 draft

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