Skip to content

Commit

Permalink
Merge branch 'master' into DB-959
Browse files Browse the repository at this point in the history
  • Loading branch information
gildossantos authored Apr 11, 2024
2 parents 7c379ff + 1de7912 commit 808fdab
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
15 changes: 15 additions & 0 deletions Load/gene_alleles.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
9 changes: 6 additions & 3 deletions data/cv_cvterm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand All @@ -35,7 +37,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']
Expand Down
90 changes: 88 additions & 2 deletions schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
);


Expand Down Expand Up @@ -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
--
Expand Down Expand Up @@ -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
--
Expand Down Expand Up @@ -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
--
Expand Down Expand Up @@ -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
--
Expand Down

0 comments on commit 808fdab

Please sign in to comment.