Skip to content

Commit 472c240

Browse files
cmdcolinclaude
andcommitted
1.6.1: fix empty MAF tracks with haplotype sample names
Returns master to the v1.6.0 release baseline (the unreleased webgl rendering refactor is being vendored upstream into jbrowse-components) and adds the sample-matching fix: 1.6.0 split each `genome.sequence` source token with a dot-position heuristic, then required that guess to exactly equal a configured/tree sample name. With Cactus haplotype names (`Species1.1`) the heuristic and the configured name disagree about the `.1`/`.2` suffix, so every row was filtered out and the track rendered empty. `matchSampleId` now resolves each token against the known sample set by its longest dot-bounded prefix — the genome name comes from ground truth rather than a guess. Applied to MafTabix, BigMaf and BgzipTaffy adapters. The dot heuristic remains only for un-annotated MAFs with no samples/tree. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent fd11ae6 commit 472c240

50 files changed

Lines changed: 1992 additions & 1610 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,46 +7,40 @@ on:
77

88
jobs:
99
build-and-lint:
10-
name: Build, lint, and unit tests
10+
name: Build and lint
1111
runs-on: ubuntu-latest
12+
if: "!contains(github.event.head_commit.message, 'skip ci')"
1213
steps:
1314
- uses: actions/checkout@v4
14-
- uses: pnpm/action-setup@v4
15-
with:
16-
version: latest
17-
- name: Use Node.js 24.x
15+
- name: Use Node.js 22.x
1816
uses: actions/setup-node@v4
1917
with:
20-
node-version: 24.x
21-
cache: pnpm
22-
- run: pnpm install --frozen-lockfile
18+
node-version: 22.x
19+
- name: Install deps (with cache)
20+
uses: bahmutov/npm-install@v1
2321
- name: Build
24-
run: pnpm build
22+
run: yarn build
2523
- name: Lint
26-
run: pnpm lint
24+
run: yarn lint
25+
2726
e2e-tests:
2827
name: E2E tests (nightly)
2928
runs-on: ubuntu-latest
3029
needs: build-and-lint
3130
steps:
3231
- uses: actions/checkout@v4
33-
- uses: pnpm/action-setup@v4
34-
with:
35-
version: latest
36-
- name: Use Node.js 24.x
32+
- name: Use Node.js 22.x
3733
uses: actions/setup-node@v4
3834
with:
39-
node-version: 24.x
40-
cache: pnpm
41-
- run: pnpm install --frozen-lockfile
42-
- name: Install Puppeteer Chrome
43-
run: npx puppeteer browsers install chrome
35+
node-version: 22.x
36+
- name: Install deps (with cache)
37+
uses: bahmutov/npm-install@v1
4438
- name: Install JBrowse CLI
45-
run: pnpm install -g @jbrowse/cli
39+
run: npm install -g @jbrowse/cli
4640
- name: Setup JBrowse nightly
4741
run: jbrowse create .test-jbrowse-nightly --nightly
4842
- name: Run E2E tests
49-
run: TEST_JBROWSE_VERSION=nightly pnpm vitest run test/
43+
run: TEST_JBROWSE_VERSION=nightly yarn vitest run test/
5044
- name: Upload screenshots on failure
5145
if: failure()
5246
uses: actions/upload-artifact@v4

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ jobs:
2424
registry-url: 'https://registry.npmjs.org'
2525
- run: pnpm install --frozen-lockfile
2626
- run: pnpm build
27-
- run: pnpm publish --access public --provenance
27+
- run: npm publish --access public --provenance

.prettierignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

eslint.config.mjs

Lines changed: 77 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,52 @@
11
import eslint from '@eslint/js'
2-
import { defineConfig } from 'eslint/config'
3-
import { importX } from 'eslint-plugin-import-x'
4-
import eslintPluginReact from 'eslint-plugin-react'
5-
import eslintPluginReactHooks from 'eslint-plugin-react-hooks'
2+
import eslintPluginUnicorn from 'eslint-plugin-unicorn'
3+
import importPlugin from 'eslint-plugin-import'
64
import tseslint from 'typescript-eslint'
75

