Skip to content

Commit a25d58e

Browse files
authored
Merge pull request #45 from PennChopMicrobiomeProgram/codex/update-header-and-home-page-content
Update navigation, isolates table, and homepage content
2 parents 67a350a + 7660595 commit a25d58e

3 files changed

Lines changed: 73 additions & 27 deletions

File tree

app/templates/base.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<body class="container-fluid">
2929
<nav class="navbar navbar-expand-lg bg-light fixed-top">
3030
<div class="container-fluid">
31-
<a class="navbar-brand" href="{{ url_for('index') }}">mARC Query</a>
31+
<a class="navbar-brand" href="{{ url_for('index') }}">microbialARC</a>
3232
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navMenu" aria-controls="navMenu" aria-expanded="false" aria-label="Toggle navigation">
3333
<span class="navbar-toggler-icon"></span>
3434
</button>
@@ -37,11 +37,6 @@
3737
<li class="nav-item">
3838
<a class="nav-link" href="{{ url_for('index') }}"><i class="bi bi-house-fill"></i> Home</a>
3939
</li>
40-
<li class="nav-item">
41-
<a class="nav-link" href="{{ url_for('browse_aliquots') }}">
42-
<i class="bi bi-eyedropper"></i> Aliquots
43-
</a>
44-
</li>
4540
<li class="nav-item">
4641
<a class="nav-link" href="{{ url_for('browse_isolates') }}"><i class="bi bi-bug-fill"></i> Isolates</a>
4742
</li>
@@ -56,6 +51,11 @@
5651
<li><a class="dropdown-item" href="{{ url_for('browse_antimicrobials') }}">Antimicrobials</a></li>
5752
</ul>
5853
</li>
54+
<li class="nav-item">
55+
<a class="nav-link" href="{{ url_for('browse_aliquots') }}">
56+
<i class="bi bi-eyedropper"></i> Aliquots
57+
</a>
58+
</li>
5959
<li class="nav-item">
6060
<a class="nav-link" href="{{ url_for('query') }}"><i class="bi bi-search"></i> Custom Query</a>
6161
</li>

