Commit f6565c21 authored by Alisa Muraveva's avatar Alisa Muraveva
Browse files

references were added in legend table

git-svn-id: https://humgenprojects.lumc.nl/svn/mutalyzer/branches/mobile-2013@735 eb6bd6ab-9ccd-42b9-aceb-e2899b4a52f1
parent 1b692ea1
......@@ -105,6 +105,8 @@ class Locus(object) :
self.proteinRange = []
self.locusTag = None
self.link = None
self.references_p = None
self.references_r = None
self.transcribe = False
self.translate = False
self.linkMethod = None
......
......@@ -631,6 +631,7 @@ class EMBLparser():
myTranscript.transcriptID = i.transcript_id
myTranscript.transcriptProduct = i.product
myTranscript.locusTag = locus_tag
#myTranscript.references = ???
if i.link :
myTranscript.CDS = PList()
myTranscript.CDS.positionList = i.link.positionList
......@@ -643,7 +644,13 @@ class EMBLparser():
myTranscript.txTable = \
int(i.qualifiers["transl_table"][0])
if "transl_except" in i.link.qualifiers :
myTranscript.transl_except=self.create_exception(i.link)
myTranscript.transl_except=self.create_exception(i.link)
if i.link.qualifiers.has_key("db_xref"):
for ref in i.link.qualifiers["db_xref"]:
if ref.split(":")[0] == "RefSeq_peptide":
myTranscript.references_p = ref.split(":")[1]
elif ref.split(":")[0] == "RefSeq_mRNA":
myTranscript.references_r = ref.split(":")[1]
#if
myRealGene.transcriptList.append(myTranscript)
#if
......
......@@ -286,6 +286,7 @@
<td>Locus tag</td>
<td>Product</td>
<td>Link method</td>
<td>References</td>
</tr>
<tr tal:repeat = "i legends">
<td tal:repeat = "j i" tal:content = "j"></td>
......
......@@ -1368,7 +1368,7 @@ def _add_transcript_info(mutator, transcript, output):
[transcript.txTable].start_codons:
output.addMessage(__file__,2, "WSTART", 'Non canonical start codon {0} was found in reference protein'.format(cds_original[0:3]))
else:
output.addMessage(__file__,3, "ESTART", '{0} codon of {1} was not found in table of start codons for current organism '.format(cds_original[0:3], transcript.locusTag))
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 \
Bio.Data.CodonTable.unambiguous_dna_by_id \
[transcript.txTable].start_codons:
......@@ -1392,7 +1392,7 @@ def _add_transcript_info(mutator, transcript, output):
output.addOutput('newprotein', '?')
output.addOutput('newProteinFancy', pprint_sequence('?', format=HtmlFormat, annotations=[[(0, 0)], [(0,0)]]))
output.addOutput('newProteinFancyText', pprint_sequence('?', format=AnsiFormat, annotations=[[(0, 0)], [(0,0)]]))
output.addMessage(__file__, 3, "ESTART", "No start codon was found in predicted cds")
output.addMessage(__file__, 2, "WSTART", "No start codon was found in predicted cds")
print cds_variant[0:3], cds_original[0:3]
else:
......@@ -1752,13 +1752,13 @@ def check_variant(description, output):
['%s_v%s' % (name, transcript.name),
transcript.transcriptID, transcript.locusTag,
transcript.transcriptProduct,
transcript.linkMethod])
transcript.linkMethod, transcript.references_r])
if transcript.translate:
output.addOutput('legends',
['%s_i%s' % (name, transcript.name),
transcript.proteinID, transcript.locusTag,
transcript.proteinProduct,
transcript.linkMethod])
transcript.linkMethod, transcript.references_p])
# Chromosomal region (only for GenBank human transcript references).
# This is still quite ugly code, and should be cleaned up once we have
......
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