comparison macros.xml @ 10:7028154f9c93 draft

planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/chado commit 0b135f1ea2623ea68e41ac88e13d99e6b4ad8bea
author gga
date Mon, 08 Jul 2019 05:39:06 -0400
parents 95fd9a1aaef7
children 95221c68838f
comparison
equal deleted inserted replaced
9:51f5137232ff 10:7028154f9c93
1 <?xml version="1.0"?> 1 <?xml version="1.0"?>
2 <macros> 2 <macros>
3 <xml name="requirements"> 3 <xml name="requirements">
4 <requirements> 4 <requirements>
5 <requirement type="package" version="2.2.5">python-chado</requirement> 5 <requirement type="package" version="2.2.6">python-chado</requirement>
6 <requirement type="package" version="1.5">jq</requirement> 6 <requirement type="package" version="1.5">jq</requirement>
7 <requirement type="package" version="@PG_VERSION@">postgresql</requirement>
8 <requirement type="package" version="0.1">pglite</requirement>
7 <yield/> 9 <yield/>
8 </requirements> 10 </requirements>
9 </xml> 11 </xml>
12
13 <token name="@PG_VERSION@">11.2</token>
10 14
11 <xml name="stdio"> 15 <xml name="stdio">
12 <stdio> 16 <stdio>
13 <regex level="fatal" match="Exception:" source="stderr" /> 17 <regex level="fatal" match="Exception:" source="stderr" />
14 <regex level="fatal" match="error" source="stderr" /> 18 <regex level="fatal" match="error" source="stderr" />
15 <exit_code range="1:" /> 19 <exit_code range="1:" />
16 </stdio> 20 </stdio>
17 </xml> 21 </xml>
18 22
19 <token name="@WRAPPER_VERSION@">2.2.5</token> 23 <token name="@WRAPPER_VERSION@">2.2.6</token>
20 24
21 <xml name="citation"> 25 <xml name="citation">
22 <citations> 26 <citations>
23 </citations> 27 </citations>
24 </xml> 28 </xml>
28 32
29 Python-cado provides several tools allowing to load data into a remote Chado database. 33 Python-cado provides several tools allowing to load data into a remote Chado database.
30 ]]></token> 34 ]]></token>
31 35
32 <token name="@HELP@"><![CDATA[ 36 <token name="@HELP@"><![CDATA[
33 ]]></token>
34
35 <token name="@AUTH@"><![CDATA[
36 echo "__default: local" > '.auth.yml' &&
37 echo "local:" >> '.auth.yml' &&
38 echo " dbhost: \"\$GALAXY_CHADO_DBHOST\"" >> '.auth.yml' &&
39 echo " dbname: \"\$GALAXY_CHADO_DBNAME\"" >> '.auth.yml' &&
40 echo " dbpass: \"\$GALAXY_CHADO_DBPASS\"" >> '.auth.yml' &&
41 echo " dbuser: \"\$GALAXY_CHADO_DBUSER\"" >> '.auth.yml' &&
42 echo " dbschema: \"\$GALAXY_CHADO_DBSCHEMA\"" >> '.auth.yml' &&
43 echo " dbport: \"\$GALAXY_CHADO_DBPORT\"" >> '.auth.yml' &&
44
45 CHAKIN_GLOBAL_CONFIG_PATH='.auth.yml'
46 ]]></token> 37 ]]></token>
47 38
48 <xml name="sanitized"> 39 <xml name="sanitized">
49 <sanitizer> 40 <sanitizer>
50 <valid initial="string.printable"> 41 <valid initial="string.printable">
81 argument="--rel-subject-type" 72 argument="--rel-subject-type"
82 type="text" 73 type="text"
83 label="Sequence type of the parent" 74 label="Sequence type of the parent"
84 help="this should be a Sequence Ontology term" /> 75 help="this should be a Sequence Ontology term" />
85 </xml> 76 </xml>
77
78 <xml name="psql_target">
79 <conditional name="psql_target">
80 <param name="method" type="select" label="Chado Database" help="If you select 'Remote database' make sure credentials are defined in environment variables">
81 <option value="remote">Remote database</option>
82 <option value="pgtools">Database from history</option>
83 </param>
84 <when value="remote"/>
85 <when value="pgtools">
86 <param name="infile" type="data" format="postgresql" label="Input database" />
87 <param name="schema" type="text" label="Schema containing Chado tables" value="public" help="Can be 'chado' for a Tripal database"/>
88 </when>
89 </conditional>
90 </xml>
91
92 <token name="@AUTH@"><![CDATA[
93 if [ -z "$CHAKIN_GLOBAL_CONFIG_PATH" ]; then
94 echo "__default: local" > '.auth.yml' &&
95 echo "local:" >> '.auth.yml' &&
96 echo " dbhost: \"\$GALAXY_CHADO_DBHOST\"" >> '.auth.yml' &&
97 echo " dbname: \"\$GALAXY_CHADO_DBNAME\"" >> '.auth.yml' &&
98 echo " dbpass: \"\$GALAXY_CHADO_DBPASS\"" >> '.auth.yml' &&
99 echo " dbuser: \"\$GALAXY_CHADO_DBUSER\"" >> '.auth.yml' &&
100 echo " dbschema: \"\$GALAXY_CHADO_DBSCHEMA\"" >> '.auth.yml' &&
101 echo " dbport: \"\$GALAXY_CHADO_DBPORT\"" >> '.auth.yml' &&
102
103 export CHAKIN_GLOBAL_CONFIG_PATH='.auth.yml'
104 ; fi
105 ]]></token>
106
107 <token name="@START_PSQL@"><![CDATA[
108 #if $psql_target.method == 'pgtools'
109 tar -xjvf '$psql_target.infile' > /dev/null &&
110 . '$__tool_directory__/prepare_psql.sh' '$psql_target.schema'
111 #else
112 @AUTH@
113 #end if
114 ]]></token>
115
116 <token name="@STOP_PSQL@"><![CDATA[
117 #if $psql_target.method == 'pgtools'
118 pglite stop -d ./postgresql &&
119 timeout 60 bash -c 'until pglite status -d ./postgresql | grep -F -q "no server running"; do sleep 1; done'
120 ;
121 ## Make sure psql is stopped even if loading script failed
122 pglite stop -d ./postgresql || true
123 #end if
124 ]]></token>
125
126 <token name="@ZIP_PSQL@"><![CDATA[
127 #if $psql_target.method == 'pgtools'
128 pglite stop -d ./postgresql &&
129 timeout 60 bash -c 'until pglite status -d ./postgresql | grep -F -q "no server running"; do sleep 1; done' &&
130 tar -cvjf postgresql_out.tar.bz2 postgresql > /dev/null
131 ;
132 ## Make sure psql is stopped even if loading script failed
133 pglite stop -d ./postgresql || true
134 #end if
135 ]]></token>
86 </macros> 136 </macros>