comparison macros.xml @ 0:1daff3b60f39 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:13:05 -0400
parents
children 6006ad63cb13
comparison
equal deleted inserted replaced
-1:000000000000 0:1daff3b60f39
1 <?xml version="1.0"?>
2 <macros>
3 <xml name="requirements">
4 <requirements>
5 <requirement type="package" version="@LIB_VERSION@">python-chado</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>
9 <yield/>
10 </requirements>
11 </xml>
12
13 <token name="@LIB_VERSION@">2.3.0</token>
14 <token name="@WRAPPER_VERSION@">@LIB_VERSION@</token>
15 <token name="@PG_VERSION@">11.2</token>
16
17 <xml name="stdio">
18 <stdio>
19 <regex level="fatal" match="Exception:" source="stderr" />
20 <regex level="fatal" match="error" source="stderr" />
21 <exit_code range="1:" />
22 </stdio>
23 </xml>
24
25 <xml name="citation">
26 <citations>
27 </citations>
28 </xml>
29
30 <token name="@HELP_OVERVIEW@"><![CDATA[
31 **Python-chado Overview**
32
33 Python-cado provides several tools allowing to load data into a remote Chado database.
34 ]]></token>
35
36 <token name="@HELP@"><![CDATA[
37 ]]></token>
38
39 <xml name="sanitized">
40 <sanitizer>
41 <valid initial="string.printable">
42 <remove value="&apos;"/>
43 </valid>
44 <mapping initial="none">
45 <add source="&apos;" target="&apos;&quot;&apos;&quot;&apos;"/>
46 <add source="(" target="\("/>
47 <add source=")" target="\)"/>
48 </mapping>
49 </sanitizer>
50 </xml>
51
52 <!-- I'm not proud of it, but it is needed for workflows -->
53 <xml name="wait_for">
54 <param name="wait_for"
55 type="data"
56 format="data"
57 optional="true"
58 label="Run this only after the following dataset is ready"
59 help="Use this if you want to delay the job execution until some data is already loaded. The selected dataset will not be used for anything else."/>
60 </xml>
61
62 <xml name="feature_rel">
63 <param name="rel_subject_re"
64 argument="--rel-subject-re"
65 type="text"
66 label="Regular expression to extract the unique name of the parent feature"
67 help="this regex will be applied on the fasta definition line to generate the unique name of the parent feature">
68 <expand macro="sanitized"/>
69 </param>
70
71 <param name="rel_subject_type"
72 argument="--rel-subject-type"
73 type="text"
74 label="Sequence type of the parent"
75 help="this should be a Sequence Ontology term" />
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="@START_PSQL@"><![CDATA[
93 #if $psql_target.method == 'pgtools'
94 tar -xjvf '$psql_target.infile' > /dev/null &&
95 . '$__tool_directory__/prepare_psql.sh' '$psql_target.schema'
96 #else
97 if [ -z "\$CHAKIN_GLOBAL_CONFIG_PATH" ]; then
98 echo "__default: local" > '.auth.yml' &&
99 echo "local:" >> '.auth.yml' &&
100 echo " dbhost: \"\$GALAXY_CHADO_DBHOST\"" >> '.auth.yml' &&
101 echo " dbname: \"\$GALAXY_CHADO_DBNAME\"" >> '.auth.yml' &&
102 echo " dbpass: \"\$GALAXY_CHADO_DBPASS\"" >> '.auth.yml' &&
103 echo " dbuser: \"\$GALAXY_CHADO_DBUSER\"" >> '.auth.yml' &&
104 echo " dbschema: \"\$GALAXY_CHADO_DBSCHEMA\"" >> '.auth.yml' &&
105 echo " dbport: \"\$GALAXY_CHADO_DBPORT\"" >> '.auth.yml' &&
106
107 export CHAKIN_GLOBAL_CONFIG_PATH='.auth.yml'
108 ; fi
109 #end if
110 ]]></token>
111
112 <token name="@STOP_PSQL@"><![CDATA[
113 #if $psql_target.method == 'pgtools'
114 &&
115 pglite stop -d ./postgresql &&
116 timeout 60 bash -c 'until pglite status -d ./postgresql | grep -F -q "no server running"; do sleep 1; done'
117 ;
118 ## Make sure psql is stopped even if loading script failed
119 pglite stop -d ./postgresql || true
120 #end if
121 ]]></token>
122
123 <token name="@ZIP_PSQL@"><![CDATA[
124 #if $psql_target.method == 'pgtools'
125 &&
126 pglite stop -d ./postgresql &&
127 timeout 60 bash -c 'until pglite status -d ./postgresql | grep -F -q "no server running"; do sleep 1; done' &&
128 tar -cvjf postgresql_out.tar.bz2 postgresql > /dev/null
129 ;
130 ## Make sure psql is stopped even if loading script failed
131 pglite stop -d ./postgresql || true
132 #end if
133 ]]></token>
134 </macros>