changeset 0:225cc4c0255c draft default tip

"planemo upload for repository https://github.com/quadram-institute-bioscience/galaxy-tools/tree/master/tools/operams commit 7c920ffbc24003e893b2d666c0e4df52a8fe5d5f-dirty"
author thanhlv
date Mon, 23 Aug 2021 09:29:07 +0000
parents
children
files operams.xml
diffstat 1 files changed, 152 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/operams.xml	Mon Aug 23 09:29:07 2021 +0000
@@ -0,0 +1,152 @@
+<tool id="operams" name="Hybrid metagenomic assembler" version="@VERSION@">
+    <macros>
+        <token name="@VERSION@">0.9.0</token>
+    </macros>
+    <requirements>
+        <container type="singularity">singularity/opera-ms.sif</container>
+    </requirements>
+    <command detect_errors="exit_code"><![CDATA[
+## Preparing files
+#if str( $paired_unpaired.fastq_input_selector ) == "paired"
+    #if $paired_unpaired.fastq_input1.is_of_type('fastqsanger')
+        #set fq1 = "fq1.fastq"
+    #elif $paired_unpaired.fastq_input1.is_of_type('fastqsanger.gz')
+        #set fq1 = "fq1.fastq.gz"
+    #end if
+    #if $paired_unpaired.fastq_input2.is_of_type('fastqsanger')
+        #set fq2 = "fq2.fastq"
+    #elif $paired_unpaired.fastq_input2.is_of_type('fastqsanger.gz')
+        #set fq2 = "fq2.fastq.gz"
+    #end if
+    ln -s '${paired_unpaired.fastq_input1}' $fq1 &&
+    ln -s '${paired_unpaired.fastq_input2}' $fq2 &&
+#elif str( $paired_unpaired.fastq_input_selector ) == "paired_collection"
+    #if $paired_unpaired.fastq_input1.forward.is_of_type('fastqsanger')
+        #set fq1 = "fq1.fastq"
+    #elif $paired_unpaired.fastq_input1.forward.is_of_type('fastqsanger.gz')
+        #set fq1 = "fq1.fastq.gz"
+    #end if
+    #if $paired_unpaired.fastq_input1.reverse.is_of_type('fastqsanger')
+        #set fq2 = "fq2.fastq"
+    #elif $paired_unpaired.fastq_input1.reverse.is_of_type('fastqsanger.gz')
+        #set fq2 = "fq2.fastq.gz"
+    #end if
+    ln -s '${paired_unpaired.fastq_input1.forward}' $fq1 &&
+    ln -s '${paired_unpaired.fastq_input1.reverse}' $fq2 &&
+#end if
+#if $long_read
+    #if $long_read.is_of_type('fastqsanger')
+        #set lr = "lr.fastq"
+    #elif $long_read.is_of_type('fastqsanger.gz')
+        #set lr = "lr.fastq.gz"
+    #elif $long_read.is_of_type('fasta')
+        #set lr = "lr.fasta"
+    #end if
+    ln -s '${long_read}' '$lr' &&
+#end if
+#if $contig_file
+    ln -s '${contig_file}' 'contigs.fasta' &&
+#end if
+## Running OPERA-MS
+##singularity exec /home/ubuntu/galaxy-tools/tools/operams/singularity/opera-ms.sif
+OPERA-MS.pl --num-processors "\${GALAXY_SLOTS:-4}"
+--genome-db '/path/to/opera-ms-db'
+--out-dir output
+#if str( $paired_unpaired.fastq_input_selector ) == "paired"
+    --short-read1 '$fq1'
+    --short-read2 '$fq2'
+#elif str( $paired_unpaired.fastq_input_selector ) == "paired_collection"
+    --short-read1 '$fq1'
+    --short-read2 '$fq2'
+#end if
+#if $long_read
+    --long-read $lr
+#end if
+#if str($contig_file) != ''
+    --contig-file 'contigs.fasta'
+#end if
+$no_ref_clustering
+$no_polishing
+$no_strain_clustering
+$no_gap_filling
+--long-read-mapper $lr_mapper
+--short-read-assembler $sr_assembler
+--kmer-size $kmer_size
+--contig-len-thr $contig_len_thr
+--contig-edge-len $contig_edge_len
+--contig-window-len $contig_window_len 2>&1 > log.txt &&
+tar -czf intermediate_files.tar.gz ./output/intermediate_files
+    ]]></command>
+    <inputs>
+        <conditional name="paired_unpaired">
+            <param name="fastq_input_selector" type="select" label="Paired or Single end data?" help="Select between paired and single end data">
+                <option selected="True" value="paired">Paired</option>
+                <option value="paired_collection">Paired Collection</option>
+            </param>
+            <when value="paired">
+                <param name="fastq_input1" argument="-1" type="data" format="fastqsanger,fastqsanger.gz"
+                    label="Select first set of reads" help="Specify dataset with forward reads"/>
+                <param name="fastq_input2" argument="-2" type="data" format="fastqsanger,fastqsanger.gz"
+                    label="Select second set of reads" help="Specify dataset with reverse reads"/>
+            </when>
+            <when value="paired_collection">
+                <param name="fastq_input1" format="fastqsanger,fastqsanger.gz" type="data_collection" collection_type="paired" label="Select a paired collection" />
+            </when>
+        </conditional>
+        <param name="contig_file" type="data" format="fasta,fasta.gz" optional="True" label="Contig file, if the short-reads have been assembled previously"/>
+        <param argument="--long_read" type="data" format="fastqsanger,fastqsanger.gz,fasta" label="Select long reads"/>
+        <param argument="--no_ref_clustering" type="boolean" checked="true" truevalue="--no-ref-clustering" falsevalue="" label="Disable reference level clustering" help=""/>
+        <param argument="--no_polishing" type="boolean" checked="false" truevalue="--no-polishing" falsevalue="" label="Disable short-read polishing with Pilon" help="For samples with high coverage and/or high complexity this step may take a significant amount of time"/>
+        <param argument="--no_strain_clustering" type="boolean" checked="false" truevalue="--no-strain-clustering" falsevalue="" label="Disable strain level clustering" help=""/>
+        <param argument="--no_gap_filling" type="boolean" checked="false" truevalue="--no-gap-filling" falsevalue="" label="Disable gap-filling stage" help=""/>
+        <param name="lr_mapper" type="select" label="long-read mapper">
+            <option value="blasr">blasr</option>
+            <option value="minimap2" selected="True">minimap2</option>
+        </param>
+        <param name="sr_assembler" type="select" label="short-read assembler">
+            <option value="spades">spades</option>
+            <option value="megahit" selected="True">megahit</option>
+        </param>
+        <param argument="--kmer_size" type="integer" min="0" max="100" value="60" label="Kmer value used to assemble contigs"/>
+        <param argument="--contig_len_thr" type="integer" min="0" max="10000" value="500" label="Contig length threshold for clustering" help="contigs smaller than the threshold will be filtered out"/>
+        <param argument="--contig_edge_len" type="integer" min="0" max="10000" value="80" label="Number of bases filtered out from each contig end" help="to avoid biases due to lower mapping efficiency"/>
+        <param argument="--contig_window_len" type="integer" min="0" max="10000" value="340" label="Window length in which the coverage estimation is performed" help="We recommend using contig-len-thr - 2 * contig-edge-len as the value"/>
+    </inputs>
+    <outputs>
+        <data name="log" format="txt" from_work_dir="log.txt" label="${tool.name} on ${on_string}: Log" />
+        <data name="assembly_stats" format="txt" from_work_dir="output/assembly.stats" label="${tool.name} on ${on_string}: Assembly Stats" />
+        <data name="contigs" format="fasta" from_work_dir="output/contigs.fasta" label="${tool.name} on ${on_string}: Contigs" />
+        <data name="polish_contigs" format="fasta" from_work_dir="output/contigs.polished.fasta" label="${tool.name} on ${on_string}: Contigs (Polished)" >
+            <filter>no_poslishing is True</filter>
+        </data>
+        <data name="contig_info" format="tabular" from_work_dir="output/contig_info.txt" label="${tool.name} on ${on_string}: Contigs Info" />
+        <data name="cluster_info" format="tabular" from_work_dir="output/cluster_info.txt" label="${tool.name} on ${on_string}: Cluster Info" />
+        <data name="intermedia_files" format="tar.gz" from_work_dir="intermediate_files.tar.gz" label="${tool.name} on ${on_string}: Archived Intermediate Files" />
+    </outputs>
+    <tests>
+    <test>
+        <param name="paired_unpaired" value="paired" />
+        <param name="fastq_input1" value="R1.fastq.gz" ftype="fastqsanger.gz" />
+        <param name="fastq_input2" value="R2.fastq.gz" ftype="fastqsanger.gz" />
+        <param name="long_read" value="long_read.fastq" ftype="fastqsanger" />
+        <param name="contig_file" value="contigs.fasta" ftype="fastqsanger" />
+        <output name="assembly_stats" >
+            <assert_contents>
+                <has_n_lines n="10" />
+                <has_text text="Assembly size: 94" />
+            </assert_contents>
+        </output>
+    </test>
+    </tests>
+    <help><![CDATA[
+
+**OPERA-MS**
+
+OPERA-MS is a hybrid metagenomic assembler which combines the advantages of short and long-read technologies to provide high quality assemblies, addressing issues of low contiguity for short-read only assemblies, and low base-pair quality for long-read only assemblies. OPERA-MS has been extensively tested on mock and real communities sequenced using different long-read technologies, including Oxford Nanopore, PacBio and Illumina Synthetic Long Read, and is particularly robust to noise in the read data.
+
+Home page: https://github.com/CSB5/OPERA-MS
+    ]]></help>
+    <citations>
+        <citation type="doi">s41587-019-0191-2</citation>
+    </citations>
+</tool>