@jax-data-science/api-clients 0.0.1 → 0.0.2-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/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 The Jackson Laboratory
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,21 +1,133 @@
|
|
|
1
|
-
# api-clients
|
|
1
|
+
# @jax-data-science/api-clients by The Jackson Laboratory (JAX)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Overview
|
|
4
|
+
The library provides a centralized approach for frontend applications to interact with backend services across
|
|
5
|
+
the [JAX Data Science](https://www.jax.org/research-and-faculty/data-science/tools-and-databases) ecosystem.
|
|
6
|
+
It eliminates code duplication by offering reusable API clients with consistent error handling and authentication.
|
|
7
|
+
The library abstracts service communication details, allowing developers to focus on UI logic. All services are
|
|
8
|
+
configurable, handle errors uniformly, and define type-safe models for robust data handling.
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
Designed primarily for component consumption but usable independently, it ensures consistency and
|
|
11
|
+
maintainability as backend services evolve.
|
|
6
12
|
|
|
7
|
-
|
|
13
|
+
## Installation
|
|
8
14
|
|
|
15
|
+
```bash
|
|
16
|
+
npm install @jax-data-science/api-clients
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Available API Clients
|
|
20
|
+
|
|
21
|
+
> **Note**: For a complete list of API clients, visit our [Demo Application](https://jds-apps.jax.org/echo) or check the generated documentation.
|
|
9
22
|
|
|
10
|
-
##
|
|
23
|
+
## Quick Start
|
|
11
24
|
|
|
12
|
-
|
|
13
|
-
subject to change in releases.
|
|
25
|
+
### 1. Set needed service configuration in your application (e.g., base URL, timeout)
|
|
14
26
|
|
|
15
|
-
|
|
27
|
+
```typescript
|
|
28
|
+
/**
|
|
29
|
+
* app.module.ts
|
|
30
|
+
*/
|
|
16
31
|
|
|
32
|
+
...
|
|
33
|
+
// MY_SERVICE_CONFIG: injection token used to provide configuration values (like API urls) for MyService
|
|
34
|
+
// MyServiceConfig is an interface that defines the structure of the configuration object
|
|
35
|
+
import { MY_SERVICE_CONFIG, MyServiceConfig } from '@jax-data-science/api-clients';
|
|
36
|
+
...
|
|
37
|
+
|
|
38
|
+
...
|
|
39
|
+
@NgModule({
|
|
40
|
+
declarations: [...],
|
|
41
|
+
...
|
|
42
|
+
providers: [
|
|
43
|
+
{
|
|
44
|
+
provide(MY_SERVICE_CONFIG, {
|
|
45
|
+
useValue: {
|
|
46
|
+
baseUrl: 'https://api.example.com', // could also come from environment variables
|
|
47
|
+
timeout: 5000, // could also come from environment variables
|
|
48
|
+
} as MyServiceConfig
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
})
|
|
17
53
|
```
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### 2. Inject and use the API client in your components or services
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* example.component.ts
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
import { Component, OnInit } from '@angular/core';
|
|
66
|
+
|
|
67
|
+
import { MyService } from '@jax-data-science/api-clients';
|
|
68
|
+
|
|
69
|
+
@Component({
|
|
70
|
+
selector: 'app-example',
|
|
71
|
+
templateUrl: './example.component.html',
|
|
72
|
+
styleUrls: ['./example.component.css']
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
export class ExampleComponent implements OnInit {
|
|
76
|
+
data: any;
|
|
77
|
+
|
|
78
|
+
// Inject MyService into the component
|
|
79
|
+
constructor(private myService: MyService) {}
|
|
80
|
+
|
|
81
|
+
ngOnInit() {
|
|
82
|
+
// Use the service to fetch data
|
|
83
|
+
this.myService.getData().subscribe(
|
|
84
|
+
(response) => {
|
|
85
|
+
this.data = response;
|
|
86
|
+
},
|
|
87
|
+
(error) => {
|
|
88
|
+
console.error('Error fetching data:', error);
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Contributing
|
|
96
|
+
The JAX Data Science team welcomes and encourages collaborations!
|
|
97
|
+
|
|
98
|
+
### Ways to Contribute
|
|
99
|
+
|
|
100
|
+
- API Clients Development
|
|
101
|
+
|
|
102
|
+
- Testing & Quality Assurance
|
|
103
|
+
|
|
104
|
+
- Documentation
|
|
105
|
+
|
|
106
|
+
- Bug Fixes & Enhancements
|
|
107
|
+
|
|
108
|
+
### Reporting Issues
|
|
109
|
+
|
|
110
|
+
Found a bug or have a suggestion? Please email us at: npm@jax.org
|
|
111
|
+
|
|
112
|
+
When reporting issues please include:
|
|
113
|
+
|
|
114
|
+
- a clear description of the problem or suggestion
|
|
115
|
+
- steps to reproduce (for bugs)
|
|
116
|
+
- expected vs. actual behavior
|
|
117
|
+
- screenshots or code examples when applicable
|
|
118
|
+
- environment details (browser, framework version, etc.)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
## Changelog
|
|
122
|
+
|
|
123
|
+
For detailed release notes and version history, see [CHANGELOG.md](./CHANGELOG.md).
|
|
124
|
+
|
|
125
|
+
## More Information
|
|
126
|
+
|
|
127
|
+
**GitHub Repo**: [jds-ui-components](https://github.com/TheJacksonLaboratory/jds-ui-components)
|
|
128
|
+
|
|
129
|
+
**Maintained By**: JAX Data Science
|
|
130
|
+
|
|
131
|
+
**Contact**: npm@jax.org
|
|
132
|
+
|
|
133
|
+
**Demo Application**: [View JDS Components](https://jds-apps.jax.org/echo)
|
|
@@ -941,27 +941,10 @@ class SnpGridService {
|
|
|
941
941
|
http;
|
|
942
942
|
environment;
|
|
943
943
|
api;
|
|
944
|
-
// default true but becomes false if any of the API calls for general information fails
|
|
945
|
-
apiAvailable = true;
|
|
946
|
-
strains = new BehaviorSubject([]);
|
|
947
|
-
strains$ = this.strains.asObservable();
|
|
948
944
|
constructor(http, environment) {
|
|
949
945
|
this.http = http;
|
|
950
946
|
this.environment = environment;
|
|
951
947
|
this.api = environment.securedURLs.genomeMUSter;
|
|
952
|
-
this.getHealthCheck().subscribe({
|
|
953
|
-
error: () => {
|
|
954
|
-
this.apiAvailable = false;
|
|
955
|
-
},
|
|
956
|
-
});
|
|
957
|
-
this.getStrains().subscribe({
|
|
958
|
-
next: (strains) => {
|
|
959
|
-
this.apiAvailable = Boolean(strains.length);
|
|
960
|
-
},
|
|
961
|
-
error: () => {
|
|
962
|
-
this.apiAvailable = false;
|
|
963
|
-
},
|
|
964
|
-
});
|
|
965
948
|
}
|
|
966
949
|
/**
|
|
967
950
|
* Returns the result of a health check for the API
|
|
@@ -974,7 +957,6 @@ class SnpGridService {
|
|
|
974
957
|
*/
|
|
975
958
|
getMusterMetadata() {
|
|
976
959
|
return this.http.get(`${this.api}/db_info`).pipe(catchError((err) => {
|
|
977
|
-
this.apiAvailable = false;
|
|
978
960
|
throw err;
|
|
979
961
|
}));
|
|
980
962
|
}
|
|
@@ -984,9 +966,7 @@ class SnpGridService {
|
|
|
984
966
|
* @param limit - maximum number of strains to be returned
|
|
985
967
|
*/
|
|
986
968
|
getStrains(limit = 5000) {
|
|
987
|
-
return this.http
|
|
988
|
-
.get(`${this.api}/strains/?limit=${limit}`)
|
|
989
|
-
.pipe(tap((strains) => this.strains.next(strains.filter((s) => s.mpd_strainid))));
|
|
969
|
+
return this.http.get(`${this.api}/strains/?limit=${limit}`).pipe(map((strains) => strains.filter((s) => s.mpd_strainid)));
|
|
990
970
|
}
|
|
991
971
|
/**
|
|
992
972
|
* Returns a list of known genes whose symbols/coordinates start with the specified value.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jax-data-science-api-clients.mjs","sources":["../../../../libs/api-clients/src/lib/services/base.service.ts","../../../../libs/api-clients/src/lib/services/asynctask/asynctask.service.ts","../../../../libs/api-clients/src/lib/services/asynctask/asynctask.model.ts","../../../../libs/api-clients/src/lib/tokens/isa-data-config.token.ts","../../../../libs/api-clients/src/lib/services/isa-data/isa-data.service.ts","../../../../libs/api-clients/src/lib/models/isa-data/isa-data.model.ts","../../../../libs/api-clients/src/lib/services/mvar/models/response/dtos.ts","../../../../libs/api-clients/src/lib/services/mvar/mvar.service.ts","../../../../libs/api-clients/src/lib/services/mvar/mvar-client.module.ts","../../../../libs/api-clients/src/lib/services/ontology/ontology.service.base.ts","../../../../libs/api-clients/src/lib/services/ontology/ontology.model.ts","../../../../libs/api-clients/src/lib/services/ontology/ontology.shared.ts","../../../../libs/api-clients/src/lib/services/ontology/ontology.service.jax.ts","../../../../libs/api-clients/src/lib/services/ontology/ontology.service.ols.ts","../../../../libs/api-clients/src/lib/services/snp-grid/snp-grid.service.ts","../../../../libs/api-clients/src/lib/services/snp-grid/snp-grid-client.module.ts","../../../../libs/api-clients/src/lib/services/snp-grid/models/response/dtos.ts","../../../../libs/api-clients/src/index.ts","../../../../libs/api-clients/src/jax-data-science-api-clients.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { HttpClient, HttpErrorResponse, HttpParams } from '@angular/common/http';\nimport { catchError, map, Observable, throwError } from 'rxjs';\n\n// models\nimport { ErrorResponse } from './../models/error';\nimport { Response, CollectionResponse } from './../models/response';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ApiBaseServiceFactory {\n constructor(private http: HttpClient) { }\n\n create(baseUrl: string): ApiBaseService {\n return new ApiBaseService(this.http, baseUrl);\n }\n}\n\nexport class ApiBaseService {\n constructor(\n private http: HttpClient,\n private baseUrl: string,\n ) {}\n\n /**\n * Handles API response errors and HTTP errors\n * @param response The API response\n * @private\n */\n private handleResponse<T>(\n response: Response<T> | CollectionResponse<T>,\n ): Response<T> | CollectionResponse<T> {\n if(response.errors) {\n // TO-DO: [GIK 6/6/2025] once the API service has the capabilities to respond\n // with meaningful validation and analytical errors, this will need to be\n // updated to typecast these into the ErrorResponse model and rethrow the error object\n throw new Error(response.errors.join(', '));\n }\n return response;\n }\n\n /**\n * Handles HTTP errors by catching them and rethrowing a consistent\n * error response that contains an error code, numeric code, and\n * a user-friendly message.\n * TO-DO: [GIK 6/10/2025] consider adding error logging capabilities to an external service\n * @param error an error object, typically an HttpErrorResponse\n * @returns an Observable that emits an ErrorResponse object\n */\n private handleHttpError(error: any): Observable<never> {\n let errorResponse: ErrorResponse;\n\n // errors returned on the Observable response stream\n // will be wrapped in an HttpErrorResponse class\n if(error.name === 'HttpErrorResponse') {\n errorResponse = {\n code: error.statusText || 'HTTP_ERROR',\n num_code: error.status,\n message: this.getErrorMessage(error),\n };\n } else {\n errorResponse = {\n code: 'UNKNOWN_ERROR',\n num_code: 0,\n message: error.message || 'An unknown error occurred',\n }\n }\n\n return throwError(() => errorResponse);\n }\n\n /**\n * Get a user-friendly error message based on the HTTP status code\n *\n * @param error\n * @return a string containing the error message\n */\n getErrorMessage(error: HttpErrorResponse): string {\n switch(error.status) {\n case 400:\n return 'Bad request - malformed request syntax or invalid parameters';\n break;\n case 401:\n return 'Unauthorized - authentication required or invalid credentials';\n break;\n case 403:\n return 'Forbidden - the authenticated user does not have permission to perform the operation';\n break;\n case 404:\n return 'Not found - the requested resource does not exist';\n break;\n case 422:\n return 'Unprocessable content - the request is correctly formed but contained semantic errors';\n break;\n case 500:\n return 'Internal Server Error - generic server-side error';\n break;\n default:\n return `Unexpected error occurred - status code: ${error.status}`;\n }\n }\n\n /**\n * Get a single resource\n * @param url The endpoint URL\n * @param params Optional query parameters\n */\n get<T>(url: string, params?: HttpParams): Observable<Response<T>> {\n return this.http.get<Response<T>>(`${this.baseUrl}${url}`, { params }).pipe(\n map((response) => this.handleResponse(response)),\n catchError((error) => this.handleHttpError(error)),\n );\n }\n\n /**\n * Get a collection of resources\n * @param url The endpoint URL\n * @param params Optional query parameters\n */\n private handleCollectionResponse<T>(\n response: CollectionResponse<T>,\n ): CollectionResponse<T> {\n if (response.errors) {\n throw new Error(response.errors.join(', '));\n }\n return response;\n }\n\n getCollection<T>(\n url: string,\n params?: HttpParams,\n ): Observable<CollectionResponse<T>> {\n return this.http\n .get<CollectionResponse<T>>(`${this.baseUrl}${url}`, { params })\n .pipe(\n map((response) => this.handleCollectionResponse(response)),\n catchError((error) => this.handleHttpError(error)),\n );\n }\n\n /**\n * Create a new resource\n * @param url The endpoint URL\n * @param body The resource to create\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n post<T>(url: string, body: any): Observable<Response<T>> {\n return this.http.post<Response<T>>(`${this.baseUrl}${url}`, body).pipe(\n map((response) => this.handleResponse(response)),\n catchError((error) => this.handleHttpError(error)),\n );\n }\n\n /**\n * Update an existing resource\n * @param url The endpoint URL\n * @param body The resource updates\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n put<T>(url: string, body: any): Observable<Response<T>> {\n return this.http.put<Response<T>>(`${this.baseUrl}${url}`, body).pipe(\n map((response) => this.handleResponse(response)),\n catchError((error) => this.handleHttpError(error)),\n );\n }\n\n /**\n * Partially update an existing resource\n * @param url The endpoint URL\n * @param body The partial resource updates\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n patch<T>(url: string, body: any): Observable<Response<T>> {\n return this.http.patch<Response<T>>(`${this.baseUrl}${url}`, body).pipe(\n map((response) => this.handleResponse(response)),\n catchError((error) => this.handleHttpError(error)),\n );\n }\n\n /**\n * Delete a resource\n * @param url The endpoint URL\n */\n delete<T>(url: string): Observable<Response<T>> {\n return this.http.delete<Response<T>>(`${this.baseUrl}${url}`).pipe(\n map((response) => this.handleResponse(response)),\n catchError((error) => this.handleHttpError(error)),\n );\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { Observable, Subscriber } from 'rxjs';\nimport { fetchEventSource, EventSourceMessage } from '@microsoft/fetch-event-source';\n// services\nimport { ApiBaseService, ApiBaseServiceFactory } from '../base.service';\n// models\nimport {\n Input,\n InputReference,\n InputSubmission,\n Result,\n ResultReference,\n Run\n} from './asynctask.model';\nimport { CollectionResponse, Response } from '../../models/response';\nimport { ErrorResponse } from '../../models/error';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AsyncTaskService {\n // TO-DO [GIK 7/9/2025]: move 'https://astra-dev.jax.org' to an environment variable\n private apiBaseUrl = '/asynctask/api';\n\n private apiServiceFactory: ApiBaseServiceFactory = inject(ApiBaseServiceFactory);\n\n private apiBaseService: ApiBaseService =\n this.apiServiceFactory.create(this.apiBaseUrl);\n\n setApiBaseUrl(baseUrl: string): void {\n this.apiBaseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl;\n\n // ensure the URL ends with '/asynctask/api'\n if(!this.apiBaseUrl.endsWith('asynctask/api')) {\n this.apiBaseUrl = `${this.apiBaseUrl}/asynctask/api`;\n }\n\n // recreate the apiService\n this.apiBaseService = this.apiServiceFactory.create(this.apiBaseUrl);\n }\n\n getApiBaseUrl(): string {\n return this.apiBaseUrl;\n }\n\n // INPUT\n addInput(inputSubmission: InputSubmission): Observable<Response<Input>> {\n return this.apiBaseService.post<Input>('/inputs', inputSubmission);\n }\n getInput(id: number): Observable<Response<Input>> {\n return this.apiBaseService.get<Input>(`/inputs/${id}`);\n }\n getInputs(): Observable<CollectionResponse<InputReference>> {\n return this.apiBaseService.getCollection<InputReference>('/inputs');\n }\n\n /**\n * Updates an existing input - only 'name' and 'description' can be updated\n * @param inputId\n * @param name - (optional) name to update\n * @param description - (optional) description to update\n */\n updateInput(inputId: number, name?: string, description?: string): Observable<Response<InputReference>> {\n let url = `/inputs/${inputId}?`;\n if(name !== undefined) {\n url += `name=${name}&`;\n }\n if(description !== undefined) {\n url += `description=${description}`;\n }\n\n return this.apiBaseService.patch<InputReference>(url, null);\n }\n\n // RUN\n createRun(inputId?: number, inputSubmission?: InputSubmission): Observable<Response<Run>> {\n const url = inputId ? `/runs?input_id=${inputId}` : '/runs';\n\n return this.apiBaseService.post<Run>(url, inputSubmission || null);\n }\n\n getRun(id: number): Observable<Response<Run>> {\n return this.apiBaseService.get<Run>(`/runs/${id}`);\n }\n\n /**\n *\n * @param workflowId - (optional) workflow identifier\n */\n getRuns(workflowId?: string): Observable<CollectionResponse<Run>> {\n const url = (workflowId ? `/runs?workflow_id=${workflowId}` : '/runs');\n\n return this.apiBaseService.getCollection<Run>(url);\n }\n\n /**\n * Gets the input associated with the specific run ID. One run is associated\n * with only one input, so this function returns a single input object.\n * @param runId\n */\n getRunInput(runId: number): Observable<Response<Input>> {\n return this.apiBaseService.get<Input>(`/runs/${runId}/inputs`);\n }\n\n /**\n * Gets the result associated with the specific run ID. One run is associated\n * with only one result, so this function returns a single result object.\n * @param runId\n */\n getRunResult(runId: number): Observable<Response<Result>> {\n return this.apiBaseService.get<Result>(`/runs/${runId}/results`);\n }\n\n /**\n * Calls the fetchEventSource() function, which is a wrapper around the native\n * EventSource API. This function is used to establish connection to an API\n * endpoint and listen to event streaming data associated with task runs.\n * TO-DO [GIK 7/9/2025]: needs to add a reconnect logic\n * @return an observable that emits run events\n */\n getRunEvents(accessToken: string): Observable<Run> {\n const api = this.apiBaseService\n // observable constructor argument is 'subscribe()' method implementation\n return new Observable<Run>(\n (subscriber: Subscriber<Run>) => {\n // abort controller to cancel the request (on component destroy)\n const abortController = new AbortController();\n\n fetchEventSource(`${this.apiBaseUrl}/runs/events`, {\n method: 'GET',\n headers: {\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache',\n 'Authorization': `Bearer ${accessToken}`\n },\n\n async onopen(response): Promise<void> {\n // SSE media type must be 'text/event-stream'\n const contentType = response.headers.get('content-type');\n\n if(!contentType?.startsWith('text/event-stream')) {\n const errorResponse: ErrorResponse = {\n code: 'INVALID_CONTENT_TYPE',\n num_code: response.status,\n message: `Expected content-type to be text/event-stream, but got: ${contentType}`\n };\n throw errorResponse;\n }\n\n // resolve promise (without returning anything), which indicates that the connection is open\n if(response.ok && response.status === 200) return;\n\n // opening SSE connection failed\n if(response.status >= 400 && response.status < 500 && response.status !== 429) {\n const errorResponse: ErrorResponse = {\n code: 'RESOURCE_NOT_FOUND',\n num_code: response.status,\n message: 'Resource not found or access denied'\n }\n throw errorResponse;\n }\n },\n onmessage(event: EventSourceMessage) {\n try {\n const run: Run = JSON.parse(event.data) as Run;\n subscriber.next(run);\n } catch(error) {\n const errorResponse: ErrorResponse = {\n code: 'PARSE_ERROR',\n num_code: 0,\n message: `Failed to parse event data: ${event.data}`\n }\n throw errorResponse;\n }\n },\n onclose(): void {\n subscriber.complete();\n },\n onerror(errorRes: ErrorResponse): void {\n // send an error message to subscriber's error handler\n subscriber.error(errorRes);\n // rethrow the error to stop the operation\n throw errorRes;\n },\n signal: abortController.signal\n });\n\n return () => {\n abortController.abort(); // close connection on unsubscribe\n }\n });\n }\n\n // RESULT\n getResult(resId: number): Observable<Response<Result>> {\n return this.apiBaseService.get<Result>(`/results/${resId}`);\n }\n\n getResults(): Observable<CollectionResponse<ResultReference>> {\n return this.apiBaseService.getCollection<ResultReference>('/results');\n }\n\n /**\n * Updates an existing result record - 'name' and 'description' can be updated\n * @param resId\n * @param name - (optional) result's name to update\n * @param description - (optional) result's description to update\n */\n updateResult(resId: number, name?: string, description?: string): Observable<Response<ResultReference>> {\n let url = `/results/${resId}?`;\n if(name !== undefined) {\n url += `name=${name}&`;\n }\n if(description !== undefined) {\n url += `description=${description}`;\n }\n \n return this.apiBaseService.patch<ResultReference>(url, null);\n }\n\n // HEALTH CHECK\n // TO-DO [GIK 05/30/2025]: should be moved outside this service\n getHealthCheck(): Observable<any> {\n return this.apiBaseService.get<any>('/monitors/servers/health');\n }\n}\n","/**\n * AsyncTask Service Models\n * \n * This module contains TypeScript interfaces for the AsyncTask service API.\n * These models are based on the OpenAPI specification and represent the\n * core entities used in the AsyncTask workflow system.\n */\n\n/**\n * Represents the current execution status of a workflow.\n * Based on temporalio.api.enums.v1.WorkflowExecutionStatus\n */\nexport enum WorkflowExecutionStatus {\n RUNNING = 1,\n COMPLETED = 2,\n FAILED = 3,\n CANCELED = 4,\n TERMINATED = 5,\n CONTINUED_AS_NEW = 6,\n TIMED_OUT = 7\n}\n\n/**\n * Represents a configuration of input parameters for a workflow run.\n */\nexport interface Input {\n /**\n * Auto-generated primary key\n */\n id?: number | null;\n \n /**\n * Type of the input\n */\n type?: string | null;\n \n /**\n * Foreign key to the user who created this input\n */\n owner_id: number;\n \n /**\n * JSON dictionary containing input parameters\n */\n values: Record<string, any>;\n \n /**\n * Optional descriptive name\n */\n name?: string | null;\n \n /**\n * Optional detailed description\n */\n description?: string | null;\n}\n\n/**\n * Lightweight reference to an input configuration.\n * Used for list endpoints to minimize data transfer.\n */\nexport interface InputReference {\n /**\n * Input identifier\n */\n id: number;\n \n /**\n * Optional descriptive name\n */\n name?: string | null;\n \n /**\n * Optional detailed description\n */\n description?: string | null;\n}\n\n/**\n * Input submission for creating a new workflow run\n */\nexport interface InputSubmission {\n /**\n * Optional descriptive name\n */\n name?: string | null;\n \n /**\n * Optional detailed description\n */\n description?: string | null;\n \n /**\n * Type of task to execute\n */\n task_type: string;\n \n /**\n * Input values specific to the task type\n */\n values: Record<string, any> | string;\n }\n \n\n/**\n * Represents output data from a completed workflow run.\n */\nexport interface Result {\n /**\n * Auto-generated primary key\n */\n id: number;\n \n /**\n * Foreign key to the associated run\n */\n run_id: number;\n \n /**\n * JSON dictionary containing result data\n */\n values: Record<string, any>;\n \n /**\n * Optional descriptive name\n */\n name?: string | null;\n \n /**\n * Optional detailed description\n */\n description?: string | null;\n}\n\n/**\n * Lightweight reference to a result.\n * Used for list endpoints to minimize data transfer.\n */\nexport interface ResultReference {\n /**\n * Result identifier\n */\n id: number;\n \n /**\n * Associated run identifier\n */\n run_id: number;\n \n /**\n * Optional descriptive name\n */\n name?: string | null;\n \n /**\n * Optional detailed description\n */\n description?: string | null;\n}\n\n/**\n * Represents an execution instance of a workflow.\n */\nexport interface Run {\n /**\n * Auto-generated primary key\n */\n id: number;\n \n /**\n * Foreign key to the input configuration\n */\n input_id: number;\n \n /**\n * Foreign key to the user who initiated the run\n */\n owner_id: number;\n \n /**\n * Temporal workflow identifier\n */\n workflow_id: string;\n \n /**\n * Current execution status from Temporal\n */\n status: WorkflowExecutionStatus;\n\n /**\n * Run start time in ISO 8601 format\n */\n init_time?: string | null; // ISO 8601 format\n}\n","import { InjectionToken } from '@angular/core';\n\nexport interface IsaDataServiceConfig {\n baseUrl: string;\n}\n\nexport const ISA_DATA_SERVICE_CONFIG = new InjectionToken<IsaDataServiceConfig>(\n 'ISA_DATA_SERVICE_CONFIG'\n);","import { Injectable, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\n// services\nimport { ApiBaseService, ApiBaseServiceFactory } from '../base.service';\n// models\nimport { Response } from '../../models/response';\nimport { ErrorResponse } from '../../models/error';\nimport {\n MeasureSeriesMetadata,\n MeasureMetadata,\n IsaCharacteristic\n} from '../../models/isa-data/isa-data.model';\n// tokens\nimport {\n ISA_DATA_SERVICE_CONFIG,\n IsaDataServiceConfig\n} from '../../tokens/isa-data-config.token';\n\n/**\n * service for interacting with ISA (Investigation-Study-Assay) data model API.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ISADataService {\n private readonly apiConfig: IsaDataServiceConfig = inject(ISA_DATA_SERVICE_CONFIG);\n private readonly apiServiceFactory: ApiBaseServiceFactory = inject(ApiBaseServiceFactory);\n private readonly apiBaseService: ApiBaseService;\n\n constructor() {\n this.apiBaseService = this.apiServiceFactory.create(this.apiConfig.baseUrl);\n }\n\n getApiBaseUrl(): string {\n return this.apiConfig.baseUrl;\n }\n\n // measure operations\n\n /**\n * Fetches measure series metadata for the given measure series IDs and study IDs.\n *\n * @param measureSeriesIds - measure series identifiers to fetch metadata for. ONLY ONE ID IS SUPPORTED.\n * @param studyIds - ONLY ONE ID IS SUPPORTED. REQUIRED!! WILL BE REMOVED IN THE FUTURE.\n *\n * @return Observable<Response<MeasureSeriesMetadata>> - an observable containing the measure series metadata.\n */\n getMeasureSeriesMetadata(measureSeriesIds: string[], studyIds: string[]) :\n Observable<Response<MeasureSeriesMetadata>> {\n if(!measureSeriesIds?.length) {\n const errorResponse: ErrorResponse = {\n code: 'BAD_REQUEST',\n num_code: 400,\n message: 'missing required parameter: measureSeriesIds',\n };\n\n throw errorResponse;\n }\n\n\n const url = this.buildUrl('/visualization/measures/metadata', {\n measureSeriesIds: measureSeriesIds.join(','),\n studyId: studyIds.join(',')\n });\n\n\n return this.apiBaseService.get<MeasureSeriesMetadata>(url);\n }\n\n /**\n * THIS METHOD SHOULD NOT BE USED. PLACEHOLDER FOR FUTURE IMPLEMENTATION ONCE THE API GROWS.\n */\n getMeasuresMetadata(measureIds: string[], studyIds: string[]) :\n Observable<Response<MeasureMetadata>> {\n const reqUrl = '';\n return this.apiBaseService.get<MeasureMetadata>(reqUrl);\n }\n\n /**\n * Fetches measure series characteristics for the given measure series IDs and study IDs.\n *\n * @param measureSeriesIds - measure series identifiers to fetch metadata for. ONLY ONE ID IS SUPPORTED.\n * @param studyIds - ONLY ONE ID IS SUPPORTED. REQUIRED!! WILL BE REMOVED IN THE FUTURE.\n *\n * @return Observable<Response<MeasureSeriesMetadata>> - an observable containing the measure series metadata.\n */\n getMeasureSeriesCharacteristics(measureSeriesIds: string[], studyIds: string[]) :\n Observable<Response<IsaCharacteristic>> {\n if(!measureSeriesIds?.length) {\n const errorResponse: ErrorResponse = {\n code: 'BAD_REQUEST',\n num_code: 400,\n message: 'missing required parameter: measureSeriesIds',\n };\n\n throw errorResponse;\n }\n\n const url = this.buildUrl('/visualization/measures/characteristics', {\n measureSeriesIds: measureSeriesIds.join(','),\n studyIds: studyIds.join(',')\n });\n\n\n return this.apiBaseService.get(url);\n }\n\n // ASSAYS: to-be-implemented\n\n /**\n * Placeholder for assay operations\n * TODO: Implement assay-related methods\n */\n\n // STUDIES: to-be-implemented\n\n /**\n * Placeholder for study operations\n * TODO: Implement study-related methods\n */\n\n // INVESTIGATIONS: to-be-implemented\n\n /**\n * Placeholder for investigation operations\n * TODO: Implement investigation-related methods\n */\n\n /**\n * Builds the URL for the ISA data service.\n *\n * @param endpoint - the API endpoint path.\n * @param params - optional query parameters as key-value pairs.\n *\n * @return complete URL with query string parameters.\n */\n private buildUrl(endpoint: string, params: Record<string, string>) {\n const queryParams = new URLSearchParams(params).toString();\n\n return queryParams ? `${endpoint}?${queryParams}` : endpoint;\n }\n\n // HEALTH CHECK\n // TO-DO [GIK 05/30/2025]: should be moved outside this service\n getHealthCheck(): Observable<any> {\n return this.apiBaseService!.get<any>('/monitors/servers/health');\n }\n}\n","/**\n * This module defines the data models for representing the Investigation-Study-Assay (ISA)\n * data model, which is a standard for describing life science experiments and their results.\n *\n * Key Concepts:\n * - Investigation: The overall research project or study.\n * - Study: A specific experimental design within an investigation.\n * - Assay: A specific test or measurement performed on samples within a study.\n *\n * Measures represent the actual data points collected from assay executions, including:\n * - Measure: a single assay results with unique identifier\n * - MeasureSeries: a collection of measures that share common metadata and characteristics\n *\n * Each measure/series contains values, metadata about the experimental conditions,\n * and characteristics that describe sample properties or experimental parameters.\n */\n\nexport interface Measure {\n id: string;\n values?: MeasureValue[];\n metadata?: MeasureMetadata;\n characteristics?: IsaCharacteristic[];\n}\n\nexport interface MeasureSeries {\n id: string;\n values?: MeasureValue[];\n measures?: string[];\n metadata?: MeasureSeriesMetadata;\n characteristics?: IsaCharacteristic[];\n}\n\nexport interface MeasureMetadata {\n assay_id: number;\n description: string;\n measure_id: number;\n method: string;\n study_id: string;\n units: string;\n treatment: string;\n variable_name: string;\n\n characteristics?: Record<string, string[]>\n}\n\nexport interface MeasureSeriesMetadata {\n assay_id: number;\n description: string;\n initiated_at_units?: string;\n measure_ids: string[];\n measure_series_id: string;\n measurement_units: string;\n method: string;\n study_id?: number;\n treatment: string;\n treatment_units: string;\n variable_name: string;\n\n characteristics?: Record<string, string[]>;\n};\n\nexport interface MeasureValue {\n value: string | number;\n measure_id: string;\n measure_series_id?: string;\n study_id?: string;\n source_id: string;\n}\n\nexport interface IsaCharacteristicValue {\n value: string | number | boolean | Date;\n label: string; // e.g., 'High', 'Low', 'Positive', '2023-10-01'\n count?: number;\n description?: string; // optional description of the characteristic value\n metadata: Record<string, string>; // additional metadata about the characteristic value\n}\n\nexport interface IsaCharacteristic {\n name: string;\n value: IsaCharacteristicValue | IsaCharacteristicValue[];\n type?: string; // e.g., 'text', 'numeric', 'date'\n unit?: string; // e.g., 'mg/L', 'Celsius'\n description?: string; // optional description of the characteristic\n}\n","export interface VariantResults {\n variantCount: number;\n variants: Variant[];\n}\n\nexport interface Variant {\n accession: string;\n alt: string;\n aminoAcidChange: string;\n assembly: string;\n canonVarIdentifier: {\n caID: string;\n id: number;\n variantRefTxt: string;\n };\n chr: string;\n dnaHgvsNotation: string;\n functionalClassCode: string;\n functionalClasses: SequenceOntologyTerm[]; // added artificially\n gene: {\n chr: string;\n description: string;\n ensemblGeneId: string;\n entrezGeneId: string;\n id: number;\n mgiId: string;\n name: string;\n symbol: string;\n synonyms: {\n id: number;\n }[];\n transcripts: {\n id: number;\n }[];\n type: string;\n };\n id: number;\n impact: string;\n parentRefInd: boolean;\n position: number;\n proteinHgvsNotation: string;\n proteinPosition: string;\n ref: string;\n sources: {\n id: number;\n name: string;\n sourceVersion: string;\n url: string;\n }[];\n transcripts: {\n description: string;\n geneSymbol: string;\n id: number;\n mRnaId: string;\n primaryIdentifier: string;\n }[];\n type: string;\n variantHgvsNotation: string;\n variantRefTxt: string;\n}\n\nexport interface SequenceOntologyTerm {\n definition: string;\n id: number;\n label: string;\n soId: string;\n subClassOf: string;\n mpdTerm: string;\n}\n\n\nexport interface SNP {\n alternate_bases: string;\n calls: Call[];\n chr: string;\n observed: string;\n reference_base: string;\n rs: string;\n start_position: number | null; // allow for null value for gutter row\n annotation?: Variant | null;\n}\n\nexport interface Call {\n strain_name: string;\n sample_id: number;\n genotype: string;\n prob: number;\n base: string;\n}\n\nexport interface SNPSearchRegion {\n chromosome: string;\n start_position: number;\n end_position: number;\n reference_base?: string;\n alternate_base?: string;\n}\n\n// TODO - move to constants file/library\nexport const MUS_CHRS = [\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10',\n '11',\n '12',\n '13',\n '14',\n '15',\n '16',\n '17',\n '18',\n '19',\n 'X',\n 'Y',\n];\n","import { Inject, Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { BehaviorSubject, combineLatest, map, Observable, tap } from \"rxjs\";\n\nimport { MUS_CHRS, SequenceOntologyTerm, SNP, SNPSearchRegion, Variant, VariantResults } from './models/response/dtos';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MVarService {\n\n private api;\n\n sequenceOntologyMapping: Record<string, SequenceOntologyTerm> = {};\n\n private soTerms: BehaviorSubject<SequenceOntologyTerm[]> = new BehaviorSubject(<SequenceOntologyTerm[]>[]);\n soTerms$: Observable<SequenceOntologyTerm[]> = this.soTerms.asObservable();\n\n constructor(private http: HttpClient, @Inject('environment') private environment: any) {\n this.api = environment.unsecuredURLs.mvar;\n\n // create a sequence ontology lookup\n this.getSequenceOntologyTerms().subscribe((terms) => {\n terms.forEach((t) => {\n if (t.label) {\n this.sequenceOntologyMapping[t.label] = t;\n }\n });\n });\n }\n\n /**\n * Gets Variants from mvar for a given set snp regions\n * @param regions Array of snp regions\n * @param pageStart snp start location\n * @param pageEnd snp end location\n * @param assembly Desired assembly version. Acceptable values are 'mm10' (GRCm38) and 'mm39' (GRCm39)\n */\n getVariants(regions: SNPSearchRegion[], pageStart: SNP, pageEnd: SNP, assembly: string): Observable<Variant[]> {\n return combineLatest(\n this.getRegionsToRequestVariantsFor(regions, pageStart, pageEnd).map((r) => {\n return this.http.get<VariantResults>(\n `${this.api}/variant/query?chr=${r.chromosome}&startPos=${r.start_position}&endPos=${r.end_position}&max=8000&assembly=${assembly}`,\n );\n }),\n ).pipe(\n map((variants: VariantResults[]) => {\n const allVariants = variants.map((v) => v.variants).flat();\n allVariants.forEach((variant: Variant) => {\n const classCodes = variant.functionalClassCode.split(',')[0];\n // add the ontology term\n variant.functionalClasses = classCodes.split('&').map((c) => this.sequenceOntologyMapping[c]);\n });\n return allVariants;\n }),\n );\n }\n\n /**\n * Returns all sequence ontology terms in MVAR\n */\n getSequenceOntologyTerms(): Observable<SequenceOntologyTerm[]> {\n return this.http\n .get<SequenceOntologyTerm[]>(`${this.api}/sequenceOntology/query?max=3000`)\n .pipe(tap((terms) => this.soTerms.next(terms)));\n }\n\n /**\n * Translates the regions requested from MUSter and the regions actually displayed on the current page into\n * regions to request from MVAR\n * @param requestedRegions - regions included in the request to MUSter\n * @param pageStart - first SNP from the sorted results from MUSter to display in the table\n * @param pageEnd - last SNP from the sorted results from MUSter to display in the table\n */\n getRegionsToRequestVariantsFor(\n requestedRegions: SNPSearchRegion[],\n pageStart: SNP,\n pageEnd: SNP,\n ): SNPSearchRegion[] {\n const displayStartBP = pageStart.start_position || 0;\n const displayEndBP = pageEnd.start_position || 0;\n const regionsByChr: Record<string, SNPSearchRegion[]> = {};\n requestedRegions.forEach((r) => {\n if (regionsByChr[r.chromosome]) {\n regionsByChr[r.chromosome].push(r);\n } else {\n regionsByChr[r.chromosome] = [r];\n }\n });\n\n const displayedRegions: SNPSearchRegion[] = [];\n if (pageStart.chr === pageEnd.chr) {\n regionsByChr[pageStart.chr].forEach((r) => {\n if (r.start_position <= displayEndBP && r.end_position >= displayStartBP) {\n displayedRegions.push({\n chromosome: r.chromosome,\n start_position: Math.max(r.start_position, displayStartBP),\n end_position: Math.min(r.end_position, displayEndBP),\n });\n }\n });\n } else {\n const displayedChrs = Object.keys(regionsByChr).filter(\n (r) =>\n MUS_CHRS.indexOf(r) >= MUS_CHRS.indexOf(pageStart.chr) &&\n MUS_CHRS.indexOf(r) <= MUS_CHRS.indexOf(pageEnd.chr),\n );\n\n displayedChrs.forEach((chr) => {\n regionsByChr[chr].forEach((r) => {\n if (r.end_position >= displayStartBP && chr === pageStart.chr) {\n displayedRegions.push({\n chromosome: r.chromosome,\n start_position: Math.max(r.start_position, displayStartBP),\n end_position: r.end_position,\n });\n } else if (r.start_position <= displayEndBP && chr === pageEnd.chr) {\n displayedRegions.push({\n chromosome: r.chromosome,\n start_position: r.start_position,\n end_position: Math.min(r.end_position, displayEndBP),\n });\n } else if (chr !== pageStart.chr && chr !== pageEnd.chr) {\n displayedRegions.push({\n chromosome: r.chromosome,\n start_position: r.start_position,\n end_position: r.end_position,\n });\n }\n });\n });\n }\n\n return displayedRegions;\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MVarService } from \"./mvar.service\";\n\n@NgModule({\n imports: [CommonModule],\n})\nexport class MvarClientModule {\n\n public static forRoot(environment: any): ModuleWithProviders<MvarClientModule> {\n return {\n ngModule: MvarClientModule,\n providers: [\n MVarService,\n {\n provide: 'environment', // you can also use InjectionToken\n useValue: environment\n }\n ]\n };\n }\n\n}\n","import { Observable } from 'rxjs';\nimport { Ontology, OntologyTerm } from './ontology.model';\nimport { CollectionResponse, Response } from '../../models/response';\n\nexport abstract class OntologyService {\n abstract search(query: string, limit: number, ontology: Ontology): Observable<CollectionResponse<OntologyTerm>>;\n abstract term(id: string): Observable<Response<OntologyTerm>>;\n abstract parents(id: string): Observable<CollectionResponse<OntologyTerm>>;\n abstract children(id: string): Observable<CollectionResponse<OntologyTerm>>;\n abstract ancestors(id: string): Observable<CollectionResponse<OntologyTerm>>;\n abstract descendants(id: string): Observable<CollectionResponse<OntologyTerm>>;\n}","export interface OntologyConfig {\n name: string;\n prefix: string;\n github: {\n api: string;\n home: string;\n };\n home: string;\n api: {\n docs: string;\n base: string;\n };\n base_file: string;\n international: boolean;\n description: string;\n}\n\nexport enum Ontology {\n HP = 'HP',\n MONDO = 'MONDO',\n MP = 'MP',\n CL = 'CL',\n MAXO = 'MAXO'\n}\n\nexport interface OntologyTerm {\n id: string;\n name: string;\n}\n\n// OLS Term interface based on provided JSON\nexport interface OLSTerm {\n appearsIn: string[];\n curie: string;\n definedBy: string[];\n definition?: Array<{\n type: string[];\n value: string;\n axioms?: Array<{ [key: string]: string }>\n }>;\n definitionProperty?: string;\n directAncestor?: string[];\n directParent?: Array<string>;\n hasDirectChildren?: boolean;\n hasDirectParents?: boolean;\n hasHierarchicalChildren?: boolean;\n hasHierarchicalParents?: boolean;\n hierarchicalAncestor?: string[];\n hierarchicalParent?: Array<string | {\n type: string[];\n value: string;\n axioms?: Array<{ [key: string]: string }>\n }>;\n hierarchicalProperty?: string;\n imported?: boolean;\n iri: string;\n isDefiningOntology?: boolean;\n isObsolete?: boolean;\n isPreferredRoot?: boolean;\n label?: string[];\n linkedEntities?: Record<string, any>;\n linksTo?: string[];\n numDescendants?: number;\n numHierarchicalDescendants?: number;\n ontologyId?: string;\n ontologyIri?: string;\n ontologyPreferredPrefix?: string;\n searchableAnnotationValues?: any[];\n shortForm?: string;\n type?: string[];\n [key: string]: any;\n}\n\n// OLS Response interface\nexport interface OLSResponse {\n page: number;\n numElements: number;\n totalPages: number;\n totalElements: number;\n elements: OLSTerm[];\n facetFieldsToCounts?: Record<string, any>;\n}","import { Ontology } from \"./ontology.model\";\n\n/**\n * Get the ontology from curie\n */\nexport function ontologyFromCurie(curie: string): Ontology {\n return Ontology[curie.split(':')[0] as keyof typeof Ontology];\n}","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Observable, throwError } from 'rxjs';\nimport { Ontology, OntologyConfig, OntologyTerm } from './ontology.model';\n\nimport { CollectionResponse, Response } from '../../models/response';\nimport { ontologyFromCurie } from './ontology.shared';\nimport { OntologyService } from './ontology.service.base';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class JaxOntologyService extends OntologyService {\n config_location = 'https://raw.githubusercontent.com/TheJacksonLaboratory/ontology-service/refs/heads/main/config/ontologies-internal.json'\n private config!: OntologyConfig[];\n\n /**\n * Get the configuration file from the source for the backend api service\n */\n constructor(private httpClient: HttpClient) {\n super();\n this.httpClient.get<OntologyConfig[]>(this.config_location).subscribe({\n next: (config) => this.config = config,\n error: () => {\n this.config = [];\n }\n });\n }\n\n /**\n * Search for terms in an ontology\n * @param query - the search query\n * @param limit - the number of results to return\n * @param ontology - the ontology to search\n */\n search(query: string, limit: number, ontology: Ontology): Observable<CollectionResponse<OntologyTerm>> {\n return this.httpClient.get<CollectionResponse<OntologyTerm>>(`${this.ontologyBaseResolver(ontology)}/search?q=${query}&limit=${limit}`);\n }\n\n /**\n * Get a term by its ID\n * @param id - the term ID\n */\n term(id: string): Observable<Response<OntologyTerm>> {\n try {\n const url = `${this.ontologyBaseResolver(ontologyFromCurie(id))}/${id}`;\n return this.httpClient.get<Response<OntologyTerm>>(url);\n } catch (error) {\n return throwError(() => error);\n }\n }\n\n /**\n * Get the parents of a term\n * @param id - the term ID\n */\n parents(id: string): Observable<CollectionResponse<OntologyTerm>> {\n try {\n const url = `${this.ontologyBaseResolver(ontologyFromCurie(id))}/${id}/parents`;\n return this.httpClient.get<CollectionResponse<OntologyTerm>>(url);\n } catch (error) {\n return throwError(() => error);\n }\n }\n\n /**\n * Get the children of a term\n * @param id - the term ID\n */\n children(id: string): Observable<CollectionResponse<OntologyTerm>> {\n try {\n const url = `${this.ontologyBaseResolver(ontologyFromCurie(id))}/${id}/children`;\n return this.httpClient.get<CollectionResponse<OntologyTerm>>(url);\n } catch (error: any) {\n return throwError(() => error);\n }\n }\n\n /**\n * Get the ancestors of a term\n * @param id - the term ID\n */\n ancestors(id: string): Observable<CollectionResponse<OntologyTerm>> {\n try {\n const url = `${this.ontologyBaseResolver(ontologyFromCurie(id))}/${id}/ancestors`;\n return this.httpClient.get<CollectionResponse<OntologyTerm>>(url);\n } catch (error) {\n return throwError(() => error);\n }\n }\n\n /**\n * Get the descendants of a term\n * @param id - the term ID\n */\n descendants(id: string): Observable<CollectionResponse<OntologyTerm>> {\n try {\n const url = `${this.ontologyBaseResolver(ontologyFromCurie(id))}/${id}/descendants`;\n return this.httpClient.get<CollectionResponse<OntologyTerm>>(url);\n } catch (error) {\n return throwError(() => error);\n }\n }\n\n /**\n * Get the ontology api base url configuration\n **/\n ontologyBaseResolver(ontology: Ontology): string {\n if (!this.config || this.config.length === 0) {\n throw new Error('No ontology configuration found.');\n }\n const ontology_config = this.config.find((config) => config.prefix.toUpperCase() === ontology);\n\n if(!ontology_config) {\n throw new Error('Ontology not found in configuration.');\n }\n return ontology_config.api.base;\n }\n}\n","// ols-ontology.service.ts\nimport { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { OntologyService } from './ontology.service.base';\nimport { Observable, map, pipe } from 'rxjs';\nimport { OLSResponse, OLSTerm, Ontology, OntologyTerm } from './ontology.model';\nimport { CollectionResponse, Response } from '../../models/response';\nimport { ontologyFromCurie } from './ontology.shared';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OLSOntologyService extends OntologyService {\n\n private OLS_SEARCH_BASE = 'https://www.ebi.ac.uk/ols4/api/v2/entities';\n private OLS_ENTITY_BASE = 'https://www.ebi.ac.uk/ols4/api/v2/ontologies';\n private PURL_BASE = 'http://purl.obolibrary.org/obo';\n constructor(private httpClient: HttpClient) {\n super();\n }\n\n term(id: string): Observable<Response<OntologyTerm>> {\n const ontology = ontologyFromCurie(id);\n const params = new URLSearchParams;\n params.set('includeObsoleteEntities', 'false');\n return this.httpClient.get<OLSTerm>(`${this.OLS_ENTITY_BASE}/${ontology.toLowerCase()}/classes/${this.PURL_BASE}/${id.replace(':', '_')}?${params.toString()}`).pipe(map(olsResponse => {\n return {\n object: this.mapOLSTermToOntologyTerm(olsResponse)\n };\n }));\n }\n\n search(query: string, limit: number, ontology: Ontology): Observable<CollectionResponse<OntologyTerm>> {\n\n const params = new URLSearchParams\n params.set('search', query);\n params.set('size', limit.toString());\n params.set('ontologyId', ontology.toLowerCase());\n params.set('includeObsoleteEntities', 'false');\n return this.httpClient.get<OLSResponse>(`${this.OLS_SEARCH_BASE}?${params.toString()}`).pipe(map(olsResponse => {\n const collectionResponse: CollectionResponse<OntologyTerm> = {\n data: olsResponse.elements.filter((olsTerm: OLSTerm) => olsTerm.definedBy.includes(ontology.toLowerCase())).map(olsTerm => this.mapOLSTermToOntologyTerm(olsTerm)),\n paging: {\n page: olsResponse.page,\n total_pages: olsResponse.totalPages,\n total_items: olsResponse.totalElements\n }\n };\n return collectionResponse;\n }));\n }\n\n parents(id: string): Observable<CollectionResponse<OntologyTerm>> {\n const ontology = ontologyFromCurie(id);\n const params = new URLSearchParams;\n params.set('includeObsoleteEntities', 'false');\n return this.httpClient.get<OLSTerm>(`${this.OLS_ENTITY_BASE}/${ontology.toLowerCase()}/classes/${this.PURL_BASE}/${id.replace(':', '_')}?${params.toString()}`).pipe(map(olsTerm => {\n const data = olsTerm.directParent\n ? olsTerm.directParent\n .map(parent =>\n olsTerm.linkedEntities && olsTerm.linkedEntities[parent]\n ? this.mapOLSTermToOntologyTerm(olsTerm.linkedEntities[parent])\n : \"\"\n ).filter(parent => parent !== \"\")\n : []\n return {\n data: data,\n paging: {\n page: 1,\n total_pages: 1,\n total_items: data.length\n }\n };\n }));\n }\n\n children(id: string): Observable<CollectionResponse<OntologyTerm>> {\n const ontology = ontologyFromCurie(id);\n const params = new URLSearchParams;\n params.set('includeObsoleteEntities', 'false');\n params.set('size', '100');\n params.set('lang', 'en');\n return this.httpClient.get<OLSResponse>(`${this.OLS_ENTITY_BASE}/${ontology.toLowerCase()}/classes/${this.PURL_BASE}/${id.replace(':', '_')}/children?${params.toString()}`).pipe(map(childrenResponse => {\n const data = childrenResponse.elements.map(olsTerm => this.mapOLSTermToOntologyTerm(olsTerm));\n return {\n data: data,\n paging: {\n page: childrenResponse.page,\n total_pages: childrenResponse.totalPages,\n total_items: data.length\n }\n };\n }));\n }\n\n ancestors(id: string): Observable<CollectionResponse<OntologyTerm>> {\n const ontology = ontologyFromCurie(id);\n const params = new URLSearchParams;\n params.set('includeObsoleteEntities', 'false');\n return this.httpClient.get<OLSTerm>(`${this.OLS_ENTITY_BASE}/${ontology.toLowerCase()}/classes/${this.PURL_BASE}/${id.replace(':', '_')}?${params.toString()}`).pipe(map(olsTerm => {\n const data = olsTerm.directAncestor\n ? olsTerm.directAncestor\n .map(ancestor =>\n olsTerm.linkedEntities && olsTerm.linkedEntities[ancestor]\n ? this.mapOLSTermToOntologyTerm(olsTerm.linkedEntities[ancestor])\n : \"\"\n ).filter(ancestor => ancestor !== \"\")\n : []\n return {\n data: data,\n paging: {\n page: 1,\n total_pages: 1,\n total_items: data.length\n }\n };\n }));\n }\n\n // finish testing this method\n descendants(id: string): Observable<CollectionResponse<OntologyTerm>> {\n const ontology = ontologyFromCurie(id);\n const params = new URLSearchParams;\n params.set('includeObsoleteEntities', 'false');\n params.set('size', '100'); // max size for children endpoint\n params.set('lang', 'en');\n return this.httpClient.get<OLSResponse>(`${this.OLS_ENTITY_BASE}/${ontology.toLowerCase()}/classes/${this.PURL_BASE}/${id.replace(':', '_')}/hierarchicalChildren?${params.toString()}`).pipe(map(childrenResponse => {\n const data = childrenResponse.elements.map(olsTerm => this.mapOLSTermToOntologyTerm(olsTerm));\n return {\n data: data,\n paging: {\n page: childrenResponse.page,\n total_pages: childrenResponse.totalPages,\n total_items: data.length\n }\n };\n }));\n }\n\n mapOLSTermToOntologyTerm(olsTerm: OLSTerm): OntologyTerm {\n return {\n id: olsTerm.curie,\n name: olsTerm.label && olsTerm.label.length > 0 ? olsTerm.label[0] : 'No label'\n };\n }\n}","import { Inject, Injectable } from '@angular/core';\nimport { HttpClient } from \"@angular/common/http\";\nimport { BehaviorSubject, catchError, map, Observable, tap } from \"rxjs\";\n\nimport {\n Dataset, DatasetStatus,\n Gene, GenotypeResults,\n MusterHealthCheck,\n MusterMetadata,\n ReferenceSNP,\n SNPSearchProperties,\n Strain\n} from './models/response/dtos';\nimport { SNPSearchRegion } from '../mvar/models/response/dtos';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SnpGridService {\n private api;\n\n // default true but becomes false if any of the API calls for general information fails\n apiAvailable = true;\n\n private strains: BehaviorSubject<Strain[]> = new BehaviorSubject(<Strain[]>[]);\n strains$: Observable<Strain[]> = this.strains.asObservable();\n\n constructor(private http: HttpClient, @Inject('environment') private environment: any) {\n this.api = environment.securedURLs.genomeMUSter;\n\n this.getHealthCheck().subscribe({\n error: () => {\n this.apiAvailable = false;\n },\n });\n this.getStrains().subscribe({\n next: (strains) => {\n this.apiAvailable = Boolean(strains.length);\n },\n error: () => {\n this.apiAvailable = false;\n },\n });\n }\n\n /**\n * Returns the result of a health check for the API\n */\n getHealthCheck(): Observable<MusterHealthCheck> {\n return this.http.get<MusterHealthCheck>(`${this.api}/healthcheck`);\n }\n\n /**\n * Returns the metadata on the MUSter DB\n */\n getMusterMetadata(): Observable<MusterMetadata> {\n return this.http.get<MusterMetadata>(`${this.api}/db_info`).pipe(\n catchError((err) => {\n this.apiAvailable = false;\n throw err;\n }),\n );\n }\n\n /**\n * Returns strains available in the API and takes an optional limit; by default the limit is set\n * to 5000 to get all strains\n * @param limit - maximum number of strains to be returned\n */\n getStrains(limit = 5000): Observable<Strain[]> {\n return this.http\n .get<Strain[]>(`${this.api}/strains/?limit=${limit}`)\n .pipe(tap((strains) => this.strains.next(strains.filter((s) => s.mpd_strainid))));\n }\n\n /**\n * Returns a list of known genes whose symbols/coordinates start with the specified value.\n * @param searchValue - value to use for the \"starts with\" filter\n * @param limit - maximum number of genes to return, default is 20\n */\n getGenes(searchValue: string, limit = 20): Observable<Gene[]> {\n return this.http.get<Gene[]>(`${this.api}/genes/?symbol=${searchValue}%&limit=${limit}`);\n }\n\n /**\n * Returns the gene that matches the specified gene symbol\n * @param geneSymbol - symbol to use to get the associated gene info\n */\n getGene(geneSymbol: string): Observable<Gene | null> {\n return this.http\n .get<Gene[]>(`${this.api}/genes/?symbol=${geneSymbol}`)\n .pipe(map((genes) => (genes.length ? genes[0] : null)));\n }\n\n /**\n * Returns true if the specified gene symbol is valid from the perspective of MUSter\n * @param geneSymbol - symbol to use to check the validity of\n */\n isGeneSymbolValid(geneSymbol: string): Observable<boolean> {\n return this.getGene(geneSymbol).pipe(\n map((g: Gene | null) => g !== null && geneSymbol.toLowerCase() === g.symbol.toLowerCase()),\n );\n }\n\n /**\n * Returns list of known reference SNP (RS) data which includes IDs and coordinates\n * @param searchValue - value to use to filter the search results\n * @param limit - maximum number of results to return, default is 20\n */\n getReferenceSNPs(searchValue: string, limit = 20): Observable<ReferenceSNP[]> {\n return this.http.get<ReferenceSNP[]>(`${this.api}/rsids/?rsid=${searchValue}%&limit=${limit}`);\n }\n\n /**\n * Returns the RS info that matches the specified rsID\n * @param rsid - the RSID to use to get the associated RS info\n */\n getReferenceSNP(rsid: string): Observable<ReferenceSNP | null> {\n return this.http\n .get<ReferenceSNP[]>(`${this.api}/rsids/?rsid=${rsid}`)\n .pipe(map((rsids) => (rsids.length ? { ...rsids[0], end_position: rsids[0].start_position } : null)));\n }\n\n /**\n * Returns true if the specified rsID is valid from the perspective of MUSter\n * @param rsid - rsID to use to check the validity of\n */\n isRSIDValid(rsid: string): Observable<boolean> {\n return this.getReferenceSNP(rsid).pipe(\n map((rs: ReferenceSNP | null) => rs !== null && rsid.toLowerCase() === rs.rsid.toLowerCase()),\n );\n }\n\n /**\n * Returns the SNP results generated from the query constructed from the specified parameters and page\n * @param parameters - search properties (strain IDs, regions, assembly version, etc.)\n * @param page - requested page, which is 0-indexed. The 0th page is the initial page\n * @param pageSize - number of records to show per page. Default of 5000\n */\n getGenotypes(parameters: SNPSearchProperties, page = 0, pageSize = 5000): Observable<GenotypeResults> {\n let constructedURL =\n `${this.api}/snps/?` +\n `assembly=${parameters.assembly}&` +\n `mpd_strain_ids=${parameters.strains.join(',')}&` +\n `limit=${pageSize}`;\n\n if (parameters.strains_b?.length) {\n constructedURL += `&mpd_strain_ids_b=${parameters.strains_b.join(',')}&strain_limit=${parameters.strains.length + parameters.strains_b.length}`;\n } else {\n constructedURL += `&strain_limit=${parameters.strains.length}`\n }\n\n if (parameters.rsids?.length) {\n constructedURL += `&rsids=${parameters.rsids.join(',')}`;\n }\n\n if (parameters.genes?.length) {\n constructedURL += `&genes=${parameters.genes.join(',')}`;\n }\n\n if (parameters.regions?.length) {\n constructedURL += `®ions=${parameters.regions.join(',')}`;\n }\n\n if (parameters.dataset_id) {\n constructedURL += `&dataset_id=${parameters.dataset_id}`;\n }\n\n if (parameters.is_unique_row) {\n constructedURL += `&is_unique_row=${parameters.is_unique_row}`;\n }\n\n if (page) {\n constructedURL += `&offset=${pageSize * page}`;\n }\n\n return this.http.get<GenotypeResults>(constructedURL);\n }\n\n /**\n * Returns the URL that will generate a download (in file form) for the specified strain IDs and regions\n * @param strains - list of mpd_strain_ids to query SNPs for\n * @param regions - list of SNPSearchRegions to query SNPs for (chromosome, start and end)\n * @param dataset_id - ID of the dataset to query SNPs for\n * @param is_unique_row - boolean for polymorphism filtering - true for only rows with polymorphism, false for all\n * @param limit - the limit of the number of result rows to include in the download - you're likely to\n * prefer to pass the total number of rows generated by the query itself, which is included\n * as part of the GenotypeResults returned by getGenotypes()\n */\n getGenotypeDownloadURLForCurrentData(strains: number[], regions: SNPSearchRegion[], dataset_id: number | undefined, is_unique_row = false, limit: number): string {\n if (!dataset_id) {\n // default to the GenomeMuster dataset id\n dataset_id = 2;\n }\n const stringifiedRegions = `regions=${regions\n .map((reg) => `${reg.chromosome}:${reg.start_position}-${reg.end_position}`)\n .join(',')}`;\n const stringifiedStrains = `mpd_strain_ids=${strains.join(',')}`;\n return `${this.api}/snps/download?dataset_id=${dataset_id}&${stringifiedStrains}&${stringifiedRegions}&limit=${limit}&is_unique_row=${is_unique_row}`;\n }\n\n /**\n * Returns the dataset with the given ID\n * @param id\n */\n getDataset(id: number): Observable<Dataset> {\n return this.http.get<Dataset>(`${this.api}/datasets/${id}`)\n }\n\n /**\n * Returns a list of Datasets that match the given criteria\n * @param status The value of the status to be used for filtering\n * @param limit The maximum number of records to return\n */\n findDatasets(status: DatasetStatus, limit = 50): Observable<Dataset[]> {\n let url = `${this.api}/datasets`;\n url += `/?limit=${limit}`;\n if (status) {\n url += `&status=${status}`;\n }\n return this.http.get<Dataset[]>(url);\n }\n\n /**\n * Return a list of strains that match the given criteria\n * @param datasetId The ID of the dataset from which to fetch the strains\n * @param limit The maximum number of records to return\n */\n datasetStrains(datasetId: number, limit = 5000): Observable<Strain[]> {\n const url = `${this.api}/dataset_strain/?dataset_id=${datasetId}&limit=${limit}`;\n return this.http.get<Strain[]>(url);\n }\n\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SnpGridService } from \"./snp-grid.service\";\n\n@NgModule({\n imports: [CommonModule],\n})\nexport class SnpGridClientModule {\n\n public static forRoot(environment: any): ModuleWithProviders<SnpGridClientModule> {\n return {\n ngModule: SnpGridClientModule,\n providers: [\n SnpGridService,\n {\n provide: 'environment', // you can also use InjectionToken\n useValue: environment\n }\n ]\n };\n }\n\n}\n","import { SNP, SNPSearchRegion } from \"../../../mvar/models/response/dtos\";\n\nexport interface MusterHealthCheck {\n status: string;\n timestamp: string;\n}\n\nexport interface MusterMetadata {\n total_number_of_SNPs: number;\n last_updated: string;\n version: string;\n total_number_of_strains: number;\n}\n\nexport interface Strain {\n bq_sample_id: number;\n mpd_strainid: number;\n strainname: string;\n straintype: string;\n}\n\nexport interface Gene {\n symbol: string;\n chr: string;\n start_position: number;\n end_position: number;\n strand: string;\n description: string;\n mginum: string;\n markertype: string;\n centimorgan: number;\n featuretype: string;\n}\n\nexport interface ReferenceSNP {\n chr: string;\n start_position: number;\n end_position?: number; // added later\n rsid: string;\n}\n\nexport interface MusterSearchParameters {\n bq_sample_ids: null;\n genes: string | null; // stringified array\n genes_data: Gene[];\n limit: number;\n mpd_strain_ids: string; // stringified array\n next_region: string | null;\n offset: number;\n query_regions: {\n chromosome: string;\n regions: SNPSearchRegion[];\n }[];\n regions: SNPSearchRegion[];\n rsids: string | null; //stringified array\n rsids_data: ReferenceSNP[];\n strain_limit: number;\n strain_names: null;\n dataset: Dataset;\n}\n\nexport interface SNPSearchProperties {\n strains: number[];\n strains_b?: number[];\n rsids?: string[];\n regions?: string[];\n assembly: string;\n genes?: string[];\n offset?: number;\n dataset_id?: number;\n is_unique_row?: boolean;\n}\n\nexport interface GenotypeResults {\n message: string | null;\n next_region: string;\n parameter: MusterSearchParameters;\n snps: SNP[];\n status: string;\n total_rows: number;\n}\n\nexport enum DatasetStatus {\n Queued = 'queued',\n Loading = 'loading',\n Done = 'done',\n Archived = 'archived',\n}\n\nexport interface Dataset {\n id: number,\n display_name: string,\n sort_by: number,\n year: string,\n procedure: string,\n panel: string,\n sex: string,\n dataset_name: string,\n source: string,\n status: DatasetStatus,\n num_of_strains: number,\n pubmed: string,\n description: string,\n assembly_version: string,\n}\n","// AsyncTask API client\nexport * from './lib/services/asynctask/asynctask.service';\nexport * from './lib/services/asynctask/asynctask.model';\n\n// ISA Data API client\nexport * from './lib/services/isa-data/isa-data.service';\nexport * from './lib/models/isa-data/isa-data.model';\nexport * from './lib/tokens/isa-data-config.token';\n\n// MVAR API client\nexport * from './lib/services/mvar/mvar.service';\nexport * from './lib/services/mvar/models/response/dtos';\nexport * from './lib/services/mvar/mvar-client.module';\n\n// Ontology API client\nexport * from './lib/services/ontology/ontology.service.base';\nexport * from './lib/services/ontology/ontology.service.jax';\nexport * from './lib/services/ontology/ontology.service.ols';\n\n// MVar API client\nexport * from './lib/services/mvar/mvar.service';\nexport * from './lib/services/mvar/models/response/dtos';\nexport * from './lib/services/mvar/mvar-client.module';\n\n// SNP Grid API client\nexport * from './lib/services/snp-grid/snp-grid-client.module';\nexport * from './lib/services/snp-grid/models/response/dtos';\nexport * from './lib/services/snp-grid/snp-grid.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAWa,qBAAqB,CAAA;AACZ,IAAA,IAAA;AAApB,IAAA,WAAA,CAAoB,IAAgB,EAAA;QAAhB,IAAA,CAAA,IAAI,GAAJ,IAAI;IAAgB;AAExC,IAAA,MAAM,CAAC,OAAe,EAAA;QACpB,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC;IAC/C;wGALW,qBAAqB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAArB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,cAFpB,MAAM,EAAA,CAAA;;4FAEP,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAHjC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AAC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AAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,aAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,aAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACvB,CAAC,EALW,aAAa,KAAb,aAAa,GAAA,EAAA,CAAA,CAAA;;AClFzB;;ACAA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"jax-data-science-api-clients.mjs","sources":["../../../../libs/api-clients/src/lib/services/base.service.ts","../../../../libs/api-clients/src/lib/services/asynctask/asynctask.service.ts","../../../../libs/api-clients/src/lib/services/asynctask/asynctask.model.ts","../../../../libs/api-clients/src/lib/tokens/isa-data-config.token.ts","../../../../libs/api-clients/src/lib/services/isa-data/isa-data.service.ts","../../../../libs/api-clients/src/lib/models/isa-data/isa-data.model.ts","../../../../libs/api-clients/src/lib/services/mvar/models/response/dtos.ts","../../../../libs/api-clients/src/lib/services/mvar/mvar.service.ts","../../../../libs/api-clients/src/lib/services/mvar/mvar-client.module.ts","../../../../libs/api-clients/src/lib/services/ontology/ontology.service.base.ts","../../../../libs/api-clients/src/lib/services/ontology/ontology.model.ts","../../../../libs/api-clients/src/lib/services/ontology/ontology.shared.ts","../../../../libs/api-clients/src/lib/services/ontology/ontology.service.jax.ts","../../../../libs/api-clients/src/lib/services/ontology/ontology.service.ols.ts","../../../../libs/api-clients/src/lib/services/snp-grid/snp-grid.service.ts","../../../../libs/api-clients/src/lib/services/snp-grid/snp-grid-client.module.ts","../../../../libs/api-clients/src/lib/services/snp-grid/models/response/dtos.ts","../../../../libs/api-clients/src/index.ts","../../../../libs/api-clients/src/jax-data-science-api-clients.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { HttpClient, HttpErrorResponse, HttpParams } from '@angular/common/http';\nimport { catchError, map, Observable, throwError } from 'rxjs';\n\n// models\nimport { ErrorResponse } from './../models/error';\nimport { Response, CollectionResponse } from './../models/response';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ApiBaseServiceFactory {\n constructor(private http: HttpClient) { }\n\n create(baseUrl: string): ApiBaseService {\n return new ApiBaseService(this.http, baseUrl);\n }\n}\n\nexport class ApiBaseService {\n constructor(\n private http: HttpClient,\n private baseUrl: string,\n ) {}\n\n /**\n * Handles API response errors and HTTP errors\n * @param response The API response\n * @private\n */\n private handleResponse<T>(\n response: Response<T> | CollectionResponse<T>,\n ): Response<T> | CollectionResponse<T> {\n if(response.errors) {\n // TO-DO: [GIK 6/6/2025] once the API service has the capabilities to respond\n // with meaningful validation and analytical errors, this will need to be\n // updated to typecast these into the ErrorResponse model and rethrow the error object\n throw new Error(response.errors.join(', '));\n }\n return response;\n }\n\n /**\n * Handles HTTP errors by catching them and rethrowing a consistent\n * error response that contains an error code, numeric code, and\n * a user-friendly message.\n * TO-DO: [GIK 6/10/2025] consider adding error logging capabilities to an external service\n * @param error an error object, typically an HttpErrorResponse\n * @returns an Observable that emits an ErrorResponse object\n */\n private handleHttpError(error: any): Observable<never> {\n let errorResponse: ErrorResponse;\n\n // errors returned on the Observable response stream\n // will be wrapped in an HttpErrorResponse class\n if(error.name === 'HttpErrorResponse') {\n errorResponse = {\n code: error.statusText || 'HTTP_ERROR',\n num_code: error.status,\n message: this.getErrorMessage(error),\n };\n } else {\n errorResponse = {\n code: 'UNKNOWN_ERROR',\n num_code: 0,\n message: error.message || 'An unknown error occurred',\n }\n }\n\n return throwError(() => errorResponse);\n }\n\n /**\n * Get a user-friendly error message based on the HTTP status code\n *\n * @param error\n * @return a string containing the error message\n */\n getErrorMessage(error: HttpErrorResponse): string {\n switch(error.status) {\n case 400:\n return 'Bad request - malformed request syntax or invalid parameters';\n break;\n case 401:\n return 'Unauthorized - authentication required or invalid credentials';\n break;\n case 403:\n return 'Forbidden - the authenticated user does not have permission to perform the operation';\n break;\n case 404:\n return 'Not found - the requested resource does not exist';\n break;\n case 422:\n return 'Unprocessable content - the request is correctly formed but contained semantic errors';\n break;\n case 500:\n return 'Internal Server Error - generic server-side error';\n break;\n default:\n return `Unexpected error occurred - status code: ${error.status}`;\n }\n }\n\n /**\n * Get a single resource\n * @param url The endpoint URL\n * @param params Optional query parameters\n */\n get<T>(url: string, params?: HttpParams): Observable<Response<T>> {\n return this.http.get<Response<T>>(`${this.baseUrl}${url}`, { params }).pipe(\n map((response) => this.handleResponse(response)),\n catchError((error) => this.handleHttpError(error)),\n );\n }\n\n /**\n * Get a collection of resources\n * @param url The endpoint URL\n * @param params Optional query parameters\n */\n private handleCollectionResponse<T>(\n response: CollectionResponse<T>,\n ): CollectionResponse<T> {\n if (response.errors) {\n throw new Error(response.errors.join(', '));\n }\n return response;\n }\n\n getCollection<T>(\n url: string,\n params?: HttpParams,\n ): Observable<CollectionResponse<T>> {\n return this.http\n .get<CollectionResponse<T>>(`${this.baseUrl}${url}`, { params })\n .pipe(\n map((response) => this.handleCollectionResponse(response)),\n catchError((error) => this.handleHttpError(error)),\n );\n }\n\n /**\n * Create a new resource\n * @param url The endpoint URL\n * @param body The resource to create\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n post<T>(url: string, body: any): Observable<Response<T>> {\n return this.http.post<Response<T>>(`${this.baseUrl}${url}`, body).pipe(\n map((response) => this.handleResponse(response)),\n catchError((error) => this.handleHttpError(error)),\n );\n }\n\n /**\n * Update an existing resource\n * @param url The endpoint URL\n * @param body The resource updates\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n put<T>(url: string, body: any): Observable<Response<T>> {\n return this.http.put<Response<T>>(`${this.baseUrl}${url}`, body).pipe(\n map((response) => this.handleResponse(response)),\n catchError((error) => this.handleHttpError(error)),\n );\n }\n\n /**\n * Partially update an existing resource\n * @param url The endpoint URL\n * @param body The partial resource updates\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n patch<T>(url: string, body: any): Observable<Response<T>> {\n return this.http.patch<Response<T>>(`${this.baseUrl}${url}`, body).pipe(\n map((response) => this.handleResponse(response)),\n catchError((error) => this.handleHttpError(error)),\n );\n }\n\n /**\n * Delete a resource\n * @param url The endpoint URL\n */\n delete<T>(url: string): Observable<Response<T>> {\n return this.http.delete<Response<T>>(`${this.baseUrl}${url}`).pipe(\n map((response) => this.handleResponse(response)),\n catchError((error) => this.handleHttpError(error)),\n );\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { Observable, Subscriber } from 'rxjs';\nimport { fetchEventSource, EventSourceMessage } from '@microsoft/fetch-event-source';\n// services\nimport { ApiBaseService, ApiBaseServiceFactory } from '../base.service';\n// models\nimport {\n Input,\n InputReference,\n InputSubmission,\n Result,\n ResultReference,\n Run\n} from './asynctask.model';\nimport { CollectionResponse, Response } from '../../models/response';\nimport { ErrorResponse } from '../../models/error';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AsyncTaskService {\n // TO-DO [GIK 7/9/2025]: move 'https://astra-dev.jax.org' to an environment variable\n private apiBaseUrl = '/asynctask/api';\n\n private apiServiceFactory: ApiBaseServiceFactory = inject(ApiBaseServiceFactory);\n\n private apiBaseService: ApiBaseService =\n this.apiServiceFactory.create(this.apiBaseUrl);\n\n setApiBaseUrl(baseUrl: string): void {\n this.apiBaseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl;\n\n // ensure the URL ends with '/asynctask/api'\n if(!this.apiBaseUrl.endsWith('asynctask/api')) {\n this.apiBaseUrl = `${this.apiBaseUrl}/asynctask/api`;\n }\n\n // recreate the apiService\n this.apiBaseService = this.apiServiceFactory.create(this.apiBaseUrl);\n }\n\n getApiBaseUrl(): string {\n return this.apiBaseUrl;\n }\n\n // INPUT\n addInput(inputSubmission: InputSubmission): Observable<Response<Input>> {\n return this.apiBaseService.post<Input>('/inputs', inputSubmission);\n }\n getInput(id: number): Observable<Response<Input>> {\n return this.apiBaseService.get<Input>(`/inputs/${id}`);\n }\n getInputs(): Observable<CollectionResponse<InputReference>> {\n return this.apiBaseService.getCollection<InputReference>('/inputs');\n }\n\n /**\n * Updates an existing input - only 'name' and 'description' can be updated\n * @param inputId\n * @param name - (optional) name to update\n * @param description - (optional) description to update\n */\n updateInput(inputId: number, name?: string, description?: string): Observable<Response<InputReference>> {\n let url = `/inputs/${inputId}?`;\n if(name !== undefined) {\n url += `name=${name}&`;\n }\n if(description !== undefined) {\n url += `description=${description}`;\n }\n\n return this.apiBaseService.patch<InputReference>(url, null);\n }\n\n // RUN\n createRun(inputId?: number, inputSubmission?: InputSubmission): Observable<Response<Run>> {\n const url = inputId ? `/runs?input_id=${inputId}` : '/runs';\n\n return this.apiBaseService.post<Run>(url, inputSubmission || null);\n }\n\n getRun(id: number): Observable<Response<Run>> {\n return this.apiBaseService.get<Run>(`/runs/${id}`);\n }\n\n /**\n *\n * @param workflowId - (optional) workflow identifier\n */\n getRuns(workflowId?: string): Observable<CollectionResponse<Run>> {\n const url = (workflowId ? `/runs?workflow_id=${workflowId}` : '/runs');\n\n return this.apiBaseService.getCollection<Run>(url);\n }\n\n /**\n * Gets the input associated with the specific run ID. One run is associated\n * with only one input, so this function returns a single input object.\n * @param runId\n */\n getRunInput(runId: number): Observable<Response<Input>> {\n return this.apiBaseService.get<Input>(`/runs/${runId}/inputs`);\n }\n\n /**\n * Gets the result associated with the specific run ID. One run is associated\n * with only one result, so this function returns a single result object.\n * @param runId\n */\n getRunResult(runId: number): Observable<Response<Result>> {\n return this.apiBaseService.get<Result>(`/runs/${runId}/results`);\n }\n\n /**\n * Calls the fetchEventSource() function, which is a wrapper around the native\n * EventSource API. This function is used to establish connection to an API\n * endpoint and listen to event streaming data associated with task runs.\n * TO-DO [GIK 7/9/2025]: needs to add a reconnect logic\n * @return an observable that emits run events\n */\n getRunEvents(accessToken: string): Observable<Run> {\n const api = this.apiBaseService\n // observable constructor argument is 'subscribe()' method implementation\n return new Observable<Run>(\n (subscriber: Subscriber<Run>) => {\n // abort controller to cancel the request (on component destroy)\n const abortController = new AbortController();\n\n fetchEventSource(`${this.apiBaseUrl}/runs/events`, {\n method: 'GET',\n headers: {\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache',\n 'Authorization': `Bearer ${accessToken}`\n },\n\n async onopen(response): Promise<void> {\n // SSE media type must be 'text/event-stream'\n const contentType = response.headers.get('content-type');\n\n if(!contentType?.startsWith('text/event-stream')) {\n const errorResponse: ErrorResponse = {\n code: 'INVALID_CONTENT_TYPE',\n num_code: response.status,\n message: `Expected content-type to be text/event-stream, but got: ${contentType}`\n };\n throw errorResponse;\n }\n\n // resolve promise (without returning anything), which indicates that the connection is open\n if(response.ok && response.status === 200) return;\n\n // opening SSE connection failed\n if(response.status >= 400 && response.status < 500 && response.status !== 429) {\n const errorResponse: ErrorResponse = {\n code: 'RESOURCE_NOT_FOUND',\n num_code: response.status,\n message: 'Resource not found or access denied'\n }\n throw errorResponse;\n }\n },\n onmessage(event: EventSourceMessage) {\n try {\n const run: Run = JSON.parse(event.data) as Run;\n subscriber.next(run);\n } catch(error) {\n const errorResponse: ErrorResponse = {\n code: 'PARSE_ERROR',\n num_code: 0,\n message: `Failed to parse event data: ${event.data}`\n }\n throw errorResponse;\n }\n },\n onclose(): void {\n subscriber.complete();\n },\n onerror(errorRes: ErrorResponse): void {\n // send an error message to subscriber's error handler\n subscriber.error(errorRes);\n // rethrow the error to stop the operation\n throw errorRes;\n },\n signal: abortController.signal\n });\n\n return () => {\n abortController.abort(); // close connection on unsubscribe\n }\n });\n }\n\n // RESULT\n getResult(resId: number): Observable<Response<Result>> {\n return this.apiBaseService.get<Result>(`/results/${resId}`);\n }\n\n getResults(): Observable<CollectionResponse<ResultReference>> {\n return this.apiBaseService.getCollection<ResultReference>('/results');\n }\n\n /**\n * Updates an existing result record - 'name' and 'description' can be updated\n * @param resId\n * @param name - (optional) result's name to update\n * @param description - (optional) result's description to update\n */\n updateResult(resId: number, name?: string, description?: string): Observable<Response<ResultReference>> {\n let url = `/results/${resId}?`;\n if(name !== undefined) {\n url += `name=${name}&`;\n }\n if(description !== undefined) {\n url += `description=${description}`;\n }\n \n return this.apiBaseService.patch<ResultReference>(url, null);\n }\n\n // HEALTH CHECK\n // TO-DO [GIK 05/30/2025]: should be moved outside this service\n getHealthCheck(): Observable<any> {\n return this.apiBaseService.get<any>('/monitors/servers/health');\n }\n}\n","/**\n * AsyncTask Service Models\n * \n * This module contains TypeScript interfaces for the AsyncTask service API.\n * These models are based on the OpenAPI specification and represent the\n * core entities used in the AsyncTask workflow system.\n */\n\n/**\n * Represents the current execution status of a workflow.\n * Based on temporalio.api.enums.v1.WorkflowExecutionStatus\n */\nexport enum WorkflowExecutionStatus {\n RUNNING = 1,\n COMPLETED = 2,\n FAILED = 3,\n CANCELED = 4,\n TERMINATED = 5,\n CONTINUED_AS_NEW = 6,\n TIMED_OUT = 7\n}\n\n/**\n * Represents a configuration of input parameters for a workflow run.\n */\nexport interface Input {\n /**\n * Auto-generated primary key\n */\n id?: number | null;\n \n /**\n * Type of the input\n */\n type?: string | null;\n \n /**\n * Foreign key to the user who created this input\n */\n owner_id: number;\n \n /**\n * JSON dictionary containing input parameters\n */\n values: Record<string, any>;\n \n /**\n * Optional descriptive name\n */\n name?: string | null;\n \n /**\n * Optional detailed description\n */\n description?: string | null;\n}\n\n/**\n * Lightweight reference to an input configuration.\n * Used for list endpoints to minimize data transfer.\n */\nexport interface InputReference {\n /**\n * Input identifier\n */\n id: number;\n \n /**\n * Optional descriptive name\n */\n name?: string | null;\n \n /**\n * Optional detailed description\n */\n description?: string | null;\n}\n\n/**\n * Input submission for creating a new workflow run\n */\nexport interface InputSubmission {\n /**\n * Optional descriptive name\n */\n name?: string | null;\n \n /**\n * Optional detailed description\n */\n description?: string | null;\n \n /**\n * Type of task to execute\n */\n task_type: string;\n \n /**\n * Input values specific to the task type\n */\n values: Record<string, any> | string;\n }\n \n\n/**\n * Represents output data from a completed workflow run.\n */\nexport interface Result {\n /**\n * Auto-generated primary key\n */\n id: number;\n \n /**\n * Foreign key to the associated run\n */\n run_id: number;\n \n /**\n * JSON dictionary containing result data\n */\n values: Record<string, any>;\n \n /**\n * Optional descriptive name\n */\n name?: string | null;\n \n /**\n * Optional detailed description\n */\n description?: string | null;\n}\n\n/**\n * Lightweight reference to a result.\n * Used for list endpoints to minimize data transfer.\n */\nexport interface ResultReference {\n /**\n * Result identifier\n */\n id: number;\n \n /**\n * Associated run identifier\n */\n run_id: number;\n \n /**\n * Optional descriptive name\n */\n name?: string | null;\n \n /**\n * Optional detailed description\n */\n description?: string | null;\n}\n\n/**\n * Represents an execution instance of a workflow.\n */\nexport interface Run {\n /**\n * Auto-generated primary key\n */\n id: number;\n \n /**\n * Foreign key to the input configuration\n */\n input_id: number;\n \n /**\n * Foreign key to the user who initiated the run\n */\n owner_id: number;\n \n /**\n * Temporal workflow identifier\n */\n workflow_id: string;\n \n /**\n * Current execution status from Temporal\n */\n status: WorkflowExecutionStatus;\n\n /**\n * Run start time in ISO 8601 format\n */\n init_time?: string | null; // ISO 8601 format\n}\n","import { InjectionToken } from '@angular/core';\n\nexport interface IsaDataServiceConfig {\n baseUrl: string;\n}\n\nexport const ISA_DATA_SERVICE_CONFIG = new InjectionToken<IsaDataServiceConfig>(\n 'ISA_DATA_SERVICE_CONFIG'\n);","import { Injectable, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\n// services\nimport { ApiBaseService, ApiBaseServiceFactory } from '../base.service';\n// models\nimport { Response } from '../../models/response';\nimport { ErrorResponse } from '../../models/error';\nimport {\n MeasureSeriesMetadata,\n MeasureMetadata,\n IsaCharacteristic\n} from '../../models/isa-data/isa-data.model';\n// tokens\nimport {\n ISA_DATA_SERVICE_CONFIG,\n IsaDataServiceConfig\n} from '../../tokens/isa-data-config.token';\n\n/**\n * service for interacting with ISA (Investigation-Study-Assay) data model API.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ISADataService {\n private readonly apiConfig: IsaDataServiceConfig = inject(ISA_DATA_SERVICE_CONFIG);\n private readonly apiServiceFactory: ApiBaseServiceFactory = inject(ApiBaseServiceFactory);\n private readonly apiBaseService: ApiBaseService;\n\n constructor() {\n this.apiBaseService = this.apiServiceFactory.create(this.apiConfig.baseUrl);\n }\n\n getApiBaseUrl(): string {\n return this.apiConfig.baseUrl;\n }\n\n // measure operations\n\n /**\n * Fetches measure series metadata for the given measure series IDs and study IDs.\n *\n * @param measureSeriesIds - measure series identifiers to fetch metadata for. ONLY ONE ID IS SUPPORTED.\n * @param studyIds - ONLY ONE ID IS SUPPORTED. REQUIRED!! WILL BE REMOVED IN THE FUTURE.\n *\n * @return Observable<Response<MeasureSeriesMetadata>> - an observable containing the measure series metadata.\n */\n getMeasureSeriesMetadata(measureSeriesIds: string[], studyIds: string[]) :\n Observable<Response<MeasureSeriesMetadata>> {\n if(!measureSeriesIds?.length) {\n const errorResponse: ErrorResponse = {\n code: 'BAD_REQUEST',\n num_code: 400,\n message: 'missing required parameter: measureSeriesIds',\n };\n\n throw errorResponse;\n }\n\n\n const url = this.buildUrl('/visualization/measures/metadata', {\n measureSeriesIds: measureSeriesIds.join(','),\n studyId: studyIds.join(',')\n });\n\n\n return this.apiBaseService.get<MeasureSeriesMetadata>(url);\n }\n\n /**\n * THIS METHOD SHOULD NOT BE USED. PLACEHOLDER FOR FUTURE IMPLEMENTATION ONCE THE API GROWS.\n */\n getMeasuresMetadata(measureIds: string[], studyIds: string[]) :\n Observable<Response<MeasureMetadata>> {\n const reqUrl = '';\n return this.apiBaseService.get<MeasureMetadata>(reqUrl);\n }\n\n /**\n * Fetches measure series characteristics for the given measure series IDs and study IDs.\n *\n * @param measureSeriesIds - measure series identifiers to fetch metadata for. ONLY ONE ID IS SUPPORTED.\n * @param studyIds - ONLY ONE ID IS SUPPORTED. REQUIRED!! WILL BE REMOVED IN THE FUTURE.\n *\n * @return Observable<Response<MeasureSeriesMetadata>> - an observable containing the measure series metadata.\n */\n getMeasureSeriesCharacteristics(measureSeriesIds: string[], studyIds: string[]) :\n Observable<Response<IsaCharacteristic>> {\n if(!measureSeriesIds?.length) {\n const errorResponse: ErrorResponse = {\n code: 'BAD_REQUEST',\n num_code: 400,\n message: 'missing required parameter: measureSeriesIds',\n };\n\n throw errorResponse;\n }\n\n const url = this.buildUrl('/visualization/measures/characteristics', {\n measureSeriesIds: measureSeriesIds.join(','),\n studyIds: studyIds.join(',')\n });\n\n\n return this.apiBaseService.get(url);\n }\n\n // ASSAYS: to-be-implemented\n\n /**\n * Placeholder for assay operations\n * TODO: Implement assay-related methods\n */\n\n // STUDIES: to-be-implemented\n\n /**\n * Placeholder for study operations\n * TODO: Implement study-related methods\n */\n\n // INVESTIGATIONS: to-be-implemented\n\n /**\n * Placeholder for investigation operations\n * TODO: Implement investigation-related methods\n */\n\n /**\n * Builds the URL for the ISA data service.\n *\n * @param endpoint - the API endpoint path.\n * @param params - optional query parameters as key-value pairs.\n *\n * @return complete URL with query string parameters.\n */\n private buildUrl(endpoint: string, params: Record<string, string>) {\n const queryParams = new URLSearchParams(params).toString();\n\n return queryParams ? `${endpoint}?${queryParams}` : endpoint;\n }\n\n // HEALTH CHECK\n // TO-DO [GIK 05/30/2025]: should be moved outside this service\n getHealthCheck(): Observable<any> {\n return this.apiBaseService!.get<any>('/monitors/servers/health');\n }\n}\n","/**\n * This module defines the data models for representing the Investigation-Study-Assay (ISA)\n * data model, which is a standard for describing life science experiments and their results.\n *\n * Key Concepts:\n * - Investigation: The overall research project or study.\n * - Study: A specific experimental design within an investigation.\n * - Assay: A specific test or measurement performed on samples within a study.\n *\n * Measures represent the actual data points collected from assay executions, including:\n * - Measure: a single assay results with unique identifier\n * - MeasureSeries: a collection of measures that share common metadata and characteristics\n *\n * Each measure/series contains values, metadata about the experimental conditions,\n * and characteristics that describe sample properties or experimental parameters.\n */\n\nexport interface Measure {\n id: string;\n values?: MeasureValue[];\n metadata?: MeasureMetadata;\n characteristics?: IsaCharacteristic[];\n}\n\nexport interface MeasureSeries {\n id: string;\n values?: MeasureValue[];\n measures?: string[];\n metadata?: MeasureSeriesMetadata;\n characteristics?: IsaCharacteristic[];\n}\n\nexport interface MeasureMetadata {\n assay_id: number;\n description: string;\n measure_id: number;\n method: string;\n study_id: string;\n units: string;\n treatment: string;\n variable_name: string;\n\n characteristics?: Record<string, string[]>\n}\n\nexport interface MeasureSeriesMetadata {\n assay_id: number;\n description: string;\n initiated_at_units?: string;\n measure_ids: string[];\n measure_series_id: string;\n measurement_units: string;\n method: string;\n study_id?: number;\n treatment: string;\n treatment_units: string;\n variable_name: string;\n\n characteristics?: Record<string, string[]>;\n};\n\nexport interface MeasureValue {\n value: string | number;\n measure_id: string;\n measure_series_id?: string;\n study_id?: string;\n source_id: string;\n}\n\nexport interface IsaCharacteristicValue {\n value: string | number | boolean | Date;\n label: string; // e.g., 'High', 'Low', 'Positive', '2023-10-01'\n count?: number;\n description?: string; // optional description of the characteristic value\n metadata: Record<string, string>; // additional metadata about the characteristic value\n}\n\nexport interface IsaCharacteristic {\n name: string;\n value: IsaCharacteristicValue | IsaCharacteristicValue[];\n type?: string; // e.g., 'text', 'numeric', 'date'\n unit?: string; // e.g., 'mg/L', 'Celsius'\n description?: string; // optional description of the characteristic\n}\n","export interface VariantResults {\n variantCount: number;\n variants: Variant[];\n}\n\nexport interface Variant {\n accession: string;\n alt: string;\n aminoAcidChange: string;\n assembly: string;\n canonVarIdentifier: {\n caID: string;\n id: number;\n variantRefTxt: string;\n };\n chr: string;\n dnaHgvsNotation: string;\n functionalClassCode: string;\n functionalClasses: SequenceOntologyTerm[]; // added artificially\n gene: {\n chr: string;\n description: string;\n ensemblGeneId: string;\n entrezGeneId: string;\n id: number;\n mgiId: string;\n name: string;\n symbol: string;\n synonyms: {\n id: number;\n }[];\n transcripts: {\n id: number;\n }[];\n type: string;\n };\n id: number;\n impact: string;\n parentRefInd: boolean;\n position: number;\n proteinHgvsNotation: string;\n proteinPosition: string;\n ref: string;\n sources: {\n id: number;\n name: string;\n sourceVersion: string;\n url: string;\n }[];\n transcripts: {\n description: string;\n geneSymbol: string;\n id: number;\n mRnaId: string;\n primaryIdentifier: string;\n }[];\n type: string;\n variantHgvsNotation: string;\n variantRefTxt: string;\n}\n\nexport interface SequenceOntologyTerm {\n definition: string;\n id: number;\n label: string;\n soId: string;\n subClassOf: string;\n mpdTerm: string;\n}\n\n\nexport interface SNP {\n alternate_bases: string;\n calls: Call[];\n chr: string;\n observed: string;\n reference_base: string;\n rs: string;\n start_position: number | null; // allow for null value for gutter row\n annotation?: Variant | null;\n}\n\nexport interface Call {\n strain_name: string;\n sample_id: number;\n genotype: string;\n prob: number;\n base: string;\n}\n\nexport interface SNPSearchRegion {\n chromosome: string;\n start_position: number;\n end_position: number;\n reference_base?: string;\n alternate_base?: string;\n}\n\n// TODO - move to constants file/library\nexport const MUS_CHRS = [\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10',\n '11',\n '12',\n '13',\n '14',\n '15',\n '16',\n '17',\n '18',\n '19',\n 'X',\n 'Y',\n];\n","import { Inject, Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { BehaviorSubject, combineLatest, map, Observable, tap } from \"rxjs\";\n\nimport { MUS_CHRS, SequenceOntologyTerm, SNP, SNPSearchRegion, Variant, VariantResults } from './models/response/dtos';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MVarService {\n\n private api;\n\n sequenceOntologyMapping: Record<string, SequenceOntologyTerm> = {};\n\n private soTerms: BehaviorSubject<SequenceOntologyTerm[]> = new BehaviorSubject(<SequenceOntologyTerm[]>[]);\n soTerms$: Observable<SequenceOntologyTerm[]> = this.soTerms.asObservable();\n\n constructor(private http: HttpClient, @Inject('environment') private environment: any) {\n this.api = environment.unsecuredURLs.mvar;\n\n // create a sequence ontology lookup\n this.getSequenceOntologyTerms().subscribe((terms) => {\n terms.forEach((t) => {\n if (t.label) {\n this.sequenceOntologyMapping[t.label] = t;\n }\n });\n });\n }\n\n /**\n * Gets Variants from mvar for a given set snp regions\n * @param regions Array of snp regions\n * @param pageStart snp start location\n * @param pageEnd snp end location\n * @param assembly Desired assembly version. Acceptable values are 'mm10' (GRCm38) and 'mm39' (GRCm39)\n */\n getVariants(regions: SNPSearchRegion[], pageStart: SNP, pageEnd: SNP, assembly: string): Observable<Variant[]> {\n return combineLatest(\n this.getRegionsToRequestVariantsFor(regions, pageStart, pageEnd).map((r) => {\n return this.http.get<VariantResults>(\n `${this.api}/variant/query?chr=${r.chromosome}&startPos=${r.start_position}&endPos=${r.end_position}&max=8000&assembly=${assembly}`,\n );\n }),\n ).pipe(\n map((variants: VariantResults[]) => {\n const allVariants = variants.map((v) => v.variants).flat();\n allVariants.forEach((variant: Variant) => {\n const classCodes = variant.functionalClassCode.split(',')[0];\n // add the ontology term\n variant.functionalClasses = classCodes.split('&').map((c) => this.sequenceOntologyMapping[c]);\n });\n return allVariants;\n }),\n );\n }\n\n /**\n * Returns all sequence ontology terms in MVAR\n */\n getSequenceOntologyTerms(): Observable<SequenceOntologyTerm[]> {\n return this.http\n .get<SequenceOntologyTerm[]>(`${this.api}/sequenceOntology/query?max=3000`)\n .pipe(tap((terms) => this.soTerms.next(terms)));\n }\n\n /**\n * Translates the regions requested from MUSter and the regions actually displayed on the current page into\n * regions to request from MVAR\n * @param requestedRegions - regions included in the request to MUSter\n * @param pageStart - first SNP from the sorted results from MUSter to display in the table\n * @param pageEnd - last SNP from the sorted results from MUSter to display in the table\n */\n getRegionsToRequestVariantsFor(\n requestedRegions: SNPSearchRegion[],\n pageStart: SNP,\n pageEnd: SNP,\n ): SNPSearchRegion[] {\n const displayStartBP = pageStart.start_position || 0;\n const displayEndBP = pageEnd.start_position || 0;\n const regionsByChr: Record<string, SNPSearchRegion[]> = {};\n requestedRegions.forEach((r) => {\n if (regionsByChr[r.chromosome]) {\n regionsByChr[r.chromosome].push(r);\n } else {\n regionsByChr[r.chromosome] = [r];\n }\n });\n\n const displayedRegions: SNPSearchRegion[] = [];\n if (pageStart.chr === pageEnd.chr) {\n regionsByChr[pageStart.chr].forEach((r) => {\n if (r.start_position <= displayEndBP && r.end_position >= displayStartBP) {\n displayedRegions.push({\n chromosome: r.chromosome,\n start_position: Math.max(r.start_position, displayStartBP),\n end_position: Math.min(r.end_position, displayEndBP),\n });\n }\n });\n } else {\n const displayedChrs = Object.keys(regionsByChr).filter(\n (r) =>\n MUS_CHRS.indexOf(r) >= MUS_CHRS.indexOf(pageStart.chr) &&\n MUS_CHRS.indexOf(r) <= MUS_CHRS.indexOf(pageEnd.chr),\n );\n\n displayedChrs.forEach((chr) => {\n regionsByChr[chr].forEach((r) => {\n if (r.end_position >= displayStartBP && chr === pageStart.chr) {\n displayedRegions.push({\n chromosome: r.chromosome,\n start_position: Math.max(r.start_position, displayStartBP),\n end_position: r.end_position,\n });\n } else if (r.start_position <= displayEndBP && chr === pageEnd.chr) {\n displayedRegions.push({\n chromosome: r.chromosome,\n start_position: r.start_position,\n end_position: Math.min(r.end_position, displayEndBP),\n });\n } else if (chr !== pageStart.chr && chr !== pageEnd.chr) {\n displayedRegions.push({\n chromosome: r.chromosome,\n start_position: r.start_position,\n end_position: r.end_position,\n });\n }\n });\n });\n }\n\n return displayedRegions;\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MVarService } from \"./mvar.service\";\n\n@NgModule({\n imports: [CommonModule],\n})\nexport class MvarClientModule {\n\n public static forRoot(environment: any): ModuleWithProviders<MvarClientModule> {\n return {\n ngModule: MvarClientModule,\n providers: [\n MVarService,\n {\n provide: 'environment', // you can also use InjectionToken\n useValue: environment\n }\n ]\n };\n }\n\n}\n","import { Observable } from 'rxjs';\nimport { Ontology, OntologyTerm } from './ontology.model';\nimport { CollectionResponse, Response } from '../../models/response';\n\nexport abstract class OntologyService {\n abstract search(query: string, limit: number, ontology: Ontology): Observable<CollectionResponse<OntologyTerm>>;\n abstract term(id: string): Observable<Response<OntologyTerm>>;\n abstract parents(id: string): Observable<CollectionResponse<OntologyTerm>>;\n abstract children(id: string): Observable<CollectionResponse<OntologyTerm>>;\n abstract ancestors(id: string): Observable<CollectionResponse<OntologyTerm>>;\n abstract descendants(id: string): Observable<CollectionResponse<OntologyTerm>>;\n}","export interface OntologyConfig {\n name: string;\n prefix: string;\n github: {\n api: string;\n home: string;\n };\n home: string;\n api: {\n docs: string;\n base: string;\n };\n base_file: string;\n international: boolean;\n description: string;\n}\n\nexport enum Ontology {\n HP = 'HP',\n MONDO = 'MONDO',\n MP = 'MP',\n CL = 'CL',\n MAXO = 'MAXO'\n}\n\nexport interface OntologyTerm {\n id: string;\n name: string;\n}\n\n// OLS Term interface based on provided JSON\nexport interface OLSTerm {\n appearsIn: string[];\n curie: string;\n definedBy: string[];\n definition?: Array<{\n type: string[];\n value: string;\n axioms?: Array<{ [key: string]: string }>\n }>;\n definitionProperty?: string;\n directAncestor?: string[];\n directParent?: Array<string>;\n hasDirectChildren?: boolean;\n hasDirectParents?: boolean;\n hasHierarchicalChildren?: boolean;\n hasHierarchicalParents?: boolean;\n hierarchicalAncestor?: string[];\n hierarchicalParent?: Array<string | {\n type: string[];\n value: string;\n axioms?: Array<{ [key: string]: string }>\n }>;\n hierarchicalProperty?: string;\n imported?: boolean;\n iri: string;\n isDefiningOntology?: boolean;\n isObsolete?: boolean;\n isPreferredRoot?: boolean;\n label?: string[];\n linkedEntities?: Record<string, any>;\n linksTo?: string[];\n numDescendants?: number;\n numHierarchicalDescendants?: number;\n ontologyId?: string;\n ontologyIri?: string;\n ontologyPreferredPrefix?: string;\n searchableAnnotationValues?: any[];\n shortForm?: string;\n type?: string[];\n [key: string]: any;\n}\n\n// OLS Response interface\nexport interface OLSResponse {\n page: number;\n numElements: number;\n totalPages: number;\n totalElements: number;\n elements: OLSTerm[];\n facetFieldsToCounts?: Record<string, any>;\n}","import { Ontology } from \"./ontology.model\";\n\n/**\n * Get the ontology from curie\n */\nexport function ontologyFromCurie(curie: string): Ontology {\n return Ontology[curie.split(':')[0] as keyof typeof Ontology];\n}","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Observable, throwError } from 'rxjs';\nimport { Ontology, OntologyConfig, OntologyTerm } from './ontology.model';\n\nimport { CollectionResponse, Response } from '../../models/response';\nimport { ontologyFromCurie } from './ontology.shared';\nimport { OntologyService } from './ontology.service.base';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class JaxOntologyService extends OntologyService {\n config_location = 'https://raw.githubusercontent.com/TheJacksonLaboratory/ontology-service/refs/heads/main/config/ontologies-internal.json'\n private config!: OntologyConfig[];\n\n /**\n * Get the configuration file from the source for the backend api service\n */\n constructor(private httpClient: HttpClient) {\n super();\n this.httpClient.get<OntologyConfig[]>(this.config_location).subscribe({\n next: (config) => this.config = config,\n error: () => {\n this.config = [];\n }\n });\n }\n\n /**\n * Search for terms in an ontology\n * @param query - the search query\n * @param limit - the number of results to return\n * @param ontology - the ontology to search\n */\n search(query: string, limit: number, ontology: Ontology): Observable<CollectionResponse<OntologyTerm>> {\n return this.httpClient.get<CollectionResponse<OntologyTerm>>(`${this.ontologyBaseResolver(ontology)}/search?q=${query}&limit=${limit}`);\n }\n\n /**\n * Get a term by its ID\n * @param id - the term ID\n */\n term(id: string): Observable<Response<OntologyTerm>> {\n try {\n const url = `${this.ontologyBaseResolver(ontologyFromCurie(id))}/${id}`;\n return this.httpClient.get<Response<OntologyTerm>>(url);\n } catch (error) {\n return throwError(() => error);\n }\n }\n\n /**\n * Get the parents of a term\n * @param id - the term ID\n */\n parents(id: string): Observable<CollectionResponse<OntologyTerm>> {\n try {\n const url = `${this.ontologyBaseResolver(ontologyFromCurie(id))}/${id}/parents`;\n return this.httpClient.get<CollectionResponse<OntologyTerm>>(url);\n } catch (error) {\n return throwError(() => error);\n }\n }\n\n /**\n * Get the children of a term\n * @param id - the term ID\n */\n children(id: string): Observable<CollectionResponse<OntologyTerm>> {\n try {\n const url = `${this.ontologyBaseResolver(ontologyFromCurie(id))}/${id}/children`;\n return this.httpClient.get<CollectionResponse<OntologyTerm>>(url);\n } catch (error: any) {\n return throwError(() => error);\n }\n }\n\n /**\n * Get the ancestors of a term\n * @param id - the term ID\n */\n ancestors(id: string): Observable<CollectionResponse<OntologyTerm>> {\n try {\n const url = `${this.ontologyBaseResolver(ontologyFromCurie(id))}/${id}/ancestors`;\n return this.httpClient.get<CollectionResponse<OntologyTerm>>(url);\n } catch (error) {\n return throwError(() => error);\n }\n }\n\n /**\n * Get the descendants of a term\n * @param id - the term ID\n */\n descendants(id: string): Observable<CollectionResponse<OntologyTerm>> {\n try {\n const url = `${this.ontologyBaseResolver(ontologyFromCurie(id))}/${id}/descendants`;\n return this.httpClient.get<CollectionResponse<OntologyTerm>>(url);\n } catch (error) {\n return throwError(() => error);\n }\n }\n\n /**\n * Get the ontology api base url configuration\n **/\n ontologyBaseResolver(ontology: Ontology): string {\n if (!this.config || this.config.length === 0) {\n throw new Error('No ontology configuration found.');\n }\n const ontology_config = this.config.find((config) => config.prefix.toUpperCase() === ontology);\n\n if(!ontology_config) {\n throw new Error('Ontology not found in configuration.');\n }\n return ontology_config.api.base;\n }\n}\n","// ols-ontology.service.ts\nimport { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { OntologyService } from './ontology.service.base';\nimport { Observable, map, pipe } from 'rxjs';\nimport { OLSResponse, OLSTerm, Ontology, OntologyTerm } from './ontology.model';\nimport { CollectionResponse, Response } from '../../models/response';\nimport { ontologyFromCurie } from './ontology.shared';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OLSOntologyService extends OntologyService {\n\n private OLS_SEARCH_BASE = 'https://www.ebi.ac.uk/ols4/api/v2/entities';\n private OLS_ENTITY_BASE = 'https://www.ebi.ac.uk/ols4/api/v2/ontologies';\n private PURL_BASE = 'http://purl.obolibrary.org/obo';\n constructor(private httpClient: HttpClient) {\n super();\n }\n\n term(id: string): Observable<Response<OntologyTerm>> {\n const ontology = ontologyFromCurie(id);\n const params = new URLSearchParams;\n params.set('includeObsoleteEntities', 'false');\n return this.httpClient.get<OLSTerm>(`${this.OLS_ENTITY_BASE}/${ontology.toLowerCase()}/classes/${this.PURL_BASE}/${id.replace(':', '_')}?${params.toString()}`).pipe(map(olsResponse => {\n return {\n object: this.mapOLSTermToOntologyTerm(olsResponse)\n };\n }));\n }\n\n search(query: string, limit: number, ontology: Ontology): Observable<CollectionResponse<OntologyTerm>> {\n\n const params = new URLSearchParams\n params.set('search', query);\n params.set('size', limit.toString());\n params.set('ontologyId', ontology.toLowerCase());\n params.set('includeObsoleteEntities', 'false');\n return this.httpClient.get<OLSResponse>(`${this.OLS_SEARCH_BASE}?${params.toString()}`).pipe(map(olsResponse => {\n const collectionResponse: CollectionResponse<OntologyTerm> = {\n data: olsResponse.elements.filter((olsTerm: OLSTerm) => olsTerm.definedBy.includes(ontology.toLowerCase())).map(olsTerm => this.mapOLSTermToOntologyTerm(olsTerm)),\n paging: {\n page: olsResponse.page,\n total_pages: olsResponse.totalPages,\n total_items: olsResponse.totalElements\n }\n };\n return collectionResponse;\n }));\n }\n\n parents(id: string): Observable<CollectionResponse<OntologyTerm>> {\n const ontology = ontologyFromCurie(id);\n const params = new URLSearchParams;\n params.set('includeObsoleteEntities', 'false');\n return this.httpClient.get<OLSTerm>(`${this.OLS_ENTITY_BASE}/${ontology.toLowerCase()}/classes/${this.PURL_BASE}/${id.replace(':', '_')}?${params.toString()}`).pipe(map(olsTerm => {\n const data = olsTerm.directParent\n ? olsTerm.directParent\n .map(parent =>\n olsTerm.linkedEntities && olsTerm.linkedEntities[parent]\n ? this.mapOLSTermToOntologyTerm(olsTerm.linkedEntities[parent])\n : \"\"\n ).filter(parent => parent !== \"\")\n : []\n return {\n data: data,\n paging: {\n page: 1,\n total_pages: 1,\n total_items: data.length\n }\n };\n }));\n }\n\n children(id: string): Observable<CollectionResponse<OntologyTerm>> {\n const ontology = ontologyFromCurie(id);\n const params = new URLSearchParams;\n params.set('includeObsoleteEntities', 'false');\n params.set('size', '100');\n params.set('lang', 'en');\n return this.httpClient.get<OLSResponse>(`${this.OLS_ENTITY_BASE}/${ontology.toLowerCase()}/classes/${this.PURL_BASE}/${id.replace(':', '_')}/children?${params.toString()}`).pipe(map(childrenResponse => {\n const data = childrenResponse.elements.map(olsTerm => this.mapOLSTermToOntologyTerm(olsTerm));\n return {\n data: data,\n paging: {\n page: childrenResponse.page,\n total_pages: childrenResponse.totalPages,\n total_items: data.length\n }\n };\n }));\n }\n\n ancestors(id: string): Observable<CollectionResponse<OntologyTerm>> {\n const ontology = ontologyFromCurie(id);\n const params = new URLSearchParams;\n params.set('includeObsoleteEntities', 'false');\n return this.httpClient.get<OLSTerm>(`${this.OLS_ENTITY_BASE}/${ontology.toLowerCase()}/classes/${this.PURL_BASE}/${id.replace(':', '_')}?${params.toString()}`).pipe(map(olsTerm => {\n const data = olsTerm.directAncestor\n ? olsTerm.directAncestor\n .map(ancestor =>\n olsTerm.linkedEntities && olsTerm.linkedEntities[ancestor]\n ? this.mapOLSTermToOntologyTerm(olsTerm.linkedEntities[ancestor])\n : \"\"\n ).filter(ancestor => ancestor !== \"\")\n : []\n return {\n data: data,\n paging: {\n page: 1,\n total_pages: 1,\n total_items: data.length\n }\n };\n }));\n }\n\n // finish testing this method\n descendants(id: string): Observable<CollectionResponse<OntologyTerm>> {\n const ontology = ontologyFromCurie(id);\n const params = new URLSearchParams;\n params.set('includeObsoleteEntities', 'false');\n params.set('size', '100'); // max size for children endpoint\n params.set('lang', 'en');\n return this.httpClient.get<OLSResponse>(`${this.OLS_ENTITY_BASE}/${ontology.toLowerCase()}/classes/${this.PURL_BASE}/${id.replace(':', '_')}/hierarchicalChildren?${params.toString()}`).pipe(map(childrenResponse => {\n const data = childrenResponse.elements.map(olsTerm => this.mapOLSTermToOntologyTerm(olsTerm));\n return {\n data: data,\n paging: {\n page: childrenResponse.page,\n total_pages: childrenResponse.totalPages,\n total_items: data.length\n }\n };\n }));\n }\n\n mapOLSTermToOntologyTerm(olsTerm: OLSTerm): OntologyTerm {\n return {\n id: olsTerm.curie,\n name: olsTerm.label && olsTerm.label.length > 0 ? olsTerm.label[0] : 'No label'\n };\n }\n}","import { Inject, Injectable } from '@angular/core';\nimport { HttpClient } from \"@angular/common/http\";\nimport { catchError, map, Observable } from \"rxjs\";\n\nimport {\n Dataset, DatasetStatus,\n Gene, GenotypeResults,\n MusterHealthCheck,\n MusterMetadata,\n ReferenceSNP,\n SNPSearchProperties,\n Strain\n} from './models/response/dtos';\nimport { SNPSearchRegion } from '../mvar/models/response/dtos';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SnpGridService {\n private api;\n\n constructor(private http: HttpClient, @Inject('environment') private environment: any) {\n this.api = environment.securedURLs.genomeMUSter;\n }\n\n /**\n * Returns the result of a health check for the API\n */\n getHealthCheck(): Observable<MusterHealthCheck> {\n return this.http.get<MusterHealthCheck>(`${this.api}/healthcheck`);\n }\n\n /**\n * Returns the metadata on the MUSter DB\n */\n getMusterMetadata(): Observable<MusterMetadata> {\n return this.http.get<MusterMetadata>(`${this.api}/db_info`).pipe(\n catchError((err) => {\n throw err;\n }),\n );\n }\n\n /**\n * Returns strains available in the API and takes an optional limit; by default the limit is set\n * to 5000 to get all strains\n * @param limit - maximum number of strains to be returned\n */\n getStrains(limit = 5000): Observable<Strain[]> {\n return this.http.get<Strain[]>(`${this.api}/strains/?limit=${limit}`).pipe(\n map((strains) => strains.filter((s) => s.mpd_strainid))\n );\n }\n\n /**\n * Returns a list of known genes whose symbols/coordinates start with the specified value.\n * @param searchValue - value to use for the \"starts with\" filter\n * @param limit - maximum number of genes to return, default is 20\n */\n getGenes(searchValue: string, limit = 20): Observable<Gene[]> {\n return this.http.get<Gene[]>(`${this.api}/genes/?symbol=${searchValue}%&limit=${limit}`);\n }\n\n /**\n * Returns the gene that matches the specified gene symbol\n * @param geneSymbol - symbol to use to get the associated gene info\n */\n getGene(geneSymbol: string): Observable<Gene | null> {\n return this.http\n .get<Gene[]>(`${this.api}/genes/?symbol=${geneSymbol}`)\n .pipe(map((genes) => (genes.length ? genes[0] : null)));\n }\n\n /**\n * Returns true if the specified gene symbol is valid from the perspective of MUSter\n * @param geneSymbol - symbol to use to check the validity of\n */\n isGeneSymbolValid(geneSymbol: string): Observable<boolean> {\n return this.getGene(geneSymbol).pipe(\n map((g: Gene | null) => g !== null && geneSymbol.toLowerCase() === g.symbol.toLowerCase()),\n );\n }\n\n /**\n * Returns list of known reference SNP (RS) data which includes IDs and coordinates\n * @param searchValue - value to use to filter the search results\n * @param limit - maximum number of results to return, default is 20\n */\n getReferenceSNPs(searchValue: string, limit = 20): Observable<ReferenceSNP[]> {\n return this.http.get<ReferenceSNP[]>(`${this.api}/rsids/?rsid=${searchValue}%&limit=${limit}`);\n }\n\n /**\n * Returns the RS info that matches the specified rsID\n * @param rsid - the RSID to use to get the associated RS info\n */\n getReferenceSNP(rsid: string): Observable<ReferenceSNP | null> {\n return this.http\n .get<ReferenceSNP[]>(`${this.api}/rsids/?rsid=${rsid}`)\n .pipe(map((rsids) => (rsids.length ? { ...rsids[0], end_position: rsids[0].start_position } : null)));\n }\n\n /**\n * Returns true if the specified rsID is valid from the perspective of MUSter\n * @param rsid - rsID to use to check the validity of\n */\n isRSIDValid(rsid: string): Observable<boolean> {\n return this.getReferenceSNP(rsid).pipe(\n map((rs: ReferenceSNP | null) => rs !== null && rsid.toLowerCase() === rs.rsid.toLowerCase()),\n );\n }\n\n /**\n * Returns the SNP results generated from the query constructed from the specified parameters and page\n * @param parameters - search properties (strain IDs, regions, assembly version, etc.)\n * @param page - requested page, which is 0-indexed. The 0th page is the initial page\n * @param pageSize - number of records to show per page. Default of 5000\n */\n getGenotypes(parameters: SNPSearchProperties, page = 0, pageSize = 5000): Observable<GenotypeResults> {\n let constructedURL =\n `${this.api}/snps/?` +\n `assembly=${parameters.assembly}&` +\n `mpd_strain_ids=${parameters.strains.join(',')}&` +\n `limit=${pageSize}`;\n\n if (parameters.strains_b?.length) {\n constructedURL += `&mpd_strain_ids_b=${parameters.strains_b.join(',')}&strain_limit=${parameters.strains.length + parameters.strains_b.length}`;\n } else {\n constructedURL += `&strain_limit=${parameters.strains.length}`\n }\n\n if (parameters.rsids?.length) {\n constructedURL += `&rsids=${parameters.rsids.join(',')}`;\n }\n\n if (parameters.genes?.length) {\n constructedURL += `&genes=${parameters.genes.join(',')}`;\n }\n\n if (parameters.regions?.length) {\n constructedURL += `®ions=${parameters.regions.join(',')}`;\n }\n\n if (parameters.dataset_id) {\n constructedURL += `&dataset_id=${parameters.dataset_id}`;\n }\n\n if (parameters.is_unique_row) {\n constructedURL += `&is_unique_row=${parameters.is_unique_row}`;\n }\n\n if (page) {\n constructedURL += `&offset=${pageSize * page}`;\n }\n\n return this.http.get<GenotypeResults>(constructedURL);\n }\n\n /**\n * Returns the URL that will generate a download (in file form) for the specified strain IDs and regions\n * @param strains - list of mpd_strain_ids to query SNPs for\n * @param regions - list of SNPSearchRegions to query SNPs for (chromosome, start and end)\n * @param dataset_id - ID of the dataset to query SNPs for\n * @param is_unique_row - boolean for polymorphism filtering - true for only rows with polymorphism, false for all\n * @param limit - the limit of the number of result rows to include in the download - you're likely to\n * prefer to pass the total number of rows generated by the query itself, which is included\n * as part of the GenotypeResults returned by getGenotypes()\n */\n getGenotypeDownloadURLForCurrentData(strains: number[], regions: SNPSearchRegion[], dataset_id: number | undefined, is_unique_row = false, limit: number): string {\n if (!dataset_id) {\n // default to the GenomeMuster dataset id\n dataset_id = 2;\n }\n const stringifiedRegions = `regions=${regions\n .map((reg) => `${reg.chromosome}:${reg.start_position}-${reg.end_position}`)\n .join(',')}`;\n const stringifiedStrains = `mpd_strain_ids=${strains.join(',')}`;\n return `${this.api}/snps/download?dataset_id=${dataset_id}&${stringifiedStrains}&${stringifiedRegions}&limit=${limit}&is_unique_row=${is_unique_row}`;\n }\n\n /**\n * Returns the dataset with the given ID\n * @param id\n */\n getDataset(id: number): Observable<Dataset> {\n return this.http.get<Dataset>(`${this.api}/datasets/${id}`)\n }\n\n /**\n * Returns a list of Datasets that match the given criteria\n * @param status The value of the status to be used for filtering\n * @param limit The maximum number of records to return\n */\n findDatasets(status: DatasetStatus, limit = 50): Observable<Dataset[]> {\n let url = `${this.api}/datasets`;\n url += `/?limit=${limit}`;\n if (status) {\n url += `&status=${status}`;\n }\n return this.http.get<Dataset[]>(url);\n }\n\n /**\n * Return a list of strains that match the given criteria\n * @param datasetId The ID of the dataset from which to fetch the strains\n * @param limit The maximum number of records to return\n */\n datasetStrains(datasetId: number, limit = 5000): Observable<Strain[]> {\n const url = `${this.api}/dataset_strain/?dataset_id=${datasetId}&limit=${limit}`;\n return this.http.get<Strain[]>(url);\n }\n\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SnpGridService } from \"./snp-grid.service\";\n\n@NgModule({\n imports: [CommonModule],\n})\nexport class SnpGridClientModule {\n\n public static forRoot(environment: any): ModuleWithProviders<SnpGridClientModule> {\n return {\n ngModule: SnpGridClientModule,\n providers: [\n SnpGridService,\n {\n provide: 'environment', // you can also use InjectionToken\n useValue: environment\n }\n ]\n };\n }\n\n}\n","import { SNP, SNPSearchRegion } from \"../../../mvar/models/response/dtos\";\n\nexport interface MusterHealthCheck {\n status: string;\n timestamp: string;\n}\n\nexport interface MusterMetadata {\n total_number_of_SNPs: number;\n last_updated: string;\n version: string;\n total_number_of_strains: number;\n}\n\nexport interface Strain {\n bq_sample_id: number;\n mpd_strainid: number;\n strainname: string;\n straintype: string;\n}\n\nexport interface Gene {\n symbol: string;\n chr: string;\n start_position: number;\n end_position: number;\n strand: string;\n description: string;\n mginum: string;\n markertype: string;\n centimorgan: number;\n featuretype: string;\n}\n\nexport interface ReferenceSNP {\n chr: string;\n start_position: number;\n end_position?: number; // added later\n rsid: string;\n}\n\nexport interface MusterSearchParameters {\n bq_sample_ids: null;\n genes: string | null; // stringified array\n genes_data: Gene[];\n limit: number;\n mpd_strain_ids: string; // stringified array\n next_region: string | null;\n offset: number;\n query_regions: {\n chromosome: string;\n regions: SNPSearchRegion[];\n }[];\n regions: SNPSearchRegion[];\n rsids: string | null; //stringified array\n rsids_data: ReferenceSNP[];\n strain_limit: number;\n strain_names: null;\n dataset: Dataset;\n}\n\nexport interface SNPSearchProperties {\n strains: number[];\n strains_b?: number[];\n rsids?: string[];\n regions?: string[];\n assembly: string;\n genes?: string[];\n offset?: number;\n dataset_id?: number;\n is_unique_row?: boolean;\n}\n\nexport interface GenotypeResults {\n message: string | null;\n next_region: string;\n parameter: MusterSearchParameters;\n snps: SNP[];\n status: string;\n total_rows: number;\n}\n\nexport enum DatasetStatus {\n Queued = 'queued',\n Loading = 'loading',\n Done = 'done',\n Archived = 'archived',\n}\n\nexport interface Dataset {\n id: number,\n display_name: string,\n sort_by: number,\n year: string,\n procedure: string,\n panel: string,\n sex: string,\n dataset_name: string,\n source: string,\n status: DatasetStatus,\n num_of_strains: number,\n pubmed: string,\n description: string,\n assembly_version: string,\n}\n","// AsyncTask API client\nexport * from './lib/services/asynctask/asynctask.service';\nexport * from './lib/services/asynctask/asynctask.model';\n\n// ISA Data API client\nexport * from './lib/services/isa-data/isa-data.service';\nexport * from './lib/models/isa-data/isa-data.model';\nexport * from './lib/tokens/isa-data-config.token';\n\n// MVAR API client\nexport * from './lib/services/mvar/mvar.service';\nexport * from './lib/services/mvar/models/response/dtos';\nexport * from './lib/services/mvar/mvar-client.module';\n\n// Ontology API client\nexport * from './lib/services/ontology/ontology.service.base';\nexport * from './lib/services/ontology/ontology.service.jax';\nexport * from './lib/services/ontology/ontology.service.ols';\n\n// MVar API client\nexport * from './lib/services/mvar/mvar.service';\nexport * from './lib/services/mvar/models/response/dtos';\nexport * from './lib/services/mvar/mvar-client.module';\n\n// SNP Grid API client\nexport * from './lib/services/snp-grid/snp-grid-client.module';\nexport * from './lib/services/snp-grid/models/response/dtos';\nexport * from './lib/services/snp-grid/snp-grid.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAWa,qBAAqB,CAAA;AACZ,IAAA,IAAA;AAApB,IAAA,WAAA,CAAoB,IAAgB,EAAA;QAAhB,IAAA,CAAA,IAAI,GAAJ,IAAI;IAAgB;AAExC,IAAA,MAAM,CAAC,OAAe,EAAA;QAC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B;AACvB,CAAC,EALW,aAAa,KAAb,aAAa,GAAA,EAAA,CAAA,CAAA;;AClFzB;;ACAA;;AAEG;;;;"}
|
|
@@ -7,9 +7,6 @@ export declare class SnpGridService {
|
|
|
7
7
|
private http;
|
|
8
8
|
private environment;
|
|
9
9
|
private api;
|
|
10
|
-
apiAvailable: boolean;
|
|
11
|
-
private strains;
|
|
12
|
-
strains$: Observable<Strain[]>;
|
|
13
10
|
constructor(http: HttpClient, environment: any);
|
|
14
11
|
/**
|
|
15
12
|
* Returns the result of a health check for the API
|