Skip to content

Restrict bcftools consensus to region-filtered VCFs - #62

Open
yoshihikosuzuki wants to merge 1 commit into
czi-ai:mainfrom
yoshihikosuzuki:feat/restrict-bcftools-consensus
Open

Restrict bcftools consensus to region-filtered VCFs#62
yoshihikosuzuki wants to merge 1 commit into
czi-ai:mainfrom
yoshihikosuzuki:feat/restrict-bcftools-consensus

Conversation

@yoshihikosuzuki

Copy link
Copy Markdown

Summary

This PR speeds up VCF-based prediction by subsetting the input VCF to the target region before each bcftools consensus call.

Changes

  • create a temporary region-filtered VCF with bcftools view -r
  • run bcftools consensus against that temporary VCF
  • add a small test for region-based consensus behavior

Validation

  • pytest -q tests/test_data_process.py
  • pytest -vv -s tests/test_ad_risk.py

Impact

For tests/test_ad_risk.py with B200 GPU:

  • before: 1360.82s (0:22:40)
  • after: 163.07s (0:02:43)

Fixes #61

Thanks for all the great work on this project!!

@sayangsep
sayangsep requested a review from barhomi April 8, 2026 21:31
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.

VCF-based prediction is unnecessarily slow due to full VCF scan

1 participant