changeset 7:126fc4d52d4e draft

"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/chado commit 1640878827bdc3870b6f34eded3a3f7571a1849f"
author gga
date Wed, 21 Aug 2019 05:10:30 -0400
parents 546ea3a2a7f7
children 80444967de58
files chado.py expression_add_expression.xml macros.xml
diffstat 3 files changed, 72 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/chado.py	Thu Jul 11 08:36:59 2019 -0400
+++ b/chado.py	Wed Aug 21 05:10:30 2019 -0400
@@ -389,7 +389,8 @@
         os.environ['GALAXY_CHADO_DBPASS'],
         os.environ['GALAXY_CHADO_DBSCHEMA'],
         os.environ['GALAXY_CHADO_DBPORT'],
-        no_reflect=True
+        no_reflect=True,
+        pool_connections=False
     )
 
 
@@ -474,3 +475,43 @@
     for an in ci.analysis.get_analyses():
         ans_data.append((an['name'], str(an['analysis_id']), False))
     return ans_data
+
+
+def list_dbs(*args, **kwargs):
+
+    ci = _get_instance()
+
+    # Key for cached data
+    cacheKey = 'dbs'
+    # We don't want to trust "if key in cache" because between asking and fetch
+    # it might through key error.
+    if cacheKey not in cache:
+        # However if it ISN'T there, we know we're safe to fetch + put in
+        # there.<?xml version="1.0"?>
+
+        data = _list_dbs(ci, *args, **kwargs)
+        cache[cacheKey] = data
+        ci.session.close()
+        return data
+    try:
+        # The cache key may or may not be in the cache at this point, it
+        # /likely/ is. However we take no chances that it wasn't evicted between
+        # when we checked above and now, so we reference the object from the
+        # cache in preparation to return.
+        data = cache[cacheKey]
+        ci.session.close()
+        return data
+    except KeyError:
+        # If access fails due to eviction, we will fail over and can ensure that
+        # data is inserted.
+        data = _list_dbs(ci, *args, **kwargs)
+        cache[cacheKey] = data
+        ci.session.close()
+        return data
+
+
+def _list_dbs(ci, *args, **kwargs):
+    dbs_data = []
+    for db in ci.load._get_dbs():
+        dbs_data.append((db['name'], str(db['db_id']), False))
+    return dbs_data
--- a/expression_add_expression.xml	Thu Jul 11 08:36:59 2019 -0400
+++ b/expression_add_expression.xml	Wed Aug 21 05:10:30 2019 -0400
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<tool id="expression_add_expression" name="Chado expression add" version="@WRAPPER_VERSION@.1">
+<tool id="expression_add_expression" name="Chado expression add" version="@WRAPPER_VERSION@">
     <description></description>
     <macros>
         <import>macros.xml</import>
@@ -14,6 +14,20 @@
 '$analysis_id'
 '$file_path'
 
+#if $unit:
+  --unit '$unit'
+#end if
+
+--query_type '$query_type'
+
+$match_on_name
+
+#if $re_name:
+  --re_name '$re_name'
+#end if
+
+$skip_missing
+
  > '$results'
 
 @ZIP_PSQL@
@@ -25,6 +39,18 @@
         <param argument="analysis_id" type="select" dynamic_options="list_analyses()"  label="Analysis" />
         <param name="file_path" label="Expression matrix" argument="file_path" type="data" format="tabular" help="Tabular file where columns are experimental conditions, and rows are features" />
 
+	      <param name="unit" label="Unit" argument="--unit" type="text" help="The units associated with the loaded values (ie, FPKM, RPKM, raw counts)" />
+
+        <param name="query_type" label="Query type" argument="--query_type" type="text" help="The feature type (e.g. 'gene', 'mRNA', 'polypeptide', 'contig') of the query. It must be a valid Sequence Ontology term." value="mRNA" />
+
+        <param name="match_on_name" label="Match On Name" argument="--match_on_name" type="boolean" truevalue="--match_on_name" falsevalue="" help="Match features using their name instead of their uniquename" />
+
+        <param name="re_name" label="Name regular expression" argument="--re_name" type="text" help="Regular expression to extract the feature name from the input file (first capturing group will be used)." optional="true">
+            <expand macro="sanitized"/>
+        </param>
+
+        <param name="skip_missing" label="Skip Missing" argument="--skip_missing" type="boolean" truevalue="--skip_missing" falsevalue="" help="Skip lines with unknown features instead of aborting everything." />
+
         <expand macro="wait_for"/>
     </inputs>
     <outputs>
--- a/macros.xml	Thu Jul 11 08:36:59 2019 -0400
+++ b/macros.xml	Wed Aug 21 05:10:30 2019 -0400
@@ -2,7 +2,7 @@
 <macros>
     <xml name="requirements">
         <requirements>
-            <requirement type="package" version="2.2.6">python-chado</requirement>
+            <requirement type="package" version="@LIB_VERSION@">python-chado</requirement>
             <requirement type="package" version="1.5">jq</requirement>
             <requirement type="package" version="@PG_VERSION@">postgresql</requirement>
             <requirement type="package" version="0.1">pglite</requirement>
@@ -10,6 +10,8 @@
         </requirements>
     </xml>
 
+    <token name="@LIB_VERSION@">2.3.0</token>
+    <token name="@WRAPPER_VERSION@">@LIB_VERSION@</token>
     <token name="@PG_VERSION@">11.2</token>
 
     <xml name="stdio">
@@ -20,8 +22,6 @@
         </stdio>
     </xml>
 
-    <token name="@WRAPPER_VERSION@">2.2.6</token>
-
     <xml name="citation">
         <citations>
         </citations>