app/templates/browse_isolates.html

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,55 @@ <h2>Isolates</h2>
1111
<thead>
1212
<tr>
1313
<th>Sample ID</th>
14-
<th>Received Date</th>
15-
<th>Cryobanking Date</th>
14+
<th>Collection</th>
15+
<th>Collection Year</th>
1616
<th>Subject ID</th>
1717
<th>Specimen ID</th>
1818
<th>Suspected Organism</th>
19-
<th>Special Collection</th>
2019
</tr>
2120
</thead>
2221
<tbody></tbody>
2322
</table>
2423
</div>
2524
</div>
26-
25+
2726
<script type="text/javascript">
2827
$(document).ready(function () {
2928
/* Initialize the DataTable with server-side processing */
3029
const isolateUrl = "{{ url_for('show_isolate', isolate_id='') }}";
30+
const renderCollectionYear = (value, type) => {
31+
if (!value) {
32+
return type === 'sort' || type === 'type' ? null : '';
33+
}
34+
35+
let year = '';
36+
const parsedDate = new Date(value);
37+
if (parsedDate.toString() !== 'Invalid Date') {
38+
year = parsedDate.getUTCFullYear().toString();
39+
} else {
40+
const match = /^(\d{4})/.exec(value);
41+
if (match) {
42+
year = match[1];
43+
}
44+
}
45+
46+
if (!year) {
47+
return type === 'sort' || type === 'type' ? null : '';
48+
}
49+
50+
if (type === 'sort' || type === 'type') {
51+
return parseInt(year, 10);
52+
}
53+
54+
return year;
55+
};
3156
const oTable = createServerDataTable('#isolates', '{{ url_for('api_isolates') }}', [
3257
{ data: 'sample_id', render: function(d, type, row) { return '<a href="' + isolateUrl + d + '">' + d + '</a>'; } },
33-
{ data: 'received_date' },
34-
{ data: 'cryobanking_date' },
58+
{ data: 'special_collection' },
59+
{ data: 'received_date', render: function(value, type) { return renderCollectionYear(value, type); } },
3560
{ data: 'subject_id' },
3661
{ data: 'specimen_id' },
37-
{ data: 'suspected_organism' },
38-
{ data: 'special_collection' }
62+
{ data: 'suspected_organism' }
3963
]);
4064

4165
/* Move search box to bottom of summary area */

app/templates/index.html

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,46 @@
22

33
{% block body %}
44
<div class="container py-5">
5-
<h2 class="mb-3 text-center">Welcome to the microbial ARC isolate database!</h2>
5+
<h2 class="mb-3 text-center">Welcome to the Microbial ARchive and Cryo-collection!</h2>
66
<p>
7-
This initiative within the umbrella of Center for Microbial Medicine aims to
8-
sequence the genome of every clinically relevant isolate collected at
9-
Children’s Hospital of Philadelphia. The database currently holds, {{ isolate_count }} isolates from
10-
{{ patient_count }} patients.
7+
The microbial ARchive and Cryo-collection (microbialARC) at the Children’s Hospital of Philadelphia is a
8+
biorepository and research platform dedicated to preserving and studying both pathogenic and commensal microorganisms. We are building a meticulously curated strain library that advances the field of microbial genomics by integrating advanced cryo-preservation with genomic and phenotypic characterization.
119
</p>
10+
<p>
11+
We collaborate closely with clinicians and basic researchers to collect, culture, and sequence microorganisms that shape human health and disease. Through the systematic preservation and genomic characterization of these isolates, microbialARC supports precision surveillance for infection prevention, outbreak response, and mechanistic studies of the microbiome.
12+
</p>
13+
<p>
14+
Our mission is to transform microbial collections into a dynamic resource for discovery—bridging clinical microbiology, genomics, and bioinformatics to accelerate the development of innovative live biotherapeutics and next-generation tools for understanding microbial evolution and antibiotic resistance. By linking clinical, environmental, and genomic data, microbialARC empowers precision medicine and global health initiatives aimed at improving outcomes for children and communities worldwide.
15+
</p>
16+
<p>
17+
The database currently holds {{ isolate_count }} isolates from {{ patient_count }} patients.
18+
</p>
19+
1220
<p>The efforts to curate the isolates include:</p>
13-
<ol>
21+
<ul class="list-unstyled">
1422
{% for collection, val in special_collection_counts.items() %}
15-
<li>{{ collection }} ({{ val[0] }} isolates) {% if val[1] %} - {{ val[1] }} {% endif %}</li>
23+
<li class="mb-2"><strong>{{ collection }}</strong> ({{ val[0] }} isolates){% if val[1] %} - {{ val[1] }}{% endif %}</li>
1624
{% endfor %}
17-
</ol>
18-
<p>
19-
Searching through the database you will find information on the specimens
20-
the bacteria were isolated from, clinical information on subjects, assembled
21-
genomes and their annotations.
22-
</p>
25+
</ul>
26+
27+
<div class="row g-4 mt-5">
28+
<div class="col-md-6 text-center">
29+
<img
30+
src="{{ url_for('static', filename='CHOP_Center_for_Microbial_Medicine.jpg') }}"
31+
class="img-fluid rounded shadow-sm"
32+
style="width: 100%; height: 220px; object-fit: cover;"
33+
alt="Center for Microbial Medicine banner"
34+
>
35+
</div>
36+
<div class="col-md-6 text-center">
37+
<img
38+
src="{{ url_for('static', filename='CHOP_Microbiome_Center.jpg') }}"
39+
class="img-fluid rounded shadow-sm"
40+
style="width: 100%; height: 220px; object-fit: cover;"
41+
alt="CHOP Microbiome Center banner"
42+
>
43+
</div>
44+
</div>
2345
</div>
2446

2547
<div>

0 commit comments

Comments
 (0)