Skip to content

Commit 9281646

Browse files
committed
models: Update proto variant model and converter #TASK-7555
1 parent eb04915 commit 9281646

File tree

8 files changed

+601
-192
lines changed

8 files changed

+601
-192
lines changed

biodata-models/src/main/proto/protobuf/opencb/common.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,7 @@ message GeneDrugInteraction {
3030
string source = 3;
3131
string study_type = 4;
3232
string type = 5;
33+
string interaction_type = 6;
34+
string chembl_id = 7;
35+
repeated string publications = 8;
3336
}

biodata-models/src/main/proto/protobuf/opencb/evidence.proto

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,26 @@ Pharmacogenomics drug response variant classification
185185
* `efficacy` : a variant that affects the efficacy of the treatment
186186
*/
187187
enum DrugResponseClassification {
188-
responsive = 0;
189-
resistant = 1;
190-
toxicity = 2;
191-
indication = 3;
192-
contraindication = 4;
193-
dosing = 5;
194-
increased_monitoring = 6;
195-
efficacy = 7;
196-
}
188+
responsive = 0; // DEPRECATED: kept just for retrocompatibility purposes
189+
altered_sensitivity = 1;
190+
reduced_sensitivity = 2;
191+
increased_sensitivity = 3;
192+
altered_resistance = 4;
193+
increased_resistance = 5;
194+
reduced_resistance = 6;
195+
increased_risk_of_toxicity = 7;
196+
reduced_risk_of_toxicity = 8;
197+
altered_toxicity = 9;
198+
adverse_drug_reaction = 10;
199+
indication = 11;
200+
contraindication = 12;
201+
dosing_alteration = 13;
202+
increased_dose = 14;
203+
reduced_dose = 15;
204+
increased_monitoring = 16;
205+
increased_efficacy = 17;
206+
reduced_efficacy = 18;
207+
altered_efficacy = 19;}
197208

198209
/**
199210
Association of variants to a given trait.

biodata-models/src/main/proto/protobuf/opencb/variant.proto

Lines changed: 60 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,47 @@ message SampleEntry {
207207
repeated string data = 3;
208208
}
209209

210+
message IssueEntry {
211+
212+
enum IssueType {
213+
DUPLICATION = 0;
214+
DISCREPANCY = 1;
215+
MENDELIAN_ERROR = 2;
216+
DE_NOVO = 3;
217+
COMPOUND_HETEROZYGOUS = 4;
218+
}
219+
220+
IssueType type = 1;
221+
222+
SampleEntry sample = 2;
223+
224+
map<string, string> data = 3;
225+
}
226+
227+
message VariantScore {
228+
229+
/**
230+
* Variant score ID.
231+
*/
232+
string id = 1;
233+
/**
234+
* Main cohort used for calculating the score.
235+
*/
236+
string cohort1 = 2;
237+
/**
238+
* Optional secondary cohort used for calculating the score.
239+
*/
240+
string cohort2 = 3;
241+
/**
242+
* Score value
243+
*/
244+
float score = 4;
245+
/**
246+
* Score p value
247+
*/
248+
float pValue = 5;
249+
}
250+
210251
message StudyEntry {
211252
string studyId = 1;
212253
repeated FileEntry files = 2;
@@ -217,22 +258,11 @@ message StudyEntry {
217258
repeated string sampleDataKeys = 4;
218259
repeated SampleEntry samples = 5;
219260
repeated VariantStats stats = 6;
261+
repeated IssueEntry issues = 7;
262+
repeated VariantScore scores = 8;
220263
}
221264

222-
///**
223-
// * Type of structural variation
224-
// * <ul>
225-
// * <li>COPY_NUMBER_GAIN for CNVs</li>
226-
// * <li>COPY_NUMBER_LOSS for CNVs</li>
227-
// * <li>TANDEM_DUPLICATION for DUP</li>
228-
// * </ul>
229-
// */
230-
//enum StructuralVariantType {
231-
// unused = 0; // SO:0001742
232-
//// COPY_NUMBER_GAIN = 0; // SO:0001742
233-
//// COPY_NUMBER_LOSS = 1; // SO:0001743
234-
//// TANDEM_DUPLICATION = 2; // SO:1000173
235-
//}
265+
236266

237267

238268
/*
@@ -263,6 +293,21 @@ message Breakend {
263293

264294

265295
message StructuralVariation {
296+
/**
297+
* Type of structural variation
298+
* <ul>
299+
* <li>COPY_NUMBER_GAIN for CNVs</li>
300+
* <li>COPY_NUMBER_LOSS for CNVs</li>
301+
* <li>TANDEM_DUPLICATION for DUP</li>
302+
* </ul>
303+
*/
304+
enum StructuralVariantType {
305+
// unused = 0; // SO:0001742
306+
COPY_NUMBER_GAIN = 0; // SO:0001742
307+
COPY_NUMBER_LOSS = 1; // SO:0001743
308+
TANDEM_DUPLICATION = 2; // SO:1000173
309+
}
310+
266311
int32 ciStartLeft = 1;
267312
int32 ciStartRight = 2;
268313
int32 ciEndLeft = 3;
@@ -283,7 +328,7 @@ message StructuralVariation {
283328
/**
284329
* Structural variation type: COPY_NUMBER_GAIN, COPY_NUMBER_LOSS, TANDEM_DUPLICATION, ...
285330
*/
286-
// StructuralVariantType type = 8;
331+
StructuralVariantType type = 8;
287332

288333
Breakend breakend = 9;
289334
}

0 commit comments

Comments
 (0)