Skip to content

Commit 554e7ec

Browse files
committed
Update clinvar terms
1 parent 6e1340f commit 554e7ec

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/main/webapp/app/shared/tiles/tile-utils.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,12 @@ function createPathogenicityTileProps(
210210
if (clinvarData === null || clinvarData?.pathogenicity === '') {
211211
clinvarPathogenicity = 'Not Available';
212212
} else if (clinvarData) {
213-
clinvarPathogenicity = clinvarData.pathogenicity;
213+
clinvarPathogenicity = clinvarData.pathogenicity
214+
.replace(/_/g, ' ')
215+
.replace(/\|/g, ';');
216+
clinvarPathogenicity =
217+
clinvarPathogenicity.charAt(0).toUpperCase() +
218+
clinvarPathogenicity.slice(1);
214219
}
215220

216221
return {
@@ -275,6 +280,10 @@ export function SomaticGermlineAlterationTiles({
275280
const response = await axios.get(
276281
`${GENOME_NEXUS_ANNOTATION_BASE_URL}/${rest.variantAnnotation.query.hugoSymbol}:${rest.variantAnnotation.query.alteration}?fields=clinvar`
277282
);
283+
if (!response.data.successfully_annotated) {
284+
setClinvar(null);
285+
return;
286+
}
278287
const clinvarAnnotation = response.data.clinvar.annotation;
279288
if (clinvarAnnotation) {
280289
setClinvar({

0 commit comments

Comments
 (0)