changeset 1:2af554112418 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/nanocompore commit a57b5b935a80db12a0ed867b4219453a2854dd32"
author iuc
date Wed, 17 Jun 2020 13:28:53 -0400
parents b6eeea872fd2
children ca9e70c0fef8
files NanocomporeDB_process.py macros.xml nanocompore_db.xml test-data/GMM_logit_pvalue.bed test-data/GMM_logit_pvalue.bedgraph test-data/KS_dwell_pvalue.bed test-data/KS_dwell_pvalue.bedgraph test-data/KS_intensity_pvalue.bed test-data/KS_intensity_pvalue.bedgraph
diffstat 9 files changed, 47 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/NanocomporeDB_process.py	Mon Jun 08 14:41:41 2020 -0400
+++ b/NanocomporeDB_process.py	Wed Jun 17 13:28:53 2020 -0400
@@ -38,7 +38,7 @@
     parser.add_argument('--pvalue-types', type=str,
                         default='GMM_logit_pvalue,KS_dwell_pvalue,KS_intensity_pvalue',
                         help='path to the annotations')
-    parser.add_argument('--bedgraph', default=False,
+    parser.add_argument('--bedgraph', action="store_true",
                         help='write output in BEDGRAPH format instead of BED')
     parser.add_argument('--pvalue-threshold', default=1.0,
                         help='Maximum reported p-value.')
--- a/macros.xml	Mon Jun 08 14:41:41 2020 -0400
+++ b/macros.xml	Wed Jun 17 13:28:53 2020 -0400
@@ -1,7 +1,6 @@
 <?xml version="1.0"?>
 <macros>
     <token name="@TOOL_VERSION@">1.0.0rc3.post2</token>
-    <token name="@WRAPPER_VERSION@">galaxy0</token>
     <token name="@DESCRIPTION@"></token>
     <xml name="requirements">
         <requirements>
@@ -29,4 +28,4 @@
     <token name="@REFERENCES@"><![CDATA[
 More information are available on the `project website <https://nanocompore.rna.rocks/>`_ and `github <https://github.com/tleonardi/nanocompore>`_.
     ]]></token>
-</macros>
\ No newline at end of file
+</macros>
--- a/nanocompore_db.xml	Mon Jun 08 14:41:41 2020 -0400
+++ b/nanocompore_db.xml	Wed Jun 17 13:28:53 2020 -0400
@@ -1,4 +1,4 @@
-<tool id="nanocompore_db" name="NanoComporeDB" version="@TOOL_VERSION@+@WRAPPER_VERSION@">
+<tool id="nanocompore_db" name="NanoComporeDB" version="@TOOL_VERSION@+galaxy1">
     <description>Process SampComp results database</description>
     <macros>
         <import>macros.xml</import>
@@ -7,30 +7,55 @@
     <command detect_errors="exit_code"><![CDATA[
 mkdir results && 
 tar -xf $db --strip-components 1 -C results/ && 
- python '$__tool_directory__/NanocomporeDB_process.py'
- --db-path 'results/out_SampComp.db'
- --ref-fasta '$reference'
+python '$__tool_directory__/NanocomporeDB_process.py'
+--db-path 'results/out_SampComp.db'
+--ref-fasta '$reference'
 --annotation-bed '$annotation'
+$bedgraph
     ]]></command>
     <inputs>
         <param name="reference" type="data" format="fasta" label="The reference genome used for read alignment."/>
         <param name="annotation" format="bed" type="data" label="BED file containing the annotation of the transcriptome used as reference when mapping"/>
         <param name="db" type="data" format="tar" label="SampComp Database" />
+        <param argument="--bedgraph" type="boolean" truevalue="--bedgraph" falsevalue="" label="Write output in BEDGRAPH format instead of BED"/>
     </inputs>
     <outputs>
-        <data name="GMM_logit" format="bedgraph" from_work_dir="GMM_logit_pvalue.bedgraph" />
-        <data name="KS_dwell" format="bedgraph" from_work_dir="KS_dwell_pvalue.bedgraph" />
-        <data name="KS_intensity" format="bedgraph" from_work_dir="KS_intensity_pvalue.bedgraph" />
+        <data name="GMM_logit" format="bed" from_work_dir="GMM_logit_pvalue.bedgraph" label="${tool.name} on ${on_string}: GMM_logit">
+            <change_format>
+                <when input="bedgraph" value="true" format="bedgraph"/>
+            </change_format>
+        </data>
+
+        <data name="KS_dwell" format="bed" from_work_dir="KS_dwell_pvalue.bedgraph" label="${tool.name} on ${on_string}: KS_dwell">
+            <change_format>
+                <when input="bedgraph" value="true" format="bedgraph"/>
+            </change_format>
+        </data>
+
+        <data name="KS_intensity" format="bed" from_work_dir="KS_intensity_pvalue.bedgraph" label="${tool.name} on ${on_string}: KS_intensity">
+            <change_format>
+                <when input="bedgraph" value="true" format="bedgraph"/>
+            </change_format>
+        </data>
     </outputs>
     <tests>
         <test>
             <param name="reference" value="reference.fa"/>
             <param name="annotation" value="annot.bed"/>
             <param name="db" value="DB.tar"/>
+            <output name="GMM_logit" file="GMM_logit_pvalue.bed"/>
+            <output name="KS_dwell" file="KS_dwell_pvalue.bed"/>
+            <output name="KS_intensity" file="KS_intensity_pvalue.bed"/>
+        </test>
+        <test>
+            <param name="reference" value="reference.fa"/>
+            <param name="annotation" value="annot.bed"/>
+            <param name="db" value="DB.tar"/>
+            <param name="bedgraph" value="true"/>   
             <output name="GMM_logit" file="GMM_logit_pvalue.bedgraph"/>
             <output name="KS_dwell" file="KS_dwell_pvalue.bedgraph"/>
             <output name="KS_intensity" file="KS_intensity_pvalue.bedgraph"/>
-        </test>
+        </test>        
     </tests>
     <help><![CDATA[
 Produces interval bed and bedgraph outputs from NanoCompore SampComp results as input using NaonComporeDB API. 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/GMM_logit_pvalue.bed	Wed Jun 17 13:28:53 2020 -0400
@@ -0,0 +1,2 @@
+chr	22102	22107	chr_AGGAA	0	+
+chr	22103	22108	chr_GGAAA	1.0472150418546853	+
--- a/test-data/GMM_logit_pvalue.bedgraph	Mon Jun 08 14:41:41 2020 -0400
+++ b/test-data/GMM_logit_pvalue.bedgraph	Wed Jun 17 13:28:53 2020 -0400
@@ -1,2 +1,2 @@
-chr	22102	22107	chr_AGGAA	0	+
-chr	22103	22108	chr_GGAAA	1.0472150418546853	+
+chr	22104	22105	0
+chr	22105	22106	1.0472150418546853
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/KS_dwell_pvalue.bed	Wed Jun 17 13:28:53 2020 -0400
@@ -0,0 +1,2 @@
+chr	22102	22107	chr_AGGAA	0.037294307603991536	+
+chr	22103	22108	chr_GGAAA	0.037294307603991536	+
--- a/test-data/KS_dwell_pvalue.bedgraph	Mon Jun 08 14:41:41 2020 -0400
+++ b/test-data/KS_dwell_pvalue.bedgraph	Wed Jun 17 13:28:53 2020 -0400
@@ -1,2 +1,2 @@
-chr	22102	22107	chr_AGGAA	0.037294307603991536	+
-chr	22103	22108	chr_GGAAA	0.037294307603991536	+
+chr	22104	22105	0.037294307603991536
+chr	22105	22106	0.037294307603991536
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/KS_intensity_pvalue.bed	Wed Jun 17 13:28:53 2020 -0400
@@ -0,0 +1,2 @@
+chr	22102	22107	chr_AGGAA	0.5940708247528699	+
+chr	22103	22108	chr_GGAAA	0.5940708247528699	+
--- a/test-data/KS_intensity_pvalue.bedgraph	Mon Jun 08 14:41:41 2020 -0400
+++ b/test-data/KS_intensity_pvalue.bedgraph	Wed Jun 17 13:28:53 2020 -0400
@@ -1,2 +1,2 @@
-chr	22102	22107	chr_AGGAA	0.5940708247528699	+
-chr	22103	22108	chr_GGAAA	0.5940708247528699	+
+chr	22104	22105	0.5940708247528699
+chr	22105	22106	0.5940708247528699