Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 151 additions & 0 deletions tools/obitools/macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,141 @@
#end if
]]></token>

<xml name="taxo_macro_optional">
<conditional name="taxo_condi">
<param name="taxonomic_select" type="select" display="radio" label="Do you want to use a taxonomic database ?">
<option value="no_taxo">No Taxonomic Database</option>
<option value="use_taxo">Use taxonomic Database</option>
</param>
<when value="no_taxo"></when>
<when value="use_taxo">
<conditional name="taxonomy">
<param name="taxonomy_source" type="select" label="Choose source of NCBI Taxonomy">
<option value="cached" selected="true">Use built-in NCBI Taxonomy database</option>
<option value="history">Datasets from history</option>
</param>
<when value="cached">
<param type="select" name="taxonomy_table" label="NCBI Taxonomy database">
<options from_data_table="ncbi_taxonomy">
<filter type="sort_by" column="name"/>
<validator type="no_options" message="No NCBI Taxonomy downloads are available"/>
</options>
<validator type="no_options" message="No NCBI Taxonomy database download is available"/>
</param>
</when>
<when value="history">
<param name="taxdump" type="data" format="tar,tar.gz,tgz,csv" label="NCBI Taxonomic database"/>
</when>
</conditional>
</when>
</conditional>
</xml>

<xml name="taxo_macro">
<conditional name="taxonomy">
<param name="taxonomy_source" type="select" label="Choose source of NCBI Taxonomy">
<option value="cached" selected="true">Use built-in NCBI Taxonomy database</option>
<option value="history">Datasets from history</option>
</param>
<when value="cached">
<param type="select" name="taxonomy_table" label="NCBI Taxonomy database">
<options from_data_table="ncbi_taxonomy">
<filter type="sort_by" column="name"/>
<validator type="no_options" message="No NCBI Taxonomy downloads are available"/>
</options>
<validator type="no_options" message="No NCBI Taxonomy database download is available"/>
</param>
</when>
<when value="history">
<param name="taxdump" type="data" format="tar,tar.gz,tgz,csv,gz,txt,gz" label="NCBI Taxonomic database"/>
</when>
</conditional>
</xml>

<xml name="macro_restrict_rank">
<param name="rank" type="select" label="Restrict to the given taxonomic rank" multiple="true" optional="true">
<option value="species">species</option>
<option value="genus">genus</option>
<option value="family">family</option>
<option value="class">class</option>
<option value="order">order</option>
<option value="phylum">phylum</option>
<option value="kingdom">kingdom</option>
<option value="domain">domain</option>
</param>
</xml>

<xml name="taxo_macro_obigrep">
<conditional name="taxo_condi">
<param name="taxonomic_select" type="select" display="radio" label="Do you want to use a taxonomic database ?">
<option value="no_taxo">No Taxonomic Database</option>
<option value="use_taxo">Use taxonomic Database</option>
</param>
<when value="no_taxo"></when>
<when value="use_taxo">
<param name="rank" type="select" label="Restrict to the given taxonomic rank" multiple="true" optional="true">
<option value="species">species</option>
<option value="genus">genus</option>
<option value="family">family</option>
<option value="class">class</option>
<option value="order">order</option>
<option value="phylum">phylum</option>
<option value="kingdom">kingdom</option>
<option value="domain">domain</option>
</param>
<conditional name="taxonomy">
<param name="taxonomy_source" type="select" label="Choose source of NCBI Taxonomy">
<option value="cached" selected="true">Use built-in NCBI Taxonomy database</option>
<option value="history">Datasets from history</option>
</param>
<when value="cached">
<param type="select" name="taxonomy_table" label="NCBI Taxonomy database">
<options from_data_table="ncbi_taxonomy">
<filter type="sort_by" column="name"/>
<validator type="no_options" message="No NCBI Taxonomy downloads are available"/>
</options>
<validator type="no_options" message="No NCBI Taxonomy database download is available"/>
</param>
</when>
<when value="history">
<param name="taxdump" type="data" format="tar,tar.gz,tgz,csv" label="NCBI Taxonomic database"/>
</when>
</conditional>
</when>
</conditional>
</xml>

<token name="@TAXO_DIR@"><![CDATA[
#if str($taxonomy.taxonomy_source) == 'cached':
--taxonomy '$taxonomy.taxonomy_table.fields.path'
#else
--taxonomy '$taxonomy.taxdump'
#end if
]]></token>

<token name="@TAXO_DIR_OPTIONAL@"><![CDATA[
#if str($taxo_condi.taxonomic_select) == 'use_taxo':
#if str($taxo_condi.taxonomy.taxonomy_source) == 'cached':
--taxonomy '$taxonomy.taxonomy_table.fields.path'
#else
--taxonomy '$taxo_condi.taxonomy.taxdump'
#end if
#end if
]]></token>

