Commit e0024265 authored by Laros's avatar Laros
Browse files

First Beta release.

Added help and about pages.

Extended the TRM.

Mutalyzer.py:
- Added a __checkDNA() funtion for input checking.
- Added a warning message for ``rolled'' insertions that are not duplications.
- Added a warning for unsupported RNA descriptions.

Web.py:
- Added a release date variable.
- Increased version numbers.

index.py:
- Added functions for the new pages (help.html and about.html)
- Fixed a cosmetic bug that occurred when using html tags in the input.

menu.html:
- Made the top and bottom links compatible with Internet Explorer.
- Added a link to the about page.
- Added a link to the name generator page.
- Removed some comment, altered some layout.

index.html:
- Moved some technical data to the about page.



git-svn-id: https://humgenprojects.lumc.nl/svn/mutalyzer/trunk@78 eb6bd6ab-9ccd-42b9-aceb-e2899b4a52f1
parent a86d786f
......@@ -644,9 +644,72 @@ transcription start, transcription stop and CDS stop, a function
\newpage
\section{Programs} \label{sec:programs}
In this section we discuss a number of possible interconnections between the
modules.
\subsection{Mutalyzer} \label{subsec:mutalyzer}
\subsubsection{Semantic checks}
The main function of \texttt{Mutalyzer} program, is \emph{semantic name
checking}. It uses the \texttt{Parser} module for syntactic checking and the
generation of a parse tree, and applies the given description to a reference
sequence. This reference sequence is provided by either the \texttt{LRGparser}
of \texttt{GBparser} module. By combining the variant description and the
interpreted reference sequence file, semantic checking can be done.
Semantic checks focus on several aspects of a variant description:
\begin{itemize}
\item Correctness of an intronic position notation.
\item Disambiguation of a deletion or insertion.
\item Minimising a description.
\item Verifying optional arguments.
\end{itemize}
As an example of an intronic position check, we look at the position $25+4$. In
this case, position $25$ must be a splice donor site.
When a nucleotide is deleted from a stretch of nucleotides, the HGVS prescribes
that the last one should be deleted. This disambiguation also applies for more
complex structures; deleting \verb#GACTATTCCCTG# from a sequence
\verb#ATGGACTATTCCCTGGCT# for example, should be corrected to the deletion of
\verb#ACTATTCCCTGG#. Only deletions, insertions and duplications are sensitive
to this kind of ambiguity.
Every description can be written as a deletion/insertion (\emph{delins})
operation, but using this representation is not necessarily the shortest one. A
delins of one nucleotide, for example should be written as a substitution.
Several checks are implemented to reduce one representation to an other. In
Table~\ref{tab:erosion} a list of possibly ``disguised'' variants is shown.
\begin{table}[H]
\begin{center}
\begin{tabular}{l|l}
Variant type & Could be \\
\hline
delins & del, ins, dup, subst, inv \\
ins & dup \\
inv & subst
\end{tabular}
\end{center}
\caption{Disguised variants.} \label{tab:erosion}
\end{table}
Apart from this possible disguise, a variant can be described using too much
nucleotides, or a range that is too large. A delins can include part of the
flanking sequence of the real change. To prevent this, the \emph{longest common
prefix} and \emph{longest common suffix} are pruned. Likewise, an inversion
can be too large when the \emph{reverse complement} of a prefix is a suffix.
This is pruned in a similar way. Finally, a delins, subst or inv can have no
effect at all.
Any optional arguments must also be checked. If a length of a deletion is given
for example, it must match the range of the deletion. If a stretch of
nucleotides is given, this stretch must match the reference sequence.
\subsubsection{Visualisation}
\subsubsection{Effect prediction}
\subsection{VarInfo} \label{subsec:varinfo}
\subsection{UCSC\_Update} \label{subsec:ucsc_update}
......
......@@ -70,7 +70,8 @@ class Nomenclatureparser() :
ProtIso = Suppress("_i") + Number("ProtIso")
GeneSymbol = Suppress('(') + Group(Name("GeneSymbol") + \
Optional(TransVar ^ ProtIso))("Gene") + Suppress(')')
GI = Suppress(Optional("GI") ^ Optional("GI:")) + Number("RefSeqAcc")
GI = Suppress(Optional("GI") ^ Optional("GI:") ^ Optional("gi") ^
Optional("gi:")) + Number("RefSeqAcc")
Version = Suppress('.') + Number("Version")
AccNo = NotAny("LRG_") + \
Combine(Word(alphas + '_') + Number)("RefSeqAcc") + \
......
......@@ -42,8 +42,9 @@ class Web() :
version ; Here the displayed version is defined.
"""
self.version = "2.0α-5"
self.version = "2.0β-1"
self.nomenclatureVersion = "2.0"
self.releaseDate = "9 Aug 2010"
C = Config.Config()
self.email = C.Retriever.email
......@@ -134,6 +135,7 @@ class Web() :
context.addGlobal("version", self.version)
context.addGlobal("nomenclatureVersion", self.nomenclatureVersion)
context.addGlobal("releaseDate", self.releaseDate)
context.addGlobal("contactEmail", self.email)
for i in args :
context.addGlobal(i, args[i])
......
......@@ -269,6 +269,16 @@ def __cdsLen(splice_sites) :
return l
#__cdsLen
def __checkDNA(arg) :
"""
"""
for i in str(arg) :
if not i in IUPAC.unambiguous_dna.letters :
return False
return True
#__checkDNA
def __checkOptArg(ref, p1, p2, arg, O) :
"""
"""
......@@ -285,6 +295,10 @@ def __checkOptArg(ref, p1, p2, arg, O) :
#if
#if
else :
if not __checkDNA(arg) :
O.addMessage(__file__, 4, "ENODNA",
"Invalid letters in argument.")
return False
ref_slice = str(ref[p1 - 1:p2])
if ref_slice != str(arg) : # FIXME more informative.
O.addMessage(__file__, 3, "EREF",
......@@ -537,11 +551,15 @@ def _createBatchOutput(O):
O.addOutput("batchDone", outputline)
#_createBatchOutput
def checkSubstitution(start_g, Arg1, Arg2, MUU, GenRecordInstance, O) :
"""
"""
if not __checkDNA(Arg2) :
#O.addMessage(__file__, 4, "ENODNA", "Invalid letter in input")
return
if Arg1 == Arg2 :
O.addMessage(__file__, 3, "ENOVAR",
"No mutation given (%c>%c) at position %i." % (
......@@ -640,6 +658,14 @@ def checkInsertion(start_g, end_g, Arg1, MUU, GenRecordInstance, O) :
if start_g + 1 != end_g :
O.addMessage(__file__, 3, "EINSRANGE",
"%i and %i are not consecutive positions." % (start_g, end_g))
return
#if
if not Arg1 or not __checkDNA(Arg1) :
O.addMessage(__file__, 3, "EUNKVAR", "Although the syntax of this " \
"variant is correct, the effect can not be analysed.")
return
#if
MUU.insM(start_g, Arg1)
insertionLength = len(Arg1)
newStart = MUU.shiftpos(start_g)
......@@ -674,6 +700,13 @@ def checkInsertion(start_g, end_g, Arg1, MUU, GenRecordInstance, O) :
(roll[0] + shift - insertionLength, 0))
#if
else :
if shift :
O.addMessage(__file__, 2, "WROLL", "Insertion of %s at position " \
"%i_%i was given, however, the HGVS notation prescribes " \
"that it should be an insertion of %s at position %i_%i." % (
MUU.mutated[newStart:newStop], start_g, start_g + 1,
MUU.mutated[newStart + shift:newStop + shift],
newStart + shift, newStart + shift + 1))
GenRecordInstance.name(start_g, start_g + 1, "ins",
MUU.mutated[newStart + shift:newStop + shift] , "",
(roll[0], shift))
......@@ -899,6 +932,9 @@ def __rv(MUU, RawVar, GenRecordInstance, parts, O, transcript) :
def __ppp(MUU, parts, GenRecordInstance, O) :
if parts.RawVar or parts.SingleAlleleVarSet :
if parts.RefType == 'r' :
O.addMessage(__file__, 4, "ERNA", "Descriptions on RNA level " \
"are not supported.")
if parts.RefType in ['c', 'n'] :
GS, W = None, None
goi, toi = O.getOutput("geneSymbol")[-1]
......@@ -1194,6 +1230,7 @@ def process(cmd, C, O) :
fullDescr =\
"%st%s:%c.%s" % (reference, j.name, j.molType, descr)
O.addOutput("descriptions", fullDescr)
#if
else:
O.addOutput("descriptions", (i.name))
......@@ -1203,12 +1240,14 @@ def process(cmd, C, O) :
fullpDescr = "%sp%s:%s" % (reference, j.name, pDescr)
O.addOutput("protDescriptions", fullpDescr)
cAcc, pAcc = j.transcriptID, j.proteinID
#if
O.addOutput("NewDescriptions", (
iName, jName, mType, cDescr, pDescr, gAcc,
cAcc, pAcc, fullDescr, fullpDescr))
#if
#for
#for
#if
else :
for i in GenRecordInstance.record.geneList :
for j in sorted(i.transcriptList, key = attrgetter("name")) :
......@@ -1232,11 +1271,13 @@ def process(cmd, C, O) :
reference, iName, jName, pDescr)
O.addOutput("protDescriptions", fullpDescr)
cAcc, pAcc = j.transcriptID, j.proteinID
#if
O.addOutput("NewDescriptions", (
iName, jName, mType, cDescr, pDescr, gAcc,
cAcc, pAcc, fullDescr, fullpDescr))
#for
#for
#else
......
......@@ -44,6 +44,7 @@ def snp(req) :
R = Retriever.Retriever(C.Retriever, O, None)
R.snpConvert(rsId)
O.addMessage(__file__, -1, "INFO", "Finished processing rs%s" % rsId)
#if
args = {
"snp" : O.getOutput("snp"),
......@@ -63,6 +64,16 @@ def index(req) :
return W.tal("HTML", "templates/index.html", {})
#index
def help(req) :
W = Web.Web()
return W.tal("HTML", "templates/help.html", {})
#about
def about(req) :
W = Web.Web()
return W.tal("HTML", "templates/about.html", {})
#about
def nameGenerator(req):
W = Web.Web()
return W.tal("HTML", "templates/generator.html", {})
......@@ -113,11 +124,15 @@ def check(req) :
else :
reference += ".gb"
pe = O.getOutput("parseError")
if pe :
pe[0] = pe[0].replace('<', "&lt;")
args = {
"lastpost" : name,
"messages" : O.getMessages(),
"summary" : summary,
"parseError" : O.getOutput("parseError"),
"parseError" : pe,
"errors" : errors,
"genomicDescription" : W.urlEncode([O.getIndexedOutput(
"genomicDescription", 0)])[0],
......@@ -188,10 +203,15 @@ def syntaxCheck(req) :
#else :
# args["messages"].append("The syntax of this variant is OK!")
#if
pe = O.getOutput("parseError")
if pe :
pe[0] = pe[0].replace('<', "&lt;")
args = {
"variant" : variant,
"messages" : O.getMessages(),
"parseError" : O.getOutput("parseError"),
"parseError" : pe,
"debug" : ""
}
ret = W.tal("HTML", "templates/parse.html", args)
......
<html>
<head>
<title></title>
</head>
<body>
<div metal:define-macro="content">
<center>
<h3>About</h3>
</center>
Mutalyzer <span tal:content = "structure string:${version}"></span>
is designed and developed by Jeroen F. J. Laros, with the
following exceptions:
<ul>
<li>The LRG parser, as well as the Batch interfaces are written
by Gerben R. Stouten.</li>
<li>The position converter interfaces (webservice and WWW) are
written by Gerard C. P. Schaafsma.</li>
</ul>
Specifications are given by Peter E. M. Taschner and Johan T. den
Dunnen.<br>
<br>
Since the publication is under development, please use the old
reference for now when referring to these pages:
<a href="http://www.ncbi.nlm.nih.gov/entrez/utils/fref.fcgi?PrId=3058&itool=AbstractPlus-def&uid=18000842&db=pubmed&url=http://dx.doi.org/10.1002/humu.20654">
&quot;Wildeman M et al. (2008). Improving sequence variant
descriptions in mutation databases and literature using the
Mutalyzer sequence variation nomenclature checker. Hum Mutat 29,
6-13&quot;</a>.<br>
<br>
Project development is sponsored by
<a href="http://www.gen2phen.org" target="_blank">
<img src="base/images/gen_2_phen_logo_print.png"
width="110"
height="50"
align="middle"
border="0"
alt="Eurogentest"></a>
and has been supported by
<a href="http://www.eurogentest.org" target="_blank">
<img src="base/images/Eurogentest.png"
width="110"
height="50"
align="middle"
border="0"
alt="Eurogentest"></a>
<br>
</div>
</body>
</html>
This diff is collapsed.
......@@ -50,28 +50,6 @@
</li>
</ul>
<br>
Mutalyzer <span tal:content = "structure string:${version}"></span>
is designed and developed by Dr. Jeroen F. J. Laros, with the
following exceptions:
<ul>
<li>The LRG parser, as well as the Batch interfaces are written
by Gerben R. Stouten.</li>
<li>The position converter interfaces (webservice and WWW) are
written by Ir. Gerard C. P. Schaafsma.</li>
</ul>
Specifications are given by Dr. Peter E. M. Taschner and Prof. Dr.
Johan T. den Dunnen.<br>
<br>
Since the publication is under development, please use the old
reference for now when referring to these pages:
<a href="http://www.ncbi.nlm.nih.gov/entrez/utils/fref.fcgi?PrId=3058&itool=AbstractPlus-def&uid=18000842&db=pubmed&url=http://dx.doi.org/10.1002/humu.20654">
&quot;Wildeman M et al. (2008). Improving sequence variant
descriptions in mutation databases and literature using the
Mutalyzer sequence variation nomenclature checker. Hum Mutat 29,
6-13&quot;
</a>.<br>
<br>
<br>
<!--
Mutalyzer <span tal:content = "structure string:${version}"></span> is
written completely in <a href="http://www.python.org">Python</a>. The
......@@ -86,22 +64,6 @@
<a href = "http://www.sun.com">SUN Microsystems</a> with server
hardware within the scope of the Academic Excellence Grant (AEG)
program (award EDUD-7832-080223-CNE).<br>
Project development is sponsored by
<a href="http://www.gen2phen.org" target="_blank">
<img src="base/images/gen_2_phen_logo_print.png"
width="110"
height="50"
align="middle"
border="0"
alt="Eurogentest"></a>
and has been supported by
<a href="http://www.eurogentest.org" target="_blank">
<img src="base/images/Eurogentest.png"
width="110"
height="50"
align="middle"
border="0"
alt="Eurogentest"></a>
</div>
</body>
</html>
......@@ -40,7 +40,7 @@
preloadImages('base/images/bullitlicht1.gif',
'base/images/bullitlicht2.gif');">
<!-- Header -->
<a id="top"></a>
<a id = "top" name = "top"></a>
<table width="98%"
border="0"
......@@ -89,6 +89,8 @@
<td align="right">
<a href="index"
class="hornav">home</a>&nbsp;&nbsp;&nbsp;
<a href="about"
class="hornav">about</a>&nbsp;&nbsp;&nbsp;
<a tal:attributes = "href string:mailto:${contactEmail}"
class="hornav">contact</a>&nbsp;&nbsp;&nbsp;
<a href="#bottom" class="hornav">go to bottom</a>&nbsp;&nbsp;&nbsp;
......@@ -120,81 +122,6 @@
<img src="base/images/1x1b.gif" height="19" border="0">
</td>
</tr>
<!-- Home
<tr>
<td valign="top" width="20">
<img src="base/images/bullitdonker.gif" id="b_">
</td>
<td colspan="3">
<a id="page_"
onClick="swapActive('');"
href="/"
onMouseover="navAct('base/images/bullitlicht1.gif',
'');"
onMouseout="navDeAct('base/images/bullitdonker.gif',
'');"
class="vertnavsub">Home</a>
</td>
</tr>
-->
<!-- Contact - ->
<tr>
<td valign="top" width="20">
<img src="base/images/bullitdonker.gif" id="b_contact">
</td>
<td colspan="3">
<a id="page_contact"
onClick="swapActive('contact');"
href="/#contact"
onMouseover="navAct('base/images/bullitlicht1.gif',
'contact');"
onMouseout="navDeAct('base/images/bullitdonker.gif',
'contact');"
class="vertnavsub">Contact</a>
</td>
</tr>
-->
<!-- Current Projects -->
<!--
<tr>
<td valign="top" width="20">
<img src="base/images/bullitdonker.gif" id="b_projects">
</td>
<td colspan="3">
<a id="page_projects"
onClick="swapActive('projects');"
href="/#projects"
onMouseover="navAct('base/images/bullitlicht1.gif',
'projects');"
onMouseout="navDeAct('base/images/bullitdonker.gif',
'projects');"
class="vertnavsub">Current Projects</a>
</td>
</tr>
<!- - Current Projects sub: SNP - ->
<tr style="display:none" id="projects_0">
<td></td>
<td valign="baseline" width="10">
<img src="base/images/bullitmiddel.gif" id="b_projects_snp">
</td>
<td colspan="2">
<a id="page_projects_snp"
onClick="swapActive('projects_snp');"
href="/projects/snp/"
onMouseover="navAct('base/images/bullitlicht2.gif',
'projects_snp');"
onMouseout="navDeAct('base/images/bullitmiddel.gif',
'projects_snp');"
class="vertnavsub">SNP</a>
</td>
</tr>
-->
<!-- Finished Projects -->
<tr>
<td valign="top" width="20">
......@@ -260,38 +187,6 @@
</td>
</tr>
<tr>
<td valign="top" width="20">
<img src="base/images/bullitdonker.gif" id="b_nameGenerator">
</td>
<td colspan="3">
<a id="page_nameGenerator"
onclick="swapActive('nameGenerator');"
href="nameGenerator"
onmouseover="navAct('base/images/bullitlicht1.gif',
'nameGenerator');"
onmouseout="navDeAct('base/images/bullitdonker.gif',
'nameGenerator');"
class="vertnavsub">Name Generator</a>
</td>
</tr>
<tr>
<td valign="top" width="20">
<img src="base/images/bullitdonker.gif" id="b_upload">
</td>
<td colspan="3">
<a id="page_upload"
onclick="swapActive('upload');"
href="upload"
onmouseover="navAct('base/images/bullitlicht1.gif',
'upload');"
onmouseout="navDeAct('base/images/bullitdonker.gif',
'upload');"
class="vertnavsub">GenBank uploader</a>
</td>
</tr>
<tr>
<td valign="top" width="20">
<img src="base/images/bullitdonker.gif" id="b_snp">
......@@ -310,17 +205,17 @@
<tr>
<td valign="top" width="20">
<img src="base/images/bullitdonker.gif" id="b_webservices">
<img src="base/images/bullitdonker.gif" id="b_nameGenerator">
</td>
<td colspan="3">
<a id="page_webservices"
onclick="swapActive('webservices');"
href="webservices"
onmouseover="navAct('base/images/bullitlicht1.gif',
'webservices');"
onmouseout="navDeAct('base/images/bullitdonker.gif',
'webservices');"
class="vertnavsub">Webservices</a>
<a id="page_nameGenerator"
onclick="swapActive('nameGenerator');"
href="nameGenerator"
onmouseover="navAct('base/images/bullitlicht1.gif',
'nameGenerator');"
onmouseout="navDeAct('base/images/bullitdonker.gif',
'nameGenerator');"
class="vertnavsub">Name Generator</a>
</td>
</tr>
......@@ -347,7 +242,6 @@
</td>
<td colspan="2">
<a id="page_batchNameChecker"
onclick="swapActive('batchNameChecker');"
href="batchNameChecker"
class="vertnavsub">Name Checker</a>
</td>
......@@ -360,7 +254,6 @@
</td>
<td colspan="2">
<a id="page_batchSyntaxChecker"
onclick="swapActive('batchSyntaxChecker');"
href="batchSyntaxChecker"
class="vertnavsub">Syntax Checker</a>
</td>
......@@ -373,12 +266,45 @@
</td>
<td colspan="2">
<a id="page_batchPositionConverter"
onclick="swapActive('batchPositionConverter');"
href="batchPositionConverter"
class="vertnavsub">Position Converter</a>
</td>
</tr>
<tr>
<td valign="top" width="20">
<img src="base/images/bullitdonker.gif" id="b_upload">
</td>
<td colspan="3">
<a id="page_upload"
onclick="swapActive('upload');"
href="upload"
onmouseover="navAct('base/images/bullitlicht1.gif',
'upload');"
onmouseout="navDeAct('base/images/bullitdonker.gif',
'upload');"
class="vertnavsub">GenBank uploader</a>
</td>
</tr>
<tr>
<td valign="top" width="20">
<img src="base/images/bullitdonker.gif" id="b_webservices">
</td>
<td colspan="3">
<a id="page_webservices"
onclick="swapActive('webservices');"
href="webservices"
onmouseover="navAct('base/images/bullitlicht1.gif',
'webservices');"
onmouseout="navDeAct('base/images/bullitdonker.gif',
'webservices');"
class="vertnavsub">Webservices</a>
</td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td valign="top" width="20">
<img src="base/images/bullitdonker.gif" id="b_help">
......@@ -468,7 +394,6 @@
</td>
<td colspan="2">
<a id="page_external_hgb"
onclick="swapActive('external_hgb');"
href="http://www.genenames.org/guidelines.html"
class="vertnavsub">Human Gene Nomenclature</a>
</td>
......@@ -481,7 +406,6 @@
</td>
<td colspan="2">
<a id="page_external_hgvs"
onclick="swapActive('external_hgvs');"
href="http://www.hgvs.org/mutnomen/"
class="vertnavsub">HGVS variation nomenclature</a>
</td>
......@@ -494,7 +418,6 @@
</td>
<td colspan="2">
<a id="page_external_hgvsext"
onclick="swapActive('external_hgvsext');"