jbrowse-plugin-mafviewer 1.3.1 → 1.4.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.
Files changed (101) hide show
  1. package/README.md +1 -48
  2. package/dist/BigMafAdapter/BigMafAdapter.js +39 -28
  3. package/dist/BigMafAdapter/BigMafAdapter.js.map +1 -1
  4. package/dist/LinearMafDisplay/components/Crosshairs.js +1 -1
  5. package/dist/LinearMafDisplay/components/Crosshairs.js.map +1 -1
  6. package/dist/LinearMafDisplay/components/MAFTooltip.d.ts +2 -3
  7. package/dist/LinearMafDisplay/components/MAFTooltip.js +6 -19
  8. package/dist/LinearMafDisplay/components/MAFTooltip.js.map +1 -1
  9. package/dist/LinearMafDisplay/stateModel.d.ts +8 -0
  10. package/dist/LinearMafDisplay/stateModel.js +10 -0
  11. package/dist/LinearMafDisplay/stateModel.js.map +1 -1
  12. package/dist/LinearMafDisplay/util.d.ts +20 -0
  13. package/dist/LinearMafDisplay/util.js +29 -0
  14. package/dist/LinearMafDisplay/util.js.map +1 -1
  15. package/dist/LinearMafRenderer/LinearMafRenderer.d.ts +9 -0
  16. package/dist/LinearMafRenderer/LinearMafRenderer.js +1 -2
  17. package/dist/LinearMafRenderer/LinearMafRenderer.js.map +1 -1
  18. package/dist/LinearMafRenderer/components/LinearMafRendering.d.ts +13 -0
  19. package/dist/LinearMafRenderer/components/LinearMafRendering.js +46 -0
  20. package/dist/LinearMafRenderer/components/LinearMafRendering.js.map +1 -0
  21. package/dist/LinearMafRenderer/components/ReactComponent.d.ts +3 -0
  22. package/dist/LinearMafRenderer/components/ReactComponent.js +41 -2
  23. package/dist/LinearMafRenderer/components/ReactComponent.js.map +1 -1
  24. package/dist/LinearMafRenderer/components/util.d.ts +1 -0
  25. package/dist/LinearMafRenderer/components/util.js +13 -0
  26. package/dist/LinearMafRenderer/components/util.js.map +1 -0
  27. package/dist/LinearMafRenderer/index.js +1 -1
  28. package/dist/LinearMafRenderer/index.js.map +1 -1
  29. package/dist/LinearMafRenderer/makeImageData.d.ts +6 -5
  30. package/dist/LinearMafRenderer/makeImageData.js +35 -146
  31. package/dist/LinearMafRenderer/makeImageData.js.map +1 -1
  32. package/dist/LinearMafRenderer/rendering/features.d.ts +4 -0
  33. package/dist/LinearMafRenderer/rendering/features.js +41 -0
  34. package/dist/LinearMafRenderer/rendering/features.js.map +1 -0
  35. package/dist/LinearMafRenderer/rendering/gaps.d.ts +2 -0
  36. package/dist/LinearMafRenderer/rendering/gaps.js +19 -0
  37. package/dist/LinearMafRenderer/rendering/gaps.js.map +1 -0
  38. package/dist/LinearMafRenderer/rendering/index.d.ts +8 -0
  39. package/dist/LinearMafRenderer/rendering/index.js +10 -0
  40. package/dist/LinearMafRenderer/rendering/index.js.map +1 -0
  41. package/dist/LinearMafRenderer/rendering/insertions.d.ts +2 -0
  42. package/dist/LinearMafRenderer/rendering/insertions.js +78 -0
  43. package/dist/LinearMafRenderer/rendering/insertions.js.map +1 -0
  44. package/dist/LinearMafRenderer/rendering/matches.d.ts +2 -0
  45. package/dist/LinearMafRenderer/rendering/matches.js +34 -0
  46. package/dist/LinearMafRenderer/rendering/matches.js.map +1 -0
  47. package/dist/LinearMafRenderer/rendering/mismatches.d.ts +13 -0
  48. package/dist/LinearMafRenderer/rendering/mismatches.js +57 -0
  49. package/dist/LinearMafRenderer/rendering/mismatches.js.map +1 -0
  50. package/dist/LinearMafRenderer/rendering/spatialIndex.d.ts +9 -0
  51. package/dist/LinearMafRenderer/rendering/spatialIndex.js +19 -0
  52. package/dist/LinearMafRenderer/rendering/spatialIndex.js.map +1 -0
  53. package/dist/LinearMafRenderer/rendering/text.d.ts +12 -0
  54. package/dist/LinearMafRenderer/rendering/text.js +42 -0
  55. package/dist/LinearMafRenderer/rendering/text.js.map +1 -0
  56. package/dist/LinearMafRenderer/rendering/types.d.ts +55 -0
  57. package/dist/LinearMafRenderer/rendering/types.js +15 -0
  58. package/dist/LinearMafRenderer/rendering/types.js.map +1 -0
  59. package/dist/MafAddTrackWorkflow/AddTrackWorkflow.js +37 -35
  60. package/dist/MafAddTrackWorkflow/AddTrackWorkflow.js.map +1 -1
  61. package/dist/MafTabixAdapter/MafTabixAdapter.js +48 -22
  62. package/dist/MafTabixAdapter/MafTabixAdapter.js.map +1 -1
  63. package/dist/index.js +0 -2
  64. package/dist/index.js.map +1 -1
  65. package/dist/jbrowse-plugin-mafviewer.umd.production.min.js +5 -29
  66. package/dist/jbrowse-plugin-mafviewer.umd.production.min.js.map +4 -4
  67. package/dist/out.js +32310 -0
  68. package/dist/out.js.map +7 -0
  69. package/dist/util/fastaUtils.js.map +1 -1
  70. package/package.json +3 -2
  71. package/src/BigMafAdapter/BigMafAdapter.ts +49 -28
  72. package/src/LinearMafDisplay/components/Crosshairs.tsx +1 -7
  73. package/src/LinearMafDisplay/components/MAFTooltip.tsx +14 -33
  74. package/src/LinearMafDisplay/stateModel.ts +10 -0
  75. package/src/LinearMafDisplay/util.ts +57 -0
  76. package/src/LinearMafRenderer/LinearMafRenderer.ts +1 -2
  77. package/src/LinearMafRenderer/components/LinearMafRendering.tsx +76 -0
  78. package/src/LinearMafRenderer/components/util.ts +13 -0
  79. package/src/LinearMafRenderer/index.ts +1 -1
  80. package/src/LinearMafRenderer/makeImageData.ts +64 -196
  81. package/src/LinearMafRenderer/rendering/features.ts +111 -0
  82. package/src/LinearMafRenderer/rendering/gaps.ts +33 -0
  83. package/src/LinearMafRenderer/rendering/index.ts +9 -0
  84. package/src/LinearMafRenderer/rendering/insertions.ts +154 -0
  85. package/src/LinearMafRenderer/rendering/matches.ts +62 -0
  86. package/src/LinearMafRenderer/rendering/mismatches.ts +113 -0
  87. package/src/LinearMafRenderer/rendering/spatialIndex.ts +40 -0
  88. package/src/LinearMafRenderer/rendering/text.ts +72 -0
  89. package/src/LinearMafRenderer/rendering/types.ts +65 -0
  90. package/src/MafAddTrackWorkflow/AddTrackWorkflow.tsx +5 -6
  91. package/src/MafTabixAdapter/MafTabixAdapter.ts +77 -22
  92. package/src/index.ts +0 -2
  93. package/src/util/fastaUtils.ts +2 -1
  94. package/src/BgzipTaffyAdapter/BgzipTaffyAdapter.ts +0 -307
  95. package/src/BgzipTaffyAdapter/configSchema.ts +0 -59
  96. package/src/BgzipTaffyAdapter/index.ts +0 -16
  97. package/src/BgzipTaffyAdapter/rowInstructions.ts +0 -91
  98. package/src/BgzipTaffyAdapter/types.ts +0 -16
  99. package/src/BgzipTaffyAdapter/util.ts +0 -25
  100. package/src/BgzipTaffyAdapter/virtualOffset.ts +0 -29
  101. package/src/LinearMafRenderer/components/ReactComponent.tsx +0 -13
