Annotation generation bug fixes#1215
Open
ainefairbrother wants to merge 5 commits into
Open
Conversation
…_file, simulate variation multi-tx handling
dglemos
reviewed
Jun 8, 2026
dglemos
left a comment
Contributor
There was a problem hiding this comment.
Tested against file Homo_sapiens.GRCh38.115.chr.gff3.gz
spliceai_annotation_file.pygenerates the expected output taking into account the start coordinate being 0-basedsimulate_variationreturns all regions overlapping gencode transcripts
Contributor
There was a problem hiding this comment.
Can you also update this example with the correct start coordinates (-1)?
Contributor
There was a problem hiding this comment.
This comment is in line 21.
| are aggregated, and the SpliceAI annotation formatted file is written out. | ||
| By passing --gff3, the supplied GFF3 is read in and transcript rows are retained. By default | ||
| this keeps MANE_Select transcripts; with --gencode_primary it keeps gencode_primary | ||
| protein-coding transcripts on main chromosomes. |
Contributor
There was a problem hiding this comment.
You could also add some information about the chrs included in the output file, something like this:
In both modes, only chromosomes 1-22, X, and Y are retained; all other contigs (including MT) are excluded from the generated annotation file.
dglemos
approved these changes
Jun 9, 2026
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.
SpliceAI input processing bug fixes
Summary: off-by-one and multi-transcript handling fixes for annotation file creation and the variant simulation tool.
Description of changes
ensembl-variation/scripts/python/spliceai_annotation_file.pyfixes:The annotation file now looks like:
tools/variant_simulator/simulate_variationfixes:onlyGencodePrimary, add all GENCODE-primary protein-coding transcript to the output list, rather than just the final one.Removal of the
scripts/python/filter_annotation_file.pyscript - this was for the incorrect exon diff-ing approach.Testing
You can generate and inspect the GENCODE primary protein coding annotation file using:
python3 spliceai_annotation_file.py \ --gff3 Homo_sapiens.GRCh38.116.gff3.gz \ --gencode_primary \ --name_format gene_transcript \ --release 116 \ --output_file "gene_annotation_116_gencode_primary_protein_coding.txt"