comparison builds.sql @ 0:40d14d5c8125 draft

"planemo upload for repository https://github.com/brinkmanlab/galaxy-tools/tree/master/microbedb commit e63162a36457c0337c67e536a8a394beb06f4d70"
author brinkmanlab
date Fri, 30 Oct 2020 21:04:47 +0000
parents
children 258826db8291
comparison
equal deleted inserted replaced
-1:000000000000 0:40d14d5c8125
1 DROP TABLE IF EXISTS builds_temp;
2 CREATE TEMP TABLE builds_temp(dbkey unique, label);
3 .mode csv
4 .separator ' '
5 .import $__app__.config.builds_file_path builds_temp
6 INSERT OR REPLACE INTO builds_temp (dbkey, label)
7 SELECT (r.rep_accnum || '_' || r.rep_version) AS dbkey,
8 (REPLACE(r.definition, ', complete genome.', '') || ' [' || r.rep_accnum || '.' || r.rep_version ||
9 ']') AS label
10 FROM genomeproject
11 JOIN replicon r ON genomeproject.gpv_id = r.gpv_id AND r.rep_type = 'chromosome'
12 WHERE genomeproject.version_id = (SELECT MAX(version_id) FROM version)
13 AND genomeproject.file_types IS NOT NULL
14 AND genomeproject.file_types LIKE '%.fna%'
15 AND r.rep_type = 'chromosome';
16 .mode list
17 .separator ' '
18 .once $__app__.config.builds_file_path
19 SELECT dbkey, label FROM builds_temp ORDER BY dbkey;