@@ -0,0 +1,113 @@
1
+ import { fillRect } from '../util'
2
+ import { addToSpatialIndex, shouldAddToSpatialIndex } from './spatialIndex'
3
+ import { GAP_STROKE_OFFSET } from './types'
4
+
5
+ import type { RenderingContext } from './types'
6
+
7
+ /**
8
+ * Renders colored rectangles for mismatches and matches (when showAllLetters is true)
9
+ * Colors are determined by base type when mismatchRendering is enabled
10
+ * @param context - Rendering context with canvas and styling info
11
+ * @param alignment - The aligned sequence for this sample
12
+ * @param seq - The reference sequence
13
+ * @param leftPx - Left pixel position of the feature
14
+ * @param rowTop - Top pixel position of the row
15
+ * @param alignmentStart - Start position of the alignment
16
+ * @param chr - Chromosome/sequence name
17
+ */
18
+ export function renderMismatches(
19
+ context: RenderingContext,
20
+ alignment: string,
21
+ seq: string,
22
+ leftPx: number,
23
+ rowTop: number,
24
+ sampleId: number,
25
+ _featureId: string,
26
+ alignmentStart: number,
27
+ chr: string,
28
+ ) {
29
+ const {
30
+ ctx,
31
+ scale,
32
+ h,
33
+ canvasWidth,
34
+ showAllLetters,
35
+ mismatchRendering,
36
+ colorForBase,
37
+ } = context
38
+
39
+ for (
40
+ let i = 0, genomicOffset = 0, seqLength = alignment.length;
41
+ i < seqLength;
42
+ i++
43
+ ) {
44
+ const currentChar = alignment[i]
45
+ if (seq[i] !== '-') {
46
+ if (currentChar !== '-') {
47
+ const xPos = leftPx + scale * genomicOffset
48
+ if (seq[i] !== currentChar && currentChar !== ' ') {
49
+ // Mismatch: use base-specific color or orange
50
+ fillRect(
51
+ ctx,
52
+ xPos,
53
+ rowTop,
54
+ scale + GAP_STROKE_OFFSET,
55
+ h,
56
+ canvasWidth,
57
+ mismatchRendering
58
+ ? (colorForBase[currentChar!] ?? 'black')
59
+ : 'orange',
60
+ )
61
+
62
+ // Add to spatial index if distance filter allows
63
+ if (shouldAddToSpatialIndex(xPos, context)) {
64
+ addToSpatialIndex(
65
+ context,
66
+ xPos,
67
+ rowTop,
68
+ xPos + context.scale + GAP_STROKE_OFFSET,
69
+ rowTop + context.h,
70
+ {
71
+ pos: genomicOffset + alignmentStart,
72
+ chr,
73
+ base: currentChar!,
74
+ sampleId: i,
75
+ },
76
+ )
77
+ }
78
+ } else if (showAllLetters) {
79
+ // Match (when showing all letters): use base-specific color or light blue
80
+ fillRect(
81
+ ctx,
82
+ xPos,
83
+ rowTop,
84
+ scale + GAP_STROKE_OFFSET,
85
+ h,
86
+ canvasWidth,
87
+ mismatchRendering
88
+ ? (colorForBase[currentChar!] ?? 'black')
89
+ : 'lightblue',
90
+ )
91
+
92
+ // Add to spatial index if distance filter allows
93
+ if (shouldAddToSpatialIndex(xPos, context)) {
94
+ addToSpatialIndex(
95
+ context,
96
+ xPos,
97
+ rowTop,
98
+ xPos + context.scale + GAP_STROKE_OFFSET,
99
+ rowTop + context.h,
100
+ {
101
+ pos: genomicOffset + alignmentStart,
102
+ chr,
103
+ base: currentChar!,
104
+ sampleId,
105
+ },
106
+ )
107
+ }
108
+ }
109
+ }
110
+ genomicOffset++
111
+ }
112
+ }
113
+ }
@@ -0,0 +1,40 @@
1
+ import { GAP_STROKE_OFFSET, MIN_X_DISTANCE } from './types'
2
+
3
+ import type { RenderedBase, RenderingContext } from './types'
4
+
5
+ export function createRenderedBaseCoords(
6
+ xPos: number,
7
+ rowTop: number,
8
+ context: RenderingContext,
9
+ ) {
10
+ return {
11
+ minX: xPos,
12
+ minY: rowTop,
13
+ maxX: xPos + context.scale + GAP_STROKE_OFFSET,
14
+ maxY: rowTop + context.h,
15
+ }
16
+ }
17
+
18
+ export function shouldAddToSpatialIndex(
19
+ xPos: number,
20
+ context: RenderingContext,
21
+ bypassDistanceFilter = false,
22
+ ): boolean {
23
+ return (
24
+ bypassDistanceFilter ||
25
+ Math.abs(xPos - context.lastInsertedX) > MIN_X_DISTANCE
26
+ )
27
+ }
28
+
29
+ export function addToSpatialIndex(
30
+ context: RenderingContext,
31
+ minX: number,
32
+ minY: number,
33
+ maxX: number,
34
+ maxY: number,
35
+ renderedBase: RenderedBase,
36
+ ) {
37
+ context.spatialIndex.push(renderedBase)
38
+ context.spatialIndexCoords.push(minX, minY, maxX, maxY)
39
+ context.lastInsertedX = minX
40
+ }
@@ -0,0 +1,72 @@
1
+ import { getCharWidthHeight } from '../util'
2
+ import { CHAR_SIZE_WIDTH, VERTICAL_TEXT_OFFSET } from './types'
3
+
4
+ import type { RenderingContext } from './types'
5
+
6
+ function getLetter(a: string, showAsUpperCase: boolean) {
7
+ return showAsUpperCase ? a.toUpperCase() : a
8
+ }
9
+
10
+ /**
11
+ * Renders text labels for bases when zoom level is sufficient
12
+ * Only shows text for mismatches (or all letters when showAllLetters is true)
13
+ * @param context - Rendering context with canvas and styling info
14
+ * @param alignment - The aligned sequence for this sample (lowercase)
15
+ * @param origAlignment - Original alignment preserving case
16
+ * @param seq - The reference sequence
17
+ * @param leftPx - Left pixel position of the feature
18
+ * @param rowTop - Top pixel position of the row
19
+ */
20
+ export function renderText(
21
+ context: RenderingContext,
22
+ alignment: string,
23
+ origAlignment: string,
24
+ seq: string,
25
+ leftPx: number,
26
+ rowTop: number,
27
+ _sampleId: string,
28
+ _featureId: string,
29
+ ) {
30
+ const {
31
+ ctx,
32
+ scale,
33
+ hp2,
34
+ rowHeight,
35
+ showAllLetters,
36
+ mismatchRendering,
37
+ contrastForBase,
38
+ showAsUpperCase,
39
+ } = context
40
+ const { charHeight } = getCharWidthHeight()
41
+
42
+ // Render text labels when zoomed in enough and row is tall enough
43
+ if (scale >= CHAR_SIZE_WIDTH) {
44
+ for (
45
+ let i = 0, genomicOffset = 0, seqLength = alignment.length;
46
+ i < seqLength;
47
+ i++
48
+ ) {
49
+ if (seq[i] !== '-') {
50
+ // Only process non-gap positions in reference
51
+ const xPos = leftPx + scale * genomicOffset
52
+ const textOffset = (scale - CHAR_SIZE_WIDTH) / 2 + 1 // Center text in available space
53
+ const currentChar = alignment[i]!
54
+ // Show text for mismatches or all letters (depending on setting)
55
+ if ((showAllLetters || seq[i] !== currentChar) && currentChar !== '-') {
56
+ ctx.fillStyle = mismatchRendering
57
+ ? (contrastForBase[currentChar] ?? 'white') // Use contrasting color for readability
58
+ : 'black'
59
+ if (rowHeight > charHeight) {
60
+ // Only render if row is tall enough
61
+ ctx.fillText(
62
+ getLetter(origAlignment[i] || '', showAsUpperCase),
63
+ xPos + textOffset,
64
+ hp2 + rowTop + VERTICAL_TEXT_OFFSET,
65
+ )
66
+ }
67
+ }
68
+ genomicOffset++
69
+ }
70
+ }
71
+ }
72
+ }
@@ -0,0 +1,65 @@
1
+ // Rendering constants
2
+ export const FONT_CONFIG = 'bold 10px Courier New,monospace'
3
+ export const CHAR_SIZE_WIDTH = 10
4
+ export const GAP_STROKE_OFFSET = 0.4
5
+ export const INSERTION_LINE_WIDTH = 1
6
+ export const INSERTION_BORDER_WIDTH = 2
7
+ export const INSERTION_PADDING = 2
8
+ export const VERTICAL_TEXT_OFFSET = 3
9
+ export const LARGE_INSERTION_THRESHOLD = 10
10
+ export const HIGH_ZOOM_THRESHOLD = 0.2
11
+ export const MIN_ROW_HEIGHT_FOR_BORDERS = 5
12
+ export const HIGH_BP_PER_PX_THRESHOLD = 10
13
+ export const INSERTION_BORDER_HEIGHT = 5
14
+ export const MIN_X_DISTANCE = 0.5
15
+
16
+ export interface Sample {
17
+ id: string
18
+ color?: string
19
+ }
20
+
21
+ export interface GenomicRegion {
22
+ start: number
23
+ end: number
24
+ refName: string
25
+ }
26
+
27
+ export interface RenderedBase {
28
+ pos: number
29
+ chr: string
30
+ base: string
31
+ sampleId: number
32
+ isInsertion?: boolean
33
+ }
34
+
35
+ /**
36
+ * Shared rendering context containing all necessary parameters for rendering operations
37
+ */
38
+ export interface RenderingContext {
39
+ ctx: CanvasRenderingContext2D
40
+ scale: number
41
+ canvasWidth: number
42
+ rowHeight: number
43
+ h: number
44
+ hp2: number
45
+ offset: number
46
+ colorForBase: Record<string, string>
47
+ contrastForBase: Record<string, string>
48
+ showAllLetters: boolean
49
+ mismatchRendering: boolean
50
+ showAsUpperCase: boolean
51
+
52
+ // RBush spatial index for efficient spatial queries
53
+ spatialIndex: RenderedBase[]
54
+ spatialIndexCoords: number[]
55
+
56
+ // Track last X position for spatial index optimization
57
+ lastInsertedX: number
58
+ }
59
+
60
+ export interface AlignmentRecord {
61
+ seq: string
62
+ start: number
63
+ strand: number
64
+ chr: string
65
+ }
@@ -37,10 +37,7 @@ const useStyles = makeStyles()(theme => ({
37
37
  },
38
38
  }))
