FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

perf: Use indexed reader for VCF highlighting parameters by fxwiegand · Pull Request #381 · alignoth/alignoth · GitHub

perf: Use indexed reader for VCF highlighting parameters - #381

Merged
fxwiegand merged 2 commits into
mainfrom
improve-vcf-performance
Oct 21, 2025
Merged

fxwiegand merged 2 commits into
mainfrom
improve-vcf-performance

Conversation

Copy link
Copy Markdown
Collaborator

This pull request updates the codebase to require and use indexed, compressed VCF files (.vcf.gz with CSI index) for variant highlighting, improving performance and reliability when querying genomic intervals. It also refactors the VCF reading logic to use IndexedReader and adds error handling for missing index files. The test suite and wizard file discovery have been updated accordingly.

VCF file handling improvements:

  • Switched from Reader to IndexedReader for VCF files in VcfHighlight, enabling efficient region-based queries and requiring CSI index files. The code now fetches only the relevant region from the VCF file instead of reading all records. (src/highlight.rs, [1] [2]
  • Added error handling in main.rs to check for the existence of the CSI index file before processing a VCF file, and provide a helpful error message if missing. (src/main.rs, src/main.rsR49-R58)

Test and file discovery updates:

  • Updated tests to use compressed VCF files (.vcf.gz) instead of uncompressed VCFs, reflecting the new requirements. (src/highlight.rs, [1] [2]
  • Modified wizard mode file discovery to only include .vcf.gz and .bcf files, excluding uncompressed VCFs. (src/wizard.rs, src/wizard.rsL34-R34)

Code cleanup and minor changes:

  • Removed the old uncompressed VCF test file from the repository. (tests/sample_3/1257A.vcf, tests/sample_3/1257A.vcfL1-L4)
  • Renamed the Region::contains method to _contains (now unused), reflecting its removal from active use in the highlighting logic. (src/cli.rs, src/cli.rsL296-R296)
  • Minor import and error handling improvements in main.rs. (src/main.rs, src/main.rsL11-R11)

codecov-commenter commented Oct 21, 2025
edited
Loading

Copy link
Copy Markdown

⚠️ Please install the to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 58.82353% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.09%. Comparing base (31524ab) to head (8f33bcc).

Files with missing lines Patch % Lines
src/main.rs 0.00% 4 Missing ⚠️
src/cli.rs 0.00% 1 Missing ⚠️
src/highlight.rs 90.90% 1 Missing ⚠️
src/wizard.rs 0.00% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #381      +/-   ##
==========================================
- Coverage   51.64%   51.09%   -0.56%     
==========================================
  Files           6        6              
  Lines         637      640       +3     
==========================================
- Hits          329      327       -2     
- Misses        308      313       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

fxwiegand merged commit 4a6bf64 into main Oct 21, 2025
6 checks passed
fxwiegand deleted the improve-vcf-performance branch October 21, 2025 09:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL