Commit c5c1ac96 authored by Fernando João Pereira da Cruz's avatar Fernando João Pereira da Cruz
Browse files

improving home and adding new input arguments (dbs, ontologies, ...)

parent 28a0c8eb
......@@ -69,13 +69,18 @@ def submit():
taxonomyId = request.form["text"]
validInput = verifyInput(taxonomyId)
dbs = str(request.form["database"])
ontologies = str(request.form["ontologies"])
if not validInput:
return jsonify({"Genome": "Input genome must be in .faa or .fasta format",
"Model": "Model must be in .xml format or a list of metabolites in .txt format (one metabolite per line)",
"Taxonomy ID": "Input must only contain digits"}), 406
logger.info("Taxonomy identifier: " + taxonomyId)
return run(files, taxonomyId, False)
logger.info("Database: " + dbs)
logger.info("Ontologies: " + ontologies)
return run(files, taxonomyId, dbs, ontologies, False)
@app.route("/submitMerlinPlugin/<taxonomyId>", methods=["POST"])
......@@ -95,7 +100,7 @@ def submitMerlinPlugin(taxonomyId):
return run(files, taxonomyId, True)
def run(files, taxonomyId, isRest):
def run(files, taxonomyId, dbs, ontologies, isRest):
logger.debug('New submission in progress...')
total = len(os.listdir(SUBMISSIONS_PATH))
......@@ -147,6 +152,12 @@ def run(files, taxonomyId, isRest):
logger.info("taxID -> " + taxonomyId)
logger.info("inputCheck -> " + str(inputCheck))
with open("/".join([submission_path, "databases.txt"]), "w") as dbsFile:
dbsFile.write(dbs) # write databases file
with open("/".join([submission_path, "ontologies.txt"]), "w") as ontoFile:
ontoFile.write(ontologies) # write ontologies file
if inputCheck in validInputs:
with open("/".join([submission_path, "taxID.txt"]), "w") as taxFile:
taxFile.write(taxonomyId) # write TaxonomyID file
......
......@@ -25,7 +25,7 @@
justify-content: space-between;
-ms-flex-align: center;
align-items: center;
box-shadow: 20px 8px 20px 8px rgba(0, 0, 0, 0.15);
box-shadow: 15px 8px 15px 8px rgba(0, 0, 0, 0.15);
}
.submit-form .inner-form {
......@@ -37,7 +37,7 @@
justify-content: space-between;
-ms-flex-align: center;
align-items: center;
box-shadow: 20px 8px 20px 8px rgba(0, 0, 0, 0.15);
box-shadow: 15px 8px 15px 8px rgba(0, 0, 0, 0.15);
}
.submit-form form .inner-form .input-field {
......@@ -174,4 +174,74 @@
font-weight: bold;
font-size: 22px;
cursor: pointer;
}
.submit-button {
display: inline-block;
background: none;
padding: 10px;
margin: 10px;
cursor:pointer;
border: 2px solid #27ae60;
}
.submit-button:hover {
display: inline-block;
background: #27ae60;
transition: 0.5s;
}
.submit-button >p {
margin: 0;
color: #27ae60;
padding: 7px 25px 7px 25px;
font-size: 22px;
}
.submit-button:hover >p {
margin: 0;
color: #ffffff;
transition: 0.5s;
}
.more-options-button {
display: inline-block;
background: none;
padding: 10px;
margin: 10px;
cursor:pointer;
border: 2px solid #2c3e50;
}
.more-options-button:hover {
display: inline-block;
background: #2c3e50;
transition: 0.5s;
}
.more-options-button >p {
margin: 0;
color: #2c3e50;
padding: 5px 20px 5px 20px;
font-size: 18px;
}
.more-options-button:hover >p {
margin: 0;
color: #ffffff;
transition: 0.5s;
}
\ No newline at end of file
var input = document.getElementById( 'file-upload' );
var infoArea = document.getElementById( 'file-upload-filename' );
input.addEventListener( 'change', showFileName );
function showFileName( event ) {
var input = event.target;
infoArea.textContent = input.files[0].name;
infoArea.style.color = '#27ae60';
}
var input2 = document.getElementById( 'file-upload2' );
var infoArea2 = document.getElementById( 'file-upload-filename2' );
input2.addEventListener( 'change', showFileName2 );
function showFileName2( event2 ) {
var input2 = event2.target;
infoArea2.textContent = input2.files[0].name;
infoArea2.style.color = '#27ae60';
}
\ No newline at end of file
function showSubmit(event) {
document.getElementById( 'to-retrieve' ).style.display = 'none';
document.getElementById( 'to-submit' ).style.display = 'inline-block';
}
function toggleMoreOptions(event) {
if(document.getElementById('more-options').style.display == "none") { // if is menuBox displayed, hide it
document.getElementById('more-options').style.display = "inline-block";
}
function showRetrieve(event) {
document.getElementById( 'to-submit' ).style.display = 'none';
document.getElementById( 'to-retrieve' ).style.display = 'inline-block';
else {
document.getElementById('more-options').style.display = "none";
}
}
function showExternal(event) {
document.getElementById( 'external-links' ).style.display = 'inline-block';
document.getElementById( 'external-links' ).style.padding = '25px';
document.getElementById( 'external-links' ).style.textAlign = 'left';
document.getElementById( 'external-links' ).style.width = '100%';
document.getElementById( 'external-links' ).style.boxShadow = '20px 8px 20px 8px rgba(0, 0, 0, 0.15)';
}
function closeExternal(event) {
document.getElementById( 'external-links' ).style.display = 'none';
......@@ -43,16 +36,3 @@ function toggleMetabolites() {
document.getElementById('aspect-content').style.display = "none";
}
}
function toggleMenu2(id) {
if(document.getElementById(id).style.display == "none") { // if is menuBox displayed, hide it
document.getElementById(id).style.display = "block";
document.getElementById(id).style.padding = '10px';
document.getElementById(id).style.textAlign = 'left';
document.getElementById(id).style.width = '100%';
}
else {
document.getElementById(id).style.display = "none";
}
}
\ No newline at end of file
......@@ -3,11 +3,15 @@
<head>
<meta charset="UTF-8">
<title>TranSyT</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/downloadButton.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/accordion_results.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/footer.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/center.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/submit.css') }}">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<link href="//fonts.googleapis.com/css?family=Oxygen&subset=latin,latin-ext" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="{{ url_for('static', filename='css/downloadButton.css') }}">
</head>
<body style="background: #fefcfe">
......@@ -38,16 +42,20 @@
<br>
<br>
</div>
<div style="text-align: center; color: black; font-family: Oxygen">
<a href="{{url_for('index')}}"><b>TranSyT 2019</b></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://www.eng.uminho.pt/en" target="_blank"> <img border="0" alt="School of Engineering" src="{{ url_for('static', filename = 'images/EENG.jpg') }}" width="90" height="60"></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://www.ceb.uminho.pt/" target="_blank"> <img border="0" alt="Centre of Biological Engineering" src="{{ url_for('static', filename = 'images/ceb1.png') }}" width="130" height="105"></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://www.elixir-portugal.org/" target="_blank"> <img border="0" alt="BioData" src="{{ url_for('static', filename = 'images/biodata_elixir.png') }}" width="235" height="30"></a>
<br>
<br>
<div class="footer">
<table>
<tr>
<th><a href="{{url_for('index')}}">TranSyT 2019</a> <br>
by <a href="https://www.ceb.uminho.pt/People/Profile/davidelagoa" target="_blank">Davide Lagoa</a> and
<a href="https://www.ceb.uminho.pt/People/Profile/odias" target="_blank">Oscar Dias</a>
</th>
<th><a href="https://www.eng.uminho.pt/en" target="_blank"> <img border="0" alt="School of Engineering" src="{{ url_for('static', filename = 'images/EENG.jpg') }}"></a></th>
<th><a href="https://www.ceb.uminho.pt/" target="_blank"> <img border="0" alt="Centre of Biological Engineering" src="{{ url_for('static', filename = 'images/ceb1.png') }}"></a></th>
<th><a href="https://www.elixir-portugal.org/" target="_blank"> <img border="0" alt="BioData" src="{{ url_for('static', filename = 'images/biodata_elixir.png') }}"></a></th>
</tr>
</table>
</div>
</body>
</html>
......@@ -3,11 +3,15 @@
<head>
<meta charset="UTF-8">
<title>TranSyT</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/downloadButton.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/accordion_results.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/footer.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/center.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/submit.css') }}">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<link href="//fonts.googleapis.com/css?family=Oxygen&subset=latin,latin-ext" rel="stylesheet" type="text/css"></head>
<link href="//fonts.googleapis.com/css?family=Oxygen&subset=latin,latin-ext" rel="stylesheet" type="text/css">
</head>
<body style="background: #fefcfe">
......@@ -29,7 +33,7 @@
<p align="justify">TranSyT can receive as input the organism NCBI taxonomy identifier, its genome sequence in a fasta file format and its constraint-based metabolic model in the SBML file format or a metabolites list in text file format.</p>
<br>
<br>
<div class="search_bar">
<div class="submit-form">
<form id="upload-form" action="{{url_for('submit')}}" method="POST" enctype="multipart/form-data">
<h3>Submit NCBI Taxonomy number</h3>
<br>
......@@ -40,57 +44,116 @@
</div>
<br>
<br>
<h3>Upload genome file in <b>fasta</b> format</h3>
<br>
<div class="inner-form">
<div class="input-field third-wrap">
<label class="input-field third-wrap custom-file-upload">
<input type="file" name="file" multiple />
Upload Genome
<input id="file-upload" type="file" name="file" multiple/>
<div id="file-upload-filename">Upload Genome</div>
</label>
</div>
</div>
<br>
<br>
<h3>Upload a model file in <b>xml</b> format or a metabolites list in <b>txt</b> format </h3>
<br>
<div class="inner-form">
<div class="input-field third-wrap">
<label class="input-field third-wrap custom-file-upload">
<input type="file" name="file" multiple/>
Upload Model or Metabolites
<input id="file-upload2" type="file" name="file" multiple/>
<div id="file-upload-filename2">Upload Model or Metabolites</div>
</label>
</div>
</div>
<br>
<br>
<br>
<br>
<div class="inner-form" style="background-color: #27ae60; max-width: 30%">
<div class="input-field fourth-wrap">
<label class="input-field fourth-wrap custom-file-upload">
<input type="submit" name="send" />
Submit
</label>
</div>
<div>
<label class="more-options-button">
<button style="display: none" onclick="toggleMoreOptions()" type="button"></button>
<p>More Options</p>
</label>
</div>
<br>
<br>
<div id="more-options" style="display: none">
<h3>Select a database</h3>
<br>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon">Database</span>
<select name="database" class="selectpicker form-control">
<option value="metacyc">MetaCyc</option>
<option value="kegg">KEGG</option>
<option value="bigg">BiGG</option>
<option value="modelseed">ModelSEED</option>
</select>
</div>
</div>
<br>
<br>
<h3>Filter by common ontologies?</h3>
<br>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon">Ontologies</span>
<select name="ontologies" class="selectpicker form-control">
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
</div>
</div>
</div>
<br>
<br>
<div>
<label class="submit-button" style="border: 2px solid #27ae60;">
<input style="display: none" type="submit" name="send" />
<p><b>Submit</b></p>
</label>
</div>
</form>
</div>
<script src="../static/js/show_filename.js"></script>
<script src="../static/js/to_show.js"></script>
</div>
<br>
<br>
<div style="text-align: center; color: black; font-family: Oxygen">
<a href="{{url_for('index')}}"><b>TranSyT 2019</b></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://www.eng.uminho.pt/en" target="_blank"> <img border="0" alt="School of Engineering" src="{{ url_for('static', filename = 'images/EENG.jpg') }}" width="90" height="60"></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://www.ceb.uminho.pt/" target="_blank"> <img border="0" alt="Centre of Biological Engineering" src="{{ url_for('static', filename = 'images/ceb1.png') }}" width="130" height="105"></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://www.elixir-portugal.org/" target="_blank"> <img border="0" alt="BioData" src="{{ url_for('static', filename = 'images/biodata_elixir.png') }}" width="235" height="30"></a>
<br>
<br>
<div class="footer">
<table>
<tr>
<th><a href="{{url_for('index')}}">TranSyT 2019</a> <br>
by <a href="https://www.ceb.uminho.pt/People/Profile/davidelagoa" target="_blank">Davide Lagoa</a> and
<a href="https://www.ceb.uminho.pt/People/Profile/odias" target="_blank">Oscar Dias</a>
</th>
<th><a href="https://www.eng.uminho.pt/en" target="_blank"> <img border="0" alt="School of Engineering" src="{{ url_for('static', filename = 'images/EENG.jpg') }}"></a></th>
<th><a href="https://www.ceb.uminho.pt/" target="_blank"> <img border="0" alt="Centre of Biological Engineering" src="{{ url_for('static', filename = 'images/ceb1.png') }}"></a></th>
<th><a href="https://www.elixir-portugal.org/" target="_blank"> <img border="0" alt="BioData" src="{{ url_for('static', filename = 'images/biodata_elixir.png') }}"></a></th>
</tr>
</table>
</div>
</body>
......
......@@ -3,15 +3,17 @@
<head>
<meta charset="UTF-8">
<title>TranSyT</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/downloadButton.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/accordion_results.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/footer.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/center.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/submit.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/footer.css') }}">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<link href="//fonts.googleapis.com/css?family=Oxygen&subset=latin,latin-ext" rel="stylesheet" type="text/css">
</head>
<body>
<body style="background: #fefcfe">
<div class="center" align="center" style="border: 0">
<br>
......
......@@ -3,18 +3,15 @@
<head>
<meta charset="UTF-8">
<title>TranSyT</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/center.css') }}">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="{{ url_for('static', filename='css/header.css') }}">
<link href="//fonts.googleapis.com/css?family=Oxygen&subset=latin,latin-ext" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="{{ url_for('static', filename='css/nav.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/downloadButton.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/accordion_results.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/footer.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/center.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/submit.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/footer.css') }}">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<link href="//fonts.googleapis.com/css?family=Oxygen&subset=latin,latin-ext" rel="stylesheet" type="text/css">
</head>
<body style="background: #fefcfe">
......
......@@ -4,10 +4,16 @@
<meta charset="UTF-8">
<meta http-equiv="refresh" content="5;url={{url_for('display_msg', submissionID = subId, isRest = False)}}">
<title>TranSyT</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/downloadButton.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/accordion_results.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/footer.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/center.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/submit.css') }}">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<link href="//fonts.googleapis.com/css?family=Oxygen&subset=latin,latin-ext" rel="stylesheet" type="text/css">
</head>
<body style="background: #fefcfe">
<div class="center" align="center" style="border: 0">
......@@ -34,16 +40,20 @@
<br>
<br>
<br>
<div style="text-align: center; color: black; font-family: Oxygen">
<a href="{{url_for('index')}}"><b>TranSyT 2019</b></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://www.eng.uminho.pt/en" target="_blank"> <img border="0" alt="School of Engineering" src="{{ url_for('static', filename = 'images/EENG.jpg') }}" width="90" height="60"></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://www.ceb.uminho.pt/" target="_blank"> <img border="0" alt="Centre of Biological Engineering" src="{{ url_for('static', filename = 'images/ceb1.png') }}" width="130" height="105"></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://www.elixir-portugal.org/" target="_blank"> <img border="0" alt="BioData" src="{{ url_for('static', filename = 'images/biodata_elixir.png') }}" width="235" height="30"></a>
<br>
<br>
<div class="footer">
<table>
<tr>
<th><a href="{{url_for('index')}}">TranSyT 2019</a> <br>
by <a href="https://www.ceb.uminho.pt/People/Profile/davidelagoa" target="_blank">Davide Lagoa</a> and
<a href="https://www.ceb.uminho.pt/People/Profile/odias" target="_blank">Oscar Dias</a>
</th>
<th><a href="https://www.eng.uminho.pt/en" target="_blank"> <img border="0" alt="School of Engineering" src="{{ url_for('static', filename = 'images/EENG.jpg') }}"></a></th>
<th><a href="https://www.ceb.uminho.pt/" target="_blank"> <img border="0" alt="Centre of Biological Engineering" src="{{ url_for('static', filename = 'images/ceb1.png') }}"></a></th>
<th><a href="https://www.elixir-portugal.org/" target="_blank"> <img border="0" alt="BioData" src="{{ url_for('static', filename = 'images/biodata_elixir.png') }}"></a></th>
</tr>
</table>
</div>
</body>
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Upload</title>
</head>
<body>
<h1>TranSyT's NEW Files Uploader</h1>
<p>The submissions will only be valid if the following files are submitted:</p>
<p>Genome as 'genome.faa'</p>
<p>Taxonomy identifier (write the number inside a simple txt file) as taxID.txt</p>
<p>Model as 'model.xml'!!</p>
<p></p>
<p>Please submit the files with the names above!</p>
<form id="upload-form" action="{{url_for('submit')}}" method="POST" enctype="multipart/form-data">
<input type="file" name="file" multiple>
<input type="submit" name="send">
</form>
</body>
</html>
Markdown is supported
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