39
39
 
40
- type AdapterTypeOptions =
41
- | 'BigMafAdapter'
42
- | 'MafTabixAdapter'
43
- | 'BgzipTaffyAdapter'
40
+ type AdapterTypeOptions = 'BigMafAdapter' | 'MafTabixAdapter'
44
41
  type IndexTypeOptions = 'TBI' | 'CSI'
45
42
 
46
43
  export default function MultiMAFWidget({ model }: { model: AddTrackModel }) {
@@ -89,7 +86,8 @@ export default function MultiMAFWidget({ model }: { model: AddTrackModel }) {
89
86
  setLoc(arg)
90
87
  }}
91
88
  />
92
- ) : fileTypeChoice === 'MafTabixAdapter' ? (
89
+ ) : // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
90
+ fileTypeChoice === 'MafTabixAdapter' ? (
93
91
  <>
94
92
  <FormControl>
95
93
  <FormLabel>Index type</FormLabel>
@@ -212,7 +210,8 @@ export default function MultiMAFWidget({ model }: { model: AddTrackModel }) {
212
210
  samples: sampleNames,
213
211
  nhLocation: nhLoc,
214
212
  }
215
- : fileTypeChoice === 'MafTabixAdapter'
213
+ : // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
214
+ fileTypeChoice === 'MafTabixAdapter'
216
215
  ? {
217
216
  type: fileTypeChoice,
218
217
  bedGzLocation: loc,
@@ -81,38 +81,93 @@ export default class MafTabixAdapter extends BaseFeatureDataAdapter {
81
81
  await updateStatus('Processing alignments', statusCallback, () => {
82
82
  let firstAssemblyNameFound = ''
83
83
  const refAssemblyName = this.getConf('refAssemblyName')
84
+
84
85
  for (const feature of features) {
85
86
  const data = (feature.get('field5') as string).split(',')
86
87
  const alignments = {} as Record<string, OrganismRecord>
88
+ const dataLength = data.length
87
89
 
88
- const len = data.length
89
- for (let j = 0; j < len; j++) {
90
+ for (let j = 0; j < dataLength; j++) {
90
91
  const elt = data[j]!
91
- const seq = elt.split(':')[5]!
92
- const ad = elt.split(':')
93
- const ag = ad[0]!.split('.')
94
- const [n1, n2 = '', ...rest] = ag
95
- let assemblyName
96
- let last = ''
97
- if (ag.length === 2) {
98
- assemblyName = n1
99
- last = n2!
100
- } else if (!Number.isNaN(+n2)) {
101
- assemblyName = `${n1}.${n2}`
102
- last = rest.join('.')
92
+ // Cache split result to avoid redundant operations
93
+ const parts = elt.split(':')
94
+
95
+ // Use destructuring for better performance than multiple array access
96
+ const [
97
+ assemblyAndChr,
98
+ startStr,
99
+ srcSizeStr,
100
+ strandStr,
101
+ unknownStr,
102
+ seq,
103
+ ] = parts
104
+
105
+ // Skip if we don't have all required parts
106
+ if (!assemblyAndChr || !seq) {
107
+ continue
108
+ }
109
+
110
+ // Optimized assembly name parsing with simplified logic
111
+ let assemblyName: string
112
+ let chr: string
113
+
114
+ const firstDotIndex = assemblyAndChr.indexOf('.')
115
+ if (firstDotIndex === -1) {
116
+ // No dot found, entire string is assembly name
117
+ assemblyName = assemblyAndChr
118
+ chr = ''
103
119
  } else {
104
- assemblyName = n1
105
- last = [n2, ...rest].join('.')
120
+ const secondDotIndex = assemblyAndChr.indexOf(
121
+ '.',
122
+ firstDotIndex + 1,
123
+ )
124
+ if (secondDotIndex === -1) {
125
+ // Only one dot: assembly.chr
126
+ assemblyName = assemblyAndChr.slice(
127
+ 0,
128
+ Math.max(0, firstDotIndex),
129
+ )
130
+ chr = assemblyAndChr.slice(Math.max(0, firstDotIndex + 1))
131
+ } else {
132
+ // Multiple dots: check if second part is numeric (version number)
133
+ const secondPart = assemblyAndChr.slice(
134
+ firstDotIndex + 1,
135
+ secondDotIndex,
136
+ )
137
+ const isNumeric =
138
+ secondPart.length > 0 && !Number.isNaN(+secondPart)
139
+
140
+ if (isNumeric) {
141
+ // assembly.version.chr format
142
+ assemblyName = assemblyAndChr.slice(
143
+ 0,
144
+ Math.max(0, secondDotIndex),
145
+ )
146
+ chr = assemblyAndChr.slice(Math.max(0, secondDotIndex + 1))
147
+ } else {
148
+ // assembly.chr.more format
149
+ assemblyName = assemblyAndChr.slice(
150
+ 0,
151
+ Math.max(0, firstDotIndex),
152
+ )
153
+ chr = assemblyAndChr.slice(Math.max(0, firstDotIndex + 1))
154
+ }
155
+ }
106
156
  }
157
+
107
158
  if (assemblyName) {
108
- firstAssemblyNameFound = firstAssemblyNameFound || assemblyName
159
+ // Set first assembly name found (only once)
160
+ if (!firstAssemblyNameFound) {
161
+ firstAssemblyNameFound = assemblyName
162
+ }
109
163
 
164
+ // Create alignment record with optimized number conversion
110
165
  alignments[assemblyName] = {
111
- chr: last,
112
- start: +ad[1]!,
113
- srcSize: +ad[2]!,
114
- strand: ad[3] === '-' ? -1 : 1,
115
- unknown: +ad[4]!,
166
+ chr,
167
+ start: +startStr!,
168
+ srcSize: +srcSizeStr!,
169
+ strand: strandStr === '-' ? -1 : 1,
170
+ unknown: +unknownStr!,
116
171
  seq,
117
172
  }
118
173
  }
package/src/index.ts CHANGED
@@ -2,7 +2,6 @@ import Plugin from '@jbrowse/core/Plugin'
2
2
  import PluginManager from '@jbrowse/core/PluginManager'
3
3
 
4
4
  import { version } from '../package.json'
5
- import BgzipTaffyAdapterF from './BgzipTaffyAdapter'
6
5
  import BigMafAdapterF from './BigMafAdapter'
7
6
  import LinearMafDisplayF from './LinearMafDisplay'
8
7
  import LinearMafRendererF from './LinearMafRenderer'
@@ -22,7 +21,6 @@ export default class MafViewerPlugin extends Plugin {
22
21
  LinearMafDisplayF(pluginManager)
23
22
  LinearMafRendererF(pluginManager)
24
23
  MafTabixAdapterF(pluginManager)
25
- BgzipTaffyAdapterF(pluginManager)
26
24
  MafAddTrackWorkflowF(pluginManager)
27
25
  MafGetSequencesF(pluginManager)
28
26
  MafGetSamplesF(pluginManager)
@@ -1,5 +1,6 @@
1
1
  import { Sample } from '../LinearMafDisplay/types'
2
2
 
3
+ import type { AlignmentRecord } from '../LinearMafRenderer/rendering'
3
4
  import type { Feature, Region } from '@jbrowse/core/util'
4
5
 
5
6
  /**
@@ -27,7 +28,7 @@ export function processFeaturesToFasta({
27
28
  const outputRows = samples.map(() => '-'.repeat(rlen))
28
29
  for (const feature of features.values()) {
29
30
  const leftCoord = feature.get('start')
30
- const vals = feature.get('alignments') as Record<string, { seq: string }>
31
+ const vals = feature.get('alignments') as Record<string, AlignmentRecord>
31
32
  const seq = feature.get('seq')
32
33
  for (const [sample, val] of Object.entries(vals)) {
33
34
  const origAlignment = val.seq