Mercurial > repos > brinkmanlab > microbedb
comparison all_fasta.xml @ 7:6ad04790da12 draft
"planemo upload for repository https://github.com/brinkmanlab/galaxy-tools/tree/master/microbedb commit 86feecfffe799823fcbae7c56b04d4ef7c87117d"
author | brinkmanlab |
---|---|
date | Mon, 09 Nov 2020 23:15:23 +0000 |
parents | 67447b96c3ff |
children | 7c2f036e13a7 |
comparison
equal
deleted
inserted
replaced
6:b7884a377566 | 7:6ad04790da12 |
---|---|
11 <requirements> | 11 <requirements> |
12 <requirement type="package" version="3">sqlite</requirement> | 12 <requirement type="package" version="3">sqlite</requirement> |
13 </requirements> | 13 </requirements> |
14 <version_command>sqlite3 --version</version_command> | 14 <version_command>sqlite3 --version</version_command> |
15 <command><![CDATA[ | 15 <command><![CDATA[ |
16 #import os.path | 16 sqlite3 -readonly '$db' < '$sql' > '$output' |
17 sqlite3 -readonly $db '.param set :basepath ${os.path.dirname(str($db))}' '.read $__tool_directory__/all_fasta.sql' > '$output' | |
18 #if $builds | |
19 && touch $__app__.config.builds_file_path && sqlite3 -readonly $db < '$builds_sql' | |
20 #end if | |
21 ]]></command> | 17 ]]></command> |
22 <configfiles> | 18 <configfiles> |
23 <configfile name="builds_sql"><![CDATA[ | 19 <configfile name="sql"><![CDATA[ |
24 #include $__tool_directory__+"/builds.sql" | 20 #import os.path |
21 SELECT json_object('data_tables', | |
22 json_object('all_fasta', json_group_array(json_object('value', unique_build_id, 'dbkey', dbkey, 'name', label, 'path', file_path))), | |
23 #if $builds | |
24 json_object('__dbkeys__', json_group_array(json_object('value', dbkey, 'name', label, 'len_path', ''))), | |
25 #end if | |
26 ) FROM ( | |
27 SELECT (r.rep_accnum || '.' || r.rep_version) AS unique_build_id, | |
28 (r.rep_accnum || '_' || r.rep_version) AS dbkey, | |
29 (REPLACE(r.definition, ', complete genome.', '') || ' [' || r.rep_accnum || '.' || r.rep_version || ']') AS label, | |
30 ('${os.path.dirname(str($db))}/' || genomeproject.gpv_directory || '/' || genomeproject.filename || '_genomic.fna') AS file_path | |
31 FROM genomeproject | |
32 JOIN replicon r ON genomeproject.gpv_id = r.gpv_id AND r.rep_type = 'chromosome' | |
33 WHERE genomeproject.version_id = (SELECT version_id FROM version WHERE is_current == 1) | |
34 AND genomeproject.file_types IS NOT NULL | |
35 AND genomeproject.file_types LIKE '%.fna%' | |
36 AND r.rep_type = 'chromosome' | |
37 ) | |
25 ]]></configfile> | 38 ]]></configfile> |
26 </configfiles> | 39 </configfiles> |
27 <inputs> | 40 <inputs> |
28 <param name="db" type="text" value="/cvmfs/microbedb.brinkmanlab.ca/microbedb.sqlite" label="Path" help="Absolute path to microbedb.sqlite on Galaxy host server"/> | 41 <param name="db" type="text" value="/cvmfs/microbedb.brinkmanlab.ca/microbedb.sqlite" label="Path" help="Absolute path to microbedb.sqlite on Galaxy host server"/> |
29 <param name="builds" type="boolean" label="Append references to builds" help="Append genomes to Galaxies builds.txt, listing them at /api/genomes"/> | 42 <param name="builds" type="boolean" label="Add genomes to __dbkeys__" help="Add genomes to __dbkeys__ table, listing them at /api/genomes"/> |
30 </inputs> | 43 </inputs> |
31 <outputs> | 44 <outputs> |
32 <data name="output" format="data_manager_json" /> | 45 <data name="output" format="data_manager_json" /> |
33 </outputs> | 46 </outputs> |
34 <tests> | 47 <tests> |