From 1d9d350b092c0489950560deab5c1b8a3a93a0ff Mon Sep 17 00:00:00 2001 From: ianlongden Date: Tue, 5 Dec 2023 17:41:38 -0500 Subject: [PATCH 1/5] bionic noew only available in archive --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e3ae96c..a284c54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ # FROM ubuntu:18.04 -RUN apt-get update && apt-get install -y gnupg curl ca-certificates +RUN apt-get update && apt-get install -y gnupg curl ca-certificates RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - # Add the PostgreSQL PGP key to verify their Debian packages. # It should be the same key as https://www.postgresql.org/media/keys/ACCC4CF8.asc @@ -16,7 +16,7 @@ ARG SOURCE_BRANCH=master # Add PostgreSQL's repository. Idocker-boomt contains the most recent stable release # of PostgreSQL, ``9.3``. -RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main" > /etc/apt/sources.list.d/pgdg.list +RUN echo "deb http://apt-archive.postgresql.org/pub/repos/apt/ bionic-pgdg main" > /etc/apt/sources.list.d/pgdg.list # Install ``python-software-properties``, ``software-properties-common`` and PostgreSQL 9.3 # There are some warnings (in red) that show up during the build. You can hide From ff9046965857a1508a5795cb6da7611c150f8c7b Mon Sep 17 00:00:00 2001 From: ianlongden Date: Thu, 7 Dec 2023 13:56:31 -0500 Subject: [PATCH 2/5] add changes needed for flyBERT results store --- schema.sql | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 88 insertions(+), 2 deletions(-) diff --git a/schema.sql b/schema.sql index 48cfc6a..daa757e 100644 --- a/schema.sql +++ b/schema.sql @@ -3,7 +3,7 @@ -- -- Dumped from database version 13.3 --- Dumped by pg_dump version 13.3 +-- Dumped by pg_dump version 14.7 (Homebrew) SET statement_timeout = 0; SET lock_timeout = 0; @@ -12730,7 +12730,8 @@ CREATE TABLE public.analysis ( sourcename character varying(255), sourceversion character varying(255), sourceuri text, - timeexecuted timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL + timeexecuted timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, + is_obsolete boolean DEFAULT false NOT NULL ); @@ -19049,6 +19050,44 @@ CREATE TABLE public.pub ( ALTER TABLE public.pub OWNER TO go; +-- +-- Name: pub_analysis_feature; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.pub_analysis_feature ( + pub_analysis_feature_id integer NOT NULL, + pub_id integer NOT NULL, + analysis_id integer NOT NULL, + feature_id integer NOT NULL, + score double precision, + status character varying(30) +); + + +ALTER TABLE public.pub_analysis_feature OWNER TO go; + +-- +-- Name: pub_analysis_feature_pub_analysis_feature_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- + +CREATE SEQUENCE public.pub_analysis_feature_pub_analysis_feature_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE public.pub_analysis_feature_pub_analysis_feature_id_seq OWNER TO go; + +-- +-- Name: pub_analysis_feature_pub_analysis_feature_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- + +ALTER SEQUENCE public.pub_analysis_feature_pub_analysis_feature_id_seq OWNED BY public.pub_analysis_feature.pub_analysis_feature_id; + + -- -- Name: pub_dbxref; Type: TABLE; Schema: public; Owner: postgres -- @@ -21066,6 +21105,13 @@ ALTER TABLE ONLY public.project ALTER COLUMN project_id SET DEFAULT nextval('pub ALTER TABLE ONLY public.pub ALTER COLUMN pub_id SET DEFAULT nextval('public.pub_pub_id_seq'::regclass); +-- +-- Name: pub_analysis_feature pub_analysis_feature_id; Type: DEFAULT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.pub_analysis_feature ALTER COLUMN pub_analysis_feature_id SET DEFAULT nextval('public.pub_analysis_feature_pub_analysis_feature_id_seq'::regclass); + + -- -- Name: pub_dbxref pub_dbxref_id; Type: DEFAULT; Schema: public; Owner: postgres -- @@ -23733,6 +23779,22 @@ ALTER TABLE ONLY public.project ADD CONSTRAINT project_pkey PRIMARY KEY (project_id); +-- +-- Name: pub_analysis_feature pub_analysis_feature_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.pub_analysis_feature + ADD CONSTRAINT pub_analysis_feature_pkey PRIMARY KEY (pub_analysis_feature_id); + + +-- +-- Name: pub_analysis_feature pub_analysis_feature_pub_id_analysis_id_feature_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.pub_analysis_feature + ADD CONSTRAINT pub_analysis_feature_pub_id_analysis_id_feature_id_key UNIQUE (pub_id, analysis_id, feature_id); + + -- -- Name: pub_dbxref pub_dbxref_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- @@ -30497,6 +30559,30 @@ ALTER TABLE ONLY public.organismprop ADD CONSTRAINT organismprop_type_id_fkey FOREIGN KEY (type_id) REFERENCES public.cvterm(cvterm_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; +-- +-- Name: pub_analysis_feature paf_fk_analysis; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.pub_analysis_feature + ADD CONSTRAINT paf_fk_analysis FOREIGN KEY (analysis_id) REFERENCES public.analysis(analysis_id); + + +-- +-- Name: pub_analysis_feature paf_fk_feature; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.pub_analysis_feature + ADD CONSTRAINT paf_fk_feature FOREIGN KEY (feature_id) REFERENCES public.feature(feature_id); + + +-- +-- Name: pub_analysis_feature paf_fk_pub; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.pub_analysis_feature + ADD CONSTRAINT paf_fk_pub FOREIGN KEY (pub_id) REFERENCES public.pub(pub_id); + + -- -- Name: phendesc phendesc_environment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- From dd6eaf068c4563f61859332c60a2b1e6ab52edf0 Mon Sep 17 00:00:00 2001 From: ianlongden Date: Tue, 19 Dec 2023 10:00:39 -0500 Subject: [PATCH 3/5] F11 cvterms needed --- data/cv_cvterm.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/cv_cvterm.yaml b/data/cv_cvterm.yaml index 5304d24..998c9f5 100644 --- a/data/cv_cvterm.yaml +++ b/data/cv_cvterm.yaml @@ -35,7 +35,8 @@ feature_cvtermprop type: [ 'common_tool_uses', 'webcv', 'date'] feature_expression property type: ['curated_as', 'comment'] feature_pubprop type: ['abstract_languages'] -feature_relationshipprop type: ['fly_disease-implication_change', 'comment', 'relative_position', 'score', 'start_location', 'end_location'] +feature_relationshipprop type: ['fly_disease-implication_change', 'comment', 'relative_position', 'score', + 'start_location', 'end_location', 'is_subset_expression', 'is_relative_wildtype'] FlyBase: ['FlyBase analysis'] FlyBase_internal: ['pubprop type:curated_by'] From b9946211337ea46ce451985a4acba80a1cfadab3 Mon Sep 17 00:00:00 2001 From: ianlongden Date: Tue, 9 Apr 2024 14:36:54 -0400 Subject: [PATCH 4/5] more cv terms needed --- data/cv_cvterm.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/data/cv_cvterm.yaml b/data/cv_cvterm.yaml index 998c9f5..79b1067 100644 --- a/data/cv_cvterm.yaml +++ b/data/cv_cvterm.yaml @@ -10,11 +10,13 @@ SO: ['chromosome_arm', 'chromosome', 'gene', 'mRNA', 'DNA', 'golden_path', 'ncRN 'natural_transposable_element', 'gene_group', 'polypeptide', 'chromosome_breakpoint', 'engineered_plasmid', 'sgRNA', 'oligo', 'engineered_foreign_gene', 'point_mutation', 'cDNA_clone', 'TSS', 'rescue_region', 'insertion_site', 'synthetic_sequence', 'RNA'] molecular_function: ['mRNA binding'] -cellular_component: ['nucleolus', 'something' ,'extracellular space', 'endoplasmic reticulum'] +cellular_component: ['nucleolus', 'something' ,'extracellular space', 'endoplasmic reticulum', + 'mitochondrial crista', 'mitochondrion'] biological_process: ['activation of immune response', 'defense response to other organism', 'rRNA processing'] FlyBase anatomy CV: ['embryo','dopaminergic PAM neuron 1', 'dopaminergic PAM neuron 5', 'dissociated larval fat cell', 'embryonic/larval hemolymph', - 'anatomy 1', 'anatomy 2', 'anatomy 3', 'mesoderm'] + 'anatomy 1', 'anatomy 2', 'anatomy 3', 'mesoderm', + 'indirect flight muscle', 'macrochaeta', 'scutellar bristle'] ####### End of order matters cv/cvterms cell_line_cvtermprop type: ['basis'] @@ -48,7 +50,7 @@ FlyBase miscellaneous CV: [ 'contributes_to', 'disease implicated variant', 'evidence_code', 'environ1', 'environ2', 'environ3','environ4', 'environ5', 'faint', 'functional group', 'female', 'in vitro construct - amino acid replacement', 'in vitro construct - coding region fusion', - 'in vitro construct - regulatory fusion', + 'in vitro construct - regulatory fusion', 'increased number', 'inferred from direct assay', 'inferred from mutant phenotype', 'isolated cells', 'natural population', 'male', 'misc 1', 'misc 2', 'misc 3', 'multi-individual sample', 'pheno1', 'pheno2', 'pheno3', 'pheno4', 'pheno5', From 8694bd5da27727d433e453e378fdbc14028748fc Mon Sep 17 00:00:00 2001 From: ianlongden Date: Wed, 10 Apr 2024 12:10:12 -0400 Subject: [PATCH 5/5] gene with () in it for format testing --- Load/gene_alleles.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Load/gene_alleles.py b/Load/gene_alleles.py index 0acfd79..5f33785 100644 --- a/Load/gene_alleles.py +++ b/Load/gene_alleles.py @@ -732,6 +732,19 @@ def create_allele_GA90(cursor, org_dict, feature_id, cvterm_id, db_id, pub_id): cursor.execute(fpp_sql, (fp_id, pub_id)) +def create_bracket_gene(cursor, org_dict, feature_id, cvterm_id, db_id, pub_id): + """ + Create genes/allels with '(' and [}' in them. + This will be used for testing formats allowed etc. + """ + create_gene_alleles(cursor, org_dict, feature_id, cvterm_id, db_id, pub_id, + num_genes=6, + num_alleles=1, + gene_prefix='a(1)48', + tool_prefix='' + ) + + def create_G1f_gene(cursor, org_dict, feature_id, cvterm_id, db_id, pub_id, dbxref_id): """Create gene data for G1f to test merging. @@ -997,3 +1010,5 @@ def add_genes_and_alleles(cursor, organism_id, feature_id, cvterm_id, dbxref_id, create_G1f_gene(cursor, organism_id, feature_id, cvterm_id, db_id, feature_id['Nature_3'], dbxref_id) create_allele_PDEV_184(cursor, organism_id, feature_id, cvterm_id, db_id, pub_id) + + create_bracket_gene(cursor, organism_id, feature_id, cvterm_id, db_id, pub_id)