Skip to content
Open
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,9 @@ obj/
obj.dbg/
test/
unit_test_*
log/mrs.log
.gdb_history
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/settings.json
.vscode/tasks.json
11 changes: 6 additions & 5 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,33 @@ MRS_BASE_URL ?= http://chelonium.cmbi.umcn.nl:$(MRS_PORT)/
MRS_USER ?= $(shell whoami)

PERL ?= $(shell which perl)
PERL := LANG=C $(PERL)

DEFINES += MRS_ETC_DIR='"$(MRS_ETC_DIR)"' \
MRS_USER='"$(MRS_USER)"' \
MRS_CURRENT_VERSION='"$(VERSION)"'

BOOST_LIBS = system thread filesystem regex math_c99 math_c99f program_options date_time iostreams timer random chrono
BOOST_LIBS := $(BOOST_LIBS:%=boost_%$(BOOST_LIB_SUFFIX))
LIBS = m pthread rt z bz2 zeep
LIBS = m pthread rt z bz2 zeep $(BOOST_LIBS)

CXX ?= c++

CXXFLAGS += -std=c++11
CXXFLAGS += -std=c++14
CFLAGS += $(INCLUDE_DIR:%=-I%) -I. -pthread
CFLAGS += -Wno-deprecated -Wno-multichar
CFLAGS += $(shell $(PERL) -MExtUtils::Embed -e perl_inc)
CFLAGS += $(DEFINES:%=-D%)

LDFLAGS += $(LIBRARY_DIR:%=-L %) $(LIBS:%=-l%) $(BOOST_LIBS:%=-l%) -g
LDFLAGS += $(LIBRARY_DIR:%=-L %) $(LIBS:%=-l%) -g
LDFLAGS += $(shell $(PERL) -MExtUtils::Embed -e ldopts)

OBJDIR = obj

ifneq ($(DEBUG),1)
CFLAGS += -O3 -DNDEBUG -g
else
CFLAGS += -g -DDEBUG
CFLAGS += -g
OBJDIR := $(OBJDIR).dbg
endif

Expand Down Expand Up @@ -151,7 +152,7 @@ $(OBJDIR)/M6Config.o: make.config
unicode/M6UnicodeTables.h src/../unicode/M6UnicodeTables.h:
cd unicode; $(PERL) unicode-table-creator.pl > $(@F)

include $(OBJECTS:%.o=%.d)
-include $(OBJECTS:%.o=%.d)

$(OBJECTS:.o=.d):

Expand Down
3 changes: 3 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ END
push @libs, "boost_thread";
push @libs, "boost_filesystem";
push @libs, "boost_math_c99";
push @libs, "boost_random";
push @libs, "rt";

if (not CheckLib("zeep", $header_check, $lib_check))
Expand Down Expand Up @@ -380,13 +381,15 @@ END
$cxxflags =~ s/\s+/ /g;

$header_check =<<END;
#define PERL_NO_INLINE_FUNCTIONS 1
#include "EXTERN.h"
#include "XSUB.h"
#include <iostream>
int main() { std::cout << 1 << '\t' << 0; return 0; }
END

$lib_check =<<END;
#define PERL_NO_INLINE_FUNCTIONS 1
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
Expand Down
43 changes: 22 additions & 21 deletions docroot/admin.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:mrs="https://mrs.cmbi.ru.nl/mrs-web/ml"
xmlns:z2="http://www.hekkelman.com/libzeep/m2"
xml:lang="en" lang="en">
<head>
<title>MRS Administration</title>
Expand All @@ -22,17 +23,17 @@

</head>
<body>
<mrs:include file="header.html" />
<div z2:replace="header :: #header" />
<div id="main">
<div class="nav">
<ul>
<li><a href="#" id="global">Main</a></li>
<li><a href="#" id="server">Server</a></li>
<li><a href="#" id="parsers">Parsers</a></li>
<li><a href="#" id="formats">Formats</a></li>
<li><a href="#" id="databanks">Databanks</a></li>
<li><a href="#" id="scheduler">Scheduler</a></li>
<li><a href="#" id="blast">Blast Queue</a></li>
<li><a href="#" data-id="global">Main</a></li>
<li><a href="#" data-id="server">Server</a></li>
<li><a href="#" data-id="parsers">Parsers</a></li>
<li><a href="#" data-id="formats">Formats</a></li>
<li><a href="#" data-id="databanks">Databanks</a></li>
<li><a href="#" data-id="scheduler">Scheduler</a></li>
<li><a href="#" data-id="blast">Blast Queue</a></li>
</ul>
</div>

