@apollo-annotation/jbrowse-plugin-apollo 0.3.1 → 0.3.2
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/index.esm.js +2072 -1496
- package/dist/index.esm.js.map +1 -1
- package/dist/jbrowse-plugin-apollo.cjs.development.js +2069 -1493
- 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 +2256 -1533
- 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/package.json +13 -11
- package/src/ApolloSequenceAdapter/ApolloSequenceAdapter.ts +7 -10
- package/src/FeatureDetailsWidget/ApolloFeatureDetailsWidget.tsx +3 -0
- package/src/FeatureDetailsWidget/Attributes.tsx +27 -27
- package/src/FeatureDetailsWidget/FeatureDetailsNavigation.tsx +65 -0
- package/src/FeatureDetailsWidget/TranscriptBasic.tsx +6 -1
- package/src/FeatureDetailsWidget/TranscriptSequence.tsx +25 -2
- package/src/LinearApolloDisplay/components/LinearApolloDisplay.tsx +0 -1
- package/src/LinearApolloDisplay/glyphs/BoxGlyph.ts +8 -1
- package/src/LinearApolloDisplay/glyphs/GeneGlyph.ts +88 -40
- package/src/LinearApolloDisplay/glyphs/Glyph.ts +8 -1
- package/src/LinearApolloDisplay/stateModel/base.ts +28 -2
- package/src/LinearApolloDisplay/stateModel/layouts.ts +65 -11
- package/src/LinearApolloDisplay/stateModel/mouseEvents.ts +25 -6
- package/src/LinearApolloDisplay/stateModel/rendering.ts +1 -2
- package/src/OntologyManager/OntologyStore/index.ts +6 -2
- package/src/OntologyManager/OntologyStore/indexeddb-storage.ts +41 -13
- package/src/OntologyManager/index.ts +35 -0
- package/src/SixFrameFeatureDisplay/stateModel.ts +11 -2
- package/src/TabularEditor/HybridGrid/Feature.tsx +1 -2
- package/src/TabularEditor/HybridGrid/HybridGrid.tsx +0 -1
- package/src/TabularEditor/HybridGrid/featureContextMenuItems.ts +8 -1
- package/src/components/AddRefSeqAliases.tsx +7 -8
- package/src/components/CopyFeature.tsx +1 -1
- package/src/components/CreateApolloAnnotation.tsx +304 -0
- package/src/components/DownloadGFF3.tsx +5 -1
- package/src/components/FilterFeatures.tsx +120 -0
- package/src/components/ModifyFeatureAttribute.tsx +27 -27
- package/src/components/OntologyTermMultiSelect.tsx +5 -5
- package/src/extensions/annotationFromJBrowseFeature.test.ts +119 -0
- package/src/extensions/annotationFromJBrowseFeature.ts +171 -0
- package/src/extensions/annotationFromPileup.ts +1 -1
- package/src/extensions/index.ts +1 -0
- package/src/index.ts +8 -2
- package/src/session/ClientDataStore.ts +29 -0
- package/src/session/session.ts +2 -5
- package/src/LinearApolloDisplay/stateModel/getGlyph.ts +0 -40
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { AnnotationFeature } from '@apollo-annotation/mst'
|
|
2
|
-
|
|
3
|
-
import { boxGlyph, geneGlyph, genericChildGlyph } from '../glyphs'
|
|
4
|
-
import { Glyph } from '../glyphs/Glyph'
|
|
5
|
-
|
|
6
|
-
/** get the appropriate glyph for the given top-level feature */
|
|
7
|
-
export function getGlyph(feature: AnnotationFeature): Glyph {
|
|
8
|
-
if (looksLikeGene(feature)) {
|
|
9
|
-
return geneGlyph
|
|
10
|
-
}
|
|
11
|
-
if (feature.children?.size) {
|
|
12
|
-
return genericChildGlyph
|
|
13
|
-
}
|
|
14
|
-
return boxGlyph
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function looksLikeGene(feature: AnnotationFeature) {
|
|
18
|
-
const { children } = feature
|
|
19
|
-
if (!children?.size) {
|
|
20
|
-
return false
|
|
21
|
-
}
|
|
22
|
-
for (const [, child] of children) {
|
|
23
|
-
if (child.type === 'mRNA') {
|
|
24
|
-
const { children: grandChildren } = child
|
|
25
|
-
if (!grandChildren?.size) {
|
|
26
|
-
return false
|
|
27
|
-
}
|
|
28
|
-
const hasCDS = [...grandChildren.values()].some(
|
|
29
|
-
(grandchild) => grandchild.type === 'CDS',
|
|
30
|
-
)
|
|
31
|
-
const hasExon = [...grandChildren.values()].some(
|
|
32
|
-
(grandchild) => grandchild.type === 'exon',
|
|
33
|
-
)
|
|
34
|
-
if (hasCDS && hasExon) {
|
|
35
|
-
return true
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return false
|
|
40
|
-
}
|