<token name="@TAXO_DIR_OBIGREP@"><![CDATA[
#if str($taxo_condi.taxonomic_select) == 'use_taxo':
#for i in $rank
--require-rank $i
#end for
#if str($taxo_condi.taxonomy.taxonomy_source) == 'cached':
--taxonomy '$taxonomy.taxonomy_table.fields.path'
#else
--taxonomy '$taxo_condi.taxonomy.taxdump'
#end if
#end if
]]></token>

<token name="@OUT_FORMAT@"><![CDATA[
#if str($out_format) in ["fasta.gz", "fastq.gz"] or ($input.ext.endswith(".gz") and str($out_format) not in ["fasta", "fastq"])
--compress
Expand Down Expand Up @@ -77,6 +212,22 @@
<param name="compress_bool" type="boolean" truevalue="--compress" falsevalue="" checked="false" label="Do you want to compress the output file ?"/>
</xml>

<token name="@RESTRICT_TO_RANK@"><![CDATA[
#for i in $rank
--require-rank $i
#end for
]]></token>

<xml name="macro_restrict_taxon">
<param name="taxon" type="integer" label="Restrict to a specific taxon by his taxid" help="Require that the actual taxon of the sequence belongs the provided taxid." optional="true"/>
</xml>

<token name="@RESTRICT_TO_TAXON@"><![CDATA[
#if $taxon
--restrict-to-taxon $taxon
#end if
]]></token>

<token name="@OBITOOLS_LINK_OBI4@">
<![CDATA[
--------
Expand Down
3 changes: 3 additions & 0 deletions tools/obitools/obiannotate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@OPTIONS_OBIGREP@
#end for

@TAXO_DIR_OBIGREP@

#if $rename_tag.old_name and $rename_tag.new_name
--rename-tag '$rename_tag.old_name'='$rename_tag.new_name'
#end if
Expand Down Expand Up @@ -113,6 +115,7 @@
<repeat name="repeat_obigrep" title="filter parameter" min="0">
<expand macro="option_grep_macro"/>
</repeat>
<expand macro="taxo_macro_obigrep"/>
<expand macro="input_format_options_macro"/>
<expand macro="out_format_macro"/>
</inputs>
Expand Down
47 changes: 47 additions & 0 deletions tools/obitools/obicomplement.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<tool id="obi_complement" name="obicomplement" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
<description>
Compute the reverse complement of the sequence entries.
</description>
<macros>
<import>macros.xml</import>
</macros>
<expand macro="requirements"/>
<expand macro="stdio"/>
<command><![CDATA[
obicomplement
--no-progressbar
@INPUT_FORMAT@
@OUT_FORMAT@
'$input'
> '$output'
]]></command>
<inputs>
<param name="input" type="data" format="@INPUT_FORMATS@"/>
<expand macro="input_format_options_macro"/>
<expand macro="out_format_macro"/>
</inputs>
<outputs>
<data name="output" format_source="input">
<expand macro="change_format_macro"/>
</data>
</outputs>
<tests>
<test>
<param name="input" value="output_obipairing.fastqsanger" ftype="fastqsanger"/>
<output name="output" value="output_obicomplement.fastqsanger" ftype="fastqsanger"/>
</test>
</tests>
<help><![CDATA[
.. class:: infomark

**What it does**

Compute the reverse complement of the sequence entries.

@OBITOOLS_LINK_OBI4@

]]>
</help>
<expand macro="citation" />

</tool>
6 changes: 4 additions & 2 deletions tools/obitools/obigrep.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#for $i in $repeat_obigrep
@OPTIONS_OBIGREP@
#end for
@TAXO_DIR_OBIGREP@
@INPUT_FORMAT@
@OUT_FORMAT@
$input
Expand All @@ -25,6 +26,7 @@
<expand macro="option_grep_macro"/>
</repeat>
<param name="v" type="boolean" truevalue="-v" falsevalue="" checked="false" label="Invert the sequence record selection (option -v)"/>
<expand macro="taxo_macro_obigrep"/>
<expand macro="input_format_options_macro"/>
<expand macro="out_format_macro"/>
</inputs>
Expand Down Expand Up @@ -76,7 +78,7 @@
<output name="output" file="output_obigrep_mincount_attrib.fasta" ftype="fasta"/>
</test>
</tests>
<help>
<help><![CDATA[
.. class:: infomark

**What it does**
Expand Down Expand Up @@ -113,7 +115,7 @@ Sequence record selection options :
* mincount : Selects sequence records whose sequence count is equal or longer than lmin. ex : 5

@OBITOOLS_LINK_OBI4@

]]>
</help>
<expand macro="citation" />

Expand Down
98 changes: 98 additions & 0 deletions tools/obitools/obipcr.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<tool id="obi_pcr" name="obipcr" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
<description>
In sillico PCR
</description>
<macros>
<import>macros.xml</import>
</macros>
<expand macro="requirements"/>
<expand macro="stdio"/>
<command><![CDATA[
obipcr
--no-progressbar
--forward $forward
--reverse $reverse
--max-length $max_length
-e $allowed_mismatches
#if $min_length
--min-length $min_length
#end if
$circular
#if $delta
--delta $delta
$only_complete_flanking
#end if
@TAXO_DIR_OPTIONAL@
@INPUT_FORMAT@
@OUT_FORMAT@
'$input'
>'$output'
]]></command>
<inputs>
<param name="input" type="data" format="@INPUT_FORMATS@"/>
<param name="forward" type="text" optional="false" label="Sequence of the forward primer" help="The forward primer used for the electronic PCR. IUPAC codes can be used in the pattern.">
<validator type="regex" message="Please enter a valid forward primer sequence">^(?:[ACGTKMRYSWBDHVN]#?|\[!?[ACGT]+\]#?){1,63}$</validator>
</param>
<param name="reverse" type="text" optional="false" label="Sequence of the reverse primer" help="The reverse primer used for the electronic PCR. IUPAC codes can be used in the pattern.">
<validator type="regex" message="Please enter a valid reverse primer sequence">^(?:[ACGTKMRYSWBDHVN]#?|\[!?[ACGT]+\]#?){1,63}$</validator>
</param>
<param name="max_length" type="integer" optional="false" label="Maximum length of the barcode, primers excluded.">
<validator type="in_range" min="0" message="This paramater can't be negative, please provide a valid number"></validator>
</param>
<param name="min_length" type="integer" optional="true" label="Minimum length of the barcode, primers excluded.">
<validator type="in_range" min="0" message="This paramater can't be negative, please provide a valid number"></validator>
</param>
<param name="allowed_mismatches" type="integer" value="0" label="Maximum number of mismatches allowed for each primer">
<validator type="in_range" min="0" message="This paramater can't be negative, please provide a valid number"></validator>
</param>
<param name="circular" type="boolean" truevalue="--circular" falsevalue="" label="Considers that sequences are circular. (default: sequences are considered linear)"/>
<section name="delta_option" title="delta_option">
<param name="delta" type="integer" optional="true" label="delta" help="Without this option, only the barcode sequences will be output, without the priming sites. This option allows to add the priming sites and the flanking sequences of the priming sites over a length of delta to each side of the barcode."/>
<param name="only_complete_flanking" optional="true" type="boolean" truevalue="--only-complete-flanking" falsevalue="" label="only complete flanking" help="Works in conjunction with –delta. Prints only sequences with full-length flanking sequences (default: prints every sequence regardless of whether the flanking sequences are present)."/>
</section>
<expand macro="taxo_macro_optional"/>
<expand macro="input_format_options_macro"/>
<expand macro="out_format_macro"/>
</inputs>
<outputs>
<data format_source="input" name="output">
<expand macro="change_format_macro"/>
</data>
</outputs>
<tests>
<test>
<param name="input" value="input_reference_dataset.fasta.gz"/>
<param name="forward" value="GGGCAATCCTGAGCCAA"/>
<param name="reverse" value="CCATTGAGTCTCTGCACCTATC"/>
<param name="max_length" value="220"/>
<param name="out_format" value="fasta"/>
<output name="output" file="output_obipcr.fasta" ftype="fasta"/>
</test>
</tests>
<help><![CDATA[
.. class:: infomark

**What it does**

The obipcr program is the successor of ecoPCR. It is known as an in silico PCR software.

* forward : The forward primer used for the electronic PCR. IUPAC codes can be used in the pattern.

* reverse : The reverse primer used for the electronic PCR. IUPAC codes can be used in the pattern.

* max length : Maximum length of the barcode, primers excluded.

* min length : Minimum length of the barcode primers excluded (default: no minimum length).

* circular : Considers that sequences are circular. (default: sequences are considered linear)

* delta : Without this option, only the barcode sequences will be output, without the priming sites. This option allows to add the priming sites and the flanking sequences of the priming sites over a length of delta to each side of the barcode.

* only complete flanking : Works in conjunction with –delta. Prints only sequences with full-length flanking sequences (default: prints every sequence regardless of whether the flanking sequences are present).

@OBITOOLS_LINK_OBI4@
]]>
</help>
<expand macro="citation" />

</tool>
Loading
Loading