diff tools/mira4_assembler/mira4_de_novo.xml @ 1:70248e6e3efc draft

v0.0.7 move dependency to package_mira_4_0_2 etc
author peterjc
date Wed, 05 Aug 2015 11:31:05 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/mira4_assembler/mira4_de_novo.xml	Wed Aug 05 11:31:05 2015 -0400
@@ -0,0 +1,275 @@
+<tool id="mira_4_0_de_novo" name="MIRA v4.0 de novo assember" version="0.0.7">
+    <description>Takes Sanger, Roche 454, Solexa/Illumina, Ion Torrent and PacBio reads</description>
+    <requirements>
+        <requirement type="binary">mira</requirement>
+        <requirement type="binary">miraconvert</requirement>
+        <requirement type="package" version="4.0.2">MIRA</requirement>
+        <requirement type="binary">samtools</requirement>
+        <requirement type="package" version="0.1.19">samtools</requirement>
+    </requirements>
+    <code file="mira4_validator.py" />
+    <stdio>
+        <!-- Assume anything other than zero is an error -->
+        <exit_code range="1:" />
+        <exit_code range=":-1" />
+    </stdio>
+    <version_command interpreter="python">mira4.py --version</version_command>
+    <command interpreter="python">mira4.py
+--manifest "$manifest"
+#if str($maf_wanted)=="true":
+--maf "$out_maf"
+#end if
+#if str($bam_wanted)=="true":
+--bam "$out_bam"
+#end if
+--fasta "$out_fasta"
+--log "$out_log"
+    </command>
+    <configfiles>
+        <configfile name="manifest">
+project = MIRA
+job = denovo,${job_type},${job_quality}
+parameters = -NW:cmrnl=no -DI:trt=/tmp -OUT:orc=no
+## -GE:not is short for -GENERAL:number_of_threads and using one (1)
+## can be useful for repeatability of assemblies and bug hunting.
+## This is overriden by the command line -t switch which is easier
+## to set from within Galaxy.
+##
+## -NW:cmrnl is short for -NAG_AND_WARN:check_maxreadnamelength
+## and without this MIRA aborts with read names over 40 characters
+## due to limitations of some downstream tools.
+##
+## -DI:trt is short for -DIRECTORY:tmp_redirected_to and should
+## point to a local hard drive (not something like NFS on network).
+## We replace /tmp with an environment variable via mira4.py
+##
+## -OUT:orc=no is short for -OUTPUT:output_result_caf=no 
+## which turns off an output file we don't want anyway.
+
+#for $rg in $read_group
+
+##This bar goes into the manifest as a comment line
+#------------------------------------------------------------------------------
+
+readgroup
+technology = ${rg.technology}
+##Record the segment placement (if any)
+#if str($rg.segments.type) == "paired"
+segment_placement = ${rg.segments.placement}
+segment_naming = ${rg.segments.naming}
+#if str($rg.segments.min_size) != "" or str($rg.segments.max_size) != ""
+##If our min/max validation failed I trust MIRA to give an error message...
+template_size = $rg.segments.min_size $rg.segments.max_size
+#end if
+#end if
+##if str($rg.segments.type) == "none"
+##MIRA4 manual says use segment_placement = unknown or ? for unpaired data
+##but this stopped working in MIRA 4.0 RC5 and 4.0 (final). See:
+##http://www.freelists.org/post/mira_talk/Unpaired-reads-and-segment-placement--or-unknown
+##segment_placement = ?
+##end if
+##MIRA will accept multiple filenames on one data line, or multiple data lines
+#for $f in $rg.filenames
+##Must now map Galaxy datatypes to MIRA file types...
+#if $f.ext.startswith("fastq")
+##MIRA doesn't like fastqsanger etc, just plain old fastq:
+data = fastq::$f
+#elif $f.ext == "mira"
+##We're calling *.maf the "mira" format in Galaxy (name space collision)
+data = maf::$f
+#else
+##MIRA is happy with fasta as name,
+data = ${f.ext}::$f
+#end if
+#end for
+#end for
+        </configfile>
+    </configfiles>
+    <inputs>
+        <param name="job_type" type="select" label="Assembly type">
+            <option value="genome">Genome</option>
+            <option value="est">EST (transcriptome)</option>
+        </param>
+        <param name="job_quality" type="select" label="Assembly quality grade">
+            <option value="accurate">Accurate</option>
+            <option value="draft">Draft</option>
+        </param>
+        <repeat name="read_group" title="Read Group" min="1">
+            <param name="technology" type="select" label="Read technology">
+                <option value="solexa">Solexa/Illumina</option>
+                <option value="sanger">Sanger cappillary sequencing</option>
+                <option value="454">Roche 454</option>
+                <option value="iontor">Ion Torrent</option>
+                <option value="pcbiolq">PacBio low quality (raw)</option>
+                <option value="pcbiohq">PacBio high quality (corrected)</option>
+                <option value="text">Synthetic reads (database entries, consensus sequences, artifical reads, etc)</option>
+                <!-- TODO reference/backbone as an entry here? -->
+            </param>
+            <conditional name="segments">
+                <param name="type" type="select" label="Are these paired reads?">
+                    <option value="paired">Paired reads</option>
+                    <option value="none">Single reads or not relevant (e.g. primer walking with Sanger capillary sequencing)</option>
+                </param>
+                <when value="paired">
+                    <param name="placement" type="select" label="Pairing type (segment placing)">
+                        <option value="FR">---&gt; &lt;--- (e.g. Sanger capillary or Solexa/Illumina paired-end library)</option>
+                        <option value="RF">&lt;--- ---&gt; (e.g. Solexa/Illumina mate-pair library)</option>
+                        <option value="SB">2---&gt; 1---&gt; (e.g. Roche 454 paired-end libraries or IonTorrent long-mate; see note)</option>
+                    </param>
+                    <!-- min/max validation is done via the <code> tag -->
+                    <param name="min_size" type="integer" optional="true" min="0" value=""
+                           label="Minimum size of 'good' DNA templates in the library preparation"
+                           help="Optional, but if used you must also supply a maximum value." />
+                    <param name="max_size" type="integer" optional="true" min="0" value=""
+                           label="Maximum size of 'good' DNA templates in the library preparation"
+                           help="Optional, but if used you must also supply a minimum value." />
+                    <param name="naming" type="select" label="Pair naming convention">
+                        <option value="solexa">Solexa/Illumina (using '/1' and '/2' suffixes, or later Illumina colon system)</option>
+                        <option value="FR">Forward/Reverse scheme (using '.f*' and '.r*' suffixes)</option>
+                        <option value="tigr">TIGR scheme (using 'TF*' and 'TR*' suffixes)</option>
+                        <option value="sanger">Sanger scheme (see notes)</option>
+                        <option value="stlouis">St. Louis scheme (see notes)</option>
+                    </param>
+                </when>
+                <when value="none" /><!-- no further questions -->
+            </conditional>
+            <param name="filenames" type="data" format="fastq,mira" multiple="true" required="true" label="Read file(s)"
+                  help="Multiple files allowed, for example paired reads can be given as two files (MIRA looks at read names to identify pairs)." />
+        </repeat>
+        <param name="maf_wanted" type="boolean" label="Output assembly in MIRA's own format?" checked="False" />
+        <param name="bam_wanted" type="boolean" label="Convert assembly into BAM format?" checked="True" />
+    </inputs>
+    <outputs>
+        <data name="out_fasta" format="fasta" label="MIRA de novo contigs (FASTA)" />
+        <data name="out_bam" format="bam" label="MIRA de novo assembly (BAM)">
+            <filter>bam_wanted is True</filter>
+        </data>
+        <data name="out_maf" format="mira" label="MIRA de novo assembly">
+            <filter>maf_wanted is True</filter>
+        </data>
+        <!-- TODO?                                                                                                                          
+        <data name="out_contigstats" format="tabular" label="MIRA contig stats" />                                                          
+        -->
+        <data name="out_log" format="txt" label="MIRA de novo log" />
+    </outputs>
+    <tests>
+        <!-- Tiger mitochondria, selected paired end Illumina reads from SRR639755
+             Note we're using just one repeat group, and only the filenames parameter
+             within it, so this should work with current test framework limitations:
+             TODO: Revise example and/or -NW:cac=warn and -NW:acv=80 settings
+             MIRA 4.0 complains as coverage is about x93 which is over 80 limit.
+             Also MIRA 4.0 gives three contigs as output.
+        <test>
+            <param name="job_type" value="genome" />
+            <param name="job_quality" value="accurate" />
+            <param name="filenames" value="SRR639755_mito_pairs.fastq.gz" ftype="fastqsanger" />
+            <output name="out_fasta" file="SRR639755_mito_pairs.mira4_de_novo.fasta" ftype="fasta" />
+        </test>
+        -->
+        <!-- Simple assembly based on MIRA's minidemo/demo4 example
+             Note we're using just one repeat group,
+             but several parameters with the repeat
+        -->
+        <test>
+            <param name="job_type" value="genome" />
+            <param name="job_quality" value="accurate" />
+            <param name="technology" value="sanger" />
+            <param name="type" value="none" />
+            <param name="filenames" value="U13small_m.fastq" ftype="fastqsanger" />
+            <param name="maf_wanted" value="true"/>
+            <param name="bam_wanted" value="true"/>
+            <output name="out_fasta" file="U13small_m.mira4_de_novo.fasta" ftype="fasta" />
+            <output name="out_bam" file="empty_file.dat" compare="contains" />
+            <!-- TODO: Suggest startswith as a compare method? -->
+            <output name="out_maf" file="header.mira" compare="contains" />
+            <output name="out_log" file="empty_file.dat" compare="contains" />
+        </test>
+        <!-- Simple assembly based on MIRA's minidemo/solexa1 example
+             Note we're using just one repeat group,
+             but two parameters within the repeat (filename, no pairing)
+         -->
+        <test>
+            <param name="job_type" value="genome" />
+            <param name="job_quality" value="accurate" />
+            <param name="type" value="none" />
+            <param name="filenames" value="ecoli.fastq" ftype="fastqsanger" />
+            <param name="maf_wanted" value="false"/>
+            <param name="bam_wanted" value="false"/>
+            <output name="out_fasta" file="ecoli.mira4_de_novo.fasta" ftype="fasta" />
+            <output name="out_log" file="empty_file.dat" compare="contains" />
+        </test>
+    </tests>
+    <help>
+
+**What it does**
+
+Runs MIRA v4.0 in de novo mode, collects the output, generates a sorted BAM
+file, and then throws away all the temporary files.
+
+MIRA is an open source assembly tool capable of handling sequence data from
+a range of platforms (Sanger capillary, Solexa/Illumina, Roche 454, Ion Torrent
+and also PacBio).
+
+It is particularly suited to small genomes such as bacteria.
+
+
+**Notes on paired reads**
+
+.. class:: warningmark
+
+MIRA uses read naming conventions to identify paired read partners
+(and does not care about their order in the input files). In most cases,
+the Solexa/Illumina setting is fine. For Sanger capillary sequencing,
+you may need to rename your reads to match one of the standard conventions
+supported by MIRA. For Roche 454 or Ion Torrent the appropriate settings
+depend on how the FASTQ file was produced:
+
+* If using Roche's ``sffinfo`` or older versions of ``sff_extract``
+  to convert SFF files to FASTQ, your reads will probably have the
+  ``---&gt; &lt;---`` orientation and use the ``.f`` and ``.r``
+  suffixes (FR naming).
+
+* If using a recent version of ``sff_extract``, then the ``/1`` and ``/2``
+  suffixes are used (Solexa/Illumina style naming) and the original
+  ``2---&gt; 1---&gt;`` orientation is preserved.
+
+The reason for this is the raw data for Roche 454 and Ion Torrent paired-end
+libraries sequences a circularised fragment such that the raw data begins
+with the end of the fragment, a linker, then the start of the fragment.
+This means both the start and end are sequenced from the same strand, and
+have the orientation ``2---&gt; 1---&gt;``. However, in order to use the data
+with traditional tools expecting Sanger capillary style ``---&gt; &lt;---``
+orientation it was common to reverse complement one of the pair to mimic this.
+
+
+**Citation**
+
+If you use this Galaxy tool in work leading to a scientific publication please
+cite the following papers:
+
+Peter J.A. Cock, Björn A. Grüning, Konrad Paszkiewicz and Leighton Pritchard (2013).
+Galaxy tools and workflows for sequence analysis with applications
+in molecular plant pathology. PeerJ 1:e167
+http://dx.doi.org/10.7717/peerj.167
+
+Bastien Chevreux, Thomas Wetter and Sándor Suhai (1999).
+Genome Sequence Assembly Using Trace Signals and Additional Sequence Information.
+Computer Science and Biology: Proceedings of the German Conference on Bioinformatics (GCB) 99, pp. 45-56.
+http://www.bioinfo.de/isb/gcb99/talks/chevreux/main.html
+
+This wrapper is available to install into other Galaxy Instances via the Galaxy
+Tool Shed at http://toolshed.g2.bx.psu.edu/view/peterjc/mira4_assembler
+    </help>
+    <citations>
+        <citation type="doi">10.7717/peerj.167</citation>
+        <citation type="bibtex">@ARTICLE{Chevreux1999-mira3,
+        author = {B. Chevreux and T. Wetter and S. Suhai},
+        year = {1999},
+        title = {Genome Sequence Assembly Using Trace Signals and Additional Sequence Information},
+        journal = {Computer Science and Biology: Proceedings of the German Conference on Bioinformatics (GCB)}
+        volume = {99},
+        pages = {45-56},
+        url = {http://www.bioinfo.de/isb/gcb99/talks/chevreux/main.html}
+        }</citation>
+    </citations>
+</tool>