view GrepFile.xml @ 1:dba6ffec8e2e draft

Uploaded
author geert-vandeweyer
date Thu, 13 Feb 2014 08:37:30 -0500
parents fd6b71c81011
children 94ba1a8de091
line wrap: on
line source

<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>