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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,80 +0,0 @@
1
- export interface OntologyConfig {
2
- name: string;
3
- prefix: string;
4
- github: {
5
- api: string;
6
- home: string;
7
- };
8
- home: string;
9
- api: {
10
- docs: string;
11
- base: string;
12
- };
13
- base_file: string;
14
- international: boolean;
15
- description: string;
16
- }
17
- export declare enum Ontology {
18
- HP = "HP",
19
- MONDO = "MONDO",
20
- MP = "MP",
21
- CL = "CL",
22
- MAXO = "MAXO"
23
- }
24
- export interface OntologyTerm {
25
- id: string;
26
- name: string;
27
- }
28
- export interface OLSTerm {
29
- appearsIn: string[];
30
- curie: string;
31
- definedBy: string[];
32
- definition?: Array<{
33
- type: string[];
34
- value: string;
35
- axioms?: Array<{
36
- [key: string]: string;
37
- }>;
38
- }>;
39
- definitionProperty?: string;
40
- directAncestor?: string[];
41
- directParent?: Array<string>;
42
- hasDirectChildren?: boolean;
43
- hasDirectParents?: boolean;
44
- hasHierarchicalChildren?: boolean;
45
- hasHierarchicalParents?: boolean;
46
- hierarchicalAncestor?: string[];
47
- hierarchicalParent?: Array<string | {
48
- type: string[];
49
- value: string;
50
- axioms?: Array<{
51
- [key: string]: string;
52
- }>;
53
- }>;
54
- hierarchicalProperty?: string;
55
- imported?: boolean;
56
- iri: string;
57
- isDefiningOntology?: boolean;
58
- isObsolete?: boolean;
59
- isPreferredRoot?: boolean;
60
- label?: string[];
61
- linkedEntities?: Record<string, any>;
62
- linksTo?: string[];
63
- numDescendants?: number;
64
- numHierarchicalDescendants?: number;
65
- ontologyId?: string;
66
- ontologyIri?: string;
67
- ontologyPreferredPrefix?: string;
68
- searchableAnnotationValues?: any[];
69
- shortForm?: string;
70
- type?: string[];
71
- [key: string]: any;
72
- }
73
- export interface OLSResponse {
74
- page: number;
75
- numElements: number;
76
- totalPages: number;
77
- totalElements: number;
78
- elements: OLSTerm[];
79
- facetFieldsToCounts?: Record<string, any>;
80
- }
@@ -1,11 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { Ontology, OntologyTerm } from './ontology.model';
3
- import { CollectionResponse, Response } from '../../models/response';
4
- export declare abstract class OntologyService {
5
- abstract search(query: string, limit: number, ontology: Ontology): Observable<CollectionResponse<OntologyTerm>>;
6
- abstract term(id: string): Observable<Response<OntologyTerm>>;
7
- abstract parents(id: string): Observable<CollectionResponse<OntologyTerm>>;
8
- abstract children(id: string): Observable<CollectionResponse<OntologyTerm>>;
9
- abstract ancestors(id: string): Observable<CollectionResponse<OntologyTerm>>;
10
- abstract descendants(id: string): Observable<CollectionResponse<OntologyTerm>>;
11
- }
@@ -1,53 +0,0 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { Observable } from 'rxjs';
3
- import { Ontology, OntologyTerm } from './ontology.model';
4
- import { CollectionResponse, Response } from '../../models/response';
5
- import { OntologyService } from './ontology.service.base';
6
- import * as i0 from "@angular/core";
7
- export declare class JaxOntologyService extends OntologyService {
8
- private httpClient;
9
- config_location: string;
10
- private config;
11
- /**
12
- * Get the configuration file from the source for the backend api service
13
- */
14
- constructor(httpClient: HttpClient);
15
- /**
16
- * Search for terms in an ontology
17
- * @param query - the search query
18
- * @param limit - the number of results to return
19
- * @param ontology - the ontology to search
20
- */
21
- search(query: string, limit: number, ontology: Ontology): Observable<CollectionResponse<OntologyTerm>>;
22
- /**
23
- * Get a term by its ID
24
- * @param id - the term ID
25
- */
26
- term(id: string): Observable<Response<OntologyTerm>>;
27
- /**
28
- * Get the parents of a term
29
- * @param id - the term ID
30
- */
31
- parents(id: string): Observable<CollectionResponse<OntologyTerm>>;
32
- /**
33
- * Get the children of a term
34
- * @param id - the term ID
35
- */
36
- children(id: string): Observable<CollectionResponse<OntologyTerm>>;
37
- /**
38
- * Get the ancestors of a term
39
- * @param id - the term ID
40
- */
41
- ancestors(id: string): Observable<CollectionResponse<OntologyTerm>>;
42
- /**
43
- * Get the descendants of a term
44
- * @param id - the term ID
45
- */
46
- descendants(id: string): Observable<CollectionResponse<OntologyTerm>>;
47
- /**
48
- * Get the ontology api base url configuration
49
- **/
50
- ontologyBaseResolver(ontology: Ontology): string;
51
- static ɵfac: i0.ɵɵFactoryDeclaration<JaxOntologyService, never>;
52
- static ɵprov: i0.ɵɵInjectableDeclaration<JaxOntologyService>;
53
- }
@@ -1,22 +0,0 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { OntologyService } from './ontology.service.base';
3
- import { Observable } from 'rxjs';
4
- import { OLSTerm, Ontology, OntologyTerm } from './ontology.model';
5
- import { CollectionResponse, Response } from '../../models/response';
6
- import * as i0 from "@angular/core";
7
- export declare class OLSOntologyService extends OntologyService {
8
- private httpClient;
9
- private OLS_SEARCH_BASE;
10
- private OLS_ENTITY_BASE;
11
- private PURL_BASE;
12
- constructor(httpClient: HttpClient);
13
- term(id: string): Observable<Response<OntologyTerm>>;
14
- search(query: string, limit: number, ontology: Ontology): Observable<CollectionResponse<OntologyTerm>>;
15
- parents(id: string): Observable<CollectionResponse<OntologyTerm>>;
16
- children(id: string): Observable<CollectionResponse<OntologyTerm>>;
17
- ancestors(id: string): Observable<CollectionResponse<OntologyTerm>>;
18
- descendants(id: string): Observable<CollectionResponse<OntologyTerm>>;
19
- mapOLSTermToOntologyTerm(olsTerm: OLSTerm): OntologyTerm;
20
- static ɵfac: i0.ɵɵFactoryDeclaration<OLSOntologyService, never>;
21
- static ɵprov: i0.ɵɵInjectableDeclaration<OLSOntologyService>;
22
- }
@@ -1,5 +0,0 @@
1
- import { Ontology } from "./ontology.model";
2
- /**
3
- * Get the ontology from curie
4
- */
5
- export declare function ontologyFromCurie(curie: string): Ontology;
@@ -1,95 +0,0 @@
1
- import { SNP, SNPSearchRegion } from "../../../mvar/models/response/dtos";
2
- export interface MusterHealthCheck {
3
- status: string;
4
- timestamp: string;
5
- }
6
- export interface MusterMetadata {
7
- total_number_of_SNPs: number;
8
- last_updated: string;
9
- version: string;
10
- total_number_of_strains: number;
11
- }
12
- export interface Strain {
13
- bq_sample_id: number;
14
- mpd_strainid: number;
15
- strainname: string;
16
- straintype: string;
17
- }
18
- export interface Gene {
19
- symbol: string;
20
- chr: string;
21
- start_position: number;
22
- end_position: number;
23
- strand: string;
24
- description: string;
25
- mginum: string;
26
- markertype: string;
27
- centimorgan: number;
28
- featuretype: string;
29
- }
30
- export interface ReferenceSNP {
31
- chr: string;
32
- start_position: number;
33
- end_position?: number;
34
- rsid: string;
35
- }
36
- export interface MusterSearchParameters {
37
- bq_sample_ids: null;
38
- genes: string | null;
39
- genes_data: Gene[];
40
- limit: number;
41
- mpd_strain_ids: string;
42
- next_region: string | null;
43
- offset: number;
44
- query_regions: {
45
- chromosome: string;
46
- regions: SNPSearchRegion[];
47
- }[];
48
- regions: SNPSearchRegion[];
49
- rsids: string | null;
50
- rsids_data: ReferenceSNP[];
51
- strain_limit: number;
52
- strain_names: null;
53
- dataset: Dataset;
54
- }
55
- export interface SNPSearchProperties {
56
- strains: number[];
57
- strains_b?: number[];
58
- rsids?: string[];
59
- regions?: string[];
60
- assembly: string;
61
- genes?: string[];
62
- offset?: number;
63
- dataset_id?: number;
64
- is_unique_row?: boolean;
65
- }
66
- export interface GenotypeResults {
67
- message: string | null;
68
- next_region: string;
69
- parameter: MusterSearchParameters;
70
- snps: SNP[];
71
- status: string;
72
- total_rows: number;
73
- }
74
- export declare enum DatasetStatus {
75
- Queued = "queued",
76
- Loading = "loading",
77
- Done = "done",
78
- Archived = "archived"
79
- }
80
- export interface Dataset {
81
- id: number;
82
- display_name: string;
83
- sort_by: number;
84
- year: string;
85
- procedure: string;
86
- panel: string;
87
- sex: string;
88
- dataset_name: string;
89
- source: string;
90
- status: DatasetStatus;
91
- num_of_strains: number;
92
- pubmed: string;
93
- description: string;
94
- assembly_version: string;
95
- }
@@ -1,9 +0,0 @@
1
- import { ModuleWithProviders } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "@angular/common";
4
- export declare class SnpGridClientModule {
5
- static forRoot(environment: any): ModuleWithProviders<SnpGridClientModule>;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<SnpGridClientModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<SnpGridClientModule, never, [typeof i1.CommonModule], never>;
8
- static ɵinj: i0.ɵɵInjectorDeclaration<SnpGridClientModule>;
9
- }
@@ -1,94 +0,0 @@
1
- import { HttpClient } from "@angular/common/http";
2
- import { Observable } from "rxjs";
3
- import { Dataset, DatasetStatus, Gene, GenotypeResults, MusterHealthCheck, MusterMetadata, ReferenceSNP, SNPSearchProperties, Strain } from './models/response/dtos';
4
- import { SNPSearchRegion } from '../mvar/models/response/dtos';
5
- import * as i0 from "@angular/core";
6
- export declare class SnpGridService {
7
- private http;
8
- private environment;
9
- private api;
10
- constructor(http: HttpClient, environment: any);
11
- /**
12
- * Returns the result of a health check for the API
13
- */
14
- getHealthCheck(): Observable<MusterHealthCheck>;
15
- /**
16
- * Returns the metadata on the MUSter DB
17
- */
18
- getMusterMetadata(): Observable<MusterMetadata>;
19
- /**
20
- * Returns strains available in the API and takes an optional limit; by default the limit is set
21
- * to 5000 to get all strains
22
- * @param limit - maximum number of strains to be returned
23
- */
24
- getStrains(limit?: number): Observable<Strain[]>;
25
- /**
26
- * Returns a list of known genes whose symbols/coordinates start with the specified value.
27
- * @param searchValue - value to use for the "starts with" filter
28
- * @param limit - maximum number of genes to return, default is 20
29
- */
30
- getGenes(searchValue: string, limit?: number): Observable<Gene[]>;
31
- /**
32
- * Returns the gene that matches the specified gene symbol
33
- * @param geneSymbol - symbol to use to get the associated gene info
34
- */
35
- getGene(geneSymbol: string): Observable<Gene | null>;
36
- /**
37
- * Returns true if the specified gene symbol is valid from the perspective of MUSter
38
- * @param geneSymbol - symbol to use to check the validity of
39
- */
40
- isGeneSymbolValid(geneSymbol: string): Observable<boolean>;
41
- /**
42
- * Returns list of known reference SNP (RS) data which includes IDs and coordinates
43
- * @param searchValue - value to use to filter the search results
44
- * @param limit - maximum number of results to return, default is 20
45
- */
46
- getReferenceSNPs(searchValue: string, limit?: number): Observable<ReferenceSNP[]>;
47
- /**
48
- * Returns the RS info that matches the specified rsID
49
- * @param rsid - the RSID to use to get the associated RS info
50
- */
51
- getReferenceSNP(rsid: string): Observable<ReferenceSNP | null>;
52
- /**
53
- * Returns true if the specified rsID is valid from the perspective of MUSter
54
- * @param rsid - rsID to use to check the validity of
55
- */
56
- isRSIDValid(rsid: string): Observable<boolean>;
57
- /**
58
- * Returns the SNP results generated from the query constructed from the specified parameters and page
59
- * @param parameters - search properties (strain IDs, regions, assembly version, etc.)
60
- * @param page - requested page, which is 0-indexed. The 0th page is the initial page
61
- * @param pageSize - number of records to show per page. Default of 5000
62
- */
63
- getGenotypes(parameters: SNPSearchProperties, page?: number, pageSize?: number): Observable<GenotypeResults>;
64
- /**
65
- * Returns the URL that will generate a download (in file form) for the specified strain IDs and regions
66
- * @param strains - list of mpd_strain_ids to query SNPs for
67
- * @param regions - list of SNPSearchRegions to query SNPs for (chromosome, start and end)
68
- * @param dataset_id - ID of the dataset to query SNPs for
69
- * @param is_unique_row - boolean for polymorphism filtering - true for only rows with polymorphism, false for all
70
- * @param limit - the limit of the number of result rows to include in the download - you're likely to
71
- * prefer to pass the total number of rows generated by the query itself, which is included
72
- * as part of the GenotypeResults returned by getGenotypes()
73
- */
74
- getGenotypeDownloadURLForCurrentData(strains: number[], regions: SNPSearchRegion[], dataset_id: number | undefined, is_unique_row: boolean | undefined, limit: number): string;
75
- /**
76
- * Returns the dataset with the given ID
77
- * @param id
78
- */
79
- getDataset(id: number): Observable<Dataset>;
80
- /**
81
- * Returns a list of Datasets that match the given criteria
82
- * @param status The value of the status to be used for filtering
83
- * @param limit The maximum number of records to return
84
- */
85
- findDatasets(status: DatasetStatus, limit?: number): Observable<Dataset[]>;
86
- /**
87
- * Return a list of strains that match the given criteria
88
- * @param datasetId The ID of the dataset from which to fetch the strains
89
- * @param limit The maximum number of records to return
90
- */
91
- datasetStrains(datasetId: number, limit?: number): Observable<Strain[]>;
92
- static ɵfac: i0.ɵɵFactoryDeclaration<SnpGridService, never>;
93
- static ɵprov: i0.ɵɵInjectableDeclaration<SnpGridService>;
94
- }
@@ -1,5 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- export interface IsaDataServiceConfig {
3
- baseUrl: string;
4
- }
5
- export declare const ISA_DATA_SERVICE_CONFIG: InjectionToken<IsaDataServiceConfig>;