Skip to content

Commit

Permalink
plotPars; refseq2chro for variant plot parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaudis committed Feb 28, 2024
1 parent 6f69725 commit 77fc3fe
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/modules/details-pages/variantPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { Layout } from "../../components/Layout"
import { ShowJSON } from "../../components/RawData"
import { BiosamplePlot } from "../../components/SVGloaders"
import React from "react"
import { refseq2chro } from "../../components/Chromosome"

const entity = "variants"
const exampleId = "pgxvar-5bab576a727983b2e00b8d32"
Expand Down Expand Up @@ -52,18 +53,22 @@ function VariantLoader({ id, datasetIds }) {
)
}

function VariantResponse({ response, id }) {
function VariantResponse({ response, id datasetIds }) {
if (!response.response.resultSets[0].results[0]) {
return NoResultsHelp(exampleId, entity)
}
return <Variant variant={response.response.resultSets[0].results[0]} id={id} />
return (
<Variant
variant={response.response.resultSets[0].results[0]}
id={id}
datasetIds={datasetIds}
/>
}

function Variant({ variant, id, datasetIds }) {

var marker = variant.variantInternalId
var mParts = marker.split(':')
const chro = mParts[0]
const chro = refseq2chro(mParts[0])
marker = marker + " (" + mParts[1] + ")"

return (
Expand Down

0 comments on commit 77fc3fe

Please sign in to comment.