Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding HTPexpressiondatasetannotation entities #1609

Merged
merged 25 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0270da3
Adding HTPexpressiondataset entities
VarunReddy1111 Jul 12, 2024
5908c6c
Formatting
VarunReddy1111 Jul 12, 2024
c8f0463
Note class used instead of string for related note
VarunReddy1111 Jul 12, 2024
c53bc8b
formatting
VarunReddy1111 Jul 12, 2024
37beb3c
Added vocabulary terms for HTP Dataset and HTP Dataset Sample
VarunReddy1111 Jul 16, 2024
e1a5d54
changes vocabulary terms name into snake case
VarunReddy1111 Jul 16, 2024
8513ec4
Merge branch 'alpha' into SCRUM-4192
VarunReddy1111 Jul 16, 2024
bc408ff
Changed the version of the migration file
VarunReddy1111 Jul 16, 2024
5847577
Changed the naming convention of vocabulary terms
VarunReddy1111 Jul 16, 2024
b687b2a
Adding HTPexpressiondataset entities
VarunReddy1111 Jul 12, 2024
e061e77
Formatting
VarunReddy1111 Jul 12, 2024
4f2460b
Note class used instead of string for related note
VarunReddy1111 Jul 12, 2024
730e7e4
formatting
VarunReddy1111 Jul 12, 2024
a064080
Added vocabulary terms for HTP Dataset and HTP Dataset Sample
VarunReddy1111 Jul 16, 2024
45a3c6c
changes vocabulary terms name into snake case
VarunReddy1111 Jul 16, 2024
e600f55
Changed the version of the migration file
VarunReddy1111 Jul 16, 2024
1086337
Changed the naming convention of vocabulary terms
VarunReddy1111 Jul 16, 2024
a3a266a
New model changes according to LinkMl
VarunReddy1111 Jul 26, 2024
ccca5b5
Merge branch 'alpha' into SCRUM-4192
VarunReddy1111 Jul 26, 2024
2ccbef0
model changes
VarunReddy1111 Jul 26, 2024
a515e57
Model changes
VarunReddy1111 Jul 26, 2024
c49e1f7
removed old migration file
VarunReddy1111 Jul 26, 2024
97954bb
Changed the class name
VarunReddy1111 Jul 29, 2024
6d39216
Added linkml version
VarunReddy1111 Jul 29, 2024
b8827f2
Removed unused import
VarunReddy1111 Jul 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/cliapp/src/service/DataLoadService.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export class DataLoadService extends BaseAuthService {
const bulkLoadTypes = {
BulkFMSLoad: [
'GFF',
'HTP EXPRESSION DATASET ANNOTATION',
VarunReddy1111 marked this conversation as resolved.
Show resolved Hide resolved
'INTERACTION-GEN',
'INTERACTION-MOL',
'MOLECULE',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public enum BackendBulkLoadType {
INTERACTION_GEN("tsv"),
PARALOGY("json"),
SEQUENCE_TARGETING_REAGENT("json"),
EXPRESSION("json");
EXPRESSION("json"),
HTP_EXPRESSION_DATASET_ANNOTATION("json");

public String fileExtension;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
package org.alliancegenome.curation_api.model.entities;

import java.util.List;

import org.alliancegenome.curation_api.model.entities.base.SubmittedObject;
import org.alliancegenome.curation_api.view.View;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;
import org.hibernate.search.mapper.pojo.automaticindexing.ReindexOnUpdate;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.IndexedEmbedded;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.IndexingDependency;

import com.fasterxml.jackson.annotation.JsonView;

import jakarta.persistence.Entity;
import jakarta.persistence.Index;
import jakarta.persistence.JoinTable;
import jakarta.persistence.ManyToMany;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

@Indexed
@Entity
@Data
@EqualsAndHashCode(onlyExplicitlyIncluded = true, callSuper = true)
@ToString(callSuper = true)
@Schema(name = "HighThroughputExpressionDatasetAnnotation", description = "POJO that represents the HighThroughputExpressionDatasetAnnotation")
public class HighThroughputExpressionDatasetAnnotation extends SubmittedObject{
VarunReddy1111 marked this conversation as resolved.
Show resolved Hide resolved

@JsonView({ View.FieldsOnly.class })
VarunReddy1111 marked this conversation as resolved.
Show resolved Hide resolved
private String name;
VarunReddy1111 marked this conversation as resolved.
Show resolved Hide resolved

@IndexedEmbedded(includePaths = {"curie", "primaryCrossReferenceCurie", "crossReferences.referencedCurie", "curie_keyword", "primaryCrossReferenceCurie_keyword", "crossReferences.referencedCurie_keyword"})
VarunReddy1111 marked this conversation as resolved.
Show resolved Hide resolved
@IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW)
@ManyToMany
@Fetch(FetchMode.JOIN)
@JoinTable(indexes = {
@Index(name = "htpdatasetannotation_reference_htpdataset_index", columnList = "highthroughputexpressiondatasetannotation_id"),
@Index(name = "htpdatasetannotation_reference_references_index", columnList = "references_id")
})
@JsonView({ View.FieldsAndLists.class })
private List<Reference> references;

@JsonView({ View.FieldsOnly.class })
VarunReddy1111 marked this conversation as resolved.
Show resolved Hide resolved
private String realtedNote;
VarunReddy1111 marked this conversation as resolved.
Show resolved Hide resolved

@JsonView({ View.FieldsOnly.class })
VarunReddy1111 marked this conversation as resolved.
Show resolved Hide resolved
private Integer numberOfChannels;
VarunReddy1111 marked this conversation as resolved.
Show resolved Hide resolved

@IndexedEmbedded(includePaths = {"name", "name_keyword"})
VarunReddy1111 marked this conversation as resolved.
Show resolved Hide resolved
@IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW)
@ManyToMany
VarunReddy1111 marked this conversation as resolved.
Show resolved Hide resolved
@JsonView({ View.FieldsAndLists.class })
VarunReddy1111 marked this conversation as resolved.
Show resolved Hide resolved
@JoinTable(name = "htpexpressiondatasetannotation_categorytags", indexes = { @Index(name = "htpdatasetannotation_htpdatasetid_index", columnList = "highthroughputexpressiondatasetannotation_id"), @Index(name = "htpdatasetannotation_categorytags_index", columnList = "categorytags_id")})
List<VocabularyTerm> categoryTags;
VarunReddy1111 marked this conversation as resolved.
Show resolved Hide resolved

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
-- To create bulk loads

INSERT INTO bulkloadgroup (id, name) VALUES (nextval('bulkloadgroup_seq'), 'HTP Expression Dataset Annotation Bulk Loads');

INSERT INTO bulkload (id, backendbulkloadtype, name, bulkloadstatus, group_id)
SELECT nextval('bulkload_seq'), 'HTP_EXPRESSION_DATASET_ANNOTATION', 'FB HTP Expression Dataset Annotation Load', 'STOPPED', id FROM bulkloadgroup WHERE name = 'HTP Expression Dataset Annotation Bulk Loads';
INSERT INTO bulkload (id, backendbulkloadtype, name, bulkloadstatus, group_id)
SELECT nextval('bulkload_seq'), 'HTP_EXPRESSION_DATASET_ANNOTATION', 'ZFIN HTP Expression Dataset Annotation Load', 'STOPPED', id FROM bulkloadgroup WHERE name = 'HTP Expression Dataset Annotation Bulk Loads';
INSERT INTO bulkload (id, backendbulkloadtype, name, bulkloadstatus, group_id)
SELECT nextval('bulkload_seq'), 'HTP_EXPRESSION_DATASET_ANNOTATION', 'MGI HTP Expression Dataset Annotation Load', 'STOPPED', id FROM bulkloadgroup WHERE name = 'HTP Expression Dataset Annotation Bulk Loads';
INSERT INTO bulkload (id, backendbulkloadtype, name, bulkloadstatus, group_id)
SELECT nextval('bulkload_seq'), 'HTP_EXPRESSION_DATASET_ANNOTATION', 'RGD HTP Expression Dataset Annotation Load', 'STOPPED', id FROM bulkloadgroup WHERE name = 'HTP Expression Dataset Annotation Bulk Loads';
INSERT INTO bulkload (id, backendbulkloadtype, name, bulkloadstatus, group_id)
SELECT nextval('bulkload_seq'), 'HTP_EXPRESSION_DATASET_ANNOTATION', 'SGD HTP Expression Dataset Annotation Load', 'STOPPED', id FROM bulkloadgroup WHERE name = 'HTP Expression Dataset Annotation Bulk Loads';
INSERT INTO bulkload (id, backendbulkloadtype, name, bulkloadstatus, group_id)
SELECT nextval('bulkload_seq'), 'HTP_EXPRESSION_DATASET_ANNOTATION', 'WB HTP Expression Dataset Annotation Load', 'STOPPED', id FROM bulkloadgroup WHERE name = 'HTP Expression Dataset Annotation Bulk Loads';

INSERT INTO bulkscheduledload (id, cronschedule, scheduleactive)
SELECT id, '0 0 22 ? * SUN-THU', false FROM bulkload WHERE backendbulkloadtype = 'HTP_EXPRESSION_DATASET_ANNOTATION';
VarunReddy1111 marked this conversation as resolved.
Show resolved Hide resolved

INSERT INTO bulkfmsload (id, fmsdatatype, fmsdatasubtype)
SELECT id, 'HTP_EXPRESSION_DATASET_ANNOTATION', 'FB' FROM bulkload WHERE name = 'FB HTP Expression Dataset Annotation Load';
INSERT INTO bulkfmsload (id, fmsdatatype, fmsdatasubtype)
SELECT id, 'HTP_EXPRESSION_DATASET_ANNOTATION', 'MGI' FROM bulkload WHERE name = 'MGI HTP Expression Dataset Annotation Load';
INSERT INTO bulkfmsload (id, fmsdatatype, fmsdatasubtype)
SELECT id, 'HTP_EXPRESSION_DATASET_ANNOTATION', 'RGD' FROM bulkload WHERE name = 'RGD HTP Expression Dataset Annotation Load';
INSERT INTO bulkfmsload (id, fmsdatatype, fmsdatasubtype)
SELECT id, 'HTP_EXPRESSION_DATASET_ANNOTATION', 'SGD' FROM bulkload WHERE name = 'SGD HTP Expression Dataset Annotation Load';
INSERT INTO bulkfmsload (id, fmsdatatype, fmsdatasubtype)
SELECT id, 'HTP_EXPRESSION_DATASET_ANNOTATION', 'WB' FROM bulkload WHERE name = 'WB HTP Expression Dataset Annotation Load';
INSERT INTO bulkfmsload (id, fmsdatatype, fmsdatasubtype)
SELECT id, 'HTP_EXPRESSION_DATASET_ANNOTATION', 'ZFIN' FROM bulkload WHERE name = 'ZFIN HTP Expression Dataset Annotation Load';


--Adding 3 extra vocabulary terms for HTPTags

INSERT INTO vocabularyterm (id, name, vocabulary_id) SELECT nextval('vocabularyterm_seq'), 'epigenome', id FROM vocabulary WHERE vocabularylabel = 'data_set_category_tags';
INSERT INTO vocabularyterm (id, name, vocabulary_id) SELECT nextval('vocabularyterm_seq'), 'functional genomics and proteomics', id FROM vocabulary WHERE vocabularylabel = 'data_set_category_tags';
INSERT INTO vocabularyterm (id, name, vocabulary_id) SELECT nextval('vocabularyterm_seq'), 'karyotyping', id FROM vocabulary WHERE vocabularylabel = 'data_set_category_tags';

-- Adding highthroughputexpressiondatasetannotation

CREATE SEQUENCE highthroughputexpressiondatasetannotation_seq START WITH 1 INCREMENT BY 50 NO MINVALUE NO MAXVALUE CACHE 1;

CREATE TABLE highthroughputexpressiondatasetannotation (
id bigint NOT NULL,
datecreated timestamp(6) with time zone,
dateupdated timestamp(6) with time zone,
dbdatecreated timestamp(6) with time zone,
dbdateupdated timestamp(6) with time zone,
internal boolean DEFAULT false NOT NULL,
obsolete boolean DEFAULT false NOT NULL,
curie character varying(255),
modentityid character varying(255),
modinternalid character varying(255),
name character varying(255),
numberofchannels integer,
realtednote character varying(255),
markquintontulloch marked this conversation as resolved.
Show resolved Hide resolved
createdby_id bigint,
updatedby_id bigint,
dataprovider_id bigint
);

CREATE TABLE highthroughputexpressiondatasetannotation_categorytags (
highthroughputexpressiondatasetannotation_id bigint NOT NULL,
categorytags_id bigint NOT NULL
);

CREATE TABLE highthroughputexpressiondatasetannotation_reference (
highthroughputexpressiondatasetannotation_id bigint NOT NULL,
references_id bigint NOT NULL
);

ALTER TABLE highthroughputexpressiondatasetannotation ADD CONSTRAINT highthroughputexpressiondatasetannotation_pkey PRIMARY KEY (id);

CREATE INDEX htpdatasetannotation_reference_htpdataset_index ON highthroughputexpressiondatasetannotation_reference USING btree (highthroughputexpressiondatasetannotation_id);

CREATE INDEX htpdatasetannotation_reference_references_index ON highthroughputexpressiondatasetannotation_reference USING btree (references_id);

CREATE INDEX htpdatasetannotation_categorytags_index ON highthroughputexpressiondatasetannotation_categorytags USING btree (categorytags_id);

CREATE INDEX htpdatasetannotation_htpdatasetid_index ON highthroughputexpressiondatasetannotation_categorytags USING btree (highthroughputexpressiondatasetannotation_id);

ALTER TABLE highthroughputexpressiondatasetannotation_categorytags
ADD CONSTRAINT highthroughputexpressiondatasetannotation_categorytags_highthroughputexpressiondatasetannotation_id_fk FOREIGN KEY (highthroughputexpressiondatasetannotation_id) REFERENCES highthroughputexpressiondatasetannotation(id);

ALTER TABLE highthroughputexpressiondatasetannotation
ADD CONSTRAINT highthroughputexpressiondatasetannotation_dataprovider_id_fk FOREIGN KEY (dataprovider_id) REFERENCES dataprovider(id);

ALTER TABLE highthroughputexpressiondatasetannotation_categorytags
ADD CONSTRAINT htpdatasetannotation_categorytags_categorytags_id_fk FOREIGN KEY (categorytags_id) REFERENCES vocabularyterm(id);

ALTER TABLE highthroughputexpressiondatasetannotation_reference
ADD CONSTRAINT htpdatasetannotation_reference_htpdatasetannotation_id_fk FOREIGN KEY (highthroughputexpressiondatasetannotation_id) REFERENCES highthroughputexpressiondatasetannotation(id);

ALTER TABLE highthroughputexpressiondatasetannotation_reference
ADD CONSTRAINT htpdatasetannotation_reference_references_id_fk FOREIGN KEY (references_id) REFERENCES reference(id);

ALTER TABLE highthroughputexpressiondatasetannotation
ADD CONSTRAINT htpdatasetannotation_updatedby_id_fk FOREIGN KEY (updatedby_id) REFERENCES person(id);

ALTER TABLE highthroughputexpressiondatasetannotation
ADD CONSTRAINT htpdatasetannotation_createdby_id_fk FOREIGN KEY (createdby_id) REFERENCES person(id);
Loading