# HG changeset patch # User earlhaminst # Date 1521558411 14400 # Node ID c15476d4271cd83fc3eae91d1ad42fd44f1319cb # Parent c388666f58e05bd177b28ded012869eab5340739 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/GAFA/ commit af1fd308dde99cf40a9422c53dc680932be3765d diff -r c388666f58e0 -r c15476d4271c gafa_datatypes.py --- a/gafa_datatypes.py Fri Mar 24 12:14:31 2017 -0400 +++ b/gafa_datatypes.py Tue Mar 20 11:06:51 2018 -0400 @@ -40,12 +40,17 @@ return False -# Since Binary.register_sniffable_binary_format() ignores the sniff order declared in datatypes_conf.xml and put TS datatypes at the end, instead of simply doing: +# Since in Galaxy < 18.01 Binary.register_sniffable_binary_format() ignores the +# sniff order declared in datatypes_conf.xml and put TS datatypes at the end, +# instead of simply doing: # Binary.register_sniffable_binary_format("sqlite", "sqlite", SQlite) # we need to register specialized SQLite datatypes before SQlite -for i, format_dict in enumerate(Binary.sniffable_binary_formats): - if format_dict['class'] == SQlite: - break -else: - i += 1 -Binary.sniffable_binary_formats.insert(i, {'type': 'gafa.sqlite', 'ext': 'gafa.sqlite', 'class': GAFASQLite}) +try: + for i, format_dict in enumerate(Binary.sniffable_binary_formats): + if format_dict['class'] == SQlite: + break + else: + i += 1 + Binary.sniffable_binary_formats.insert(i, {'type': 'gafa.sqlite', 'ext': 'gafa.sqlite', 'class': GAFASQLite}) +except AttributeError: + pass diff -r c388666f58e0 -r c15476d4271c schema/gafa.sql --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/gafa.sql Tue Mar 20 11:06:51 2018 -0400 @@ -0,0 +1,25 @@ +CREATE TABLE meta ( + version VARCHAR PRIMARY KEY NOT NULL); +CREATE TABLE gene ( + gene_id VARCHAR PRIMARY KEY NOT NULL, + gene_symbol VARCHAR, + species VARCHAR NOT NULL, + gene_json VARCHAR NOT NULL); +CREATE INDEX gene_symbol_index ON gene (gene_symbol); +CREATE TABLE transcript ( + transcript_id VARCHAR PRIMARY KEY NOT NULL, + protein_id VARCHAR UNIQUE, + protein_sequence VARCHAR, + gene_id VARCHAR NOT NULL REFERENCES gene(gene_id)); +CREATE VIEW transcript_species as + SELECT transcript_id, species + FROM transcript JOIN gene + ON transcript.gene_id = gene.gene_id; +CREATE TABLE gene_family ( + gene_family_id INTEGER PRIMARY KEY, + gene_tree VARCHAR NOT NULL); +CREATE TABLE gene_family_member ( + gene_family_id INTEGER NOT NULL REFERENCES gene_family(gene_family_id), + protein_id VARCHAR KEY NOT NULL REFERENCES transcript(protein_id), + protein_alignment VARCHAR NOT NULL, + PRIMARY KEY (gene_family_id, protein_id));