changeset 0:d2aeb7a02bb2 draft default tip

planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/askomics commit f745b23c84a615bf434d717c8c0e553a012f0268
author gga
date Mon, 11 Sep 2017 05:48:41 -0400
parents
children
files askomics.xml macros.xml test-data/people.tsv
diffstat 3 files changed, 222 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/askomics.xml	Mon Sep 11 05:48:41 2017 -0400
@@ -0,0 +1,131 @@
+<?xml version="1.0"?>
+<tool id="askomics_integrate" name="AskOmics" version="@WRAPPER_VERSION@">
+    <description>Data integration</description>
+
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+
+    <expand macro='requirements' />
+
+    <stdio>
+        <exit_code range="1:" />
+    </stdio>
+
+    <command><![CDATA[
+        askocli integrate
+
+        #if @URL@
+            -a @URL@
+        #else
+            -a @ENV_URL@
+        #end if
+
+        --file-type '$input_format.format'
+
+        #if $input_format.format == "csv"
+
+            #if $input_format.opt.headers
+                --headers $input_format.opt.headers
+            #end if
+
+            #if $input_format.opt.col_type
+                -c $input_format.opt.col_type
+            #end if
+
+            #if $input_format.opt.key_col
+                --key-columns $input_format.opt.key_col
+            #end if
+
+            #if $input_format.opt.dis_col
+                --disabled-columns $input_format.opt.dis_col
+            #end if
+
+        #end if
+
+        #if $input_format.format == "gff"
+            -e $input_format.ent
+            -t '$input_format.tax'
+        #end if
+
+        #if $input_format.format == "bed"
+            --entity-name $input_format.ent_name
+            -t '$input_format.tax'
+        #end if
+
+        #if $advanced.uri
+            --uri $advanced.uri
+        #end if
+
+        $advanced.public
+
+        -k @APIKEY@
+
+        '$input'
+        > '$output'
+    ]]></command>
+
+    <inputs>
+        <expand macro='askomics_loc' />
+        <expand macro='askomics_auth' />
+
+       <conditional name="input_format">
+           <param type="select" name="format" label="Input format">
+               <option value="csv">CSV/TSV</option>
+               <option value="gff">GFF</option>
+               <option value="ttl">Turtle</option>
+               <option value="bed">BED</option>
+            </param>
+           <when value="csv">
+               <param format="tabular" name="input" type="data" label="Dataset to integrate" />
+               <section name='opt' title='Optional fields' expanded='false'>
+                   <param name="headers" type="text" value="" optional="true" label="Headers (separated with spaces)" argument="--headers" />
+                   <param name="col_type" type="text" value="" optional="true" label="Columns types (separated with spaces)" argument="-c" />
+                   <param name="key_col" type="text" value="" optional="true" label="Key columns (separated with spaces)" argument="--key-columns" />
+                   <param name="dis_col" type="text" value="" optional="true" label="Disabled columns (separated with spaces)" argument="--disabled-columns" />
+                </section>
+            </when>
+            <when value="gff">
+                <param format="gff3" name="input" type="data" label="Dataset to integrate" />
+                <param name="ent" type="text" value="transcript gene" label="Entities (separated with space)" argument="-e" />
+                <param name="tax" type="text" value="" label="Taxon" argument="-t" />
+            </when>
+            <when value="bed">
+                <param format="bed" name="input" type="data" label="Dataset to integrate" />
+                <param name="ent_name" type="text" value="" label="Entity name" argument="--entity-name" />
+                <param name="tax" type="text" value="" label="Taxon" argument="-t" />
+            </when>
+            <when value="ttl">
+                <param format="ttl" name="input" type="data" label="Dataset to integrate" />
+            </when>
+        </conditional>
+
+        <!-- Advanced fonctionalities -->
+        <section name="advanced" title="Advanced features" expanded="false">
+            <param name="uri" type="text" value="" label="Custom URI" argument="--uri" />
+            <param name="public" type="boolean" checked="false" truevalue="--public" falsevalue="" label="Integrate as a public dataset" argument="--public" />
+        </section>
+
+    </inputs>
+
+    <outputs>
+        <data format="txt" name="output" label="Integration of ${input_format.input.name}" />
+    </outputs>
+
+    <tests>
+        <test expect_failure='true' expect_exit_code='1'>
+            <expand macro='test_asko_loc' />
+            <expand macro='test_asko_auth' />
+            <conditional name='input_format'>
+                <param name='format' value='csv' />
+                <param name='input' value='people.tsv' />
+            </conditional>
+        </test>
+    </tests>
+
+    <help><![CDATA[
+        @HELP@
+    ]]></help>
+
+    <expand macro='citation' />
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Mon Sep 11 05:48:41 2017 -0400
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<macros>
+    <!-- Requirements -->
+    <xml name='requirements'>
+        <requirements>
+            <requirement type='package' version='0.4.3'>askocli</requirement>
+        </requirements>
+    </xml>
+
+    <!-- Version -->
+    <token name='@WRAPPER_VERSION@'>0.1</token>
+
+    <!-- Help -->
+    <token name='@HELP@'><![CDATA[
+        AskOmics provide a visual representation of the user abstraction as a graph. 
+        By starting from a node of interest and iteratively selecting its neighbors, 
+        the user creates a path on an abstraction graph. This path can then be transformed 
+        into a SPARQL query that can be executed on the original dataset.
+    ]]></token>
+
+    <!-- Citation -->
+    <xml name='citation'>
+        <citations>
+            <citation type='bibtex'>
+            @inproceedings{legeai:hal-01391080,
+              TITLE = {{BIPAA/Askomics, a new and easy approach for querying genomics and epigenomics elements in interaction}},
+              AUTHOR = {Legeai, Fabrice and Bettembourg, Charles and Bretaudeau, Anthony and Chaussin, Yvanne and Dameron, Olivier and Tagu, Denis},
+              URL = {https://hal.inria.fr/hal-01391080},
+              BOOKTITLE = {{XXVth International Congress of Entomology 2016}},
+              ADDRESS = {Orlando, Florida, United States},
+              YEAR = {2016},
+              MONTH = Sep,
+              KEYWORDS = {AskOmics ;  Semantic Web ;  RDF ;  SPARQL ;  data integration},
+              HAL_ID = {hal-01391080},
+              HAL_VERSION = {v1},
+            }
+            </citation>
+        </citations>
+    </xml>
+
+    <!-- AskOmics server location -->
+    <xml name='askomics_loc'>
+        <section name='loc' title='AskOmics location' expanded='False'>
+            <param name='url'
+                   type='text'
+                   label='AskOmics URL'
+                   optional='true'
+                   value="http://localhost:6543"
+                   argument='-a' />
+        </section>
+    </xml>
+
+    <token name='@URL@'><![CDATA[$loc.url]]></token>
+
+    <!-- Environment variables -->
+    <token name='@ENV_URL@'><![CDATA[\$ASKOMICS_URL]]></token>
+
+    <!-- Authentication -->
+    <xml name='askomics_auth'>
+        <section name='auth' title='AskOmics authentication' expanded='True'>
+            <param name='apikey'
+                   type='text'
+                   label='API key'
+                   value="xvB2YBK8pz4I96SkDN64"
+                   argument='-k' />
+        </section>
+    </xml>
+
+    <token name='@APIKEY@'><![CDATA['$auth.apikey']]></token>
+
+    <!-- Tests -->
+    <xml name='test_asko_loc'>
+        <section name='loc'>
+            <param name='url' value='http://example.com' />
+        </section>
+    </xml>
+    <xml name='test_asko_auth'>
+        <section name='auth'>
+            <param name='apikey' value='00000000000000000000' />
+        </section>
+    </xml>
+
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/people.tsv	Mon Sep 11 05:48:41 2017 -0400
@@ -0,0 +1,7 @@
+People	First_name	Last_name	Sex	Age
+p1	Mike	Oldfield	M	63
+p2	Jean-Michel	Jarre	M	68
+p3	Roger	Waters	M	73
+p4	Matthew	Bellamy	M	38
+p5	Ellen	Fraatz	F	39
+p6	Richard	Melville	M	51
\ No newline at end of file