diff minimap2.xml @ 4:6f50f36e4481 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/minimap2 commit 2d2b68971e74ecb099e2c1109f7176d7fcbf8ec7
author iuc
date Tue, 07 Aug 2018 07:59:53 -0400
parents 1650a97189be
children 17e61517c166
line wrap: on
line diff
--- a/minimap2.xml	Fri Nov 17 08:11:42 2017 -0500
+++ b/minimap2.xml	Tue Aug 07 07:59:53 2018 -0400
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<tool id="minimap2" name="Map with minimap2" version="2.5" profile="17.01">
+<tool id="minimap2" name="Map with minimap2" version="2.5+gx1" profile="17.01">
     <description>A fast pairwise aligner for genomic and spliced nucleotide sequences</description>
     <requirements>
         <requirement type="package" version="2.5">minimap2</requirement>
@@ -13,7 +13,7 @@
     #else:
         ln -f -s '$reference_source.ref_file.fields.path' reference.fa &&
     #end if
-    minimap2 -a
+    minimap2
     -x $analysis_type_selector
     ## indexing options
     #if $indexing_options.k:
@@ -100,21 +100,29 @@
     #else if $fastq_input.fastq_input_selector == 'paired':
          '$fastq_input.fastq_input1' '$fastq_input.fastq_input2'
     #else if $fastq_input.fastq_input_selector == 'paired_collection':
-        '$fastq_input.fastq_input1.forward' '$fastq_input.fastq_input1.reverse'
+         '$fastq_input.fastq_input1.forward' '$fastq_input.fastq_input1.reverse'
     #end if
-    | samtools sort
-    -@\${GALAXY_SLOTS:-2}
-    -O $io_options.output_format
-    #if $io_options.output_format == 'CRAM':
+    #if $io_options.output_format == 'BAM':
+        -a
+        | samtools sort
+        -@\${GALAXY_SLOTS:-2}
+        -O $io_options.output_format
+        -o '$alignment_output'
+    #else if $io_options.output_format == 'CRAM':
+        -a
+        | samtools sort
+        -@\${GALAXY_SLOTS:-2}
+        -O $io_options.output_format
         --reference reference.fa
         --output-fmt-option no_ref
+        -o '$alignment_output'
     #end if
-    -o '$alignment_output'
+    > '$alignment_output'
 ]]>
     </command>
     <inputs>
         <conditional name="reference_source">
-            <param name="reference_source_selector" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options. See `Indexes` section of help below">
+            <param name="reference_source_selector" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options. See `Indexes` section of help below. If you would like to perform self-mapping select `history` here, then choose your input file as reference.">
                 <option value="cached">Use a built-in genome index</option>
                 <option value="history">Use a genome from history and build index</option>
             </param>
@@ -128,7 +136,7 @@
                 </param>
             </when>
             <when value="history">
-                <param name="ref_file" type="data" format="fasta" label="Use the following dataset as the reference sequence" help="You can upload a FASTA sequence to the history and use it as reference" />
+                <param name="ref_file" type="data" format="fasta,fastq" label="Use the following dataset as the reference sequence" help="You can upload a FASTA or FASTQ sequence to the history and use it as reference" />
             </when>
         </conditional>
         <section name="indexing_options" title="Indexing options">
@@ -200,9 +208,10 @@
             </param>
         </section>
         <section name="io_options" title="Set advanced output options" help="Sets -Q, -L, -R, -c, --cs and -K options." expanded="False">
-            <param name="output_format" type="select" label="Produce BAM or CRAM file?">
+            <param name="output_format" type="select" label="Select an output format">
                 <option value="BAM">BAM</option>
                 <option value="CRAM">CRAM</option>
+                <option value="paf">paf</option>
             </param>
             <param argument="-Q" type="boolean" truevalue="-Q" falsevalue="" optional="true" label="don't output base quality"/>
             <param argument="-L" type="boolean" truevalue="-L" falsevalue="" optional="true" label="write CIGAR with >65535 ops to the CG tag" help="Useful for very long reads in SAM/BAM format"/>
@@ -235,6 +244,7 @@
                 </conditional>
             </actions>
             <change_format>
+                <when input="io_options.output_format" value="paf" format="tabular" />
                 <when input="io_options.output_format" value="CRAM" format="cram" />
             </change_format>
         </data>
@@ -302,6 +312,16 @@
             <param name="analysis_type_selector" value="sr"/>
             <output name="alignment_output" ftype="bam" file="minimap2-test1-fasta.bam" lines_diff="2" />
         </test>
+        <test>
+            <!-- test paf output -->
+            <param name="reference_source_selector" value="history" />
+            <param name="ref_file" ftype="fastqsanger"  value="mini_reads.fq" />
+            <param name="fastq_input_selector" value="single"/>
+            <param name="fastq_input1" ftype="fastqsanger"  value="mini_reads.fq" />
+            <param name="analysis_type_selector" value="ava-ont"/>
+            <param name="output_format" value="paf"/>
+            <output name="alignment_output" ftype="tabular" file="mini_reads.paf" />
+        </test>
     </tests>
     <help>