diff medaka_consensus.xml @ 0:ef94bace3a3c draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/medaka commit 1b97fa7a21a2c85bf4891aed1b7df92685b346c3"
author iuc
date Sat, 23 May 2020 13:38:26 -0400
parents
children 551f8c9bc4cf
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/medaka_consensus.xml	Sat May 23 13:38:26 2020 -0400
@@ -0,0 +1,168 @@
+<tool id="medaka_consensus_pipeline" name="medaka: Consensus pipeline" version="@TOOL_VERSION@+galaxy0" profile="@PROFILE@">
+    <description>Assembly polishing via neural networks</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
+    <expand macro="version_command"/>
+    <command detect_errors="exit_code"><![CDATA[
+        medaka_consensus
+        ## optional
+        -m '${m}'
+        -b $b
+        -o 'results'
+        #if 'draft' in str($out).split(',') or 'variants' in str($out).split(',') or 'polished' in str($out).split(',')
+            -v
+        #end if
+        -t \${GALAXY_SLOTS:-4}
+        ## required
+        -i '$i'
+        -d '$d'
+
+        |& tee 'log.txt'
+        #if 'variants' in str($out).split(',')
+            && bgzip -d 'results/variants.vcf.gz'
+        #end if
+    ]]></command>
+    <inputs>
+        <param argument="-i" type="data" format="fastq,fastq.gz,fastqsanger,fastqsanger.gz,fasta,fasta.gz" label="Select basecalls"/>
+        <param argument="-d" type="data" format="fasta,fasta.gz" label="Select assembly" help="The input assembly should be preprocessed with racon."/>
+        <expand macro="model"/>
+        <expand macro="b"/>
+        <param name="out" type="select" multiple="true" optional="false" label="Select output file(s)" help="'Draft To Consensus', 'Variants' and 'Polished regions in draft coordinates' are generated using the parameter -v.">
+            <option value="consensus" selected="true">Consensus</option>
+            <option value="probs" selected="true">Consensus probabilities</option>
+            <option value="calls" selected="true">Calls to draft</option>
+            <option value="draft">Draft to consensus</option>
+            <option value="variants">Variants</option>
+            <option value="polished">Polished regions in draft coordinates</option>
+            <option value="log">Log</option>
+        </param>
+    </inputs>
+    <outputs>
+        <!-- standard -->
+        <data name="out_consensus" format="fasta" from_work_dir="results/consensus.fasta" label="${tool.name} on ${on_string}: Consensus">
+            <filter>'consensus' in out</filter>
+        </data>
+        <data name="out_probs" format="h5" from_work_dir="results/consensus_probs.hdf" label="${tool.name} on ${on_string}: Consensus probabilities">
+            <filter>'probs' in out</filter>
+        </data>
+        <data name="out_calls" format="bam" from_work_dir="results/calls_to_draft.bam" label="${tool.name} on ${on_string}: Calls to draft">
+            <filter>'calls' in out</filter>
+        </data>
+        <!-- optional with parameter -v -->
+        <data name="out_draft" format="txt" from_work_dir="results/draft_to_consensus.chain" label="${tool.name} on ${on_string}: Draft to consensus">
+            <filter>'draft' in out</filter>
+        </data>
+        <data name="out_variants" format="vcf" from_work_dir="results/variants.vcf" label="${tool.name} on ${on_string}: Variants">
+            <filter>'variants' in out</filter>
+        </data>
+        <data name="out_polished" format="bed" from_work_dir="results/polished_regions_in_draft_coords.bed" label="${tool.name} on ${on_string}: Polished regions in Draft">
+            <filter>'polished' in out</filter>
+        </data>
+        <!-- optional -->
+        <data name="out_log" format="txt" label="${tool.name} on ${on_string}: Log" from_work_dir="log.txt">
+            <filter>'log' in out</filter>
+        </data>
+    </outputs>
+    <tests>
+        <!-- #1 default -->
+        <test expect_num_outputs="3">
+            <param name="i" value="basecalls.fastq"/>
+            <param name="d" value="assembly.fasta"/>
+            <output name="out_consensus">
+                <assert_contents>
+                    <has_n_lines n="2"/>
+                    <has_line line=">4_segment0 4:1.0-3792.0"/>
+                    <has_text_matching expression=".+GTCAGAATCGCGTTCAGCGCGTTTCAGCGGTGCGTACAATT.+"/>
+                </assert_contents>
+            </output>
+            <output name="out_probs">
+                <assert_contents>
+                    <has_size value="194782" delta="100"/>
+                </assert_contents>
+            </output>
+            <output name="out_calls">
+                <assert_contents>
+                    <has_size value="533139" delta="100"/>
+                </assert_contents>
+            </output>
+        </test>
+        <!-- #2 -->
+        <test expect_num_outputs="7">
+            <param name="i" value="basecalls.fastq"/>
+            <param name="d" value="assembly.fasta"/>
+            <param name="m" value="r941_min_fast_g303"/>
+            <param name="b" value="99"/>
+            <param name="out" value="consensus,probs,calls,draft,variants,polished,log"/>
+            <output name="out_consensus">
+                <assert_contents>
+                    <has_n_lines n="65"/>
+                    <has_line line=">4 length=3792 depth=114.52x circular=true"/>
+                    <has_line line="CATCTCTTT"/>
+                </assert_contents>
+            </output>
+            <output name="out_probs">
+                <assert_contents>
+                    <has_size value="192710" delta="100"/>
+                </assert_contents>
+            </output>
+            <output name="out_calls">
+                <assert_contents>
+                    <has_size value="533163" delta="100"/>
+                </assert_contents>
+            </output>
+            <output name="out_draft">
+                <assert_contents>
+                    <has_n_lines n="6"/>
+                    <has_line line="chain 3789 4 3792 + 0 3792 4 3789 + 0 3789 1"/>
+                    <has_line line="1204"/>
+                </assert_contents>
+            </output>
+            <output name="out_polished">
+                <assert_contents>
+                    <has_size value="9"/>
+                </assert_contents>
+            </output>
+            <output name="out_variants">
+                <assert_contents>
+                    <has_n_lines n="9"/>
+                    <has_line line="##fileformat=VCFv4.1"/>
+                    <has_text_matching expression="4&#009;.+"/>
+                </assert_contents>
+            </output>
+            <output name="out_log">
+                <assert_contents>
+                    <has_line line="Polished assembly written to results/consensus.fasta, have a nice day."/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+.. class:: infomark
+
+**What it does**
+
+@WID@
+
+The *medaka_consensus* pipeline performs assembly polishing via neural networks.
+
+**Input**
+
+An *assembly* in .fasta format and *basecalls* in .fasta or .fastq format are required. See `Creating a Draft Assembly  <https://nanoporetech.github.io/medaka/walkthrough.html#basecalling-and-draft-assembly>`_ for a detailed example of one method of obtaining these.
+
+**Output**
+
+- Consensus polished assembly (FASTA)
+- Consensus Probabilities (H5/HDF)
+- Calls To Draft (BAM)
+- Draft To Consensus (chain, TXT)
+- Variants: VCF of changes (VCF)
+- Polished: BED file of polished regions (BED)
+
+**References**
+
+@REFERENCES@
+    ]]></help>
+    <expand macro="citations"/>
+</tool>