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