Expand Down Expand Up @@ -99,7 +100,7 @@ <h3>Web Service Locations</h3>
<table cellspacing="0" cellpadding="0" class="select_form">
<caption>Parsers</caption>
<mrs:iterate collection="parsers" var="parser">
<tr><td>${parser.id}</td></tr>
<tr data-target="parser-${parser.id}"><td>${parser.id}</td></tr>
</mrs:iterate>
</table>
</div>
Expand All @@ -113,7 +114,7 @@ <h3>Web Service Locations</h3>

<div class="admin-right">
<mrs:iterate collection="parsers" var="parser">
<form id="${parser.id}" class="admin_form" method="post" style="display:none">
<form data-id="${parser.id}" class="admin_form" method="post" style="display:none">
<input type='hidden' name='submit' value='parsers'/>
<fieldset>
<h3>Parser configuration</h3>
Expand All @@ -138,7 +139,7 @@ <h3>Parser configuration</h3>
<table cellspacing="0" cellpadding="0" class="select_form">
<caption>Formats</caption>
<mrs:iterate collection="formats" var="format">
<tr><td>${format.id}</td></tr>
<tr data-target="format-${format.id}"><td>${format.id}</td></tr>
</mrs:iterate>
</table>
</div>
Expand All @@ -152,13 +153,13 @@ <h3>Parser configuration</h3>

<div class="admin-right">
<mrs:iterate collection="formats" var="format">
<form id="${format.id}" class="admin_form" method="POST" style="display:none">
<form data-id="format-${format.id}" class="admin_form" method="POST" style="display:none">
<fieldset>
<h3>Format specification</h3>
<input type='hidden' name='submit' value='formats'/>
<input type='hidden' name='original-id' value='${format.id}'/>

<div><label>ID</label><input type="text" name="id" value="${format.id}"/></div>
<div><label>ID</label><input type="text" name="format-id" value="${format.id}"/></div>

<h3>Document layout</h3>

Expand All @@ -173,7 +174,7 @@ <h3>Document layout</h3>
<h3>Links</h3>
<p>Create 'live' links in documents based on a regular expression. You can reference captures in the
regular expression using the variable names $1 for the first capture, $2 for the second, etc.</p>
<table cellspacing="0" cellpadding="0" style="${empty format.links ? 'display:none' : ''}">
<table id="format-link-table-${format.id}" cellspacing="0" cellpadding="0" style="${empty format.links ? 'display:none' : ''}">
<tr>
<th>Regular Expression</th>
<th>Target Databank</th>
Expand Down Expand Up @@ -201,8 +202,8 @@ <h3>Links</h3>
<td><div class="delete">Delete</div></td>
</tr>
</table>
<button onclick='Admin.addLinkToFormat("${format.id}"); return false;'>Add link</button>
<button class="add-link" data-format="${format.id}">Add link</button>

<hr/>
<input type='submit' value='Submit'/><input type='reset' value='Reset'/>
</fieldset>
Expand All @@ -220,7 +221,7 @@ <h3>Links</h3>
<table cellspacing="0" cellpadding="0" class="select_form">
<caption>Databanks</caption>
<mrs:iterate collection="config-databanks" var="db">
<tr><td><mrs:if test="${db.enabled}">${db.id}</mrs:if><mrs:if test="${not db.enabled}"><em>${db.id}</em></mrs:if></td></tr>
<tr data-target="db-${db.id}"><td><mrs:if test="${db.enabled}">${db.id}</mrs:if><mrs:if test="${not db.enabled}"><em>${db.id}</em></mrs:if></td></tr>
</mrs:iterate>
</table>
</div>
Expand All @@ -234,7 +235,7 @@ <h3>Links</h3>

