jbrowse-plugin-tview 2.2.1 → 3.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.
Files changed (113) hide show
  1. package/README.md +349 -69
  2. package/dist/AddHighlightModel/index.js +2 -13
  3. package/dist/AddHighlightModel/index.js.map +1 -1
  4. package/dist/LaunchTView/TviewGetPlanRpc/TviewGetPlan.d.ts +44 -64
  5. package/dist/LaunchTView/TviewGetPlanRpc/TviewGetPlan.js +57 -81
  6. package/dist/LaunchTView/TviewGetPlanRpc/TviewGetPlan.js.map +1 -1
  7. package/dist/LaunchTView/TviewGetPlanRpc/index.d.ts +1 -1
  8. package/dist/LaunchTView/align.d.ts +18 -17
  9. package/dist/LaunchTView/align.js +198 -151
  10. package/dist/LaunchTView/align.js.map +1 -1
  11. package/dist/LaunchTView/alleles.d.ts +14 -0
  12. package/dist/LaunchTView/alleles.js +51 -3
  13. package/dist/LaunchTView/alleles.js.map +1 -1
  14. package/dist/LaunchTView/fetchTviewPlan.d.ts +5 -37
  15. package/dist/LaunchTView/fetchTviewPlan.js +7 -28
  16. package/dist/LaunchTView/fetchTviewPlan.js.map +1 -1
  17. package/dist/LaunchTView/index.js +45 -16
  18. package/dist/LaunchTView/index.js.map +1 -1
  19. package/dist/LaunchTView/launch.d.ts +50 -0
  20. package/dist/LaunchTView/launch.js +48 -0
  21. package/dist/LaunchTView/launch.js.map +1 -0
  22. package/dist/LaunchTView/launchView.d.ts +3 -8
  23. package/dist/LaunchTView/launchView.js +18 -12
  24. package/dist/LaunchTView/launchView.js.map +1 -1
  25. package/dist/LaunchTView/modifications.d.ts +64 -0
  26. package/dist/LaunchTView/modifications.js +131 -0
  27. package/dist/LaunchTView/modifications.js.map +1 -0
  28. package/dist/LaunchTView/readLayout.d.ts +35 -39
  29. package/dist/LaunchTView/readLayout.js +44 -24
  30. package/dist/LaunchTView/readLayout.js.map +1 -1
  31. package/dist/LaunchTView/repeatStats.d.ts +1 -1
  32. package/dist/LaunchTView/repeatStats.js +6 -6
  33. package/dist/LaunchTView/repeatStats.js.map +1 -1
  34. package/dist/LaunchTView/repeats.js +6 -4
  35. package/dist/LaunchTView/repeats.js.map +1 -1
  36. package/dist/LaunchTView/tview.d.ts +47 -24
  37. package/dist/LaunchTView/tview.js +188 -99
  38. package/dist/LaunchTView/tview.js.map +1 -1
  39. package/dist/TViewPanel/components/TViewPanel.js +9 -4
  40. package/dist/TViewPanel/components/TViewPanel.js.map +1 -1
  41. package/dist/TViewPanel/genome.d.ts +11 -0
  42. package/dist/TViewPanel/genome.js +32 -0
  43. package/dist/TViewPanel/genome.js.map +1 -0
  44. package/dist/TViewPanel/init.d.ts +38 -19
  45. package/dist/TViewPanel/init.js +66 -39
  46. package/dist/TViewPanel/init.js.map +1 -1
  47. package/dist/TViewPanel/initMenu.d.ts +28 -0
  48. package/dist/TViewPanel/initMenu.js +79 -0
  49. package/dist/TViewPanel/initMenu.js.map +1 -0
  50. package/dist/TViewPanel/model.d.ts +1178 -383
  51. package/dist/TViewPanel/model.js +298 -87
  52. package/dist/TViewPanel/model.js.map +1 -1
  53. package/dist/TViewPanel/modifications.d.ts +25 -0
  54. package/dist/TViewPanel/modifications.js +89 -0
  55. package/dist/TViewPanel/modifications.js.map +1 -0
  56. package/dist/index.d.ts +0 -1
  57. package/dist/index.js +0 -1
  58. package/dist/index.js.map +1 -1
  59. package/dist/jbrowse-plugin-tview.umd.production.min.js +125 -89
  60. package/dist/jbrowse-plugin-tview.umd.production.min.js.map +4 -4
  61. package/dist/version.d.ts +1 -1
  62. package/dist/version.js +1 -1
  63. package/package.json +21 -18
  64. package/src/AddHighlightModel/index.tsx +8 -14
  65. package/src/LaunchTView/TviewGetPlanRpc/TviewGetPlan.ts +119 -157
  66. package/src/LaunchTView/TviewGetPlanRpc/index.ts +0 -1
  67. package/src/LaunchTView/align.ts +233 -177
  68. package/src/LaunchTView/alleles.ts +70 -4
  69. package/src/LaunchTView/fetchTviewPlan.ts +11 -54
  70. package/src/LaunchTView/index.ts +74 -16
  71. package/src/LaunchTView/launch.ts +98 -0
  72. package/src/LaunchTView/launchView.ts +28 -20
  73. package/src/LaunchTView/modifications.ts +200 -0
  74. package/src/LaunchTView/readLayout.ts +65 -41
  75. package/src/LaunchTView/repeatStats.ts +7 -7
  76. package/src/LaunchTView/repeats.ts +6 -4
  77. package/src/LaunchTView/tview.ts +228 -112
  78. package/src/TViewPanel/components/TViewPanel.tsx +33 -4
  79. package/src/TViewPanel/genome.ts +41 -0
  80. package/src/TViewPanel/init.ts +104 -51
  81. package/src/TViewPanel/initMenu.ts +126 -0
  82. package/src/TViewPanel/model.ts +350 -97
  83. package/src/TViewPanel/modifications.ts +127 -0
  84. package/src/index.ts +0 -2
  85. package/src/version.ts +1 -1
  86. package/dist/AddHighlightModel/GenomeMouseoverHighlight.d.ts +0 -6
  87. package/dist/AddHighlightModel/GenomeMouseoverHighlight.js +0 -23
  88. package/dist/AddHighlightModel/GenomeMouseoverHighlight.js.map +0 -1
  89. package/dist/AddHighlightModel/HighlightComponents.d.ts +0 -7
  90. package/dist/AddHighlightModel/HighlightComponents.js +0 -11
  91. package/dist/AddHighlightModel/HighlightComponents.js.map +0 -1
  92. package/dist/LaunchTView/components/ArrayReport.d.ts +0 -10
  93. package/dist/LaunchTView/components/ArrayReport.js +0 -59
  94. package/dist/LaunchTView/components/ArrayReport.js.map +0 -1
  95. package/dist/LaunchTView/components/LaunchTViewDialog.d.ts +0 -6
  96. package/dist/LaunchTView/components/LaunchTViewDialog.js +0 -124
  97. package/dist/LaunchTView/components/LaunchTViewDialog.js.map +0 -1
  98. package/dist/LaunchTView/sampleTree.d.ts +0 -37
  99. package/dist/LaunchTView/sampleTree.js +0 -65
  100. package/dist/LaunchTView/sampleTree.js.map +0 -1
  101. package/dist/LaunchTView/useTviewMsa.d.ts +0 -18
  102. package/dist/LaunchTView/useTviewMsa.js +0 -24
  103. package/dist/LaunchTView/useTviewMsa.js.map +0 -1
  104. package/dist/TViewPanel/coords.d.ts +0 -25
  105. package/dist/TViewPanel/coords.js +0 -56
  106. package/dist/TViewPanel/coords.js.map +0 -1
  107. package/src/AddHighlightModel/GenomeMouseoverHighlight.tsx +0 -46
  108. package/src/AddHighlightModel/HighlightComponents.tsx +0 -25
  109. package/src/LaunchTView/components/ArrayReport.tsx +0 -64
  110. package/src/LaunchTView/components/LaunchTViewDialog.tsx +0 -212
  111. package/src/LaunchTView/sampleTree.ts +0 -73
  112. package/src/LaunchTView/useTviewMsa.ts +0 -39
  113. package/src/TViewPanel/coords.ts +0 -65
