Unverified Commit 19ae612a authored by Mihai's avatar Mihai Committed by GitHub
Browse files

Merge pull request #497 from mutalyzer/fix-mtdna-error-message

Fix erroneous message for mtDNA m. coordinate system
parents 07807486 36428807
...@@ -59,13 +59,6 @@ def get_nc_record(record_id, parsed_description, output): ...@@ -59,13 +59,6 @@ def get_nc_record(record_id, parsed_description, output):
if not _configuration_check(output): if not _configuration_check(output):
return None return None
if parsed_description.RefType in ['p', 'm', 'n']:
output.addMessage(
__file__, 4, 'ECHROMCOORD', 'Could not retrieve information for '
'the provided {}. coordinate system.'
.format(parsed_description.RefType))
return None
# Get the accession # Get the accession
accession, version = get_accession_version(record_id) accession, version = get_accession_version(record_id)
...@@ -93,10 +86,13 @@ def get_nc_record(record_id, parsed_description, output): ...@@ -93,10 +86,13 @@ def get_nc_record(record_id, parsed_description, output):
", ".join(versions))) ", ".join(versions)))
return None return None
if parsed_description.RefType == 'g': if parsed_description.RefType in ['g', '']:
# Example: NC_000001.11:g.111501128del # Examples:
# - NC_000001.11:g.111501128del
# - NC_000001.11:62825del
p_s, p_e = _get_description_boundary_positions(parsed_description) p_s, p_e = _get_description_boundary_positions(parsed_description)
elif parsed_description.RefType == 'c': elif parsed_description.RefType in ['c', 'n'] or \
parsed_description.Gene or parsed_description.AccNoTransVar:
if parsed_description.Gene: if parsed_description.Gene:
# Example: 'NC_000001.11(OR4F5_v001):c.101del' # Example: 'NC_000001.11(OR4F5_v001):c.101del'
transcripts = Transcript.query.\ transcripts = Transcript.query.\
...@@ -127,12 +123,9 @@ def get_nc_record(record_id, parsed_description, output): ...@@ -127,12 +123,9 @@ def get_nc_record(record_id, parsed_description, output):
p_s = transcript.transcript_start p_s = transcript.transcript_start
p_e = transcript.transcript_stop p_e = transcript.transcript_stop
else: else:
# Example: 'NC_000001.11:62825del'
return _record_with_genes_only(reference) return _record_with_genes_only(reference)
# db_transcripts = Transcript.query.\
# filter_by(reference_id=reference.id).all()
else: else:
return None return _record_with_genes_only(reference)
db_transcripts = _get_transcripts(reference, p_s, p_e) db_transcripts = _get_transcripts(reference, p_s, p_e)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment