Skip to content

Commit

Permalink
Fix retrieval of VCF metadata for tooltips in VCF feature details (#4845
Browse files Browse the repository at this point in the history
)
  • Loading branch information
cmdcolin authored Feb 15, 2025
1 parent be4e0a1 commit f03393a
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import BaseCard from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard
import { SimpleFeature, getEnv, getSession } from '@jbrowse/core/util'
import { Link, Typography } from '@mui/material'

import type { VariantFeatureWidgetModel } from './stateModelFactory'
import type { VariantFeatureWidgetModel } from '../stateModelFactory'
import type { SimpleFeatureSerialized } from '@jbrowse/core/util'

// lazies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Suspense, lazy } from 'react'

import { parseBreakend } from '@gmod/vcf'

import type { VariantFeatureWidgetModel } from './stateModelFactory'
import type { VariantFeatureWidgetModel } from '../stateModelFactory'

// lazies
const LaunchBreakendPanel = lazy(() => import('./LaunchBreakendPanel'))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './LaunchBreakendPanel'
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ import FeatureDetails from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/Fe
import { Paper } from '@mui/material'
import { observer } from 'mobx-react'

import VariantSampleGrid from './VariantSampleGrid'
import VariantSampleGrid from './VariantSampleGrid/VariantSampleGrid'
import { variantFieldDescriptions } from './variantFieldDescriptions'

import type { VariantFeatureWidgetModel } from './stateModelFactory'
import type { Descriptions, ReducedFeature } from './types'

// lazies
const LaunchBreakendPanel = lazy(() => import('./LaunchBreakendPanel'))
const LaunchBreakendPanel = lazy(
() => import('./LaunchBreakendPanel/LaunchBreakendPanel'),
)
const VariantConsequenceDataGrid = lazy(
() => import('./VariantConsequenceDataGrid'),
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './VariantSampleGrid'
5 changes: 5 additions & 0 deletions plugins/variants/src/VcfTabixAdapter/VcfTabixAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ export default class VcfTabixAdapter extends BaseFeatureDataAdapter {
return vcf.getHeader()
}

async getMetadata(opts?: BaseOptions) {
const { parser } = await this.configure(opts)
return parser.getMetadata()
}

public getFeatures(query: NoAssemblyRegion, opts: BaseOptions = {}) {
return ObservableCreate<Feature>(async observer => {
const { refName, start, end } = query
Expand Down

0 comments on commit f03393a

Please sign in to comment.