@@ -1,9 +1,12 @@
1
1
  import { RpcMethodType } from '@jbrowse/core/pluggableElementTypes';
2
+ import type { TviewModifications } from '../modifications';
3
+ import type { RpcCallContext, RpcExecuteArgs } from '@jbrowse/core/rpc/RpcRegistry';
2
4
  import type { Region } from '@jbrowse/core/util';
5
+ import type { Highlight, RowDataInput } from 'react-msaview';
3
6
  /** one BAM/CRAM to draw rows from, and the name its rows are grouped under */
4
7
  export interface TviewSourceArgs {
5
8
  adapterConfig: Record<string, unknown>;
6
- sample?: string;
9
+ sample: string;
7
10
  /**
8
11
  * what this file calls the region's sequence. Filled in on the client, where
9
12
  * the assembly's aliases live: two files over one assembly routinely spell it
@@ -12,47 +15,43 @@ export interface TviewSourceArgs {
12
15
  refName?: string;
13
16
  }
14
17
  export interface TviewGetPlanArgs {
15
- sessionId: string;
16
18
  sources: TviewSourceArgs[];
17
- /** the assembly's sequence adapter, when it has one */
18
- sequenceAdapterConfig?: Record<string, unknown>;
19
+ /** names the genome, so the call layer attaches its sequence adapter */
20
+ assemblyName: string;
19
21
  /** the sequence adapter's own spelling of the region */
20
- sequenceRefName?: string;
22
+ sequenceRefName: string;
21
23
  region: Region;
22
24
  /** stop before rendering an alignment bigger than this many cells */
23
25
  maxCells: number;
24
26
  }
