changeset 8:90a922f32523 draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/nanopolish commit de2370d1a385731b3c65f1dcc44e7b8558da8fd4
author bgruening
date Thu, 30 Nov 2023 17:58:25 +0000
parents be95355fef8d
children
files macros.xml nanopolish_methylation.xml
diffstat 2 files changed, 62 insertions(+), 45 deletions(-) [+]
line wrap: on
line diff
--- a/macros.xml	Fri Jul 30 06:27:46 2021 +0000
+++ b/macros.xml	Thu Nov 30 17:58:25 2023 +0000
@@ -1,5 +1,8 @@
 <macros>
-    <token name="@VERSION@">0.13.2</token>
+    <token name="@VERSION@">0.14.0</token>
+    <token name="@VERSION_SUFFIX@">0</token>
+    <token name="@PROFILE@">22.01</token>
+
     <xml name="requirements">
         <requirements>
         <requirement type="package" version="@VERSION@">nanopolish</requirement>
@@ -19,6 +22,52 @@
             <output name="output_index_readdb" file="reads.fasta.index.readdb" />
  -->
 
+
+    <token name="@PREPROCESS_INPUTS@"><![CDATA[
+        ln -s '$input_merged' reads.fasta && 
+ 
+        mkdir fast5_files &&
+        #if $input_reads_raw.extension == 'fast5':
+             ln -s '$input_reads_raw' fast5_files/read1.fast5 &&
+
+        #else if $input_reads_raw.extension == 'fast5.tar':
+            ln -s '$input_reads_raw' fast5_files.tar &&
+            tar -xf fast5_files.tar -C fast5_files &&
+
+        #else if $input_reads_raw.extension == 'fast5.tar.bz2':
+            ln -s '$input_reads_raw' fast5_files.tar.bz2 &&
+            tar -xjf fast5_files.tar.bz2 -C fast5_files &&
+
+        #else if $input_reads_raw.extension == 'fast5.tar.xz':
+            ln -s '$input_reads_raw' fast5_files.tar.xz &&
+            tar -xf fast5_files.tar.xz -C fast5_files &&
+
+        #else if $input_reads_raw.extension == 'fast5.tar.gz':
+            ln -s '$input_reads_raw' fast5_files.tar.gz &&
+            tar -xzf fast5_files.tar.gz -C fast5_files &&
+
+        #else:
+            echo 'Unsupported fast5 input type' &&
+            exit 1 &&
+
+        #end if
+
+        nanopolish index 
+        -d fast5_files/
+        #if $adv.input_seq_summary:
+          -s '$adv.input_seq_summary'
+        #end if 
+        reads.fasta &&
+
+        ln -s '$b' reads.bam &&
+        ln -s '${b.metadata.bam_index}' reads.bam.bai &&
+        #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
+    ]]></token>
+
     <xml name="citations">
         <citations>
             <citation type="doi">10.1038/nmeth.3444</citation>
--- a/nanopolish_methylation.xml	Fri Jul 30 06:27:46 2021 +0000
+++ b/nanopolish_methylation.xml	Thu Nov 30 17:58:25 2023 +0000
@@ -1,55 +1,23 @@
-<tool id="nanopolish_methylation" name="Nanopolish methylation" version="@VERSION@+galaxy0">
+<tool id="nanopolish_methylation" name="Nanopolish methylation" version="@VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>- Classify nucleotides as methylated or not.</description>
     <macros>
         <import>macros.xml</import>
     </macros>
     <expand macro="requirements" />
     <command detect_errors="exit_code"><![CDATA[
-        ln -s '$input_merged' reads.fasta && 
-        
-        #if $input_reads_raw.extension == 'fast5':
-            mkdir fast5_files && ln -s '$input_reads_raw' fast5_files/read1.fast5 &&
-
-        #else if $input_reads_raw.extension == 'fast5.tar':
-            ln -s '$input_reads_raw' fast5_files.tar &&
-            mkdir fast5_files && tar -xf fast5_files.tar -C fast5_files &&
-
-        #else if $input_reads_raw.extension == 'fast5.tar.bz2':
-            ln -s '$input_reads_raw' fast5_files.tar.bz2 &&
-            mkdir fast5_files && tar -xjf fast5_files.tar.bz2 -C fast5_files &&
-
-        #else:
-            ln -s '$input_reads_raw' fast5_files.tar.gz &&
-            mkdir fast5_files && tar -xzf fast5_files.tar.gz -C fast5_files &&
-
-        #end if
-
-        nanopolish index 
-        -d fast5_files/
-        #if $adv.input_seq_summary:
-          -s '$adv.input_seq_summary'
-        #end if 
-        reads.fasta &&
-
-        ln -s '$b' reads.bam &&
-        ln -s '${b.metadata.bam_index}' reads.bam.bai &&
-        #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
+        @PREPROCESS_INPUTS@
         
         nanopolish call-methylation
-        -r reads.fasta
-        -b reads.bam
-        -g genome.fa
-        #if str($batchsize):
-            -K $batchsize
-        #end if
-        --threads "\${GALAXY_SLOTS:-4}"        
-        #if $w and str($w).strip():
-          -w "${w}"
-        #end if  
+            -r reads.fasta
+            -b reads.bam
+            -g genome.fa
+            #if str($batchsize):
+                -K $batchsize
+            #end if
+            --threads "\${GALAXY_SLOTS:-4}"
+            #if $w and str($w).strip():
+              -w "${w}"
+            #end if
         > methylation_calls.tsv
     ]]></command>
     <inputs>