Skip to content

Commit

Permalink
Fix #15 - JAX ontology interface change - it is still on the version …
Browse files Browse the repository at this point in the history
…0 range so can change rapidly
  • Loading branch information
dnil committed Jan 28, 2025
1 parent c6d5cd0 commit 291020d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 26 deletions.
24 changes: 2 additions & 22 deletions src/hpoJax.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,9 @@
export interface TermResponse {
details: Details;
relations: Relations;
}

export interface Relations {
termCount: number;
parents: Parent[];
children: Parent[];
}

export interface Parent {
name: string;
id: number;
childrenCount: number;
ontologyId: string;
}

export interface Details {
name: string;
id: string;
altTermIds: string[];
definition: string;
comment: string;
synonyms: string[];
isObsolete: boolean;
xrefs: string[];
pubmedXrefs: string[];
xrefs?: string[];
descendantCount?: number;
}
8 changes: 4 additions & 4 deletions src/utils/lookupHpoTerm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function lookupHpoTerm(term: string): Promise<IResult> {
);
if (ret.ok) {
const res = (await ret.json()) as TermResponse;
return { term, label: res.details.name };
return { term, label: res.name };
} else {
return { error: 'Unknown HPO term' };
}
Expand All @@ -20,9 +20,9 @@ async function lookupHpoTerm(term: string): Promise<IResult> {
export interface IJaxTerm {
name: string;
id: string;
childrenCount: number;
ontologyId: string;
synonym?: string;
descendantCount: number;
xrefs?: string[];
synonyms: string[];
}
export interface TermsResponse {
error?: string;
Expand Down

0 comments on commit 291020d

Please sign in to comment.