@jax-data-science/api-clients 0.0.1 → 0.1.0-a.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -1,17 +1,859 @@
1
- export * from './lib/services/asynctask/asynctask.service';
2
- export * from './lib/services/asynctask/asynctask.model';
3
- export * from './lib/services/isa-data/isa-data.service';
4
- export * from './lib/models/isa-data/isa-data.model';
5
- export * from './lib/tokens/isa-data-config.token';
6
- export * from './lib/services/mvar/mvar.service';
7
- export * from './lib/services/mvar/models/response/dtos';
8
- export * from './lib/services/mvar/mvar-client.module';
9
- export * from './lib/services/ontology/ontology.service.base';
10
- export * from './lib/services/ontology/ontology.service.jax';
11
- export * from './lib/services/ontology/ontology.service.ols';
12
- export * from './lib/services/mvar/mvar.service';
13
- export * from './lib/services/mvar/models/response/dtos';
14
- export * from './lib/services/mvar/mvar-client.module';
15
- export * from './lib/services/snp-grid/snp-grid-client.module';
16
- export * from './lib/services/snp-grid/models/response/dtos';
17
- export * from './lib/services/snp-grid/snp-grid.service';
1
+ import { Observable } from 'rxjs';
2
+ import * as i0 from '@angular/core';
3
+ import { InjectionToken, ModuleWithProviders } from '@angular/core';
4
+ import * as i1 from '@angular/common';
5
+
6
+ /**
7
+ * AsyncTask Service Models
8
+ *
9
+ * This module contains TypeScript interfaces for the AsyncTask service API.
10
+ * These models are based on the OpenAPI specification and represent the
11
+ * core entities used in the AsyncTask workflow system.
12
+ */
13
+ /**
14
+ * Represents the current execution status of a workflow.
15
+ * Based on temporalio.api.enums.v1.WorkflowExecutionStatus
16
+ */
17
+ declare enum WorkflowExecutionStatus {
18
+ RUNNING = 1,
19
+ COMPLETED = 2,
20
+ FAILED = 3,
21
+ CANCELED = 4,
22
+ TERMINATED = 5,
23
+ CONTINUED_AS_NEW = 6,
24
+ TIMED_OUT = 7
25
+ }
26
+ /**
27
+ * Represents a configuration of input parameters for a workflow run.
28
+ */
29
+ interface Input {
30
+ /**
31
+ * Auto-generated primary key
32
+ */
33
+ id?: number | null;
34
+ /**
35
+ * Type of the input
36
+ */
37
+ type?: string | null;
38
+ /**
39
+ * Foreign key to the user who created this input
40
+ */
41
+ owner_id: number;
42
+ /**
43
+ * JSON dictionary containing input parameters
44
+ */
45
+ values: Record<string, any>;
46
+ /**
47
+ * Optional descriptive name
48
+ */
49
+ name?: string | null;
50
+ /**
51
+ * Optional detailed description
52
+ */
53
+ description?: string | null;
54
+ }
55
+ /**
56
+ * Lightweight reference to an input configuration.
57
+ * Used for list endpoints to minimize data transfer.
58
+ */
59
+ interface InputReference {
60
+ /**
61
+ * Input identifier
62
+ */
63
+ id: number;
64
+ /**
65
+ * Optional descriptive name
66
+ */
67
+ name?: string | null;
68
+ /**
69
+ * Optional detailed description
70
+ */
71
+ description?: string | null;
72
+ }
73
+ /**
74
+ * Input submission for creating a new workflow run
75
+ */
76
+ interface InputSubmission {
77
+ /**
78
+ * Optional descriptive name
79
+ */
80
+ name?: string | null;
81
+ /**
82
+ * Optional detailed description
83
+ */
84
+ description?: string | null;
85
+ /**
86
+ * Type of task to execute
87
+ */
88
+ task_type: string;
89
+ /**
90
+ * Input values specific to the task type
91
+ */
92
+ values: Record<string, any> | string;
93
+ }
94
+ /**
95
+ * Represents output data from a completed workflow run.
96
+ */
97
+ interface Result {
98
+ /**
99
+ * Auto-generated primary key
100
+ */
101
+ id: number;
102
+ /**
103
+ * Foreign key to the associated run
104
+ */
105
+ run_id: number;
106
+ /**
107
+ * JSON dictionary containing result data
108
+ */
109
+ values: Record<string, any>;
110
+ /**
111
+ * Optional descriptive name
112
+ */
113
+ name?: string | null;
114
+ /**
115
+ * Optional detailed description
116
+ */
117
+ description?: string | null;
118
+ }
119
+ /**
120
+ * Lightweight reference to a result.
121
+ * Used for list endpoints to minimize data transfer.
122
+ */
123
+ interface ResultReference {
124
+ /**
125
+ * Result identifier
126
+ */
127
+ id: number;
128
+ /**
129
+ * Associated run identifier
130
+ */
131
+ run_id: number;
132
+ /**
133
+ * Optional descriptive name
134
+ */
135
+ name?: string | null;
136
+ /**
137
+ * Optional detailed description
138
+ */
139
+ description?: string | null;
140
+ }
141
+ /**
142
+ * Represents an execution instance of a workflow.
143
+ */
144
+ interface Run {
145
+ /**
146
+ * Auto-generated primary key
147
+ */
148
+ id: number;
149
+ /**
150
+ * Foreign key to the input configuration
151
+ */
152
+ input_id: number;
153
+ /**
154
+ * Foreign key to the user who initiated the run
155
+ */
156
+ owner_id: number;
157
+ /**
158
+ * Temporal workflow identifier
159
+ */
160
+ workflow_id: string;
161
+ /**
162
+ * Current execution status from Temporal
163
+ */
164
+ status: WorkflowExecutionStatus;
165
+ /**
166
+ * Run start time in ISO 8601 format
167
+ */
168
+ init_time?: string | null;
169
+ }
170
+
171
+ interface BaseResponse {
172
+ errors?: Error[];
173
+ info?: Record<string, any>;
174
+ }
175
+
176
+ interface PagingLinks {
177
+ first?: string;
178
+ previous?: string;
179
+ next?: string;
180
+ last?: string;
181
+ }
182
+ interface Paging {
183
+ page?: number;
184
+ items?: number;
185
+ total_pages?: number;
186
+ total_items?: number;
187
+ links?: PagingLinks;
188
+ }
189
+
190
+ interface Response<T> extends BaseResponse {
191
+ object?: T;
192
+ }
193
+ interface CollectionResponse<T> extends BaseResponse {
194
+ data: T[];
195
+ paging?: Paging;
196
+ }
197
+
198
+ declare class AsyncTaskService {
199
+ private apiBaseUrl;
200
+ private apiServiceFactory;
201
+ private apiBaseService;
202
+ setApiBaseUrl(baseUrl: string): void;
203
+ getApiBaseUrl(): string;
204
+ addInput(inputSubmission: InputSubmission): Observable<Response<Input>>;
205
+ getInput(id: number): Observable<Response<Input>>;
206
+ getInputs(): Observable<CollectionResponse<InputReference>>;
207
+ /**
208
+ * Updates an existing input - only 'name' and 'description' can be updated
209
+ * @param inputId
210
+ * @param name - (optional) name to update
211
+ * @param description - (optional) description to update
212
+ */
213
+ updateInput(inputId: number, name?: string, description?: string): Observable<Response<InputReference>>;
214
+ createRun(inputId?: number, inputSubmission?: InputSubmission): Observable<Response<Run>>;
215
+ getRun(id: number): Observable<Response<Run>>;
216
+ /**
217
+ *
218
+ * @param workflowId - (optional) workflow identifier
219
+ */
220
+ getRuns(workflowId?: string): Observable<CollectionResponse<Run>>;
221
+ /**
222
+ * Gets the input associated with the specific run ID. One run is associated
223
+ * with only one input, so this function returns a single input object.
224
+ * @param runId
225
+ */
226
+ getRunInput(runId: number): Observable<Response<Input>>;
227
+ /**
228
+ * Gets the result associated with the specific run ID. One run is associated
229
+ * with only one result, so this function returns a single result object.
230
+ * @param runId
231
+ */
232
+ getRunResult(runId: number): Observable<Response<Result>>;
233
+ /**
234
+ * Calls the fetchEventSource() function, which is a wrapper around the native
235
+ * EventSource API. This function is used to establish connection to an API
236
+ * endpoint and listen to event streaming data associated with task runs.
237
+ * TO-DO [GIK 7/9/2025]: needs to add a reconnect logic
238
+ * @return an observable that emits run events
239
+ */
240
+ getRunEvents(accessToken: string): Observable<Run>;
241
+ getResult(resId: number): Observable<Response<Result>>;
242
+ getResults(): Observable<CollectionResponse<ResultReference>>;
243
+ /**
244
+ * Updates an existing result record - 'name' and 'description' can be updated
245
+ * @param resId
246
+ * @param name - (optional) result's name to update
247
+ * @param description - (optional) result's description to update
248
+ */
249
+ updateResult(resId: number, name?: string, description?: string): Observable<Response<ResultReference>>;
250
+ getHealthCheck(): Observable<any>;
251
+ static ɵfac: i0.ɵɵFactoryDeclaration<AsyncTaskService, never>;
252
+ static ɵprov: i0.ɵɵInjectableDeclaration<AsyncTaskService>;
253
+ }
254
+
255
+ /**
256
+ * This module defines the data models for representing the Investigation-Study-Assay (ISA)
257
+ * data model, which is a standard for describing life science experiments and their results.
258
+ *
259
+ * Key Concepts:
260
+ * - Investigation: The overall research project or study.
261
+ * - Study: A specific experimental design within an investigation.
262
+ * - Assay: A specific test or measurement performed on samples within a study.
263
+ *
264
+ * Measures represent the actual data points collected from assay executions, including:
265
+ * - Measure: a single assay results with unique identifier
266
+ * - MeasureSeries: a collection of measures that share common metadata and characteristics
267
+ *
268
+ * Each measure/series contains values, metadata about the experimental conditions,
269
+ * and characteristics that describe sample properties or experimental parameters.
270
+ */
271
+ interface Measure {
272
+ id: string;
273
+ values?: MeasureValue[];
274
+ metadata?: MeasureMetadata;
275
+ characteristics?: IsaCharacteristic[];
276
+ }
277
+ interface MeasureSeries {
278
+ id: string;
279
+ values?: MeasureValue[];
280
+ measures?: string[];
281
+ metadata?: MeasureSeriesMetadata;
282
+ characteristics?: IsaCharacteristic[];
283
+ }
284
+ interface MeasureMetadata {
285
+ assay_id: number;
286
+ description: string;
287
+ measure_id: number;
288
+ method: string;
289
+ study_id: string;
290
+ units: string;
291
+ treatment: string;
292
+ variable_name: string;
293
+ characteristics?: Record<string, string[]>;
294
+ }
295
+ interface MeasureSeriesMetadata {
296
+ assay_id: number;
297
+ description: string;
298
+ initiated_at_units?: string;
299
+ measure_ids: string[];
300
+ measure_series_id: string;
301
+ measurement_units: string;
302
+ method: string;
303
+ study_id?: number;
304
+ treatment: string;
305
+ treatment_units: string;
306
+ variable_name: string;
307
+ characteristics?: Record<string, string[]>;
308
+ }
309
+ interface MeasureValue {
310
+ value: string | number;
311
+ measure_id: string;
312
+ measure_series_id?: string;
313
+ study_id?: string;
314
+ source_id: string;
315
+ }
316
+ interface IsaCharacteristicValue {
317
+ value: string | number | boolean | Date;
318
+ label: string;
319
+ count?: number;
320
+ description?: string;
321
+ metadata: Record<string, string>;
322
+ }
323
+ interface IsaCharacteristic {
324
+ name: string;
325
+ value: IsaCharacteristicValue | IsaCharacteristicValue[];
326
+ type?: string;
327
+ unit?: string;
328
+ description?: string;
329
+ }
330
+
331
+ /**
332
+ * service for interacting with ISA (Investigation-Study-Assay) data model API.
333
+ */
334
+ declare class ISADataService {
335
+ private readonly apiConfig;
336
+ private readonly apiServiceFactory;
337
+ private readonly apiBaseService;
338
+ constructor();
339
+ getApiBaseUrl(): string;
340
+ /**
341
+ * Fetches measure series metadata for the given measure series IDs and study IDs.
342
+ *
343
+ * @param measureSeriesIds - measure series identifiers to fetch metadata for. ONLY ONE ID IS SUPPORTED.
344
+ * @param studyIds - ONLY ONE ID IS SUPPORTED. REQUIRED!! WILL BE REMOVED IN THE FUTURE.
345
+ *
346
+ * @return Observable<Response<MeasureSeriesMetadata>> - an observable containing the measure series metadata.
347
+ */
348
+ getMeasureSeriesMetadata(measureSeriesIds: string[], studyIds: string[]): Observable<Response<MeasureSeriesMetadata>>;
349
+ /**
350
+ * THIS METHOD SHOULD NOT BE USED. PLACEHOLDER FOR FUTURE IMPLEMENTATION ONCE THE API GROWS.
351
+ */
352
+ getMeasuresMetadata(measureIds: string[], studyIds: string[]): Observable<Response<MeasureMetadata>>;
353
+ /**
354
+ * Fetches measure series characteristics for the given measure series IDs and study IDs.
355
+ *
356
+ * @param measureSeriesIds - measure series identifiers to fetch metadata for. ONLY ONE ID IS SUPPORTED.
357
+ * @param studyIds - ONLY ONE ID IS SUPPORTED. REQUIRED!! WILL BE REMOVED IN THE FUTURE.
358
+ *
359
+ * @return Observable<Response<MeasureSeriesMetadata>> - an observable containing the measure series metadata.
360
+ */
361
+ getMeasureSeriesCharacteristics(measureSeriesIds: string[], studyIds: string[]): Observable<Response<IsaCharacteristic>>;
362
+ /**
363
+ * Placeholder for assay operations
364
+ * TODO: Implement assay-related methods
365
+ */
366
+ /**
367
+ * Placeholder for study operations
368
+ * TODO: Implement study-related methods
369
+ */
370
+ /**
371
+ * Placeholder for investigation operations
372
+ * TODO: Implement investigation-related methods
373
+ */
374
+ /**
375
+ * Builds the URL for the ISA data service.
376
+ *
377
+ * @param endpoint - the API endpoint path.
378
+ * @param params - optional query parameters as key-value pairs.
379
+ *
380
+ * @return complete URL with query string parameters.
381
+ */
382
+ private buildUrl;
383
+ getHealthCheck(): Observable<any>;
384
+ static ɵfac: i0.ɵɵFactoryDeclaration<ISADataService, never>;
385
+ static ɵprov: i0.ɵɵInjectableDeclaration<ISADataService>;
386
+ }
387
+
388
+ interface IsaDataServiceConfig {
389
+ baseUrl: string;
390
+ }
391
+ declare const ISA_DATA_SERVICE_CONFIG: InjectionToken<IsaDataServiceConfig>;
392
+
393
+ interface VariantResults {
394
+ variantCount: number;
395
+ variants: Variant[];
396
+ }
397
+ interface Variant {
398
+ accession: string;
399
+ alt: string;
400
+ aminoAcidChange: string;
401
+ assembly: string;
402
+ canonVarIdentifier: {
403
+ caID: string;
404
+ id: number;
405
+ variantRefTxt: string;
406
+ };
407
+ chr: string;
408
+ dnaHgvsNotation: string;
409
+ functionalClassCode: string;
410
+ functionalClasses: SequenceOntologyTerm[];
411
+ gene: {
412
+ chr: string;
413
+ description: string;
414
+ ensemblGeneId: string;
415
+ entrezGeneId: string;
416
+ id: number;
417
+ mgiId: string;
418
+ name: string;
419
+ symbol: string;
420
+ synonyms: {
421
+ id: number;
422
+ }[];
423
+ transcripts: {
424
+ id: number;
425
+ }[];
426
+ type: string;
427
+ };
428
+ id: number;
429
+ impact: string;
430
+ parentRefInd: boolean;
431
+ position: number;
432
+ proteinHgvsNotation: string;
433
+ proteinPosition: string;
434
+ ref: string;
435
+ sources: {
436
+ id: number;
437
+ name: string;
438
+ sourceVersion: string;
439
+ url: string;
440
+ }[];
441
+ transcripts: {
442
+ description: string;
443
+ geneSymbol: string;
444
+ id: number;
445
+ mRnaId: string;
446
+ primaryIdentifier: string;
447
+ }[];
448
+ type: string;
449
+ variantHgvsNotation: string;
450
+ variantRefTxt: string;
451
+ }
452
+ interface SequenceOntologyTerm {
453
+ definition: string;
454
+ id: number;
455
+ label: string;
456
+ soId: string;
457
+ subClassOf: string;
458
+ mpdTerm: string;
459
+ }
460
+ interface SNP {
461
+ alternate_bases: string;
462
+ calls: Call[];
463
+ chr: string;
464
+ observed: string;
465
+ reference_base: string;
466
+ rs: string;
467
+ start_position: number | null;
468
+ annotation?: Variant | null;
469
+ }
470
+ interface Call {
471
+ strain_name: string;
472
+ sample_id: number;
473
+ genotype: string;
474
+ prob: number;
475
+ base: string;
476
+ }
477
+ interface SNPSearchRegion {
478
+ chromosome: string;
479
+ start_position: number;
480
+ end_position: number;
481
+ reference_base?: string;
482
+ alternate_base?: string;
483
+ }
484
+ declare const MUS_CHRS: string[];
485
+
486
+ declare class MVarService {
487
+ private readonly config;
488
+ private readonly http;
489
+ private api;
490
+ sequenceOntologyMapping: Record<string, SequenceOntologyTerm>;
491
+ private soTerms;
492
+ soTerms$: Observable<SequenceOntologyTerm[]>;
493
+ constructor();
494
+ /**
495
+ * Gets Variants from mvar for a given set snp regions
496
+ * @param regions Array of snp regions
497
+ * @param pageStart snp start location
498
+ * @param pageEnd snp end location
499
+ * @param assembly Desired assembly version. Acceptable values are 'mm10' (GRCm38) and 'mm39' (GRCm39)
500
+ */
501
+ getVariants(regions: SNPSearchRegion[], pageStart: SNP, pageEnd: SNP, assembly: string): Observable<Variant[]>;
502
+ /**
503
+ * Returns all sequence ontology terms in MVAR
504
+ */
505
+ getSequenceOntologyTerms(): Observable<SequenceOntologyTerm[]>;
506
+ /**
507
+ * Translates the regions requested from MUSter and the regions actually displayed on the current page into
508
+ * regions to request from MVAR
509
+ * @param requestedRegions - regions included in the request to MUSter
510
+ * @param pageStart - first SNP from the sorted results from MUSter to display in the table
511
+ * @param pageEnd - last SNP from the sorted results from MUSter to display in the table
512
+ */
513
+ getRegionsToRequestVariantsFor(requestedRegions: SNPSearchRegion[], pageStart: SNP, pageEnd: SNP): SNPSearchRegion[];
514
+ static ɵfac: i0.ɵɵFactoryDeclaration<MVarService, never>;
515
+ static ɵprov: i0.ɵɵInjectableDeclaration<MVarService>;
516
+ }
517
+
518
+ declare class MvarClientModule {
519
+ static forRoot(apiUrl: string): ModuleWithProviders<MvarClientModule>;
520
+ static ɵfac: i0.ɵɵFactoryDeclaration<MvarClientModule, never>;
521
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MvarClientModule, never, [typeof i1.CommonModule], never>;
522
+ static ɵinj: i0.ɵɵInjectorDeclaration<MvarClientModule>;
523
+ }
524
+
525
+ interface MVarServiceConfig {
526
+ apiUrl: string;
527
+ }
528
+ declare const MVAR_SERVICE_CONFIG: InjectionToken<MVarServiceConfig>;
529
+
530
+ declare enum Ontology {
531
+ HP = "HP",
532
+ MONDO = "MONDO",
533
+ MP = "MP",
534
+ CL = "CL",
535
+ MAXO = "MAXO"
536
+ }
537
+ interface OntologyTerm {
538
+ id: string;
539
+ name: string;
540
+ }
541
+ interface OLSTerm {
542
+ appearsIn: string[];
543
+ curie: string;
544
+ definedBy: string[];
545
+ definition?: Array<{
546
+ type: string[];
547
+ value: string;
548
+ axioms?: Array<{
549
+ [key: string]: string;
550
+ }>;
551
+ }>;
552
+ definitionProperty?: string;
553
+ directAncestor?: string[];
554
+ directParent?: Array<string>;
555
+ hasDirectChildren?: boolean;
556
+ hasDirectParents?: boolean;
557
+ hasHierarchicalChildren?: boolean;
558
+ hasHierarchicalParents?: boolean;
559
+ hierarchicalAncestor?: string[];
560
+ hierarchicalParent?: Array<string | {
561
+ type: string[];
562
+ value: string;
563
+ axioms?: Array<{
564
+ [key: string]: string;
565
+ }>;
566
+ }>;
567
+ hierarchicalProperty?: string;
568
+ imported?: boolean;
569
+ iri: string;
570
+ isDefiningOntology?: boolean;
571
+ isObsolete?: boolean;
572
+ isPreferredRoot?: boolean;
573
+ label?: string[];
574
+ linkedEntities?: Record<string, any>;
575
+ linksTo?: string[];
576
+ numDescendants?: number;
577
+ numHierarchicalDescendants?: number;
578
+ ontologyId?: string;
579
+ ontologyIri?: string;
580
+ ontologyPreferredPrefix?: string;
581
+ searchableAnnotationValues?: any[];
582
+ shortForm?: string;
583
+ type?: string[];
584
+ [key: string]: any;
585
+ }
586
+
587
+ declare abstract class OntologyService {
588
+ abstract search(query: string, limit: number, ontology: Ontology): Observable<CollectionResponse<OntologyTerm>>;
589
+ abstract term(id: string): Observable<Response<OntologyTerm>>;
590
+ abstract parents(id: string): Observable<CollectionResponse<OntologyTerm>>;
591
+ abstract children(id: string): Observable<CollectionResponse<OntologyTerm>>;
592
+ abstract ancestors(id: string): Observable<CollectionResponse<OntologyTerm>>;
593
+ abstract descendants(id: string): Observable<CollectionResponse<OntologyTerm>>;
594
+ }
595
+
596
+ declare class JaxOntologyService extends OntologyService {
597
+ private httpClient;
598
+ config_location: string;
599
+ private config;
600
+ /**
601
+ * Get the configuration file from the source for the backend api service
602
+ */
603
+ constructor();
604
+ /**
605
+ * Search for terms in an ontology
606
+ * @param query - the search query
607
+ * @param limit - the number of results to return
608
+ * @param ontology - the ontology to search
609
+ */
610
+ search(query: string, limit: number, ontology: Ontology): Observable<CollectionResponse<OntologyTerm>>;
611
+ /**
612
+ * Get a term by its ID
613
+ * @param id - the term ID
614
+ */
615
+ term(id: string): Observable<Response<OntologyTerm>>;
616
+ /**
617
+ * Get the parents of a term
618
+ * @param id - the term ID
619
+ */
620
+ parents(id: string): Observable<CollectionResponse<OntologyTerm>>;
621
+ /**
622
+ * Get the children of a term
623
+ * @param id - the term ID
624
+ */
625
+ children(id: string): Observable<CollectionResponse<OntologyTerm>>;
626
+ /**
627
+ * Get the ancestors of a term
628
+ * @param id - the term ID
629
+ */
630
+ ancestors(id: string): Observable<CollectionResponse<OntologyTerm>>;
631
+ /**
632
+ * Get the descendants of a term
633
+ * @param id - the term ID
634
+ */
635
+ descendants(id: string): Observable<CollectionResponse<OntologyTerm>>;
636
+ /**
637
+ * Get the ontology api base url configuration
638
+ **/
639
+ ontologyBaseResolver(ontology: Ontology): string;
640
+ static ɵfac: i0.ɵɵFactoryDeclaration<JaxOntologyService, never>;
641
+ static ɵprov: i0.ɵɵInjectableDeclaration<JaxOntologyService>;
642
+ }
643
+
644
+ declare class OLSOntologyService extends OntologyService {
645
+ private httpClient;
646
+ private OLS_SEARCH_BASE;
647
+ private OLS_ENTITY_BASE;
648
+ private PURL_BASE;
649
+ constructor();
650
+ term(id: string): Observable<Response<OntologyTerm>>;
651
+ search(query: string, limit: number, ontology: Ontology): Observable<CollectionResponse<OntologyTerm>>;
652
+ parents(id: string): Observable<CollectionResponse<OntologyTerm>>;
653
+ children(id: string): Observable<CollectionResponse<OntologyTerm>>;
654
+ ancestors(id: string): Observable<CollectionResponse<OntologyTerm>>;
655
+ descendants(id: string): Observable<CollectionResponse<OntologyTerm>>;
656
+ mapOLSTermToOntologyTerm(olsTerm: OLSTerm): OntologyTerm;
657
+ static ɵfac: i0.ɵɵFactoryDeclaration<OLSOntologyService, never>;
658
+ static ɵprov: i0.ɵɵInjectableDeclaration<OLSOntologyService>;
659
+ }
660
+
661
+ declare class SnpGridClientModule {
662
+ static forRoot(apiUrl: string): ModuleWithProviders<SnpGridClientModule>;
663
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnpGridClientModule, never>;
664
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SnpGridClientModule, never, [typeof i1.CommonModule], never>;
665
+ static ɵinj: i0.ɵɵInjectorDeclaration<SnpGridClientModule>;
666
+ }
667
+
668
+ interface MusterHealthCheck {
669
+ status: string;
670
+ timestamp: string;
671
+ }
672
+ interface MusterMetadata {
673
+ total_number_of_SNPs: number;
674
+ last_updated: string;
675
+ version: string;
676
+ total_number_of_strains: number;
677
+ }
678
+ interface Strain {
679
+ bq_sample_id: number;
680
+ mpd_strainid: number;
681
+ strainname: string;
682
+ straintype: string;
683
+ }
684
+ interface Gene {
685
+ symbol: string;
686
+ chr: string;
687
+ start_position: number;
688
+ end_position: number;
689
+ strand: string;
690
+ description: string;
691
+ mginum: string;
692
+ markertype: string;
693
+ centimorgan: number;
694
+ featuretype: string;
695
+ }
696
+ interface ReferenceSNP {
697
+ chr: string;
698
+ start_position: number;
699
+ end_position?: number;
700
+ rsid: string;
701
+ }
702
+ interface MusterSearchParameters {
703
+ bq_sample_ids: null;
704
+ genes: string | null;
705
+ genes_data: Gene[];
706
+ limit: number;
707
+ mpd_strain_ids: string;
708
+ next_region: string | null;
709
+ offset: number;
710
+ query_regions: {
711
+ chromosome: string;
712
+ regions: SNPSearchRegion[];
713
+ }[];
714
+ regions: SNPSearchRegion[];
715
+ rsids: string | null;
716
+ rsids_data: ReferenceSNP[];
717
+ strain_limit: number;
718
+ strain_names: null;
719
+ dataset: Dataset;
720
+ }
721
+ interface SNPSearchProperties {
722
+ strains: number[];
723
+ strains_b?: number[];
724
+ rsids?: string[];
725
+ regions?: string[];
726
+ assembly: string;
727
+ genes?: string[];
728
+ offset?: number;
729
+ dataset_id?: number;
730
+ is_unique_row?: boolean;
731
+ }
732
+ interface GenotypeResults {
733
+ message: string | null;
734
+ next_region: string;
735
+ parameter: MusterSearchParameters;
736
+ snps: SNP[];
737
+ status: string;
738
+ total_rows: number;
739
+ }
740
+ declare enum DatasetStatus {
741
+ Queued = "queued",
742
+ Loading = "loading",
743
+ Done = "done",
744
+ Archived = "archived"
745
+ }
746
+ interface Dataset {
747
+ id: number;
748
+ display_name: string;
749
+ sort_by: number;
750
+ year: string;
751
+ procedure: string;
752
+ panel: string;
753
+ sex: string;
754
+ dataset_name: string;
755
+ source: string;
756
+ status: DatasetStatus;
757
+ num_of_strains: number;
758
+ pubmed: string;
759
+ description: string;
760
+ assembly_version: string;
761
+ }
762
+
763
+ declare class SnpGridService {
764
+ private readonly config;
765
+ private readonly http;
766
+ private api;
767
+ constructor();
768
+ /**
769
+ * Returns the result of a health check for the API
770
+ */
771
+ getHealthCheck(): Observable<MusterHealthCheck>;
772
+ /**
773
+ * Returns the metadata on the MUSter DB
774
+ */
775
+ getMusterMetadata(): Observable<MusterMetadata>;
776
+ /**
777
+ * Returns strains available in the API and takes an optional limit; by default the limit is set
778
+ * to 5000 to get all strains
779
+ * @param limit - maximum number of strains to be returned
780
+ */
781
+ getStrains(limit?: number): Observable<Strain[]>;
782
+ /**
783
+ * Returns a list of known genes whose symbols/coordinates start with the specified value.
784
+ * @param searchValue - value to use for the "starts with" filter
785
+ * @param limit - maximum number of genes to return, default is 20
786
+ */
787
+ getGenes(searchValue: string, limit?: number): Observable<Gene[]>;
788
+ /**
789
+ * Returns the gene that matches the specified gene symbol
790
+ * @param geneSymbol - symbol to use to get the associated gene info
791
+ */
792
+ getGene(geneSymbol: string): Observable<Gene | null>;
793
+ /**
794
+ * Returns true if the specified gene symbol is valid from the perspective of MUSter
795
+ * @param geneSymbol - symbol to use to check the validity of
796
+ */
797
+ isGeneSymbolValid(geneSymbol: string): Observable<boolean>;
798
+ /**
799
+ * Returns list of known reference SNP (RS) data which includes IDs and coordinates
800
+ * @param searchValue - value to use to filter the search results
801
+ * @param limit - maximum number of results to return, default is 20
802
+ */
803
+ getReferenceSNPs(searchValue: string, limit?: number): Observable<ReferenceSNP[]>;
804
+ /**
805
+ * Returns the RS info that matches the specified rsID
806
+ * @param rsid - the RSID to use to get the associated RS info
807
+ */
808
+ getReferenceSNP(rsid: string): Observable<ReferenceSNP | null>;
809
+ /**
810
+ * Returns true if the specified rsID is valid from the perspective of MUSter
811
+ * @param rsid - rsID to use to check the validity of
812
+ */
813
+ isRSIDValid(rsid: string): Observable<boolean>;
814
+ /**
815
+ * Returns the SNP results generated from the query constructed from the specified parameters and page
816
+ * @param parameters - search properties (strain IDs, regions, assembly version, etc.)
817
+ * @param page - requested page, which is 0-indexed. The 0th page is the initial page
818
+ * @param pageSize - number of records to show per page. Default of 5000
819
+ */
820
+ getGenotypes(parameters: SNPSearchProperties, page?: number, pageSize?: number): Observable<GenotypeResults>;
821
+ /**
822
+ * Returns the URL that will generate a download (in file form) for the specified strain IDs and regions
823
+ * @param strains - list of mpd_strain_ids to query SNPs for
824
+ * @param regions - list of SNPSearchRegions to query SNPs for (chromosome, start and end)
825
+ * @param dataset_id - ID of the dataset to query SNPs for
826
+ * @param is_unique_row - boolean for polymorphism filtering - true for only rows with polymorphism, false for all
827
+ * @param limit - the limit of the number of result rows to include in the download - you're likely to
828
+ * prefer to pass the total number of rows generated by the query itself, which is included
829
+ * as part of the GenotypeResults returned by getGenotypes()
830
+ */
831
+ getGenotypeDownloadURLForCurrentData(strains: number[], regions: SNPSearchRegion[], dataset_id: number | undefined, is_unique_row: boolean | undefined, limit: number): string;
832
+ /**
833
+ * Returns the dataset with the given ID
834
+ * @param id
835
+ */
836
+ getDataset(id: number): Observable<Dataset>;
837
+ /**
838
+ * Returns a list of Datasets that match the given criteria
839
+ * @param status The value of the status to be used for filtering
840
+ * @param limit The maximum number of records to return
841
+ */
842
+ findDatasets(status: DatasetStatus, limit?: number): Observable<Dataset[]>;
843
+ /**
844
+ * Return a list of strains that match the given criteria
845
+ * @param datasetId The ID of the dataset from which to fetch the strains
846
+ * @param limit The maximum number of records to return
847
+ */
848
+ datasetStrains(datasetId: number, limit?: number): Observable<Strain[]>;
849
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnpGridService, never>;
850
+ static ɵprov: i0.ɵɵInjectableDeclaration<SnpGridService>;
851
+ }
852
+
853
+ interface SnpGridServiceConfig {
854
+ apiUrl: string;
855
+ }
856
+ declare const SNP_GRID_SERVICE_CONFIG: InjectionToken<SnpGridServiceConfig>;
857
+
858
+ export { AsyncTaskService, DatasetStatus, ISADataService, ISA_DATA_SERVICE_CONFIG, JaxOntologyService, MUS_CHRS, MVAR_SERVICE_CONFIG, MVarService, MvarClientModule, OLSOntologyService, OntologyService, SNP_GRID_SERVICE_CONFIG, SnpGridClientModule, SnpGridService, WorkflowExecutionStatus };
859
+ export type { Call, Dataset, Gene, GenotypeResults, Input, InputReference, InputSubmission, IsaCharacteristic, IsaCharacteristicValue, IsaDataServiceConfig, MVarServiceConfig, Measure, MeasureMetadata, MeasureSeries, MeasureSeriesMetadata, MeasureValue, MusterHealthCheck, MusterMetadata, MusterSearchParameters, ReferenceSNP, Result, ResultReference, Run, SNP, SNPSearchProperties, SNPSearchRegion, SequenceOntologyTerm, SnpGridServiceConfig, Strain, Variant, VariantResults };