Skip to content

Commit

Permalink
fix: Different fixes for AutoACMG in REEV (#806)
Browse files Browse the repository at this point in the history
  • Loading branch information
gromdimon authored Sep 23, 2024
1 parent 20969f4 commit 016be2a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions backend/app/api/internal/endpoints/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ async def reverse_proxy(request: Request) -> Response:
backend_url = settings.BACKEND_PREFIX_CADA_PRIO + url.path.replace(
"/internal/proxy/cada-prio", ""
)
elif url.path.startswith(f"{settings.INTERNAL_STR}/proxy/autoacmg"):
elif url.path.startswith(f"{settings.INTERNAL_STR}/proxy/auto-acmg"):
backend_url = settings.BACKEND_PREFIX_AUTOACMG + url.path.replace(
"/internal/proxy/autoacmg", ""
"/internal/proxy/auto-acmg", ""
)

if backend_url:
Expand Down
2 changes: 1 addition & 1 deletion backend/app/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def assemble_cors_origins(cls, v: str | list[str]) -> list[str] | str: # pragma
#: Prefix for the backend of cada-prio service.
BACKEND_PREFIX_CADA_PRIO: str = "http://cada-prio:8080"
#: Prefix for the backend of autoacmg service.
BACKEND_PREFIX_AUTOACMG: str = "http://autoacmg:8000"
BACKEND_PREFIX_AUTOACMG: str = "http://auto-acmg:8080"

#: URL to Redis service.
REDIS_URL: str = "redis://redis:6379"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/api/autoacmg/client.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('AutoACMGClient', () => {
expect(result).toEqual(AUTOACMG_SEQVAR_RESULT['prediction'])
expect(fetchMocker).toHaveBeenCalledTimes(1)
expect(fetchMocker).toHaveBeenCalledWith(
'/internal/proxy/autoacmg/api/v1/predict/seqvar?variant_name=chr17:41215920:G:T&genome_release=grch37',
'/internal/proxy/auto-acmg/api/v1/predict/seqvar?variant_name=chr17:41215920:G:T&genome_release=grch37',
expect.objectContaining({
method: 'GET',
headers: {
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/api/autoacmg/client.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { ConfigError } from '@bihealth/reev-frontend-lib/api/common'
import { Seqvar } from '@bihealth/reev-frontend-lib/lib/genomicVars'

import { API_INTERNAL_BASE_PREFIX } from '../common'
import { API_INTERNAL_BASE_PREFIX_AUTO_ACMG } from '../common'
import { AutoACMGSeqVarResult } from './types'

//: URL to the AutoACMG API
const API_BASE_URL = `${API_INTERNAL_BASE_PREFIX}proxy/autoacmg/api/v1`
const API_BASE_URL = `${API_INTERNAL_BASE_PREFIX_AUTO_ACMG}/api/v1`

export class AutoACMGClient {
private apiBaseUrl: string
Expand Down Expand Up @@ -36,6 +36,7 @@ export class AutoACMGClient {
async classifySequenceVariant(seqvar: Seqvar): Promise<AutoACMGSeqVarResult> {
const seqvarName = `chr${seqvar.chrom}:${seqvar.pos}:${seqvar.del}:${seqvar.ins}`

console.log('REQUESTING', this.apiBaseUrl)
const url =
`${this.apiBaseUrl}/predict/seqvar?variant_name=${seqvarName}` +
`&genome_release=${seqvar.genomeBuild}`
Expand Down
1 change: 1 addition & 0 deletions frontend/src/api/common/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ export const API_INTERNAL_BASE_PREFIX_VIGUNO = '/internal/proxy/viguno'
export const API_INTERNAL_BASE_PREFIX_NGINX = '/internal/proxy/nginx'
export const API_INTERNAL_BASE_PREFIX_DOTTY = '/internal/proxy/dotty'
export const API_INTERNAL_BASE_PREFIX_CADA_PRIO = '/internal/proxy/cada-prio'
export const API_INTERNAL_BASE_PREFIX_AUTO_ACMG = '/internal/proxy/auto-acmg'
export const API_V1_BASE_PREFIX = '/api/v1/'
3 changes: 1 addition & 2 deletions frontend/src/stores/seqvarAcmgRating/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import { defineStore } from 'pinia'
import { ref } from 'vue'

import { AcmgSeqVarClient } from '@/api/acmgSeqvar'
import { AutoACMGClient } from '@/api/autoacmg'
import { AutoACMGPrediction, AutoACMGStrength } from '@/api/autoacmg/types'
import { AutoACMGClient, AutoACMGPrediction, AutoACMGStrength } from '@/api/autoacmg'
import { InterVarClient } from '@/api/intervar'
import {
ALL_ACMG_CRITERIA,
Expand Down

0 comments on commit 016be2a

Please sign in to comment.