Skip to content

Commit

Permalink
Trying using ontologyStore
Browse files Browse the repository at this point in the history
  • Loading branch information
dariober committed Oct 24, 2024
1 parent 20ed2cf commit 758ce16
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ if ('document' in window) {
}
}

function draw(
async function draw(
ctx: CanvasRenderingContext2D,
feature: AnnotationFeature,
row: number,
stateModel: LinearApolloDisplayRendering,
displayedRegionIndex: number,
): void {
): Promise<void> {
const { apolloRowHeight, lgv, session, theme } = stateModel
const { bpPerPx, displayedRegions, offsetPx } = lgv
const displayedRegion = displayedRegions[displayedRegionIndex]
Expand All @@ -66,7 +66,17 @@ function draw(
if (!children) {
return
}
const { apolloSelectedFeature } = session
const { apolloDataStore, apolloSelectedFeature } = session

const os = apolloDataStore.ontologyManager.findOntology(
apolloDataStore.ontologyManager.featureTypeOntologyName,
)
if (!(os?.name ?? os?.version ?? os?.source)) {
throw new Error('Ontology not defined')
}
const xx = apolloDataStore.ontologyManager.ontologies.at(0)
const g = await xx?.dataStore?.getTermsWithLabelOrSynonym('gene')
console.log(`HERE ${JSON.stringify(g, null, 2)}`)

// Draw lines on different rows for each mRNA
let currentRow = 0
Expand Down

0 comments on commit 758ce16

Please sign in to comment.