Repository 'spades_biosyntheticspades'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/spades_biosyntheticspades

Changeset 0:42a39792aaae (2022-01-23)
Next changeset 1:8a9a9350ffaf (2022-01-24)
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/spades commit 8734db131db6f76697b500b30f18ee7723d61813"
added:
biosyntheticspades.xml
macros.xml
test-data/A_R1.fastq.gz
test-data/A_R2.fastq.gz
test-data/B_R1.fastq.gz
test-data/B_R2.fastq.gz
test-data/corona_scaffold.fasta
test-data/covid.fastq.gz
test-data/ecoli_1K.fasta.gz
test-data/ecoli_1K.fastq.gz
test-data/ecoli_1K_1.fasta.gz
test-data/ecoli_1K_1.fastq.gz
test-data/ecoli_1K_2.fasta.gz
test-data/ecoli_1K_2.fastq.gz
test-data/pl1.fq.gz
test-data/pl2.fq.gz
b
diff -r 000000000000 -r 42a39792aaae biosyntheticspades.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/biosyntheticspades.xml Sun Jan 23 21:35:21 2022 +0000
[
@@ -0,0 +1,183 @@
+<tool id="spades_biosyntheticspades" name="biosyntheticSPAdes" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01">
+    <description>biosynthetic gene cluster assembly</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
+    <expand macro="stdio"/>
+    <expand macro="version_command"/>
+    <command detect_errors="exit_code"><![CDATA[
+
+#set $library = 1
+
+@PREPROCESS_INPUT_FILES_MAIN@
+#if $additional_reads.selector == 'true'
+    @PREPROCESS_INPUT_FILES_ADDITIONAL@
+#end if
+@PREPROCESS_NANOPORE_PACBIO_FILES@
+
+## run
+spades.py --bio
+    -o 'output'
+    @RESOURCES@
+    @INPUT_READS_MAIN@
+    #if $additional_reads.selector == 'true'
+        @INPUT_READS_ADDITIONAL@
+    #end if
+    ## reads
+    @NANOPORE_PACBIO@
+    ## parameter
+    @KMER@
+    @PHREDOFFSET@
+    @PIPELINE_OPTIONS@
+    ## postprocessing
+    @STATS@
+    @CORRECTED@
+    ]]></command>
+    <inputs>
+        <expand macro="input_files_paired" format="fastq,fastq.gz,fastqsanger.gz" label="FASTQ file(s)"/>    
+        <expand macro="input_additional_files_paired" format="fastq,fastq.gz,fastqsanger.gz" label="FASTQ file(s)"/>
+        <section name="arf" title="Additional read files">
+            <expand macro="nanopore_pacbio"/>
+        </section>
+        <expand macro="kmer"/>
+        <expand macro="phred"/>
+        <expand macro="pipeline_options">
+            <option value="--iontorrent">Iontorrent: required when assembling IonTorrent data (--iontorrent)</option>
+        </expand>
+        <param name="optional_output" type="select" multiple="true" optional="false" label="Select output file(s)" help="Only shown in history if selected here and generated by the specific run.">
+            <option value="sc" selected="true">Scaffolds</option>
+            <option value="rs" selected="true">Raw scaffolds</option>
+            <option value="b" selected="true">HMM statistics</option>
+            <option value="dg" selected="true">Domain graph</option>
+            <option value="l">Log</option>
+        </param>
+    </inputs>
+    <outputs>
+        <expand macro="out_sc"/>
+        <expand macro="out_rs"/>
+        <expand macro="out_b"/>
+        <expand macro="out_dg"/>
+        <expand macro="out_l"/>
+    </outputs>
+    <tests>
+        <!-- #1 single, interlaced, fastq.gz, default parameters -->
+        <test expect_num_outputs="4">
+            <conditional name="singlePaired">
+                <param name="sPaired" value="paired_interlaced"/>
+                <param name="input1" value="ecoli_1K.fastq.gz"/>
+            </conditional>
+            <output name="out_b">
+                <assert_contents>
+                    <has_n_lines n="1"/>
+                </assert_contents>
+            </output>
+            <output name="out_dg">
+                <assert_contents>
+                    <has_n_lines n="2"/>
+                    <has_text_matching expression="digraph.+"/>
+                </assert_contents>
+            </output>
+            <output name="out_sc">
+                <assert_contents>
+                    <has_n_lines n="0"/>
+                </assert_contents>
+            </output>
+            <output name="out_rs">
+                <assert_contents>
+                    <has_n_lines n="18"/>
+                    <has_text_matching expression=">NODE\_1\_length\_1000.+"/>
+                </assert_contents>
+            </output>
+        </test>
+        <!-- #2 single, separate, fastq, hybrid assembly, iontorrent-->
+        <test expect_num_outputs="2">
+            <conditional name="singlePaired">
+                <param name="sPaired" value="paired"/>
+                <param name="input1" value="ecoli_1K_1.fastq.gz"/>
+                <param name="input2" value="ecoli_1K_2.fastq.gz"/>
+            </conditional>
+            <section name="arf">
+                <param name="nanopore" value="ecoli_1K.fastq.gz"/>
+            </section>
+            <param name="mode_sel" value="--iontorrent"/>
+            <assert_command>
+                <has_text text="--nanopore"/>
+                <has_text text="--iontorrent"/>
+            </assert_command>
+             <conditional name="kmer_cond">
+                <param name="kmer_sel" value="manual"/>
+                <param name="manual" value="33"/>
+            </conditional>
+            <param name="phred_offset" value="33"/>           
+            <param name="optional_output" value="rs,l"/>
+            <output name="out_rs">
+                <assert_contents>
+                    <has_n_lines n="18"/>
+                </assert_contents>
+            </output>
+        </test>
+        <!-- #3 multiple inputs -->
+        <test expect_num_outputs="2">
+            <conditional name="singlePaired">
+                <param name="sPaired" value="paired"/>
+                <param name="input1" value="ecoli_1K_1.fastq.gz"/>
+                <param name="input2" value="ecoli_1K_2.fastq.gz"/>
+            </conditional>
+            <conditional name="singlePaired">
+                <param name="sPaired" value="paired_interlaced"/>
+                <param name="input1" value="ecoli_1K.fastq.gz"/>
+            </conditional>
+            <param name="optional_output" value="rs,b"/>
+            <output name="out_b">
+                <assert_contents>
+                    <has_n_lines n="1"/>
+                </assert_contents>
+            </output>
+            <output name="out_rs">
+                <assert_contents>
+                    <has_n_lines n="18"/>
+                    <has_text_matching expression=">NODE\_1\_length\_1000.+"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+.. class:: infomark
+
+**What it does**
+
+@HELP_WID@
+
+biosyntheticSPAdes is a subtool for biosynthetic gene cluster assembly with paired-end reads.
+
+**Input**
+
+biosyntheticSPAdes works with Illumina or IonTorrent reads in a single paired-end library and is capable of providing hybrid assemblies using PacBio, Oxford Nanopore and TSLR reads.
+
+Input data can be provided as interlaced, forward and reverse, merged and unpaired files.
+
+A detailed description can be found in the `input section <https://github.com/ablab/spades/#sec3.1>`_ of the manual.
+
+**Output**
+
+
+biosyntheticSPAdes outputs four files of interest:
+
+- Scaffolds: contains DNA sequences from putative biosynthetic gene clusters (BGC). Since each sample may contain multiple BGCs and biosyntheticSPAdes can  output several putative DNA sequences for eash cluster, for each contig name we append suffix _cluster_X_candidate_Y, where X is the id of the BGC and Y  is the id of the candidate from the BGC.
+- Raw_scaffolds: SPAdes scaffolds generated without domain-graph related algorithms. Very close to regular scaffolds.fasta file.
+- HMM statistics: contains statistics about BGC composition in the sample. First, it outputs number of domain hits in the sample. Then, for each BGC candidate we output domain order with positions on the corresponding DNA sequence from scaffolds.fasta.
+- Domain graphs: contains domain graph structure, that can be used to assess complexity of the sample and structure of BGCs.
+
+A detailed description can be found in the `output section <https://github.com/ablab/spades/#bgc>`_ of the manual.
+
+.. class:: infomark
+
+**References**
+
+More information can be found on `github <https://github.com/ablab/spades>`_  and on the `project website <http://cab.spbu.ru/software/biosyntheticspades>`_.
+    ]]></help>
+    <expand macro="citations">
+        <citation type="doi">10.1101/gr.243477.118</citation>
+    </expand>
+</tool>
b
diff -r 000000000000 -r 42a39792aaae macros.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml Sun Jan 23 21:35:21 2022 +0000
[
b'@@ -0,0 +1,749 @@\n+<macros>\n+    <token name="@TOOL_VERSION@">3.15.3</token>\n+    <token name="@VERSION_SUFFIX@">0</token>\n+    <xml name="requirements">\n+        <requirements>\n+            <requirement type="package" version="@TOOL_VERSION@">spades</requirement>\n+            <requirement type="package" version="3.0">zip</requirement>\n+            <yield/>\n+        </requirements>\n+    </xml>\n+    <xml name="stdio">\n+        <stdio>\n+            <exit_code range="1:"/>\n+            <regex match="Cannot allocate memory"\n+               source="stdout"\n+               level="fatal_oom"\n+               description="Out of memory error occurred"/>\n+            <regex match="The reads contain too many k-mers to fit into available memory"\n+               source="stdout"\n+               level="fatal_oom"\n+               description="Out of memory error occurred"/>\n+        </stdio>\n+    </xml>\n+    <xml name="version_command">\n+        <version_command><![CDATA[spades.py --version 2>&1 | awk -F \'v\' \'{print $2}\']]></version_command>\n+    </xml>\n+    <token name="@INTYPES@">\n+        \n+    </token>\n+    <xml name="citations">\n+        <citations>\n+            <citation type="doi">10.1093/bioinformatics/btv688</citation>\n+            <citation type="doi">10.1093/bioinformatics/btu266</citation>\n+            <citation type="doi">10.1093/bioinformatics/btv337</citation>\n+            <yield/>\n+          </citations>\n+    </xml>\n+    <xml name="operation_mode" token_help="">\n+        <param name="operation_mode" type="select" label="Operation mode" help="@HELP@">\n+            <option value="">Assembly and error correction</option>\n+            <option value="--only-assembler">Only assembler (--only-assembler)</option>\n+            <option value="--only-error-correction">Only error correction (--only-error-correction)</option>\n+        </param>\n+    </xml>\n+    \n+\n+<!-- PREPARE INPUT FILES-->\n+\n+<token name="@PREPROCESS_INPUT_FILES_MAIN@"><![CDATA[\n+#if $singlePaired.sPaired == "single" or $singlePaired.sPaired == "paired_interlaced"\n+    mkdir -p reads1 &&\n+    #set file_paths1 = []\n+    #for $input_file in $singlePaired.input1\n+        #set $ext = $input_file.ext.replace(\'fastqsanger\', \'fastq\')\n+        #set $fname = $input_file.element_identifier.replace(" ","_") + \'.\' + $ext\n+        #set $file_path = \'reads1/\' + $fname\n+        ln -s \'$input_file\' $file_path &&\n+        $file_paths1.append($file_path)\n+    #end for\n+#else if $singlePaired.sPaired == "paired"\n+    mkdir -p paired_reads1 &&\n+    #set fw_reads1 = []\n+    #for $input_file in $singlePaired.input1\n+        #set $ext = $input_file.ext.replace(\'fastqsanger\', \'fastq\')\n+        #set $fname = $input_file.element_identifier.replace(" ","_") + \'.\' + $ext\n+        #set $file_path = \'paired_reads1/\' + str($fname)\n+        ln -s \'$input_file\' $file_path &&\n+        $fw_reads1.append($file_path)\n+    #end for\n+    #set rv_reads1 = []\n+    #for $input_file in $singlePaired.input2\n+        #set $ext = $input_file.ext.replace(\'fastqsanger\', \'fastq\')\n+        #set $fname = $input_file.element_identifier.replace(" ","_") + \'.\' + $ext\n+        #set $file_path = \'paired_reads1/\' + str($fname)\n+        ln -s \'$input_file\' $file_path &&\n+        $rv_reads1.append($file_path)\n+    #end for\n+    #silent $fw_reads1.sort()\n+    #silent $rv_reads1.sort()\n+#else\n+    mkdir -p paired_reads1 &&\n+    #set fw_reads1 = []\n+    #set rv_reads1 = []\n+    #for $i, $input_file in enumerate($singlePaired.input)\n+        #set $ext = $input_file.forward.ext.replace(\'fastqsanger\', \'fastq\')\n+        #set $file_path = \'paired_reads1/fw\' + str($i) + \'.\' + $ext\n+        ln -s \'$input_file.forward\' $file_path &&\n+        $fw_reads1.append($file_path)\n+        #set $file_path = \'paired_reads1/rv\' + str($i) + \'.\' + $ext\n+        ln -s \'$input_file.reverse\' $file_path &&\n+        $rv_reads1.append($file_path)\n+    #end for\n+#end if\n+]]></token>\n+\n+<token name="@PREPROCESS_INPUT_FILES_ADDITIONAL@"><![CDATA[\n+#if $addition'..b'</filter>\n+        </data>\n+    </xml>\n+    <!--\n+      help\n+    -->\n+\n+    <token name="@HELP_IN@"><![CDATA[\n+\n+SPAdes takes as input paired-end reads, mate-pairs and single (unpaired) reads in FASTA and FASTQ. For IonTorrent data SPAdes also supports unpaired reads in unmapped BAM format (like the one produced by Torrent Server). However, in order to run read error correction, reads should be in FASTQ or BAM format. Sanger, Oxford Nanopore and PacBio CLR reads can be provided in both formats since SPAdes does not run error correction for these types of data.\n+\n+To run SPAdes 3.15.3 you need at least one library of the following types:\n+\n+- Illumina paired-end/high-quality mate-pairs/unpaired reads\n+- IonTorrent paired-end/high-quality mate-pairs/unpaired reads\n+- PacBio CCS reads\n+- Illumina and IonTorrent libraries should not be assembled together. All other types of input data are compatible. SPAdes should not be used if only PacBio CLR, Oxford Nanopore, Sanger reads or additional contigs are available.\n+\n+SPAdes supports mate-pair only assembly. However, we recommend to use only high-quality mate-pair libraries in this case (e.g. that do not have a paired-end part). We tested mate-pair only pipeline using Illumina Nextera mate-pairs. \n+\n+Notes:\n+\n+- It is strongly suggested to provide multiple paired-end and mate-pair libraries according to their insert size (from smallest to longest).\n+- It is not recommended to run SPAdes on PacBio reads with low coverage (less than 5).\n+- We suggest not to run SPAdes on PacBio reads for large genomes.\n+- SPAdes accepts gzip-compressed files.\n+\n+A detailed description can be found in the `input section <https://github.com/ablab/spades/#sec3.1>`_ of the manual.\n+    ]]></token>\n+    <token name="@HELP_OUT_AG@">\n+- Assembly graph\n+    </token>\n+    <token name="@HELP_OUT_AGS@">\n+- Assembly graph with scaffolds\n+    </token>\n+    <token name="@HELP_OUT_C@">\n+- Contigs\n+    </token>\n+    <token name="@HELP_OUT_CP@">\n+- Contigs paths in the assembly graph\n+    </token>\n+    <token name="@HELP_OUT_CS@">\n+- Contigs stats\n+    </token>\n+    <token name="@HELP_OUT_CR@">   \n+- Corrected reads by BayesHammer\n+    </token>\n+    <token name="@HELP_OUT_L@">\n+- Log file\n+    </token>\n+    <token name="@HELP_OUT_S@">\n+- Scaffolds (recommended for use as resulting sequences)\n+    </token>\n+    <token name="@HELP_OUT_SP@">\n+- Scaffolds paths in the assembly graph\n+    </token>\n+    <token name="@HELP_OUT_SS@">\n+- Scaffolds stats\n+    </token>\n+    <token name="@HELP_WID@">\n+SPAdes - St. Petersburg genome assembler - is an assembly toolkit containing various assembly pipelines.\n+    </token>\n+    <token name="@IONTORRENT@"><![CDATA[\n+The selection of k-mer length is non-trivial for IonTorrent. If the dataset is more or less conventional (good coverage, not high GC, etc), then use our `recommendation for long reads <https://cab.spbu.ru/files/release3.12.0/manual.html#sec3.4>`_ (e.g. assemble using k-mer lengths 21,33,55,77,99,127). However, due to increased error rate some changes of k-mer lengths (e.g. selection of shorter ones) may be required. For example, if you ran SPAdes with k-mer lengths 21,33,55,77 and then decided to assemble the same data set using more iterations and larger values of K, you can run SPAdes once again specifying the same output folder and the following options: --restart-from k77 -k 21,33,55,77,99,127 --mismatch-correction -o <previous_output_dir>. Do not forget to copy contigs and scaffolds from the previous run. We\'re planning to tackle issue of selecting k-mer lengths for IonTorrent reads in next versions.\n+\n+You may need no error correction for Hi-Q enzyme at all. However, we suggest trying to assemble your data with and without error correction and select the best variant.\n+\n+For non-trivial datasets (e.g. with high GC, low or uneven coverage) we suggest to enable single-cell mode (setting --sc option) and use k-mer lengths of 21,33,55.\n+\n+    ]]></token>    \n+\n+</macros>\n'
b
diff -r 000000000000 -r 42a39792aaae test-data/A_R1.fastq.gz
b
Binary file test-data/A_R1.fastq.gz has changed
b
diff -r 000000000000 -r 42a39792aaae test-data/A_R2.fastq.gz
b
Binary file test-data/A_R2.fastq.gz has changed
b
diff -r 000000000000 -r 42a39792aaae test-data/B_R1.fastq.gz
b
Binary file test-data/B_R1.fastq.gz has changed
b
diff -r 000000000000 -r 42a39792aaae test-data/B_R2.fastq.gz
b
Binary file test-data/B_R2.fastq.gz has changed
b
diff -r 000000000000 -r 42a39792aaae test-data/corona_scaffold.fasta
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/corona_scaffold.fasta Sun Jan 23 21:35:21 2022 +0000
b
@@ -0,0 +1,18 @@
+>NODE_1_length_1009_cluster_1_candidate_1_domains_2
+GTTCAAGCTGAGGCAAAACGCCTTTTTCAACTTCTACTAAGCCACAAGTGCCATCTTTAG
+GATGTTGACGTGCCTCTGATAAGACCGCCTCCACTGGAGGATACACAGGTTTAAAGGTTT
+ATACCTTCCCAGGTAACAAACCAACCAACTTTCGATCTCTTGTAGATCTGTTCTCTAAAC
+GAACTTTAAAATCTGTGTGGCTGTCACTCGGCTGCATGCTTAGTGCACTCACGCAGTATA
+ATTAATAACTAATTACTGTCGTTGACAGGACACGAGTAACTCGTCTATCTTCTGCAGGCT
+GCTTACGGTTTCGTCCGTGTTGCAGCCGATCATCAGCACATCTAGGTTTCGTCCGGGTGT
+GACCGAAAGGTAAGATGGAGAGCCTTGTCCCTGGTTTCAACGAGAAAACACACGTCCAAC
+TCAGTTTGCCTGTTTTACAGGTTCGCGACGTGCTCGTACGTGGCTTTGGAGACTCCGTGG
+AGGAGGTCTTATCAGAGGCACGTCAACATCTTAAAGATGGCACTTGTGGCTTAGTAGAAG
+TTGAAAAAGGCGTTTTGCCTCAACTTGAACAGCCCTATGTGTTCATCAAACGTTCGGATG
+CTCGAACTGCACCTCATGGTCATGTTATGGTTGAGCTGGTAGCAGAACTCGAAGGCATTC
+AGTACGGTCGTAGTGGTGAGACACTTGGTGTCCTTGTCCCTCATGTGGGCGAAATACCAG
+TGGCTTACCGCAAGGTTCTTCTTCGTAAGAACGGTAATAAAGGAGCTGGTGGCCATAGTT
+ACGGCGCCGATCTAAAGTCATTTGACTTAGGCGACGAGCTTGGCACTGATCCTTATGAAG
+ATTTAAGATGGCACTTGTGGCTTAGTAGAAGTTGAAAAAGGCGTTTTGCCTCAACTTGAA
+CAGCCCTATGTGTTCATCAAACGTTCGGATGCTCGAACTGCACCTCCTGGTCATGTTGAG
+CTGGTAGCAGAACTCGAAGGCATTCAGTACGGTCGTAGTGGTGAGACAC
b
diff -r 000000000000 -r 42a39792aaae test-data/covid.fastq.gz
b
Binary file test-data/covid.fastq.gz has changed
b
diff -r 000000000000 -r 42a39792aaae test-data/ecoli_1K.fasta.gz
b
Binary file test-data/ecoli_1K.fasta.gz has changed
b
diff -r 000000000000 -r 42a39792aaae test-data/ecoli_1K.fastq.gz
b
Binary file test-data/ecoli_1K.fastq.gz has changed
b
diff -r 000000000000 -r 42a39792aaae test-data/ecoli_1K_1.fasta.gz
b
Binary file test-data/ecoli_1K_1.fasta.gz has changed
b
diff -r 000000000000 -r 42a39792aaae test-data/ecoli_1K_1.fastq.gz
b
Binary file test-data/ecoli_1K_1.fastq.gz has changed
b
diff -r 000000000000 -r 42a39792aaae test-data/ecoli_1K_2.fasta.gz
b
Binary file test-data/ecoli_1K_2.fasta.gz has changed
b
diff -r 000000000000 -r 42a39792aaae test-data/ecoli_1K_2.fastq.gz
b
Binary file test-data/ecoli_1K_2.fastq.gz has changed
b
diff -r 000000000000 -r 42a39792aaae test-data/pl1.fq.gz
b
Binary file test-data/pl1.fq.gz has changed
b
diff -r 000000000000 -r 42a39792aaae test-data/pl2.fq.gz
b
Binary file test-data/pl2.fq.gz has changed