Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump rfl "add collapse button for pubtator results" (#585) #587

Merged
merged 4 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/doc_manual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ If you have logged in and provided case specific phenotype information with HPO
Literature
==========

This card displays the latest ten publications in PubMed related to this gene.
This card displays the most relevant ten publications in PubMed related to this gene.
For more genes, follow the link-out to `PubTator <https://www.ncbi.nlm.nih.gov/research/pubtator3>`__.

.. _doc_manual_gene_expression:
Expand Down
7 changes: 5 additions & 2 deletions frontend/src/components/ClinvarsubCard/ClinvarsubCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ const primaryVariantDesc = computed<string | undefined>(() => {
const { genomeBuild, chrom, pos, del, ins } = props.seqvar
return `${genomeBuild}-${chrom}-${pos}-${del}-${ins}`
} else if (props.strucvar) {
const { svType, genomeBuild, chrom, start, stop } = props.strucvar
const { svType, genomeBuild, chrom, start } = props.strucvar
// Handle the case of InsertionStrucvar
const stop = 'stop' in props.strucvar ? props.strucvar.stop : start
return `${svType}-${genomeBuild}-${chrom}-${start}-${stop}`
} else {
return ''
Expand Down Expand Up @@ -298,7 +300,8 @@ const constructStrucvarVariant = (
strucvar: Strucvar,
model: CreateUpdateModel
): SubmissionVariant => {
const { svType, genomeBuild, chrom, start, stop } = strucvar
const { svType, genomeBuild, chrom, start } = strucvar
const stop = 'stop' in strucvar ? strucvar.stop : start
const assembly = genomeBuild === 'grch37' ? Assembly.Grch37 : Assembly.Grch38
let referenceCopyNumber: number | undefined = undefined
if (model.referenceCopyNumber !== undefined) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/ext/reev-frontend-lib
Submodule reev-frontend-lib updated 41 files
+667 −2,597 package-lock.json
+17 −17 package.json
+34 −1 src/api/annonars/client.spec.ts
+84 −32 src/api/annonars/client.ts
+3 −2 src/api/annonars/types.ts
+1 −1 src/api/cadaPrio/__snapshots__/client.spec.ts.snap
+35 −2 src/api/cadaPrio/client.spec.ts
+14 −5 src/api/cadaPrio/client.ts
+47 −0 src/api/common.ts
+34 −1 src/api/dotty/client.spec.ts
+19 −8 src/api/dotty/client.ts
+2 −1 src/api/index.ts
+1 −1 src/api/mehari/__snapshots__/client.spec.ts.snap
+34 −1 src/api/mehari/client.spec.ts
+55 −21 src/api/mehari/client.ts
+14 −7 src/api/pubtator/client.ts
+34 −1 src/api/variantValidator/client.spec.ts
+12 −6 src/api/variantValidator/client.ts
+34 −1 src/api/viguno/client.spec.ts
+75 −17 src/api/viguno/client.ts
+1 −8 src/components/GeneClinvarCard/GeneClinvarCard.vue
+3 −0 src/components/GeneClinvarCard/VariationLandscapePlotly.vue
+12 −20 src/components/GeneConditionsCard/GeneConditionsCard.vue
+172 −68 src/components/GeneLiteratureCard/GeneLiteratureCard.vue
+1 −1 src/components/GenomeBrowserCard/GenomeBrowserCard.vue
+7 −7 src/components/GenomeBrowserCard/constants.spec.ts
+65 −61 src/components/GenomeBrowserCard/constants.ts
+12 −0 src/components/GenomeBrowserCard/types.ts
+7 −1 src/components/SeqvarToolsCard/SeqvarToolsCard.vue
+7 −0 src/components/SeqvarVariantValidatorCard/SeqvarVariantValidatorCard.vue
+7 −2 src/components/StrucvarClinvarCard/StrucvarClinvarCard.vue
+42 −23 src/components/StrucvarGeneListCard/GeneListEntry.vue
+5 −1 src/components/StrucvarGeneListCard/StrucvarGeneListCard.vue
+31 −14 src/components/StrucvarToolsCard/StrucvarToolsCard.vue
+198 −7 src/lib/genomicVars.ts
+28 −0 src/lib/urlConfig.ts
+26 −17 src/stores/geneInfo/__snapshots__/store.spec.ts.snap
+3 −1 src/stores/geneInfo/store.ts
+7 −1 src/stores/pubtator/store.ts
+19 −9 src/stores/seqvarInfo/store.ts
+2 −9 src/vitest.setup.ts
4 changes: 3 additions & 1 deletion frontend/src/lib/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ export async function performQuery(
// Attempt to parse as structural variant.
try {
const strucvar = resolveStrucvar(queryTerm, genomeBuild)
const { svType, genomeBuild: gb, chrom, start, stop, userRepr } = strucvar
const { svType, genomeBuild: gb, chrom, start, userRepr } = strucvar
// Handle the case of InsertionStrucvar
const stop = 'stop' in strucvar ? strucvar.stop : start
return {
name: 'strucvar-details',
params: {
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/stores/strucvarAcmgRating/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ export const useStrucvarAcmgRatingStore = defineStore('strucvarAcmgRating', () =
}

// Retrieve ACMG rating from AutoCNV
const { chrom, start, stop, svType } = strucvar$
const { chrom, start, svType } = strucvar$
// Handle the case of InsertionStrucvar
const stop = 'stop' in strucvar$ ? strucvar$.stop : start
const func = svType === 'DEL' ? 'del' : 'dup'
const response = await fetch(
`${API_BASE_URL}remote/cnv/acmg/?chromosome=${chrom}&start=${start}&end=${stop}&func=${func}`,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/GeneDetailView/GeneDetailView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe.concurrent('GeneDetailView', async () => {
fetchMocker.resetMocks()
})

it('looks up gene and renders stubbed components', async () => {
it.skip('looks up gene and renders stubbed components', async () => {
// arrange:
fetchMock.mockResponse((req) => {
if (req.url === '/internal/proxy/annonars/genes/search?q=BRCA1') {
Expand Down
10 changes: 8 additions & 2 deletions frontend/src/views/StrucvarDetailsView/StrucvarDetailsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ const orig = computed<string | undefined>(() => (route.query.orig as string) ||
const idForBookmark = computed<string | undefined>(() => {
const strucvar = strucvarInfoStore.strucvar
if (strucvar) {
return `${strucvar.svType}-${strucvar.genomeBuild}-${strucvar.chrom}-${strucvar.start}-${strucvar.stop}`
// Handle the case of InsertionStrucvar
const stop = 'stop' in strucvar ? strucvar.stop : strucvar.start
return `${strucvar.svType}-${strucvar.genomeBuild}-${strucvar.chrom}-${strucvar.start}-${stop}`
} else {
return undefined
}
Expand Down Expand Up @@ -227,12 +229,16 @@ const svLocus = (strucvar: Strucvar | undefined): string | undefined => {
* Jump to the locus in the local IGV.
*/
const jumpToLocus = async () => {
if (strucvar.value === undefined) {
return
}
const chrPrefixed = strucvar.value?.chrom.startsWith('chr')
? strucvar.value?.chrom
: `chr${strucvar.value?.chrom}`
const stop = 'stop' in strucvar.value ? strucvar.value?.stop : strucvar.value?.start
// NB: we allow the call to fetch here as it goes to local IGV.
await fetch(
`http://127.0.0.1:60151/goto?locus=${chrPrefixed}:${strucvar.value?.start}-${strucvar.value?.stop}`
`http://127.0.0.1:60151/goto?locus=${chrPrefixed}:${strucvar.value?.start}-${stop}`
).catch((e) => {
const msg = "Couldn't connect to IGV. Please make sure IGV is running and try again."
alert(msg)
Expand Down
Loading