@apollo-annotation/jbrowse-plugin-apollo 0.3.12 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ApolloRefNameAliasAdapter/ApolloRefNameAliasAdapter.d.ts +1 -1
- package/dist/ApolloRefNameAliasAdapter/ApolloRefNameAliasAdapter.d.ts.map +1 -1
- package/dist/BackendDrivers/BackendDriver.d.ts +29 -4
- package/dist/BackendDrivers/BackendDriver.d.ts.map +1 -1
- package/dist/BackendDrivers/CollaborationServerDriver.d.ts +3 -1
- package/dist/BackendDrivers/CollaborationServerDriver.d.ts.map +1 -1
- package/dist/BackendDrivers/LocalDriver/LocalDriver.d.ts +22 -0
- package/dist/BackendDrivers/LocalDriver/LocalDriver.d.ts.map +1 -0
- package/dist/BackendDrivers/LocalDriver/db.d.ts +4 -0
- package/dist/BackendDrivers/LocalDriver/db.d.ts.map +1 -0
- package/dist/BackendDrivers/index.d.ts +1 -2
- package/dist/BackendDrivers/index.d.ts.map +1 -1
- package/dist/ChangeManager.d.ts +3 -3
- package/dist/ChangeManager.d.ts.map +1 -1
- package/dist/FeatureDetailsWidget/ApolloTranscriptDetailsWidget.d.ts +0 -6
- package/dist/FeatureDetailsWidget/ApolloTranscriptDetailsWidget.d.ts.map +1 -1
- package/dist/FeatureDetailsWidget/TranscriptWidgetEditLocation.d.ts.map +1 -1
- package/dist/FeatureDetailsWidget/model.d.ts +0 -2
- package/dist/FeatureDetailsWidget/model.d.ts.map +1 -1
- package/dist/LinearApolloDisplay/components/CheckResultWarnings.d.ts.map +1 -1
- package/dist/LinearApolloDisplay/components/LinearApolloDisplay.d.ts.map +1 -1
- package/dist/LinearApolloDisplay/components/OverlayCanvas.d.ts +7 -0
- package/dist/LinearApolloDisplay/components/OverlayCanvas.d.ts.map +1 -0
- package/dist/LinearApolloDisplay/components/Tooltip.d.ts +10 -0
- package/dist/LinearApolloDisplay/components/Tooltip.d.ts.map +1 -0
- package/dist/LinearApolloDisplay/glyphs/BoxGlyph.d.ts +0 -1
- package/dist/LinearApolloDisplay/glyphs/BoxGlyph.d.ts.map +1 -1
- package/dist/LinearApolloDisplay/glyphs/CDSGlyph.d.ts +3 -0
- package/dist/LinearApolloDisplay/glyphs/CDSGlyph.d.ts.map +1 -0
- package/dist/LinearApolloDisplay/glyphs/ExonGlyph.d.ts +3 -0
- package/dist/LinearApolloDisplay/glyphs/ExonGlyph.d.ts.map +1 -0
- package/dist/LinearApolloDisplay/glyphs/GeneGlyph.d.ts.map +1 -1
- package/dist/LinearApolloDisplay/glyphs/GenericChildGlyph.d.ts.map +1 -1
- package/dist/LinearApolloDisplay/glyphs/Glyph.d.ts +26 -20
- package/dist/LinearApolloDisplay/glyphs/Glyph.d.ts.map +1 -1
- package/dist/LinearApolloDisplay/glyphs/TranscriptGlyph.d.ts +3 -0
- package/dist/LinearApolloDisplay/glyphs/TranscriptGlyph.d.ts.map +1 -0
- package/dist/LinearApolloDisplay/glyphs/util.d.ts +13 -0
- package/dist/LinearApolloDisplay/glyphs/util.d.ts.map +1 -1
- package/dist/LinearApolloDisplay/stateModel/base.d.ts +17 -0
- package/dist/LinearApolloDisplay/stateModel/base.d.ts.map +1 -1
- package/dist/LinearApolloDisplay/stateModel/index.d.ts +35 -17
- package/dist/LinearApolloDisplay/stateModel/index.d.ts.map +1 -1
- package/dist/LinearApolloDisplay/stateModel/layouts.d.ts +29 -7
- package/dist/LinearApolloDisplay/stateModel/layouts.d.ts.map +1 -1
- package/dist/LinearApolloDisplay/stateModel/mouseEvents.d.ts +69 -23
- package/dist/LinearApolloDisplay/stateModel/mouseEvents.d.ts.map +1 -1
- package/dist/LinearApolloDisplay/stateModel/rendering.d.ts +26 -9
- package/dist/LinearApolloDisplay/stateModel/rendering.d.ts.map +1 -1
- package/dist/LinearApolloReferenceSequenceDisplay/stateModel/base.d.ts +6 -0
- package/dist/LinearApolloReferenceSequenceDisplay/stateModel/base.d.ts.map +1 -1
- package/dist/LinearApolloReferenceSequenceDisplay/stateModel/index.d.ts +6 -0
- package/dist/LinearApolloReferenceSequenceDisplay/stateModel/index.d.ts.map +1 -1
- package/dist/LinearApolloReferenceSequenceDisplay/stateModel/rendering.d.ts +6 -0
- package/dist/LinearApolloReferenceSequenceDisplay/stateModel/rendering.d.ts.map +1 -1
- package/dist/LinearApolloSixFrameDisplay/components/LinearApolloSixFrameDisplay.d.ts.map +1 -1
- package/dist/LinearApolloSixFrameDisplay/glyphs/GeneGlyph.d.ts.map +1 -1
- package/dist/LinearApolloSixFrameDisplay/glyphs/Glyph.d.ts +1 -1
- package/dist/LinearApolloSixFrameDisplay/glyphs/Glyph.d.ts.map +1 -1
- package/dist/LinearApolloSixFrameDisplay/stateModel/layouts.d.ts.map +1 -1
- package/dist/LinearApolloSixFrameDisplay/stateModel/rendering.d.ts.map +1 -1
- package/dist/OntologyManager/OntologyStore/fulltext.d.ts +1 -1
- package/dist/OntologyManager/OntologyStore/fulltext.d.ts.map +1 -1
- package/dist/OntologyManager/OntologyStore/index.d.ts +2 -2
- package/dist/OntologyManager/OntologyStore/index.d.ts.map +1 -1
- package/dist/OntologyManager/OntologyStore/indexeddb-storage.d.ts +1 -1
- package/dist/OntologyManager/OntologyStore/indexeddb-storage.d.ts.map +1 -1
- package/dist/OntologyManager/OntologyStore/types.d.ts +18 -0
- package/dist/OntologyManager/OntologyStore/types.d.ts.map +1 -0
- package/dist/TabularEditor/HybridGrid/featureContextMenuItems.d.ts.map +1 -1
- package/dist/components/AddChildFeature.d.ts.map +1 -1
- package/dist/components/ColorFeature.d.ts +13 -0
- package/dist/components/ColorFeature.d.ts.map +1 -0
- package/dist/components/CreateApolloAnnotation.d.ts.map +1 -1
- package/dist/components/DownloadGFF3.d.ts +4 -1
- package/dist/components/DownloadGFF3.d.ts.map +1 -1
- package/dist/components/DuplicateTranscript.d.ts.map +1 -1
- package/dist/components/ViewChangeLog.d.ts +2 -1
- package/dist/components/ViewChangeLog.d.ts.map +1 -1
- package/dist/components/ViewCheckResults.d.ts +2 -1
- package/dist/components/ViewCheckResults.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/config.d.ts +4 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/extensions/annotationFromJBrowseFeature.d.ts.map +1 -1
- package/dist/extensions/annotationFromPileup.d.ts.map +1 -1
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +6325 -5997
- package/dist/index.esm.js.map +1 -1
- package/dist/jbrowse-plugin-apollo.cjs.development.js +5869 -5541
- package/dist/jbrowse-plugin-apollo.cjs.development.js.map +1 -1
- package/dist/jbrowse-plugin-apollo.cjs.production.min.js +1 -1
- package/dist/jbrowse-plugin-apollo.cjs.production.min.js.map +1 -1
- package/dist/jbrowse-plugin-apollo.umd.development.js +16782 -25897
- package/dist/jbrowse-plugin-apollo.umd.development.js.map +1 -1
- package/dist/jbrowse-plugin-apollo.umd.production.min.js +1 -1
- package/dist/jbrowse-plugin-apollo.umd.production.min.js.map +1 -1
- package/dist/makeDisplayComponent.d.ts.map +1 -1
- package/dist/menus/Icons.d.ts +3 -0
- package/dist/menus/Icons.d.ts.map +1 -0
- package/dist/menus/topLevelMenu.d.ts.map +1 -1
- package/dist/session/changeHandlers.d.ts +9 -0
- package/dist/session/changeHandlers.d.ts.map +1 -0
- package/dist/util/annotationFeatureUtils.d.ts +2 -1
- package/dist/util/annotationFeatureUtils.d.ts.map +1 -1
- package/dist/util/glyphUtils.d.ts +3 -3
- package/dist/util/glyphUtils.d.ts.map +1 -1
- package/dist/util/index.d.ts +0 -1
- package/dist/util/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/ApolloInternetAccount/model.ts +68 -4
- package/src/ApolloRefNameAliasAdapter/ApolloRefNameAliasAdapter.ts +6 -3
- package/src/ApolloTextSearchAdapter/ApolloTextSearchAdapter.ts +1 -1
- package/src/BackendDrivers/BackendDriver.ts +36 -3
- package/src/BackendDrivers/CollaborationServerDriver.ts +78 -23
- package/src/BackendDrivers/LocalDriver/LocalDriver.ts +367 -0
- package/src/BackendDrivers/LocalDriver/db.ts +37 -0
- package/src/BackendDrivers/index.ts +1 -2
- package/src/ChangeManager.ts +27 -25
- package/src/FeatureDetailsWidget/ApolloTranscriptDetailsWidget.tsx +1 -1
- package/src/FeatureDetailsWidget/TranscriptWidgetEditLocation.tsx +69 -53
- package/src/LinearApolloDisplay/components/CheckResultWarnings.tsx +1 -5
- package/src/LinearApolloDisplay/components/LinearApolloDisplay.tsx +95 -115
- package/src/LinearApolloDisplay/components/OverlayCanvas.tsx +76 -0
- package/src/LinearApolloDisplay/components/Tooltip.tsx +42 -0
- package/src/LinearApolloDisplay/glyphs/BoxGlyph.ts +60 -302
- package/src/LinearApolloDisplay/glyphs/CDSGlyph.ts +145 -0
- package/src/LinearApolloDisplay/glyphs/ExonGlyph.ts +212 -0
- package/src/LinearApolloDisplay/glyphs/GeneGlyph.ts +65 -999
- package/src/LinearApolloDisplay/glyphs/GenericChildGlyph.ts +71 -181
- package/src/LinearApolloDisplay/glyphs/Glyph.ts +42 -66
- package/src/LinearApolloDisplay/glyphs/TranscriptGlyph.ts +291 -0
- package/src/LinearApolloDisplay/glyphs/util.ts +87 -0
- package/src/LinearApolloDisplay/stateModel/base.ts +83 -0
- package/src/LinearApolloDisplay/stateModel/layouts.ts +198 -138
- package/src/LinearApolloDisplay/stateModel/mouseEvents.ts +252 -158
- package/src/LinearApolloDisplay/stateModel/rendering.ts +103 -21
- package/src/LinearApolloReferenceSequenceDisplay/drawSequenceOverlay.ts +3 -3
- package/src/LinearApolloReferenceSequenceDisplay/stateModel/base.ts +20 -2
- package/src/LinearApolloSixFrameDisplay/components/LinearApolloSixFrameDisplay.tsx +7 -2
- package/src/LinearApolloSixFrameDisplay/glyphs/GeneGlyph.ts +8 -13
- package/src/LinearApolloSixFrameDisplay/glyphs/Glyph.ts +1 -1
- package/src/LinearApolloSixFrameDisplay/stateModel/layouts.ts +4 -3
- package/src/LinearApolloSixFrameDisplay/stateModel/mouseEvents.ts +1 -1
- package/src/LinearApolloSixFrameDisplay/stateModel/rendering.ts +2 -1
- package/src/OntologyManager/OntologyStore/__snapshots__/index.test.ts.snap +18262 -8519
- package/src/OntologyManager/OntologyStore/fulltext.ts +1 -2
- package/src/OntologyManager/OntologyStore/index.test.ts +5 -2
- package/src/OntologyManager/OntologyStore/index.ts +7 -8
- package/src/OntologyManager/OntologyStore/indexeddb-storage.ts +2 -2
- package/src/OntologyManager/OntologyStore/types.ts +27 -0
- package/src/OntologyManager/index.ts +15 -26
- package/src/TabularEditor/HybridGrid/featureContextMenuItems.ts +4 -5
- package/src/components/AddChildFeature.tsx +15 -8
- package/src/components/ColorFeature.tsx +167 -0
- package/src/components/CreateApolloAnnotation.tsx +35 -9
- package/src/components/DownloadGFF3.tsx +92 -121
- package/src/components/DuplicateTranscript.tsx +10 -0
- package/src/components/ViewChangeLog.tsx +123 -83
- package/src/components/ViewCheckResults.tsx +15 -73
- package/src/components/index.ts +1 -1
- package/src/config.ts +37 -19
- package/src/extensions/annotationFromJBrowseFeature.test.ts +1 -1
- package/src/extensions/annotationFromJBrowseFeature.ts +91 -63
- package/src/extensions/annotationFromPileup.ts +40 -40
- package/src/index.ts +45 -1
- package/src/makeDisplayComponent.tsx +10 -3
- package/src/menus/Icons.tsx +49 -0
- package/src/menus/topLevelMenu.ts +24 -96
- package/src/session/ClientDataStore.ts +16 -17
- package/src/session/changeHandlers.ts +261 -0
- package/src/session/session.ts +77 -46
- package/src/util/annotationFeatureUtils.ts +29 -1
- package/src/util/glyphUtils.ts +74 -31
- package/src/util/index.ts +0 -1
- package/dist/BackendDrivers/DesktopFileDriver.d.ts +0 -160
- package/dist/BackendDrivers/DesktopFileDriver.d.ts.map +0 -1
- package/dist/BackendDrivers/InMemoryFileDriver.d.ts +0 -162
- package/dist/BackendDrivers/InMemoryFileDriver.d.ts.map +0 -1
- package/dist/LinearApolloDisplay/glyphs/index.d.ts +0 -4
- package/dist/LinearApolloDisplay/glyphs/index.d.ts.map +0 -1
- package/dist/components/OpenLocalFile.d.ts +0 -15
- package/dist/components/OpenLocalFile.d.ts.map +0 -1
- package/dist/util/loadAssemblyIntoClient.d.ts +0 -5
- package/dist/util/loadAssemblyIntoClient.d.ts.map +0 -1
- package/src/BackendDrivers/DesktopFileDriver.ts +0 -184
- package/src/BackendDrivers/InMemoryFileDriver.ts +0 -107
- package/src/LinearApolloDisplay/glyphs/index.ts +0 -3
- package/src/components/OpenLocalFile.tsx +0 -189
- package/src/util/loadAssemblyIntoClient.ts +0 -94
|
@@ -67,7 +67,7 @@ function fillAndStrokeRect(
|
|
|
67
67
|
ctx.strokeRect(left, top, width, height)
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
function
|
|
70
|
+
function drawHover(
|
|
71
71
|
ctx: CanvasRenderingContext2D,
|
|
72
72
|
feature: AnnotationFeature,
|
|
73
73
|
bpPerPx: number,
|
|
@@ -78,7 +78,7 @@ function drawHighlight(
|
|
|
78
78
|
selected = false,
|
|
79
79
|
) {
|
|
80
80
|
const row = getSeqRow(feature.strand, bpPerPx, block.reversed)
|
|
81
|
-
if (
|
|
81
|
+
if (row === undefined) {
|
|
82
82
|
return
|
|
83
83
|
}
|
|
84
84
|
const left = getLeftPx(feature, bpPerPx, offsetPx, block)
|
|
@@ -157,7 +157,7 @@ export function drawSequenceOverlay(
|
|
|
157
157
|
feature._id === selectedFeature?._id,
|
|
158
158
|
)
|
|
159
159
|
} else {
|
|
160
|
-
|
|
160
|
+
drawHover(
|
|
161
161
|
ctx,
|
|
162
162
|
feature,
|
|
163
163
|
bpPerPx,
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
import { BaseDisplay } from '@jbrowse/core/pluggableElementTypes'
|
|
14
14
|
import {
|
|
15
15
|
type AbstractSessionModel,
|
|
16
|
+
type Region,
|
|
16
17
|
getContainingView,
|
|
17
18
|
getSession,
|
|
18
19
|
} from '@jbrowse/core/util'
|
|
@@ -84,13 +85,30 @@ export function baseModelFactory(
|
|
|
84
85
|
return regions
|
|
85
86
|
},
|
|
86
87
|
regionCannotBeRendered(/* region */) {
|
|
87
|
-
if (self.lgv && self.lgv.bpPerPx
|
|
88
|
+
if (self.lgv && self.lgv.bpPerPx > 3) {
|
|
88
89
|
return 'Zoom in to see sequence'
|
|
89
90
|
}
|
|
90
91
|
return
|
|
91
92
|
},
|
|
92
93
|
}))
|
|
93
94
|
.views((self) => ({
|
|
95
|
+
get expandedRegions() {
|
|
96
|
+
const regions = self.lgv.dynamicBlocks.contentBlocks.map((block) => {
|
|
97
|
+
const { assemblyName, end, refName, start } = block
|
|
98
|
+
const { parentRegion } = block as unknown as { parentRegion: Region }
|
|
99
|
+
const expandedStart = Math.round(
|
|
100
|
+
Math.max(start - 5, parentRegion.start),
|
|
101
|
+
)
|
|
102
|
+
const expandedEnd = Math.round(Math.min(end + 5, parentRegion.end))
|
|
103
|
+
return {
|
|
104
|
+
assemblyName,
|
|
105
|
+
refName,
|
|
106
|
+
start: expandedStart,
|
|
107
|
+
end: expandedEnd,
|
|
108
|
+
}
|
|
109
|
+
})
|
|
110
|
+
return regions
|
|
111
|
+
},
|
|
94
112
|
get apolloInternetAccount() {
|
|
95
113
|
const [region] = self.regions
|
|
96
114
|
const { internetAccounts } = getRoot<ApolloRootModel>(self)
|
|
@@ -216,7 +234,7 @@ export function baseModelFactory(
|
|
|
216
234
|
if (self.lgv.bpPerPx <= 3) {
|
|
217
235
|
void (
|
|
218
236
|
self.session as unknown as ApolloSessionModel
|
|
219
|
-
).apolloDataStore.loadRefSeq(self.
|
|
237
|
+
).apolloDataStore.loadRefSeq(self.expandedRegions)
|
|
220
238
|
}
|
|
221
239
|
},
|
|
222
240
|
{
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
clusterResultByMessage,
|
|
23
23
|
useStyles,
|
|
24
24
|
} from '../../util/displayUtils'
|
|
25
|
+
import { looksLikeGene } from '../../util/glyphUtils'
|
|
25
26
|
import type { LinearApolloSixFrameDisplay as LinearApolloSixFrameDisplayI } from '../stateModel'
|
|
26
27
|
|
|
27
28
|
import { TrackLines } from './TrackLines'
|
|
@@ -185,7 +186,11 @@ export const LinearApolloSixFrameDisplay = observer(
|
|
|
185
186
|
regionNumber: idx,
|
|
186
187
|
})?.offsetPx ?? 0) - lgv.offsetPx
|
|
187
188
|
const [feature] = checkResult.featureIds
|
|
188
|
-
if (
|
|
189
|
+
if (
|
|
190
|
+
!feature ||
|
|
191
|
+
!feature.parent ||
|
|
192
|
+
!looksLikeGene(feature.parent, session)
|
|
193
|
+
) {
|
|
189
194
|
return null
|
|
190
195
|
}
|
|
191
196
|
|
|
@@ -202,7 +207,7 @@ export const LinearApolloSixFrameDisplay = observer(
|
|
|
202
207
|
? [0, 5, 3, 1, 15, 13, 11]
|
|
203
208
|
: [0, 2, 1, 0, 8, 7, 6]
|
|
204
209
|
const rowNum = frameOffsets.at(frame)
|
|
205
|
-
if (
|
|
210
|
+
if (rowNum === undefined) {
|
|
206
211
|
continue
|
|
207
212
|
}
|
|
208
213
|
if (
|
|
@@ -330,7 +330,7 @@ function draw(
|
|
|
330
330
|
let prevCDSTop = 0
|
|
331
331
|
let prevCDSEndPx = 0
|
|
332
332
|
let counter = 1
|
|
333
|
-
for (const cds of cdsRow.
|
|
333
|
+
for (const cds of cdsRow.toSorted((a, b) => a.max - b.max)) {
|
|
334
334
|
if (
|
|
335
335
|
(selectedFeature &&
|
|
336
336
|
isSelected &&
|
|
@@ -473,7 +473,7 @@ function drawDragPreview(
|
|
|
473
473
|
overlayCtx.fillRect(rectX, rectY, rectWidth, rectHeight)
|
|
474
474
|
}
|
|
475
475
|
|
|
476
|
-
function
|
|
476
|
+
function drawOverlay(
|
|
477
477
|
stateModel: LinearApolloSixFrameDisplay,
|
|
478
478
|
ctx: CanvasRenderingContext2D,
|
|
479
479
|
) {
|
|
@@ -520,7 +520,7 @@ function drawHover(
|
|
|
520
520
|
let prevCDSTop = 0
|
|
521
521
|
let prevCDSEndPx = 0
|
|
522
522
|
let counter = 1
|
|
523
|
-
for (const cds of cdsRow.
|
|
523
|
+
for (const cds of cdsRow.toSorted((a, b) => a.max - b.max)) {
|
|
524
524
|
const cdsWidthPx = (cds.max - cds.min) / bpPerPx
|
|
525
525
|
const minX =
|
|
526
526
|
(lgv.bpToPx({
|
|
@@ -859,7 +859,7 @@ function getContextMenuItems(
|
|
|
859
859
|
const currentAssemblyId = display.getAssemblyId(region.assemblyName)
|
|
860
860
|
const menuItems: MenuItem[] = []
|
|
861
861
|
const role = internetAccount ? internetAccount.role : 'admin'
|
|
862
|
-
const
|
|
862
|
+
const readOnly = !(role && ['admin', 'user'].includes(role))
|
|
863
863
|
if (!hoveredFeature) {
|
|
864
864
|
return menuItems
|
|
865
865
|
}
|
|
@@ -886,12 +886,7 @@ function getContextMenuItems(
|
|
|
886
886
|
feature,
|
|
887
887
|
)
|
|
888
888
|
if (isExonFeature(feature, session)) {
|
|
889
|
-
const adjacentExons = getAdjacentExons(
|
|
890
|
-
feature,
|
|
891
|
-
display,
|
|
892
|
-
mousePosition,
|
|
893
|
-
session,
|
|
894
|
-
)
|
|
889
|
+
const adjacentExons = getAdjacentExons(feature, display)
|
|
895
890
|
const lgv = getContainingView(
|
|
896
891
|
display as BaseDisplayModel,
|
|
897
892
|
) as unknown as LinearGenomeViewModel
|
|
@@ -928,7 +923,7 @@ function getContextMenuItems(
|
|
|
928
923
|
contextMenuItemsForFeature.push(
|
|
929
924
|
{
|
|
930
925
|
label: 'Merge exons',
|
|
931
|
-
disabled:
|
|
926
|
+
disabled: readOnly,
|
|
932
927
|
onClick: () => {
|
|
933
928
|
;(session as unknown as AbstractSessionModel).queueDialog(
|
|
934
929
|
(doneCallback) => [
|
|
@@ -952,7 +947,7 @@ function getContextMenuItems(
|
|
|
952
947
|
},
|
|
953
948
|
{
|
|
954
949
|
label: 'Split exon',
|
|
955
|
-
disabled:
|
|
950
|
+
disabled: readOnly,
|
|
956
951
|
onClick: () => {
|
|
957
952
|
;(session as unknown as AbstractSessionModel).queueDialog(
|
|
958
953
|
(doneCallback) => [
|
|
@@ -1014,7 +1009,7 @@ function onMouseLeave(): void {
|
|
|
1014
1009
|
export const geneGlyph: Glyph = {
|
|
1015
1010
|
draw,
|
|
1016
1011
|
drawDragPreview,
|
|
1017
|
-
|
|
1012
|
+
drawOverlay,
|
|
1018
1013
|
drawTooltip,
|
|
1019
1014
|
getContextMenuItems,
|
|
1020
1015
|
getContextMenuItemsForFeature,
|
|
@@ -12,7 +12,8 @@ import { addDisposer, isAlive } from '@jbrowse/mobx-state-tree'
|
|
|
12
12
|
import { autorun, observable } from 'mobx'
|
|
13
13
|
|
|
14
14
|
import type { ApolloSessionModel } from '../../session'
|
|
15
|
-
import {
|
|
15
|
+
import { looksLikeGene } from '../../util/glyphUtils'
|
|
16
|
+
import { geneGlyph } from '../glyphs/GeneGlyph'
|
|
16
17
|
|
|
17
18
|
import { baseModelFactory } from './base'
|
|
18
19
|
|
|
@@ -123,7 +124,7 @@ export function layoutsModelFactory(
|
|
|
123
124
|
if (!featureTypeOntology) {
|
|
124
125
|
throw new Error('featureTypeOntology is undefined')
|
|
125
126
|
}
|
|
126
|
-
if (feature.
|
|
127
|
+
if (looksLikeGene(feature, self.session)) {
|
|
127
128
|
const rowNum =
|
|
128
129
|
feature.strand == 1
|
|
129
130
|
? self.geneTrackRowNums[0]
|
|
@@ -169,7 +170,7 @@ export function layoutsModelFactory(
|
|
|
169
170
|
? [0, 5, 3, 1, 15, 13, 11]
|
|
170
171
|
: [0, 2, 1, 0, 8, 7, 6]
|
|
171
172
|
const rowNum = frameOffsets.at(frame)
|
|
172
|
-
if (
|
|
173
|
+
if (rowNum === undefined) {
|
|
173
174
|
continue
|
|
174
175
|
}
|
|
175
176
|
if (!featureLayout.get(rowNum)) {
|
|
@@ -313,7 +313,7 @@ export function mouseEventsModelFactory(
|
|
|
313
313
|
const glyph = self.getGlyph(hoveredFeature.feature)
|
|
314
314
|
|
|
315
315
|
// draw mouseover hovers
|
|
316
|
-
glyph.
|
|
316
|
+
glyph.drawOverlay(self, ctx)
|
|
317
317
|
|
|
318
318
|
// draw tooltip on hover
|
|
319
319
|
glyph.drawTooltip(self, ctx)
|
|
@@ -13,6 +13,7 @@ import { autorun } from 'mobx'
|
|
|
13
13
|
|
|
14
14
|
import type { ApolloSessionModel } from '../../session'
|
|
15
15
|
import { codonColorCode } from '../../util/displayUtils'
|
|
16
|
+
import { looksLikeGene } from '../../util/glyphUtils'
|
|
16
17
|
|
|
17
18
|
import { layoutsModelFactory } from './layouts'
|
|
18
19
|
|
|
@@ -209,7 +210,7 @@ export function renderingModelFactory(
|
|
|
209
210
|
const displayedRegion = displayedRegions[idx]
|
|
210
211
|
for (const [row, featureLayoutRow] of featureLayout.entries()) {
|
|
211
212
|
for (const { feature } of featureLayoutRow) {
|
|
212
|
-
if (!feature.
|
|
213
|
+
if (!looksLikeGene(feature, self.session)) {
|
|
213
214
|
continue
|
|
214
215
|
}
|
|
215
216
|
if (
|