Commit 3da79b49 authored by Albert Hornos Vidal's avatar Albert Hornos Vidal
Browse files

feat(#18): add viral sequences table

parent 61152f1e
......@@ -3,3 +3,9 @@
min-width: 350px;
max-width: 100%;
}
.nextstrain-widget {
min-height: 375px;
min-width: 100%;
max-width: 100%;
}
......@@ -6,5 +6,3 @@ menu:
weight: 1
type: genomics
---
<div style="text-align:center"><img src="/images/banners/coming-soon-banner.png" style="margin-top: 2rem;" width="200"></div>
{"entity":"SARS-CoV-2 host sequences from Spain powered by ENA","timestamp":"2021-03-03 22:29:17.256300","links":{"self":{"href":"https:\/\/docs.google.com\/spreadsheets\/d\/e\/2PACX-1vRgouM0eO0qKvyi43S72V-x3U80vru5dOkvL9jI9lO0wYeY6A11TK5UPWlcYCCevlm7isZLzaiLfsIW\/pub?gid=1484477925&single=true&output=tsv"},"origin":{"href":"https:\/\/www.covid19dataportal.org\/host-sequences?db=other-experiment&size=15&facets=country:Spain&requestFrom=searchBox#search-content"}},"host_sequences_counter":18,"host_sequences":[{"accession_id":"SRX8264272","description":"Illumina MiSeq sequencing; SARS-CoV-2 whole SPIKE-Seq: MILD case","country":"Spain","region":"Catalunya"},{"accession_id":"SRX8264274","description":"Illumina MiSeq sequencing; SARS-CoV-2 whole SPIKE-Seq: SEVERE case","country":"Spain","region":"Catalunya"},{"accession_id":"SRX8264275","description":"Illumina MiSeq sequencing; SARS-CoV-2 whole SPIKE-Seq: SEVERE case","country":"Spain","region":"Catalunya"},{"accession_id":"SRX8264278","description":"Illumina MiSeq sequencing; SARS-CoV-2 whole SPIKE-Seq: SEVERE case","country":"Spain","region":"Catalunya"},{"accession_id":"SRX8264280","description":"Illumina MiSeq sequencing; SARS-CoV-2 whole SPIKE-Seq: MILD case","country":"Spain","region":"Catalunya"},{"accession_id":"SRX8264282","description":"Illumina MiSeq sequencing; SARS-CoV-2 whole SPIKE-Seq: MILD case","country":"Spain","region":"Catalunya"},{"accession_id":"SRX8264283","description":"Illumina MiSeq sequencing; SARS-CoV-2 whole SPIKE-Seq: MILD case","country":"Spain","region":"Catalunya"},{"accession_id":"SRX8264285","description":"Illumina MiSeq sequencing; SARS-CoV-2 whole SPIKE-Seq: MILD case","country":"Spain","region":"Catalunya"},{"accession_id":"SRX8264286","description":"Illumina MiSeq sequencing; SARS-CoV-2 whole SPIKE-Seq: SEVERE case","country":"Spain","region":"Catalunya"},{"accession_id":"SRX8264288","description":"Illumina MiSeq sequencing; SARS-CoV-2 whole SPIKE-Seq: SEVERE case","country":"Spain","region":"Catalunya"},{"accession_id":"SRX8264271","description":"Illumina MiSeq sequencing; SARS-CoV-2 whole SPIKE-Seq: MILD case","country":"Spain","region":"Catalunya"},{"accession_id":"SRX8264273","description":"Illumina MiSeq sequencing; SARS-CoV-2 whole SPIKE-Seq: SEVERE case","country":"Spain","region":"Catalunya"},{"accession_id":"SRX8264276","description":"Illumina MiSeq sequencing; SARS-CoV-2 whole SPIKE-Seq: MILD case","country":"Spain","region":"Catalunya"},{"accession_id":"SRX8264277","description":"Illumina MiSeq sequencing; SARS-CoV-2 whole SPIKE-Seq: MILD case","country":"Spain","region":"Catalunya"},{"accession_id":"SRX8264279","description":"Illumina MiSeq sequencing; SARS-CoV-2 whole SPIKE-Seq: SEVERE case","country":"Spain","region":"Catalunya"},{"accession_id":"SRX8264281","description":"Illumina MiSeq sequencing; SARS-CoV-2 whole SPIKE-Seq: MILD case","country":"Spain","region":"Catalunya"},{"accession_id":"SRX8264284","description":"Illumina MiSeq sequencing; SARS-CoV-2 whole SPIKE-Seq: MILD case","country":"Spain","region":"Catalunya"},{"accession_id":"SRX8264287","description":"Illumina MiSeq sequencing; SARS-CoV-2 whole SPIKE-Seq: SEVERE case","country":"Spain","region":"Catalunya"}]}
\ No newline at end of file
This diff is collapsed.
......@@ -261,3 +261,24 @@ other = "Code"
[back_to_top]
other = "Back to top"
[accession_id]
other = "Accession"
[collection_date]
other = "Collection date"
[country]
other = "Country"
[host]
other = "Host"
[isolate]
other = "Isolate"
[molecule_type]
other = "Molecule type"
[taxon]
other = "TAXON"
......@@ -2,5 +2,50 @@
<div class="container">
<h1>{{ .Title }}</h1>
{{ .Content }}
<nav class="nav nav-pills nav-fill" role="tablist">
<a class="nav-item nav-link active ml-2 mb-2 dp-background-color--hero" id="viral-sequences"
href="#viral-sequences-content" data-bs-toggle="tab" role="tab"
aria-controls="viral-sequences-content" aria-selected="true">
<h6 class="m-0">Viral Sequences</h6>
</a>
<a class="nav-item nav-link ml-2 mb-2 dp-background-color--hero" id="host-sequences"
href="#host-sequences-content" data-bs-toggle="tab" role="tab"
aria-controls="host-sequences-content" aria-selected="false">
<h6 class="m-0">Host Sequences</h6>
</a>
<a class="nav-item nav-link ml-2 mb-2 dp-background-color--hero" id="genomic-resources"
href="#genomic-resources-content" data-bs-toggle="tab" role="tab"
aria-controls="genomic-resources-content" aria-selected="false">
<h6 class="m-0">Genomic resources</h6>
</a>
</nav>
<div class="tab-content mt-5">
<div class="tab-pane fade active show" id="viral-sequences-content" role="tabpanel" aria-labelledby="viral-sequences-tab">
<article>
{{ partial "genomics/viral-sequences-table.html" . }}
</article>
</div>
<div class="tab-pane fade" id="host-sequences-content" role="tabpanel" aria-labelledby="host-sequences-tab">
<article>
<div style="text-align:center"><img src="/images/banners/coming-soon-banner.png" style="margin-top: 2rem;" width="200"></div>
</article>
</div>
<div class="tab-pane fade" id="genomic-resources-content" role="tabpanel" aria-labelledby="genomic-resources-tab">
<article>
<div style="text-align:center"><img src="/images/banners/coming-soon-banner.png" style="margin-top: 2rem;" width="200"></div>
</article>
</div>
</div>
</div>
{{ end }}
\ No newline at end of file
<script>
$(function () {
$('.nav-pills a').on('click', function (e) {
e.preventDefault()
$(this).tab('show')
})
})
</script>
{{ end }}
<table class="table table-hover table-sm table-responsive" id="viral-sequences-table" style="display: table;">
<thead class="thead-light">
<tr>
<th scope="col">{{ i18n "accession_id" }}</th>
<th scope="col">{{ i18n "collection_date" }}</th>
<th scope="col">{{ i18n "country" }}</th>
<th scope="col">{{ i18n "host" }}</th>
<th scope="col">{{ i18n "isolate" }}</th>
<th scope="col">{{ i18n "molecule_type" }}</th>
<th scope="col">{{ i18n "taxon" }}</th>
</tr>
</thead>
<tbody>
{{ range $index, $entry := $.Site.Data.c19pes_viral_sequences.viral_sequences }}
<tr>
<td><a target="_blank" href='{{print "https://www.ebi.ac.uk/ena/browser/view/" .accession_id}}'>{{ .accession_id }}</a></td>
<td>{{ .collection_date }}</td>
<td>{{ .country }}</td>
<td>{{ .host }}</td>
<td>{{ .isolate }}</td>
<td>{{ .molecule_type }}</td>
<td>{{ .taxon }}</td>
</tr>
{{ end }}
</tbody>
</table>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.js"></script>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.22/js/dataTables.bootstrap4.min.js"></script>
<script>
$(document).ready(() => {
const covicatTable = $('#viral-sequences-table').DataTable({
dom: `
<".container-fluid"
<".row"
<".mr-auto"i>
<"#search-2.mr-2"f>
>
<".row"t>
<".row"
<".mr-auto"l>
<".ml-auto"p>
>
>
`,
ordering: false,
});
// Move download button next to filter search box.
const downloadButtonCovicat = document.querySelector('#download-button-2');
const searchCovicat = document.querySelector('#search-2');
searchCovicat.insertAdjacentElement('afterend', downloadButtonViralSequences);
});
</script>
<div class="embed widget">
<iframe class="nextstrain-widget" type="text/html" allowfullscreen frameborder="0"
src="http://nextstrain.clinbioinfosspa.es/andalucia-SARS-COV-2?d=tree&l=clock&p=full" >
</iframe>
</div>
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