Adding tabix'd GFF3 support to NearestGene - #855
Open
jamie-m-a wants to merge 1 commit into
Open
Conversation
likhitha-surapaneni
self-requested a review
August 13, 2026 08:25
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR allows NearestGene to retrieve gene locations from a tabix-indexed GFF3 file, enabling offline use:
--plugin NearestGene,gff3=/path/to/genes.gff.gz
It also adds:
Existing database-backed behaviour is unchanged.
Can test it by...
Using the release 116 GRCh38 GFF and FASTA, create an input VCF:
Check the plugin compiles:
perl -c NearestGene.pmRun VEP:
The NearestGene result should contain:
ENSG00000269981:19457:upstream&ENSG00000279928:25274:downstream
The distances correspond to the GFF coordinates:
ENSG00000269981 ends at 137965
157422 - 137965 = 19457
ENSG00000279928 starts at 182696
182696 - 157422 = 25274
Note that running the same variant using the database will not fetch nearest genes (the plugin only works for intergenic variants), and these are annotated as downstream/upstream in the DB as they around/in the transcripts of a lnRNA. This is a limitation of the transcript model building of GFF3 input, it has fallen out of sync and will be updated in future to account for more gene biotypes.