25
- /** what crosses back: the alignment, and the numbers the dialog reports */
26
- export interface TviewArrayReport {
27
- start: number;
28
- end: number;
29
- period: number;
30
- unit: string;
31
- width: number;
32
- /** per row: copies carried, and allele length in bp */
33
- copies: [string, number][];
34
- lengths: [string, number][];
35
- }
36
27
  export interface TviewPlanResult {
37
28
  msa: string;
38
- /** Newick grouping rows by sample; absent unless several were loaded */
39
- tree?: string;
40
- rowCount: number;
29
+ /** per row name: its sample, and its copies and allele length at the subject */
30
+ rowData: RowDataInput;
31
+ /** a bracket over each insertion site and each array block */
32
+ highlights: Highlight[];
41
33
  columnCount: number;
42
34
  cellCount: number;
43
- insertionWidths: [number, number][];
44
- arraySpans: [number, number, number][];
45
35
  region: {
46
36
  refName: string;
47
37
  start: number;
48
38
  end: number;
49
39
  };
50
- arrays: TviewArrayReport[];
51
- subjectIndex?: number;
52
- referenceName?: string;
40
+ /** whether rows carry a copy count at a subject array */
41
+ hasSubject: boolean;
53
42
  samples: string[];
54
43
  /** set when the alignment was over maxCells and `msa` is empty */
55
44
  tooLarge?: boolean;
45
+ /** set when some read in the window has an MM tag */
46
+ modifications?: TviewModifications;
47
+ }
48
+ declare module '@jbrowse/core/rpc/RpcRegistry' {
49
+ interface RpcRegistry {
50
+ TviewGetPlan: {
51
+ args: TviewGetPlanArgs;
52
+ return: TviewPlanResult;
53
+ };
54
+ }
56
55
  }
57
56
  /**
58
57
  * Builds the whole alignment in the worker and sends back the FASTA.
@@ -69,64 +68,45 @@ export interface TviewPlanResult {
69
68
  * against the same reference interval, so an array's copies are counted once,
70
69
  * over rows from all of them.
71
70
  */
