Skip to content
Open

Cpr #882

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# VariantValidator .gitignore

# Development scripts
VariantValidator/vvTest.py

# Python bytecode
*.pyc
__pycache__/
Expand All @@ -21,7 +18,6 @@ dist/
htmlcov/
.pytest_cache/
.mypy_cache/
VariantValidator/testing/outputs*

# MkDocs
site/
Expand All @@ -31,16 +27,13 @@ site/

# Temporary files
*.bak
temp.py
*.tmp
*.swp

# Local databases
# Local databases and data
seqrepo/
Users/
*.sql
validator_2021-07-21.sql
VVTA_2021_2_noseq.psql.gz

# LOVD HGVS Syntax Checker runtime files
VariantValidator/php/
# LOVD HGVS Syntax Checker runtime files
VariantValidator/php/
VariantValidator/php/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Community engagement and collaboration with partner projects play a vital role i

---

## Features
## Key Features

VariantValidator provides comprehensive support for validating, mapping and formatting genetic sequence variant descriptions.

Expand Down
27 changes: 3 additions & 24 deletions VariantValidator/modules/exon_numbering.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
"""
exon_numbering.py Module

Authors: Katie Williams (@kwi11iams) and Katherine Winfield (@kjwinfield)

This code will ultimately aim to provide exon numbering information for
VariantValidator.

See exon_numbering.md markdown for a full description on how this
module operates.

Use exon_numbering_tests.py for automated testing of this module.
"""

# Import vv_hgvs modules
import vvhgvs
import vvhgvs.exceptions


def _find_exon(position, exon_structure):
"""
Find the exon or intron containing an HGVS transcript position.
Expand Down Expand Up @@ -58,10 +43,8 @@ def _find_exon(position, exon_structure):
return f'{exon["exon_number"] - 1}i'

return None

return None


def finds_exon_number(variant, validator):
"""
Find exon/intron numbering for the start and end positions of a variant.
Expand All @@ -71,13 +54,11 @@ def finds_exon_number(variant, validator):
:return: dictionary containing start/end exon or intron numbers for each
aligned chromosomal or gene reference sequence
"""

response_dictionary = validator.gene2transcripts(
variant,
validator,
bypass_web_searches=True
)

# Find the transcript record corresponding to the submitted transcript.
transcript_info = None

Expand All @@ -100,8 +81,7 @@ def finds_exon_number(variant, validator):

start_position = hgvs_transcript.posedit.pos.start
end_position = hgvs_transcript.posedit.pos.end

exon_start_end_positions = {}
exon_start_and_end_positions = {}

for accession, transcript_data in exon_structure_dict.items():
exon_structure = transcript_data["exon_structure"]
Expand All @@ -122,13 +102,12 @@ def finds_exon_number(variant, validator):
if end_exon is None:
end_exon = "cannot be calculated"

exon_start_end_positions[accession] = {
exon_start_and_end_positions[accession] = {
"start_exon": start_exon,
"end_exon": end_exon,
}

return exon_start_end_positions

return exon_start_and_end_positions

# Copyright (C) 2016-2026 VariantValidator Contributors
# This file is part of VariantValidator and is distributed under the
Expand Down
Loading
Loading