<div class="admin-right">
<mrs:iterate collection="config-databanks" var="db">
<form id="${db.id}" class="admin_form" method="POST" style="display:none">
<form data-id="db-${db.id}" class="admin_form" method="POST" style="display:none">
<fieldset>
<h3>Databank information</h3>
<input type='hidden' name='submit' value='databanks'/>
Expand All @@ -249,7 +250,7 @@ <h3>Databank information</h3>
the values found in e.g. db_xref records. The <em>name</em> is used in the blast databank popup menu.</p>

<div><label>Aliases</label><div class="aliases">
<table id="${db.id}-aliases" cellspacing="0" cellpadding="0"
<table data-id="${db.id}-aliases" cellspacing="0" cellpadding="0"
style="${empty db.aliases ? 'display:none;' : ''}">
<tr>
<th>ID</th>
Expand All @@ -269,7 +270,7 @@ <h3>Databank information</h3>
<td><div class="delete">Delete</div></td>
</tr>
</table>
<span class="clickable" onclick='Admin.addAliasToDb("${db.id}"); return false;'>Add alias</span>
<span class="clickable add-alias" data-db="${db.id}">Add alias</span>
</div>
</div>

Expand Down Expand Up @@ -304,7 +305,7 @@ <h3>Data processing</h3>
<p>Formatting can be done with one of the defined formatters, or for XML databanks, with
an XML Stylesheet.</p>

<div><label>Formatter</label><select name="format" onchange="Admin.changeFormat('${db.id}');">
<div><label>Formatter</label><select name="format" data-db="${db.id}">
<option value="none">No format</option>
<mrs:option value="xml" selected="${db.format}">XML Stylesheet</mrs:option>
<mrs:options collection="formats" value="id" label="id" selected="${db.format}"/>
Expand Down
3 changes: 2 additions & 1 deletion docroot/align.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:mrs="https://mrs.cmbi.ru.nl/mrs-web/ml"
xmlns:z2="http://www.hekkelman.com/libzeep/m2"
xml:lang="en" lang="en">
<head>
<title>M6</title>
Expand All @@ -20,7 +21,7 @@
</script>
</head>
<body>
<mrs:include file="header.html" />
<div z2:replace="header :: #header" />

<div id="main">
<form id="alignForm" method="POST" action="#" onsubmit="submitAlignJob(); return false;" class="align_form">
Expand Down
12 changes: 7 additions & 5 deletions docroot/blast.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:mrs="https://mrs.cmbi.ru.nl/mrs-web/ml"
xmlns:z2="http://www.hekkelman.com/libzeep/m2"
xml:lang="en" lang="en">
<head>
<title>M6</title>
Expand All @@ -25,7 +26,7 @@

</head>
<body>
<mrs:include file="header.html" />
<div z2:replace="header :: #header" />

<div id="main">
<div style="margin-bottom: 1em;">
Expand All @@ -39,14 +40,14 @@
<textarea name="query" rows="5" cols="72">${query}</textarea>
<!-- <li>Or enter filename: <input type="file" name="queryFile" size="50" maxlength="80" /></li>-->
<div>
<label>Databank to search</label><select name="db" style="width:10em;">
<label for="db">Databank to search</label><select id="db" name="db" style="width:10em;">
<mrs:options collection="blastdatabanks" value="id" label="name" selected="${blastdb}" />
</select>
</div>

<div id="options">
<!-- <div><h3>Options</h3></div>-->
<div><label>Filter low complexity</label><mrs:checkbox name="filter" checked="${filter}" /></div>
<div><label for="filter">Filter low complexity</label><input type="checkbox" id="filter" z2:checked="${filter}" name="filter" />
</div>
<div><label>E-value cutoff</label><select name="expect"><mrs:options collection="expectRange" selected="${expect}" /></select></div>
</div>

