Mercurial > repos > iuc > obi_grep
view obigrep.xml @ 4:02bab5ff7c37 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/obitools commit dabf62d438facc62f3e606ff4419092fdcdfaa44
author | iuc |
---|---|
date | Wed, 20 Mar 2024 13:17:23 +0000 |
parents | fe7ec8a3d35e |
children |
line wrap: on
line source
<tool id="obi_grep" name="obigrep" version="@TOOL_VERSION@" profile="@PROFILE@"> <description>Filters sequence file</description> <macros> <import>macros.xml</import> </macros> <expand macro="bio_tools"/> <expand macro="requirements"/> <expand macro="stdio"/> <command><![CDATA[ @GUNZIP_INPUT@ obigrep --without-progress-bar ${v} #if str($options_grep.options_grep_selector) == 'sequence' -s ${options_grep.sequence} #else if str($options_grep.options_grep_selector) == 'definition' -D ${options_grep.definition} #else if str($options_grep.options_grep_selector) == 'identifier' -I ${options_grep.identifier} #else if str($options_grep.options_grep_selector) == 'idlist' --id-list '${options_grep.idlist}' #else if str($options_grep.options_grep_selector) == 'attribute' -a ${options_grep.attribute} #else if str($options_grep.options_grep_selector) == 'hasattribute' -A ${options_grep.attribute} #else if str($options_grep.options_grep_selector) == 'predicat' -p ${options_grep.predicat} #else if str($options_grep.options_grep_selector) == 'lmax' -L ${options_grep.lmax} #else if str($options_grep.options_grep_selector) == 'lmin' -l ${options_grep.lmin} #end if @INPUT_FORMAT@ @OUT_FORMAT@ input @GZIP_OUTPUT@ > '$output' @GENERATE_GALAXY_JSON@ ]]></command> <inputs> <param name="input" type="data" format="@INPUT_FORMATS@" label="Input sequences file"/> <conditional name="options_grep"> <param name="options_grep_selector" type="select" label="Choose the sequence record selection option"> <option value="sequence" selected="true">sequence</option> <option value="definition">definition</option> <option value="identifier">identifier</option> <option value="idlist">idlist</option> <option value="attribute">attribute</option> <option value="hasattribute">hasattribute</option> <option value="predicat">predicat</option> <option value="lmax">lmax</option> <option value="lmin">lmin</option> </param> <when value="sequence"> <param name="sequence" type="text" label="Regular expression pattern to be tested against the sequence itself. The pattern is case insensitive."> <expand macro="sanitizer"/> </param> </when> <when value="definition"> <param name="definition" type="text" label="Regular expression pattern to be tested against the definition of the sequence record. The pattern is case sensitive."> <expand macro="sanitizer"/> </param> </when> <when value="identifier"> <param name="identifier" type="text" label="Regular expression pattern to be tested against the identifier of the sequence record. The pattern is case sensitive." > <expand macro="sanitizer"/> </param> </when> <when value="idlist"> <param name="idlist" type="data" format="txt,tabular" label="points to a text file containing the list of sequence record identifiers to be selected. The file format consists in a single identifier per line."/> </when> <when value="attribute"> <param name="attribute" type="text" label="Regular expression pattern matched against the attributes of the sequence record. the value of this attribute is of the form : key:regular_pattern. The pattern is case sensitive."> <expand macro="sanitizer"/> </param> </when> <when value="hasattribute"> <param name="hasattribute" type="text" label="Selects sequence records having an attribute who is key."> <expand macro="sanitizer" /> </param> </when> <when value="predicat"> <param name="predicat" type="text" label="Python boolean expression to be evaluated for each sequence record." help="The attribute keys defined for each sequence record can be used in the expression as variable names. An extra variable named sequenceefers to the sequence record itself."> <expand macro="sanitizer"/> </param> </when> <when value="lmax"> <param name="lmax" type="text" label="lmax" help="Keeps sequence records whose sequence length is equal or shorter than lmax"/> </when> <when value="lmin"> <param name="lmin" type="text" label="lmin" help="Keeps sequence records whose sequence length is equal or longer than lmin"/> </when> </conditional> <param name="v" type="boolean" truevalue="-v" falsevalue="" checked="false" label="Invert the sequence record selection (option -v)"/> <expand macro="input_format_options_macro"/> <expand macro="out_format_macro"/> </inputs> <outputs> <data format="auto" name="output"/> </outputs> <tests> <test expect_num_outputs="1"> <!-- since the test data has large qualities it is sniffed as generic fastq which is not accepted py the parameter so the ftype is set, in this test we overwrite tis with the options_inputtype parameter and check if its set correctly on the CLI--> <param name="input" value="illuminapairedend.output.fastq" ftype="fastqsolexa"/> <conditional name="options_grep"> <param name="options_grep_selector" value="lmin"/> <param name="lmin" value="80"/> </conditional> <param name="v" value="true" /> <param name="options_inputtype" value="--sanger"/> <param name="out_format" value="fastq" /> <output name="output" file="output_obigrep_lmin.fastq" ftype="fastqsanger"/> <assert_command> <has_text text="--sanger"/> </assert_command> </test> <test expect_num_outputs="1"> <param name="input" value="illuminapairedend.output.fastq.gz" ftype="fastqsolexa.gz"/> <conditional name="options_grep"> <param name="options_grep_selector" value="predicat"/> <param name="predicat" value='mode!="joined"'/> </conditional> <param name="v" value="false" /> <param name="out_format" value="fasta" /> <output name="output" file="output_obigrep_predicat.fasta.gz" ftype="fasta.gz" decompress="true"/> <assert_command> <has_text text="--solexa"/> </assert_command> </test> </tests> <help><![CDATA[ .. class:: infomark **What it does** The obigrep command is in some way analog to the standard Unix grep command. It selects a subset of sequence records from a sequence file. A sequence record is a complex object composed of an identifier, a set of attributes (key=value), a definition, and the sequence itself. Instead of working text line by text line as the standard Unix tool, selection is done sequence record by sequence record. A large set of options allows refining selection on any of the sequence record elements. Moreover obigrep allows specifying simultaneously several conditions (that take the value TRUE or FALSE) and only the sequence records that fulfill all the conditions (all conditions are TRUE) are selected. Sequence record selection options : * sequence : Regular expression pattern to be tested against the sequence itself. ex: GAATTC * definition : Regular expression pattern to be tested against the definition of the sequence record. ex: [Cc]hloroplast * identifier : Regular expression pattern to be tested against the identifier of the sequence record. ex: ^GH * idlist : points to a text file containing the list of sequence record identifiers to be selected. * attribute : Regular expression pattern matched against the attributes of the sequence record. the value of this attribute is of the form : key:regular_pattern. ex:'family_name:Asteraceae' * hasattribute : Selects sequence records having an attribute whose key = KEY. * predicat : Python boolean expression to be evaluated for each sequence record. The attribute keys defined for each sequence record can be used in the expression as variable names. An extra variable named ‘sequence’ refers to the sequence record itself. ex: mode!="joined" * lmax : Keeps sequence records whose sequence length is equal or shorter than lmax. ex : 100 * lmin : Selects sequence records whose sequence length is equal or longer than lmin. ex : 100 @OBITOOLS_LINK@ ]]> </help> <expand macro="citation" /> </tool>