72
- export default class TviewGetPlan extends RpcMethodType {
73
- name: string;
74
- /**
75
- * Written against the 4.3.0 base class, which takes a bare
76
- * `Record<string, unknown>` and has no `renameRegions` helper — that is the
77
- * oldest host this bundle boots on, and the newer base class accepts the same
78
- * shape.
79
- */
80
- serializeArguments(args: Record<string, unknown>, rpcDriverClassName: string): Promise<Record<string, unknown>>;
81
- execute(args: TviewGetPlanArgs, rpcDriverClassName: string): Promise<{
71
+ export default class TviewGetPlan extends RpcMethodType<'TviewGetPlan'> {
72
+ name: "TviewGetPlan";
73
+ serializeArguments(args: TviewGetPlanArgs & RpcCallContext): Promise<Record<string, unknown>>;
74
+ execute(args: RpcExecuteArgs<'TviewGetPlan'>): Promise<{
75
+ modifications?: {
76
+ rows: string[];
77
+ types: string[];
78
+ row: Uint32Array<ArrayBuffer>;
79
+ residue: Uint32Array<ArrayBuffer>;
80
+ type: Uint8Array<ArrayBuffer>;
81
+ prob: Uint8Array<ArrayBuffer>;
82
+ dropped: number;
83
+ unplaced: number;
84
+ } | undefined;
82
85
  msa: string;
83
- tooLarge: boolean;
84
- rowCount: number;
85
86
  columnCount: number;
86
87
  cellCount: number;
87
- insertionWidths: [number, number][];
88
- arraySpans: [number, number, number][];
88
+ rowData: RowDataInput;
89
+ highlights: Highlight[];
89
90
  region: {
90
91
  refName: string;
91
92
  start: number;
92
93
  end: number;
93
94
  };
94
- arrays: {
95
- start: number;
96
- end: number;
97
- period: number;
98
- unit: string;
99
- width: number;
100
- copies: [string, number][];
101
- lengths: [string, number][];
102
- }[];
103
- subjectIndex: number | undefined;
104
- referenceName: string | undefined;
95
+ hasSubject: boolean;
105
96
  samples: string[];
106
97
  } | {
107
98
  msa: string;
108
- tree: string | undefined;
109
- rowCount: number;
99
+ tooLarge: boolean;
110
100
  columnCount: number;
111
101
  cellCount: number;
112
- insertionWidths: [number, number][];
113
- arraySpans: [number, number, number][];
102
+ rowData: RowDataInput;
103
+ highlights: Highlight[];
114
104
  region: {
115
105
  refName: string;
116
106
  start: number;
117
107
  end: number;
118
108
  };
119
- arrays: {
120
- start: number;
121
- end: number;
122
- period: number;
123
- unit: string;
124
- width: number;
125
- copies: [string, number][];
126
- lengths: [string, number][];
127
- }[];
128
- subjectIndex: number | undefined;
129
- referenceName: string | undefined;
109
+ hasSubject: boolean;
130
110
  samples: string[];
131
111
  }>;
132
112
  }
@@ -1,11 +1,10 @@
1
+ import { isSequenceAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
1
2
  import { getAdapter } from '@jbrowse/core/data_adapters/dataAdapterCache';
3
+ import { getFeatureAdapterOrThrow } from '@jbrowse/core/data_adapters/getFeatureAdapter';
2
4
  import { RpcMethodType } from '@jbrowse/core/pluggableElementTypes';
3
- import { renameRegionsIfNeeded } from '@jbrowse/core/util';
4
- import { buildSampleTree } from '../sampleTree';
5
- import { planTviewMsa, renderTviewMsa } from '../tview';
6
- function isFeatureSource(adapter) {
7
- return 'getFeatures' in adapter && typeof adapter.getFeatures === 'function';
8
- }
5
+ import { assembleLocString } from '@jbrowse/core/util';
6
+ import { planModifications } from '../modifications';
7
+ import { planHighlights, planRowData, planTviewMsa, renderRows, toFasta, } from '../tview';
9
8
  /**
10
9
  * Drains an adapter's feature observable into an array.
11
10
  *
@@ -13,14 +12,11 @@ function isFeatureSource(adapter) {
13
12
  * not a dependency here and `@jbrowse/core/util/rxjs` publishes only
14
13
  * `ObservableCreate`. Subscribing directly needs neither.
15
14
  */
16
- async function fetchAll(pluginManager, sessionId, adapterConfig, region) {
17
- const { dataAdapter } = await getAdapter(pluginManager, sessionId, adapterConfig);
18
- if (!isFeatureSource(dataAdapter)) {
19
- throw new Error(`${adapterConfig.type} has no getFeatures`);
20
- }
15
+ async function fetchAll(args, region) {
16
+ const dataAdapter = await getFeatureAdapterOrThrow(args);
21
17
  return new Promise((resolve, reject) => {
22
18
  const ret = [];
23
- dataAdapter.getFeatures(region).subscribe({
19
+ dataAdapter.getFeatures(region, { signal: args.signal }).subscribe({
24
20
  next: feature => ret.push(feature),
25
21
  error: reject,
26
22
  complete: () => {
@@ -29,6 +25,26 @@ async function fetchAll(pluginManager, sessionId, adapterConfig, region) {
29
25
  });
30
26
  });
31
27
  }
28
+ /**
29
+ * The reference over exactly `region`, which becomes the alignment's first row
30
+ * and is what makes an array an interval rather than an insertion. The region
31
+ * arrives clamped to its contig, so a short answer means the sequence could not
32
+ * be read, and a row that stops early would misplace every column after it.
33
+ */
34
+ async function fetchReference(pluginManager, { sessionId, sequenceAdapter, sequenceRefName, region, signal, }) {
35
+ const dataAdapter = sequenceAdapter
36
+ ? (await getAdapter(pluginManager, sessionId, sequenceAdapter)).dataAdapter
37
+ : undefined;
38
+ const sequence = dataAdapter && isSequenceAdapter(dataAdapter)
39
+ ? await dataAdapter.getSequence({ ...region, refName: sequenceRefName }, { signal })
40
+ : undefined;
41
+ const want = region.end - region.start;
42
+ if (sequence?.length !== want) {
43
+ const n = (x) => x.toLocaleString('en-US');
44
+ throw new Error(`Could not read the reference sequence over ${assembleLocString(region)}: got ${n(sequence?.length ?? 0)}bp of ${n(want)}bp`);
45
+ }
46
+ return sequence;
47
+ }
32
48
  /**
33
49
  * Builds the whole alignment in the worker and sends back the FASTA.
34
50
  *
@@ -49,41 +65,24 @@ export default class TviewGetPlan extends RpcMethodType {
49
65
  super(...arguments);
50
66
  this.name = 'TviewGetPlan';
51
67
  }
52
- /**
53
- * Written against the 4.3.0 base class, which takes a bare
54
- * `Record<string, unknown>` and has no `renameRegions` helper — that is the
55
- * oldest host this bundle boots on, and the newer base class accepts the same
56
- * shape.
57
- */
58
- async serializeArguments(args, rpcDriverClassName) {
59
- const typed = args;
60
- const assemblyManager = this.pluginManager.rootModel?.session?.assemblyManager;
61
- if (!assemblyManager) {
62
- throw new Error('no assembly manager');
63
- }
64
- const refNameFor = async (adapterConfig) => {
65
- const { regions } = await renameRegionsIfNeeded(assemblyManager, {
66
- sessionId: typed.sessionId,
67
- adapterConfig,
68
- regions: [typed.region],
68
+ async serializeArguments(args) {
69
+ const sources = await Promise.all(args.sources.map(async (source) => {
70
+ const { regions } = await this.renameRegions({
71
+ sessionId: args.sessionId,
72
+ adapterConfig: source.adapterConfig,
73
+ regions: [args.region],
69
74
  });
70
- return regions[0].refName;
71
- };
72
- const sources = await Promise.all(typed.sources.map(async (source) => ({
73
- ...source,
74
- refName: await refNameFor(source.adapterConfig),
75
- })));
76
- const sequenceRefName = typed.sequenceAdapterConfig
77
- ? await refNameFor(typed.sequenceAdapterConfig)
78
- : undefined;
79
- return super.serializeArguments({ ...args, sources, sequenceRefName }, rpcDriverClassName);
75
+ return { ...source, refName: regions[0].refName };
76
+ }));
77
+ return super.serializeArguments({ ...args, sources });
80
78
  }
81
- async execute(args, rpcDriverClassName) {
82
- const { sessionId, sources, sequenceAdapterConfig, sequenceRefName, region, maxCells, } = await this.deserializeArguments(args, rpcDriverClassName);
83
- const perSource = await Promise.all(sources.map(source => fetchAll(this.pluginManager, sessionId, source.adapterConfig, {
84
- ...region,
85
- refName: source.refName ?? region.refName,
86
- })));
79
+ async execute(args) {
80
+ const { pluginManager } = this;
81
+ const { sources, region, maxCells } = args;
82
+ const [perSource, sequence] = await Promise.all([
83
+ Promise.all(sources.map(source => fetchAll({ ...args, pluginManager, adapterConfig: source.adapterConfig }, { ...region, refName: source.refName ?? region.refName }))),
84
+ fetchReference(pluginManager, args),
85
+ ]);
87
86
  const features = [];
88
87
  const sampleByIndex = [];
89
88
  for (const [i, feats] of perSource.entries()) {
@@ -94,20 +93,6 @@ export default class TviewGetPlan extends RpcMethodType {
94
93
  }
95
94
  }
96
95
  }
97
- let sequence;
98
- if (sequenceAdapterConfig) {
99
- const seqFeats = await fetchAll(this.pluginManager, sessionId, sequenceAdapterConfig, { ...region, refName: sequenceRefName ?? region.refName });
100
- const seq = seqFeats[0]?.get('seq');
101
- const seqStart = seqFeats[0]?.get('start');
102
- // the adapter may answer with a wider block than it was asked for
103
- const sliced = seq !== undefined && seqStart !== undefined
104
- ? seq.slice(region.start - seqStart, region.end - seqStart)
105
- : undefined;
106
- // a short answer means the region runs off the end of the contig, and a
107
- // reference row that stops early would misplace every column after it
108
- sequence =
109
- sliced?.length === region.end - region.start ? sliced : undefined;
110
- }
111
96
  const plan = planTviewMsa({
112
97
  features,
113
98
  refName: region.refName,
@@ -117,36 +102,27 @@ export default class TviewGetPlan extends RpcMethodType {
117
102
  sampleOf: i => sampleByIndex[i],
118
103
  });
119
104
  const shared = {
120
- rowCount: plan.reads.length,
121
105
  columnCount: plan.layout.totalColumns,
122
106
  cellCount: plan.cellCount,
123
- insertionWidths: plan.insertionWidths,
124
- arraySpans: plan.arraySpans,
107
+ rowData: planRowData(plan),
108
+ highlights: planHighlights(plan),
125
109
  region: plan.region,
126
- arrays: plan.arrays.map(a => ({
127
- start: a.start,
128
- end: a.end,
129
- period: a.period,
130
- unit: a.unit,
131
- width: a.width,
132
- copies: [...a.copiesByName.entries()],
133
- lengths: [...a.lengthByName.entries()],
134
- })),
135
- subjectIndex: plan.subject
136
- ? plan.arrays.indexOf(plan.subject)
137
- : undefined,
138
- referenceName: plan.referenceName,
110
+ hasSubject: plan.subject !== undefined,
139
111
  samples: plan.samples,
140
112
  };
141
113
  // the render is the expensive half and the only part bounded by rows x
142
114
  // columns, so the size check happens before it rather than after
143
- return plan.cellCount > maxCells
144
- ? { ...shared, msa: '', tooLarge: true }
145
- : {
115
+ const rows = plan.cellCount > maxCells ? undefined : renderRows(plan);
116
+ const modifications = rows
117
+ ? planModifications({ features, plan, rows })
118
+ : undefined;
119
+ return rows
120
+ ? {
146
121
  ...shared,
147
- msa: renderTviewMsa(plan),
148
- tree: buildSampleTree(plan.reads),
149
- };
122
+ msa: toFasta(plan, rows),
123
+ ...(modifications ? { modifications } : {}),
124
+ }
125
+ : { ...shared, msa: '', tooLarge: true };
150
126
  }
151
127
  }
152
128
  //# sourceMappingURL=TviewGetPlan.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TviewGetPlan.js","sourceRoot":"","sources":["../../../src/LaunchTView/TviewGetPlanRpc/TviewGetPlan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAA;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAuEvD,SAAS,eAAe,CAAC,OAAe;IACtC,OAAO,aA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,IAAI,EAAE,IAAI,EAAE,CAAC;YAC7C,CAAC,CAAC,SAAS,CAAA;QACb,OAAO,IAAI;YACT,CAAC,CAAC;gBACE,GAAG,MAAM;gBACT,GAAG,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC;gBACxB,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAC5C;YACH,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;IAC5C,CAAC;CACF"}
@@ -1,3 +1,3 @@
1
1
  import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function TviewGetPlanRpcF(pluginManager: PluginManager): void;
3
- export type { TviewArrayReport, TviewGetPlanArgs, TviewPlanResult, TviewSourceArgs, } from './TviewGetPlan';
3
+ export type { TviewGetPlanArgs, TviewPlanResult, TviewSourceArgs, } from './TviewGetPlan';
@@ -8,8 +8,8 @@
8
8
  * There are two ways to do it, and which one applies is a property of the
9
9
  * inserted sequence rather than a setting:
10
10
  *
11
- * - **Aperiodic** (`alignInsertions`): one center-star alignment over the whole
12
- * inserted sequence. Right for a novel insertion, a mobile element, anything
11
+ * - **Aperiodic** (`alignInsertionSite`): one center-star alignment over the
12
+ * whole inserted sequence. Right for a novel insertion, a mobile element, anything
13
13
  * whose bases only make sense read straight through.
14
14
  * - **Periodic** (`alignPeriodicInsertions`): a tandem array, where the whole
15
15
  * inserted sequence is n copies of one unit. Aligning those base-to-base is
@@ -74,7 +74,7 @@ export interface PeriodicAlignment {
74
74
  * as wide as the widest version of that copy across the site, so a sequence with
75
75
  * fewer copies runs out of blocks rather than drifting out of register. Returns
76
76
  * undefined when the site is not a tandem array, or is too big to lay out this
77
- * way; the caller falls back to `alignInsertions`.
77
+ * way; the caller falls back to the center-star alignment.
78
78
  *
79
79
  * **Blocks are array order, not homology.** Copies are anchored at the left edge
80
80
  * of the insertion and counted rightward, so block k is "the kth copy along",
@@ -94,6 +94,13 @@ export declare function alignPeriodicInsertions(seqs: string[]): PeriodicAlignme
94
94
  * which is a guess that one chimeric read overturns for the whole site. Measured
95
95
  * off the reference, it is a property of the locus, so every read is laid out
96
96
  * against the same unit whatever the reads happen to be.
97
+ *
98
+ * An empty sequence is one of the alleles, not a missing one: a row that
99
+ * deletes the whole array carries nought copies of it, which is a measurement
100
+ * and the most extreme contraction there is. It splits into no units and so
101
+ * lays out as a row of gaps the width of the block, which is what a deletion
102
+ * should look like. Dropping it instead left that row indistinguishable from
103
+ * one that never reached the array at all.
97
104
  */
98
105
  export declare function alignToUnit(seqs: string[], consensus: string): PeriodicAlignment | undefined;
99
106
  export interface InsertionAlignment {
@@ -103,20 +110,14 @@ export interface InsertionAlignment {
103
110
  periodic?: PeriodicAlignment;
104
111
  }
105
112
  /**
106
- * Lay out the sequences inserted at one reference position, by whichever of the
107
- * two alignments the sequence itself calls for. The single place that decision
108
- * is made, so a caller reading the period cannot disagree with the layout it
109
- * gets.
113
+ * Lay out the sequences inserted at one reference position, one entry per
114
+ * read, by whichever of the two alignments the sequence itself calls for. The
115
+ * single place that decision is made, so a caller reading the period cannot
116
+ * disagree with the layout it gets.
110
117
  *
111
- * A tandem array goes unit-per-block, which is both the readable answer and the
112
- * affordable one — the size caps here are what the base-to-base alignment costs,
113
- * and an expansion is always past them. Everything else gets the center-star
114
- * alignment, or is left alone (`gapped` empty) when there is nothing to gain
115
- * from a single distinct sequence, or the site is too large to be worth it.
118
+ * A tandem array goes unit-per-block, which is the readable answer however many
119
+ * copies it has. Everything else gets the center-star alignment, or is left
120
+ * alone (`gapped` empty) when there is nothing to gain from a single distinct
121
+ * sequence, or the alignments would cost more than the site's budget.
116
122
  */
117
123
  export declare function alignInsertionSite(seqs: string[]): InsertionAlignment;
118
- /**
119
- * The gapped sequences alone, for callers with no use for the period. Every
120
- * decision lives in `alignInsertionSite`.
121
- */
122
- export declare function alignInsertions(seqs: string[]): Map<string, string>;