Expand All @@ -60,7 +61,8 @@
<div><label>Scoring matrix</label><select name="matrix" onchange="updateGapValues();">
<mrs:options collection="matrices" selected="${matrix}" /></select>
</div>
<div><label>Perform gapped alignment</label><mrs:checkbox name="gapped" checked="${gapped}" onchange="gappedChanged();" /></div>
<div><label for="gapped">Perform gapped alignment</label>
<input id="gapped" type="checkbox" name="gapped" z2:checked="${gapped}" onchange="gappedChanged();" /></div>
<div><label>Cost to open a gap</label><select name="gapOpen" onchange="gapOpenChanged();">
<option value="-1">Default</option>
<mrs:options collection="gapOpenRange" selected="${gapOpen}" /></select>
Expand Down
71 changes: 15 additions & 56 deletions docroot/browse.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:mrs="https://mrs.cmbi.ru.nl/mrs-web/ml"
xmlns:z2="http://www.hekkelman.com/libzeep/m2"
xml:lang="en" lang="en">
<head>
<title>M6</title>
Expand All @@ -18,74 +18,33 @@
</script>
</head>
<body>
<mrs:include file="header.html" />
<div z2:replace="header :: #header" />

<div id="main">

<div class="nav">
<span class="left">
<!-- Records ${first}-${last} of <mrs:number f="#,##0" n="${keyCount}"/>-->
<mrs:if test="${not empty first}">Keys ${first} to ${last} for index ${ix} in ${db}</mrs:if>
<mrs:if test="${empty first}">Keys for index ${ix} in ${db}</mrs:if>
<span z2:if="${not first.empty}" z2:text="|Keys ${first} to ${last} for index ${ix} in ${db}|"></span>
<span z2:if="${first.empty}" z2:text="|Keys for index ${ix} in ${db}|"></span>
</span>

<span class="right">
<mrs:if test="${page > 1}">
<mrs:url var="url"><mrs:param name="page" value="${page - 1}"/></mrs:url>
<a href="${url}">previous</a>
</mrs:if>
<mrs:for var="p" begin="${page > 4 ? page - 4 : 1}"
end="${lastPage > page + 4 ? page + 4 : lastPage}">
<mrs:if test="${p != page}">
<mrs:url var="url"><mrs:param name="page" value="${p}"/></mrs:url>
<a href="${url}">${p}</a>
</mrs:if>
<mrs:if test="${p = page}">${p}</mrs:if>
</mrs:for>
<mrs:if test="${lastPage > page}">
<mrs:url var="url"><mrs:param name="page" value="${page + 1}"/></mrs:url>
<a href="${url}">next</a>
</mrs:if>
</span>
&#x00a0;
</div>

<mrs:if test="${not empty sections}">
<div class="wbox">

<div class="wleft">
<ul class="browse">
<mrs:for begin="0" end="${(sections.count / 2) - 1}" var="i">
<li>
<a href="browse?ix=${ix};db=${db};first=${sections[i].first};last=${sections[i].last}">
${sections[i].first} .. ${sections[i].last}
</a>
</li>
</mrs:for>
</ul>
</div>
<div class="wright">
<ul class="browse">
<mrs:for begin="${sections.count / 2}" end="${sections.count - 1}" var="i">
<li>
<a href="browse?ix=${ix};db=${db};first=${sections[i].first};last=${sections[i].last}">
${sections[i].first} .. ${sections[i].last}
</a>
</li>
</mrs:for>
</ul>
</div>
<div class="wclear"/>
</div>
</mrs:if>

<mrs:if test="${not empty keys}">
<mrs:iterate collection="keys" var="key">
<div z2:if="${not sections.empty}" class="wbox">
<ul class="browse">
<li><a href="link?db=${db}&amp;ix=${ix}&amp;id=${key}">${key}</a></li>
<li z2:each="section: ${sections}">
<a z2:href="@{browse(ix=${ix},db=${db},first=${section.first},last=${section.last})}"
z2:text="|${section.first} .. ${section.last}|">
</a>
</li>
</ul>
</mrs:iterate>
</mrs:if>
</div>

<ul class="browse">
<li z2:each="key: ${keys}"><a z2:href="@{link(db=${db},ix=${ix},id=${key})}" z2:text="${key}"></a></li>
</ul>
</div>
</body>
</html>
Loading