diff nanopolish_variants.xml @ 1:1ebed8b65752 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/nanopolish commit d3227eb74ad38fac307911b60c8a20a13349bcf9
author bgruening
date Tue, 05 Jun 2018 17:58:46 -0400
parents 639b3a5bb415
children bc79b5b0fe04
line wrap: on
line diff
--- a/nanopolish_variants.xml	Wed May 30 11:56:35 2018 -0400
+++ b/nanopolish_variants.xml	Tue Jun 05 17:58:46 2018 -0400
@@ -17,7 +17,11 @@
         nanopolish index -d fast5_files/ reads.fasta &&
         ln -s '$b' reads.bam &&
         ln -s '${b.metadata.bam_index}' reads.bam.bai &&
-        ln -s '$g' genome.fa &&
+        #if $reference_source.reference_source_selector == 'history':
+            ln -f -s '$reference_source.ref_file' genome.fa &&
+        #else:
+            ln -f -s '$reference_source.ref_file.fields.path' genome.fa &&
+        #end if
         
         nanopolish variants
         -r reads.fasta
@@ -38,6 +42,10 @@
         -d $min_candidate_depth
         -x $max_haplotypes
         --max-rounds $max_rounds
+        --threads "\${GALAXY_SLOTS:-4}"
+        #if str($min_flanking_sequence):
+            --min-flanking-sequence $min_flanking_sequence
+        #end if
         #if $ploidy != -1:
             --ploidy $ploidy
         #end if
@@ -64,8 +72,6 @@
         #if $adv.input_models_fofn:
           --models-fofn '$input_models_fofn'
         #end if
-       
-
 
     ]]></command>
     <inputs>
@@ -75,7 +81,22 @@
 
         <!-- variants consensus inputs -->
         <param type="data" argument="-b" format="bam" label="Reads aligned to the reference genome" />
-        <param type="data" argument="-g" format="fasta" label="The reference genome"/>
+        <conditional name="reference_source">
+          <param name="reference_source_selector" type="select" label="Load reference genome from">
+            <option value="cached">Local cache</option>
+            <option value="history">History</option>
+          </param>
+          <when value="cached">
+            <param name="ref_file" type="select" label="Using reference genome" help="REFERENCE_SEQUENCE">
+              <options from_data_table="all_fasta">
+              </options>
+              <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
+            </param>
+          </when>
+          <when value="history">
+            <param name="ref_file" type="data" format="fasta" label="Use the following dataset as the reference sequence" help="REFERENCE_SEQUENCE; You can upload a FASTA sequence to the history and use it as reference" />
+          </when>
+        </conditional>
 
         <section name="adv" title="Optional data inputs">
             <!-- optional inputs -->
@@ -98,6 +119,7 @@
         <param name="max_haplotypes" type="integer" optional="true" value="1000" label="Consider at most N haplotype combinations" help="(-x)"/>
         <param name="max_rounds" type="integer" optional="true" value="50" label="Perform N rounds of consensus sequence improvement" help="(--max_rounds)"/>
         <param name="ploidy" type="integer" optional="true" value="-1" label="The ploidy level of the sequenced genome. -1:disabled" help="(-p)"/>
+        <param name="min_flanking_sequence" type="integer" optional="true" value="" label="Distance from alignment end to calculate variants" help="(--min-flanking-sequence)"/>
 
         <!-- optional flags -->
         <param argument="--consensus" type="boolean" truevalue="--consensus" falsevalue="" checked="true" label="Consensus calling mode and output polished sequence" />
@@ -117,36 +139,41 @@
     </outputs>
     <tests>
         <test>
-      <!-- index test -->
             <param name="input_merged" ftype="fasta" value="reads.fasta" />
             <param name="input_reads_raw" ftype="fast5.tar.gz" value="fast5_files.tar.gz" />
-            
-      <!-- variants consensus test -->
             <param name="b" value="reads.sorted.bam" />
-            <param name="g" value="draft.fa" />
+            <param name="reference_source_selector" value="history" />
+            <param name="ref_file" value="draft.fa" />
             <param name="w" value="tig00000001:200000-202000" />
-            
             <output name="output_polished" file="polished.fa" />
             <output name="output_variants" file="variants.vcf"/>
         </test>
         <test>
-      <!-- index test -->
             <param name="input_merged" ftype="fasta" value="reads.fasta" />
             <param name="input_reads_raw" ftype="fast5.tar.gz" value="fast5_files.tar.gz" />
-            
-      <!-- variants consensus test -->
             <param name="b" value="reads.sorted.bam" />
-            <param name="g" value="draft.fa" />
+            <param name="reference_source_selector" value="history" />
+            <param name="ref_file" value="draft.fa" />
             <param name="w" value="tig00000001:200000-202000" />
             <param name="ploidy" value="2" />
             <param name="snps" value="true" />            
             <param name="faster" value="true" />            
             <param name="all_bases" value="true" /> 
             <param name="consensus" value="false" /> 
+            <param name="min_flanking_sequence" value="30" />
             <output name="output_polished" file="t2-polished.fa" />
             <output name="output_variants" file="t2-variants.vcf"/>
         </test>
-
+        <test>
+            <param name="input_merged" ftype="fasta" value="reads.fasta" />
+            <param name="input_reads_raw" ftype="fast5.tar.gz" value="fast5_files.tar.gz" />
+            <param name="b" value="reads.sorted.bam" />
+            <param name="reference_source_selector" value="cached" />
+            <param name="ref_file" value="draft"/>
+            <param name="w" value="tig00000001:200000-202000" />
+            <output name="output_polished" file="polished.fa" />
+            <output name="output_variants" file="variants.vcf"/>
+        </test>
     </tests>
     <help><![CDATA[