Commit 2e1fe445 authored by Alisa Muraveva's avatar Alisa Muraveva
Browse files

Some stupid mistakes were fixed

git-svn-id: https://humgenprojects.lumc.nl/svn/mutalyzer/branches/mobile-2013@739 eb6bd6ab-9ccd-42b9-aceb-e2899b4a52f1
parent 244b7001
......@@ -112,7 +112,7 @@ class Locus(object) :
self.linkMethod = None
self.transcriptProduct = None
self.proteinProduct = None
self.nonusableList = []
#__init__
def cancelDescription(self):
......@@ -298,6 +298,7 @@ class Record(object) :
self.chromDescription = ""
self.orientation = 1
self.recordId = None
self.nonusableList = []
#__init__
def findGene(self, name) :
......
......@@ -621,10 +621,10 @@ class GBparser():
myRealGene.transcriptList.append(myTranscript)
#if
else:
if not i.gene in myTranscript.nonusableList:
if not i.gene in record.nonusableList:
output.addMessage(__file__, 2, 'WPOSITION',
"The gene's {0} coordinates extend beyond transcript".format(i.gene))
myTranscript.nonusableList.append(i.gene)
record.nonusableList.append(i.gene)
#for
for i in myGene.cdsList :
if not i.linked and \
......
......@@ -1366,7 +1366,7 @@ def _add_transcript_info(mutator, transcript, output):
if str(cds_original[0:3]) in \
Bio.Data.CodonTable.unambiguous_dna_by_id \
[transcript.txTable].start_codons:
output.addMessage(__file__,2, "WSTART", 'Non canonical start codon {0} was found in reference protein'.format(cds_original[0:3]))
output.addMessage(__file__,2, "WSTART", 'Non canonical start codon {0} was found in the reference protein'.format(cds_original[0:3]))
else:
output.addMessage(__file__,2, "WSTART", '{0} codon of {1} was not found in table of start codons for current organism '.format(cds_original[0:3], transcript.locusTag))
if str(cds_variant[0:3]) in \
......@@ -1502,6 +1502,10 @@ def process_variant(mutator, description, record, output):
genes = record.record.listGenes()
transcript_id = transcript_id and "%.3i" % int(transcript_id)
locus = list(record.record.locusDict)
if locus:
gene_names = locus
else:
gene_names = genes
if gene_symbol in genes:
# We found our gene.
gene = record.record.findGene(gene_symbol)
......@@ -1515,12 +1519,12 @@ def process_variant(mutator, description, record, output):
gene = record.record.geneList[0]
else:
output.addMessage(__file__, 4, "EINVALIDGENE",
"No gene specified. Please choose from: %s" % ", ".join(locus))
"No gene specified. Please choose from: %s" % ", ".join(gene_names))
else:
output.addMessage(__file__, 4, "EINVALIDGENE",
"Gene %s not found. Please choose from: %s" % (
gene_symbol, ", ".join(genes)))
gene_symbol, ", ".join(gene_names)))
if gene:
# Find transcript.
......
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