jbrowse-plugin-msaview 2.6.4 → 2.6.6

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.
@@ -11,11 +11,13 @@ export declare function parseCddDomains(xml: string): Map<string, {
11
11
  name: string;
12
12
  description: string;
13
13
  accession: string;
14
+ featureType?: string;
14
15
  };
15
16
  };
16
17
  locations: {
17
18
  start: number;
18
19
  end: number;
20
+ strand?: number;
19
21
  }[];
20
22
  }[]>;
21
23
  /**
@@ -30,10 +32,12 @@ export declare function fetchProteinDomains(accessions: string[]): Promise<Map<s
30
32
  name: string;
31
33
  description: string;
32
34
  accession: string;
35
+ featureType?: string;
33
36
  };
34
37
  };
35
38
  locations: {
36
39
  start: number;
37
40
  end: number;
41
+ strand?: number;
38
42
  }[];
39
43
  }[]>>;
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "2.6.4";
1
+ export declare const version = "2.6.6";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '2.6.4';
1
+ export const version = '2.6.6';
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.6.4",
2
+ "version": "2.6.6",
3
3
  "license": "MIT",
4
4
  "name": "jbrowse-plugin-msaview",
5
5
  "repository": {
@@ -21,7 +21,7 @@
21
21
  "g2p_mapper": "^2.1.5",
22
22
  "idb": "^8.0.3",
23
23
  "pako-esm2": "^2.0.2",
24
- "react-msaview": "^5.4.1",
24
+ "react-msaview": "^5.5.0",
25
25
  "swr": "^2.4.2"
26
26
  },
27
27
  "devDependencies": {
@@ -47,7 +47,7 @@
47
47
  "eslint-plugin-unicorn": "^64.0.0",
48
48
  "mobx": "^6.16.1",
49
49
  "mobx-react": "^9.2.2",
50
- "msa-parsers": "5.4.1",
50
+ "msa-parsers": "^5.5.0",
51
51
  "pixelmatch": "^7.2.0",
52
52
  "pngjs": "^7.0.0",
53
53
  "prettier": "^3.8.4",
@@ -19,11 +19,20 @@ const MsaToGenomeHighlight = observer(function MsaToGenomeHighlight2({
19
19
  const msaView = views
20
20
  .filter(isMsaView)
21
21
  .find(v => v.connectedViewId === model.id)
22
- const highlights = msaView?.connectedHighlights
23
22
 
24
- // Suppress codon highlight while hovering the LGV GenomeMouseoverHighlight
25
- // handles the single-bp display in that case
26
- return !hasHoverPosition(hovered) && highlights?.length ? (
23
+ // The persistent click selection always shows. The hover codon is suppressed
24
+ // while hovering the LGV — GenomeMouseoverHighlight handles the single-bp
25
+ // display in that case, so we don't stack a wider codon band on top of it.
26
+ const clickHighlight = msaView?.connectedClickHighlight
27
+ const hoverHighlight = hasHoverPosition(hovered)
28
+ ? undefined
29
+ : msaView?.connectedHoverHighlight
30
+ const highlights = [clickHighlight, hoverHighlight].filter(
31
+ (r): r is { refName: string; start: number; end: number } =>
32
+ r !== undefined,
33
+ )
34
+
35
+ return highlights.length ? (
27
36
  <MsaToGenomeHighlightRenderer model={model} highlights={highlights} />
28
37
  ) : null
29
38
  })
@@ -180,19 +180,36 @@ export default function stateModelFactory() {
180
180
  }))
181
181
 
182
182
  .views(self => ({
183
+ /**
184
+ * #getter
185
+ * Genome region under the current MSA hover column. Suppressed on the LGV
186
+ * while it's being hovered (GenomeMouseoverHighlight shows the crisp 1bp
187
+ * marker there instead of this wider codon band).
188
+ */
189
+ get connectedHoverHighlight(): IRegion | undefined {
190
+ const { mouseCol } = self
191
+ return mouseCol === undefined
192
+ ? undefined
193
+ : msaCoordToGenomeCoord({ model: self, coord: mouseCol })
194
+ },
195
+ /**
196
+ * #getter
197
+ * Genome region under the persistent MSA click selection. Shown
198
+ * regardless of LGV hover, so hovering the genome doesn't hide it.
199
+ */
200
+ get connectedClickHighlight(): IRegion | undefined {
201
+ const { mouseClickCol } = self
202
+ return mouseClickCol === undefined
203
+ ? undefined
204
+ : msaCoordToGenomeCoord({ model: self, coord: mouseClickCol })
205
+ },
183
206
  /**
184
207
  * #getter
185
208
  */
186
209
  get connectedHighlights(): IRegion[] {
187
- const { mouseCol, mouseClickCol } = self
188
- return [
189
- mouseCol === undefined
190
- ? undefined
191
- : msaCoordToGenomeCoord({ model: self, coord: mouseCol }),
192
- mouseClickCol === undefined
193
- ? undefined
194
- : msaCoordToGenomeCoord({ model: self, coord: mouseClickCol }),
195
- ].filter((r): r is IRegion => r !== undefined)
210
+ return [this.connectedHoverHighlight, this.connectedClickHighlight].filter(
211
+ (r): r is IRegion => r !== undefined,
212
+ )
196
213
  },
197
214
  }))
198
215
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '2.6.4'
1
+ export const version = '2.6.6'