8-
export default defineConfig(
6+
export default tseslint.config(
97
{
10-
ignores: ['eslint.config.mjs', 'dist/*', 'esbuild.mjs'],
8+
ignores: [
9+
'webpack.config.js',
10+
'dist/*',
11+
'esm/*',
12+
'test/*.min.js',
13+
'example/*',
14+
'eslint.config.mjs',
15+
'esbuild.mjs',
16+
'vitest.config.ts',
17+
'benchmarks/*',
18+
'test/*',
19+
],
1120
},
1221
{
1322
languageOptions: {
1423
parserOptions: {
15-
project: ['./tsconfig.json'],
24+
project: ['./tsconfig.lint.json'],
1625
tsconfigRootDir: import.meta.dirname,
1726
},
1827
},
19-
20-
settings: {
21-
react: {
22-
version: 'v19.2.5',
23-
},
24-
},
2528
},
26-
2729
eslint.configs.recommended,
30+
importPlugin.flatConfigs.recommended,
2831
...tseslint.configs.recommended,
2932
...tseslint.configs.stylisticTypeChecked,
3033
...tseslint.configs.strictTypeChecked,
31-
importX.flatConfigs.recommended,
32-
eslintPluginReact.configs.flat.recommended,
33-
{
34-
plugins: {
35-
'react-hooks': eslintPluginReactHooks,
36-
},
37-
rules: eslintPluginReactHooks.configs.recommended.rules,
38-
},
34+
35+
eslintPluginUnicorn.configs.recommended,
3936
{
4037
rules: {
41-
'no-restricted-globals': ['error', 'Buffer'],
38+
'@typescript-eslint/no-unused-vars': [
39+
'warn',
40+
{
41+
argsIgnorePattern: '^_',
42+
ignoreRestSiblings: true,
43+
caughtErrors: 'none',
44+
},
45+
],
46+
47+
'import/no-unresolved': 'off',
48+
'import/order': 'off',
49+
semi: ['error', 'never'],
4250
'no-empty': 'off',
4351
'no-console': [
4452
'warn',
@@ -48,84 +56,66 @@ export default defineConfig(
4856
],
4957
'no-underscore-dangle': 'off',
5058
curly: 'error',
51-
'object-shorthand': 'error',
52-
'@typescript-eslint/no-unnecessary-condition': 'error',
53-
semi: ['error', 'never'],
54-
'spaced-comment': [
55-
'error',
56-
'always',
57-
{
58-
markers: ['/'],
59-
},
60-
],
61-
62-
'import-x/no-unresolved': 'off',
63-
'import-x/order': [
64-
'error',
65-
{
66-
named: true,
67-
'newlines-between': 'always',
68-
alphabetize: {
69-
order: 'asc',
70-
},
71-
groups: [
72-
'builtin',
73-
['external', 'internal'],
74-
['parent', 'sibling', 'index', 'object'],
75-
'type',
76-
],
77-
pathGroups: [
78-
{
79-
group: 'builtin',
80-
pattern: 'react',
81-
position: 'before',
82-
},
83-
{
84-
group: 'external',
85-
pattern: '@mui/icons-material',
86-
position: 'after',
87-
},
88-
],
89-
90-
pathGroupsExcludedImportTypes: ['react'],
91-
},
92-
],
93-
94-
'one-var': ['error', 'never'],
95-
'react/no-unescaped-entities': 'off',
96-
'react/no-is-mounted': 'off',
97-
'react/prop-types': 'off',
9859

99-
'@typescript-eslint/no-deprecated': 'off',
60+
'no-extra-semi': 'off',
10061
'@typescript-eslint/no-explicit-any': 'off',
10162
'@typescript-eslint/explicit-module-boundary-types': 'off',
10263
'@typescript-eslint/ban-ts-comment': 'off',
103-
'@typescript-eslint/no-unnecessary-type-parameters': 'off',
104-
'@typescript-eslint/no-misused-promises': 'off',
10564
'@typescript-eslint/no-base-to-string': 'off',
10665
'@typescript-eslint/no-unsafe-member-access': 'off',
10766
'@typescript-eslint/no-unsafe-argument': 'off',
10867
'@typescript-eslint/no-unsafe-assignment': 'off',
109-
'@typescript-eslint/restrict-plus-operands': 'off',
11068
'@typescript-eslint/no-unsafe-call': 'off',
11169
'@typescript-eslint/no-unsafe-return': 'off',
11270
'@typescript-eslint/prefer-nullish-coalescing': 'off',
113-
'@typescript-eslint/no-non-null-assertion': 'off',
114-
'@typescript-eslint/consistent-type-imports': 'error',
11571
'@typescript-eslint/require-await': 'off',
72+
'@typescript-eslint/no-non-null-assertion': 'off',
11673
'@typescript-eslint/restrict-template-expressions': 'off',
74+
'@typescript-eslint/restrict-plus-operands': 'off',
11775
'@typescript-eslint/no-empty-function': 'off',
118-
'@typescript-eslint/no-extraneous-class': 'off',
119-
'@typescript-eslint/unbound-method': 'off',
120-
'@typescript-eslint/no-dynamic-delete': 'off',
121-
'@typescript-eslint/no-unused-vars': [
122-
'warn',
123-
{
124-
argsIgnorePattern: '^_',
125-
ignoreRestSiblings: true,
126-
caughtErrors: 'none',
127-
},
128-
],
76+
77+
'unicorn/no-array-sort': 'off',
78+
'unicorn/no-new-array': 'off',
79+
'unicorn/no-empty-file': 'off',
80+
'unicorn/prefer-type-error': 'off',
81+
'unicorn/prefer-modern-math-apis': 'off',
82+
'unicorn/prefer-node-protocol': 'off',
83+
'unicorn/no-unreadable-array-destructuring': 'off',
84+
'unicorn/no-abusive-eslint-disable': 'off',
85+
'unicorn/no-array-callback-reference': 'off',
86+
'unicorn/number-literal-case': 'off',
87+
'unicorn/prefer-add-event-listener': 'off',
88+
'unicorn/prefer-top-level-await': 'off',
89+
'unicorn/consistent-function-scoping': 'off',
90+
'unicorn/no-await-expression-member': 'off',
91+
'unicorn/no-lonely-if': 'off',
92+
'unicorn/consistent-destructuring': 'off',
93+
'unicorn/prefer-module': 'off',
94+
'unicorn/prefer-optional-catch-binding': 'off',
95+
'unicorn/no-useless-undefined': 'off',
96+
'unicorn/no-null': 'off',
97+
'unicorn/no-nested-ternary': 'off',
98+
'unicorn/filename-case': 'off',
99+
'unicorn/catch-error-name': 'off',
100+
'unicorn/prevent-abbreviations': 'off',
101+
'unicorn/prefer-code-point': 'off',
102+
'unicorn/numeric-separators-style': 'off',
103+
'unicorn/no-array-for-each': 'off',
104+
'unicorn/prefer-spread': 'off',
105+
'unicorn/explicit-length-check': 'off',
106+
'unicorn/prefer-regexp-test': 'off',
107+
'unicorn/relative-url-style': 'off',
108+
'unicorn/prefer-math-trunc': 'off',
109+
'unicorn/prefer-query-selector': 'off',
110+
'unicorn/no-negated-condition': 'off',
111+
'unicorn/switch-case-braces': 'off',
112+
'unicorn/prefer-switch': 'off',
113+
'unicorn/better-regex': 'off',
114+
'unicorn/no-for-loop': 'off',
115+
'unicorn/escape-case': 'off',
116+
'unicorn/prefer-number-properties': 'off',
117+
'unicorn/no-process-exit': 'off',
118+
'unicorn/prefer-at': 'off',
129119
},
130120
},
131121
)

package.json

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.6.0",
2+
"version": "1.6.1",
33
"license": "MIT",
44
"name": "jbrowse-plugin-mafviewer",
55
"repository": {
@@ -25,25 +25,28 @@
2525
"pretest:e2e": "test -d .test-jbrowse-nightly || jbrowse create .test-jbrowse-nightly --nightly",
2626
"bench": "vitest bench",
2727
"bench:memory": "node --expose-gc --experimental-strip-types src/BigMafAdapter/memoryBenchmark.ts",
28-
"format": "pnpm prettier --write .",
29-
"prebuild": "pnpm clean",
28+
"format": "prettier --write .",
29+
"prebuild": "yarn clean",
3030
"build": "tsc && NODE_ENV=production node esbuild.mjs",
31-
"lint": "eslint src --report-unused-disable-directives --max-warnings 0",
31+
"lint": "eslint --report-unused-disable-directives --max-warnings 0",
3232
"prepublishOnly": "node -e \"console.log('export const version = \\'' + require('./package.json').version + '\\'')\" > src/version.ts && git add -A src && git diff --cached --quiet || git commit -m '[skip ci] Bump version.ts'",
33-
"prepack": "pnpm build",
34-
"preversion": "pnpm lint",
33+
"prepack": "yarn build",
34+
"preversion": "yarn lint",
3535
"version": "node -e \"console.log('export const version = \\'' + require('./package.json').version + '\\'')\" > src/version.ts && git add src/version.ts",
3636
"postversion": "git push --follow-tags"
3737
},
3838
"devDependencies": {
39-
"@eslint/js": "^10.0.1",
39+
"@babel/core": "^7.29.0",
40+
"@babel/preset-react": "^7.28.5",
41+
"@emotion/react": "^11.14.0",
42+
"@eslint/js": "^8.57.1",
4043
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
41-
"@gmod/bbi": "^9.0.9",
42-
"@jbrowse/cli": "^4.2.1",
43-
"@jbrowse/core": "^4.2.0",
44+
"@gmod/bbi": "^8.1.2",
45+
"@jbrowse/cli": "^4.1.15",
46+
"@jbrowse/core": "^4.1.15",
4447
"@jbrowse/mobx-state-tree": "^5.6.0",
45-
"@jbrowse/plugin-data-management": "^4.2.0",
46-
"@jbrowse/plugin-linear-genome-view": "^4.2.0",
48+
"@jbrowse/plugin-data-management": "^4.1.15",
49+
"@jbrowse/plugin-linear-genome-view": "^4.1.15",
4750
"@mui/material": "^7.3.10",
4851
"@mui/system": "^7.3.10",
4952
"@mui/x-data-grid": "^8.28.2",
@@ -52,31 +55,34 @@
5255
"@types/jest-image-snapshot": "^6.4.1",
5356
"@types/node": "^25.6.0",
5457
"@types/react": "^19.2.14",
58+
"chalk": "^5.6.2",
5559
"esbuild": "^0.28.0",
56-
"eslint": "^10.2.1",
57-
"eslint-plugin-import-x": "^4.16.2",
60+
"eslint": "^10.2.0",
61+
"eslint-plugin-import": "^2.32.0",
5862
"eslint-plugin-react": "^7.37.5",
59-
"eslint-plugin-react-hooks": "^7.1.1",
63+
"eslint-plugin-react-hooks": "^7.0.1",
6064
"eslint-plugin-unicorn": "^64.0.0",
6165
"jest-image-snapshot": "^6.5.2",
6266
"mobx": "^6.15.0",
6367
"mobx-react": "^9.2.1",
64-
"prettier": "^3.8.3",
68+
"prettier": "^3.8.2",
6569
"pretty-bytes": "^7.1.0",
66-
"puppeteer": "^24.42.0",
70+
"puppeteer": "^24.40.0",
6771
"react": "^19.2.5",
6872
"react-dom": "^19.2.5",
6973
"rimraf": "^6.1.3",
7074
"rxjs": "^7.8.2",
75+
"serve": "^14.2.6",
7176
"tss-react": "^4.9.20",
72-
"typescript": "^6.0.3",
73-
"typescript-eslint": "^8.59.1",
74-
"vitest": "^4.1.5"
77+
"typescript": "^5.9.3",
78+
"typescript-eslint": "^8.58.2",
79+
"vitest": "^4.1.4"
7580
},
7681
"dependencies": {
77-
"@gmod/bgzf-filehandle": "^6.0.19",
82+
"@gmod/bgzf-filehandle": "^6.0.18",
7883
"@mui/icons-material": "^7.3.10",
7984
"abortable-promise-cache": "^1.5.0",
85+
"buffer": "^6.0.3",
8086
"d3-array": "^3.2.4",
8187
"d3-hierarchy": "^3.1.2",
8288
"fast-deep-equal": "^3.1.3",

0 commit comments

Comments
 (0)