Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: division by zero in overlaps #1778

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nakib103
Copy link
Contributor

@nakib103 nakib103 commented Oct 24, 2024

#1765

The issue should primarily be fixed by - Ensembl/ensembl-io#171
But this PR add checks for length to be zero and if so set the overlap percentage to be 100%. This can happen for old VCF format where INFO/SVLEN is missing and end position is calculated from INFO/END.

Test

input.vcf -

2	240692045	.	G	<DEL>	.	PASS	SVLEN=100

custom.vcf -

2       240692045       nssv211104      G       <DEL>   .       .       DBVARID=nssv211104;SVTYPE=DEL;END=240692045

CMD:

vep -i input.vcf --force --cache <cache_dir> --offline --cache_version 111 -a GRCh38 --custom file=custom.vcf,short_name=test,fields=DBVARID,num_records=all,reciprocal=1,format=vcf,coords=1,type=overlap,overlap_cutoff=0

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.

1 participant