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