Skip to content

Restore gff3 chromosome name aliasing (2.1.2) - #47

Merged
YalanBi merged 3 commits into
masterfrom
fix/gff-chromosome-aliasing
Aug 5, 2026
Merged

Restore gff3 chromosome name aliasing (2.1.2)#47
YalanBi merged 3 commits into
masterfrom
fix/gff-chromosome-aliasing

Conversation

@YalanBi

@YalanBi YalanBi commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #36: _read_gff_file no longer resolved chromosome name aliases (e.g. RefSeq accessions like NC_000001.11 vs a plain 1/chr1 genome FASTA) since the tabix-based get_gff_chrom_dict helper was removed to fix #28. Genes on such files were silently dropped with no warning when filtering against the genome's chromosome names.

Restored by recognizing region-type feature lines with a chromosome attribute during the same single sequential pass already used for parsing. No tabix/index requirement reintroduced, no second pass added.

CI: bumped every GitHub Action across all 5 workflows to their current major version (checkout v4->v7, setup-python v5->v7, dependency-review-action v4->v5.0.0, codeql-action v3->v4), and added build-check.yml (python -m build + twine check on PRs). No CHANGELOG/version bump for this part -- CI-only, no effect on the installed package.

Test plan

  • Full pytest suite passes (22 passed), including a new regression test with a minimal RefSeq-style fixture
  • Verified the new test reproduces the original silent-drop bug against the pre-fix code
  • Verified via a fresh independent clone of the pushed branch
  • Confirmed no conflict with Trouble while working with .csi indexes #28 (no tabix/.tbi reintroduced) or GFF/GTF import reads the file twice for the progress bar #37 (still single-pass)
  • flake8/black clean
  • python -m build + twine check dist/* pass at 2.1.2
  • Validated all workflow YAML files parse correctly after the action bumps
  • CI green across the full matrix (watch after pushing)

YalanBi added 2 commits August 5, 2026 18:32
_read_gff_file no longer resolved chromosome name aliases (e.g.
RefSeq accessions like NC_000001.11 vs a plain "1"/"chr1" genome
FASTA) since the tabix-based get_gff_chrom_dict helper was removed to
fix #28. Genes on such files were silently dropped with no warning
when filtering against the genome's chromosome names.

Restored by recognizing "region" feature lines with a "chromosome"
attribute during the same single sequential pass already used for
parsing -- no tabix/index requirement reintroduced (still works for
arbitrarily large chromosomes, per #28) and no second pass added
(still one file read, per #37). Closes #36.
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 3 package(s) with unknown licenses.
See the Details below.

License Issues

.github/workflows/lint.yml

PackageVersionLicenseIssue Type
actions/checkout7.*.*NullUnknown License

.github/workflows/tests.yml

PackageVersionLicenseIssue Type
actions/checkout7.*.*NullUnknown License
actions/setup-python7.*.*NullUnknown License

OpenSSF Scorecard

PackageVersionScoreDetails
actions/actions/checkout 7.*.* 🟢 6.9
Details
CheckScoreReason
Binary-Artifacts🟢 10no binaries found in the repo
Code-Review🟢 10all changesets reviewed
Maintained🟢 1024 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
Packaging⚠️ -1packaging workflow not detected
License🟢 10license file detected
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
SAST🟢 10SAST tool is run on all commits
Branch-Protection🟢 5branch protection is not maximal on development and all release branches
actions/actions/checkout 7.*.* 🟢 6.9
Details
CheckScoreReason
Binary-Artifacts🟢 10no binaries found in the repo
Code-Review🟢 10all changesets reviewed
Maintained🟢 1024 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
Packaging⚠️ -1packaging workflow not detected
License🟢 10license file detected
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
SAST🟢 10SAST tool is run on all commits
Branch-Protection🟢 5branch protection is not maximal on development and all release branches
actions/actions/setup-python 7.*.* 🟢 6.6
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained🟢 1017 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies🟢 7dependency not pinned by hash detected -- score normalized to 7
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST🟢 9SAST tool is not run on all commits -- score normalized to 9

Scanned Files

  • .github/workflows/lint.yml
  • .github/workflows/tests.yml

@YalanBi YalanBi self-assigned this Aug 5, 2026
checkout v4->v7, setup-python v5->v7, dependency-review-action
v4->v5.0.0, codeql-action v3->v4 -- across every workflow, not just
tests.yml. Checked checkout's breaking-change notes (safer
pull_request_target defaults); none of our workflows use that
trigger.

Also adds build-check.yml: python -m build + twine check on PRs, so
packaging regressions surface at PR time, not just at release.
@YalanBi YalanBi added the bug Something isn't working label Aug 5, 2026
@YalanBi
YalanBi merged commit 2f2cfac into master Aug 5, 2026
20 checks passed
@YalanBi
YalanBi deleted the fix/gff-chromosome-aliasing branch August 5, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GFF3 import silently drops genes when chromosome names don't match Trouble while working with .csi indexes

1 participant