Skip to content

Commit

Permalink
Merge pull request #18 from ScilifelabDataCentre/develop
Browse files Browse the repository at this point in the history
New collection added
  • Loading branch information
senthil10 authored May 10, 2023
2 parents f7bb86c + e990cb3 commit c164552
Show file tree
Hide file tree
Showing 16 changed files with 339 additions and 144 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/dockerhub-develop.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/dockerhub-main.yml

This file was deleted.

75 changes: 75 additions & 0 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
# Build and publish docker image(s)
# Publishing to Dockerhub requires a username and token
# as the secrets DOCKERHUB_USERNAME and DOCKERHUB_TOKEN
# remember to change repo-name and set dockerfile(s)/image name(s) in the matrix

name: Publish Docker image
on:
# generate image whenever there is a push to the listed branches
push:
branches:
- main
- develop
# generate images for releases, using the tag name
# the newest one will be latest as well
release:
types: [published]
jobs:
push_to_registry:
# only generate images when in the named repo
# (to avoid running the action in forks)
if: github.repository == 'ScilifelabDataCentre/covid-sample-collection-database'
name: Publish Docker Image
runs-on: ubuntu-latest
# Cancel earlier job if there is a new one for the same branch/release
concurrency:
group: ${{ github.ref }}-docker-build
cancel-in-progress: true
# Define the images/tags to build; will run in parallell
strategy:
matrix:
include:
- dockerfile: Dockerfiles/Dockerfile
images: |
docker.io/scilifelabdatacentre/covid-sample-collection-database
ghcr.io/scilifelabdatacentre/covid-sample-collection-database
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v3
# only needed when publishing to Dockerhub
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
# available in scilifelabdatacentre, ask admin for help
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# only needed when publishing to Github (ghcr.io)
- name: Log in to Github Container Repository
uses: docker/login-action@v2
with:
registry: ghcr.io
# will run as the user who triggered the action, using its token
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ matrix.images }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build and Publish
uses: docker/build-push-action@v3
with:
file: ${{ matrix.dockerfile }}
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
7 changes: 4 additions & 3 deletions Dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM klakegg/hugo:0.83.1-onbuild AS build
FROM klakegg/hugo:0.104.3-ubuntu-onbuild AS build

FROM nginx:1.21-alpine
COPY Dockerfiles/default.conf /etc/nginx/conf.d/default.conf
FROM nginxinc/nginx-unprivileged:alpine
COPY --from=build /target /usr/share/nginx/html

EXPOSE 8080
31 changes: 0 additions & 31 deletions Dockerfiles/default.conf

This file was deleted.

2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ languageCode: "en-us"
title: "The Swedish COVID-19 Sample Collection Database"
params:
title: "The Swedish COVID-19 Sample Collection Database"
description: "The Swedish COVID-19 Sample Collection Database, part of the COVID-19 Data Portal Sweden"
description: "The Swedish COVID-19 Sample Collection Database, part of the Swedish COVID-19 and Pandemic Preparedness Portal"
markup:
goldmark:
renderer:
Expand Down
38 changes: 38 additions & 0 deletions content/collections/NAT/1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
id: c19dp:collection:SE_NAT_1
biobank: c19dp:biobank:SE_NAT
name: National sample collection stored at National Pandemic Center (NPC)
acronym:
parent_collection:
local_id: N/A
bbmri_id:
country: SE
description: Personnel within Sweden's regions have worked intensively with both sample collection and handling of COVID-19-related samples. A large amount of samples are thereafter sequenced at the National Pandemic Center (NPC), Karolinska Institutet (KI; Stockholm), which also results in an extensive sample collection stored at the NPC. The regions are legally responsible for "their" subset of the sample collection. In theory, the sample collection at NPC is an enormous resource for research.
website_url:
bioresource_reference:
ethics_id: N/A
sampling_startdate: 2020-03-01T11:00:00+0000
sampling_enddate:
storage_duration:
collection_type: [Hospital, Disease specific, Sample]
collection_category: "National sample collection"
data_categories: [Biological samples, Medical records]
order_of_magnitude: 6
timestamp: 2022-11-02T11:00:00+0000
biobank_label:
sub_collections:
diagnosis_available: []
order_of_magnitude_donors:
autopsy:
minors:
inclusion_criteria:
exclusion_criteria:
materials: [Nasal swab,Throat swab]
head_firstname:
head_lastname:
head_role:
display_collection_contact: FALSE
contact: c19dp:biobank:SE_NAT
publications_list:
contact_priority: 1
---
17 changes: 17 additions & 0 deletions content/collections/NAT/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
id: c19dp:biobank:SE_NAT
name: National sample collections
acronym: National sample collections
juridical_person: NA
country: SE
biobank_sverige: TRUE
ivo_regnum:
bbmri_id:
website_url: https://biobanksverige.se/kontakta-oss/biobankssamordnare-och-nej-talonger/
description:
address:
contact: c19dp:contact:SE_NAT
contact_priority: 1
collections:
email: [email protected]
---
72 changes: 50 additions & 22 deletions layouts/collections/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,21 @@ <h4>General information</h4>
<div class="col-auto pl-0 font-weight-bold">Ethical approval number:</div>
<div class="col pl-0">{{ .Params.ethics_id }}</div>
</div>
{{ if eq .Params.name "National sample collection stored at National Pandemic Center (NPC)" }}
{{ else }}
<div class="row ml-0 mt-3">
<h4>Donor information</h4>
</div>
</div> {{ end }}
{{ if .Params.diagnosis_available }}<div class="row ml-0">
<div class="col-auto pl-0 font-weight-bold">Diagnoses:</div>
<div class="col pl-0">
{{ range .Params.diagnosis_available}}
{{ if eq . "urn:miriam:icd:U07.1" }}
<span class="m-1 badge badge-primary">Laboratory-confirmed COVID-19 diagnosis; U07.1</span>
{{ end }}
{{ if eq . "urn:miriam:icd:U07.2" }}
<span class="m-1 badge badge-primary">Suspect or probable COVID-19 diagnosis; U07.2</span>
{{ end }}
{{ if eq . "urn:miriam:icd:U07.1" }}
<span class="m-1 badge badge-primary">Laboratory-confirmed COVID-19 diagnosis; U07.1</span>
{{ end }}
{{ if eq . "urn:miriam:icd:U07.2" }}
<span class="m-1 badge badge-primary">Suspect or probable COVID-19 diagnosis; U07.2</span>
{{ end }}
{{ end }}
</div>
</div>{{ end }}
Expand Down Expand Up @@ -154,31 +156,33 @@ <h4>Donor information</h4>
{{ $info_about_autopsy := string .Params.autopsy }}
{{ if $info_about_autopsy }}<div class="row ml-0">
<div class="col-auto pl-0 font-weight-bold">Samples from deceased (autopsy):</div>
<div class="col pl-0">{{ if eq $info_about_autopsy "true" }}yes{{ else if eq $info_about_autopsy "false" }}no{{ end }}</div>
<div class="col pl-0">
{{ if eq $info_about_autopsy "true" }}yes{{ else if eq $info_about_autopsy "false" }}no{{ end }}</div>
</div> {{ end }}
{{ $info_about_minors := string .Params.minors }}
{{ if $info_about_minors }}<div class="row ml-0">
<div class="col-auto pl-0 font-weight-bold">Samples from minors (&lt;18 years old):</div>
<div class="col pl-0">{{ if eq $info_about_minors "true" }}yes{{ else if eq $info_about_minors "false" }}no{{ end }}</div>
<div class="col pl-0">
{{ if eq $info_about_minors "true" }}yes{{ else if eq $info_about_minors "false" }}no{{ end }}</div>
</div> {{ end }}
{{ if .Params.inclusion_criteria }}<div class="row ml-0">
<div class="mb-3">
<b>Inclusion criteria:</b> {{ .Params.inclusion_criteria }}
</div>
</div>{{ end }}
</div>{{ end }}
{{ if .Params.exclusion_criteria }}<div class="row ml-0">
<div class="mb-3">
<b>Exclusion criteria:</b> {{ .Params.exclusion_criteria }}
</div>
</div>{{ end }}
</div>{{ end }}
<div class="row ml-0 mt-3">
<h4>Sample information</h4>
</div>
<div class="row ml-0">
<div class="col-auto pl-0 font-weight-bold">Materials:</div>
<div class="col pl-0">{{ range (.GetTerms "materials") }}
<span class="m-1 badge badge-danger taxonomy-term"><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></span>
{{ end }}
{{ end }}
</div>
</div>
</div>
Expand All @@ -188,17 +192,40 @@ <h4>Sample information</h4>
<div class="card-text">
{{ if .Params.display_collection_contact }}
<h5>Collection contact information</h5>
{{ if .Params.head_firstname }}<div class="row"><div class="col">Collection head: {{ .Params.head_firstname }} {{ .Params.head_lastname }} {{ if .Params.head_role }}({{ .Params.head_role }}){{ end }}</div></div>{{ end }}
<div class="row"><div class="col">Contact person: {{ .Params.collection_contact.first_name }} {{ .Params.collection_contact.last_name }}</div></div>
<div class="row"><div class="col"><i class="bi bi-envelope-fill mr-2"></i><span>{{ .Params.collection_contact.email }} </span></div></div>
{{ if .Params.website_url }}<div class="row"><div class="col"><i class="bi bi-globe mr-2"></i><a href="{{ .Params.website_url }}" target="_blank"><span>Collection homepage</span></a></div></div>{{ end }}
{{ if .Params.head_firstname }}<div class="row">
<div class="col">Collection head: {{ .Params.head_firstname }} {{ .Params.head_lastname }}
{{ if .Params.head_role }}({{ .Params.head_role }}){{ end }}</div>
</div>{{ end }}
<div class="row">
<div class="col">Contact person: {{ .Params.collection_contact.first_name }}
{{ .Params.collection_contact.last_name }}</div>
</div>
<div class="row">
<div class="col"><i class="bi bi-envelope-fill mr-2"></i><span>{{ .Params.collection_contact.email }}
</span></div>
</div>
{{ if .Params.website_url }}<div class="row">
<div class="col"><i class="bi bi-globe mr-2"></i><a href="{{ .Params.website_url }}"
target="_blank"><span>Collection homepage</span></a></div>
</div>{{ end }}
{{ end }}
<h5>Biobank contact information</h5>
<div class="row"><div class="col">{{ .Parent.Params.name }}</div></div>
{{ if .Parent.Params.ivo_regnum }}<div class="row"><div class="col">Registration number at IVO: {{ .Parent.Params.ivo_regnum }}</div></div>{{ end }}
{{ if .Parent.Params.email }}<div class="row"><div class="col"><i class="bi bi-envelope-fill mr-2"></i>{{ .Parent.Params.email }}</div></div>{{ end }}
{{ if .Parent.Params.website_url }}<div class="row"><div class="col"><i class="bi bi-globe mr-2"></i><a href="{{ .Parent.Params.website_url }}" target="_blank"><span>Biobank homepage</span></a></div></div>{{ end }}
<div class="row mt-2"><div class="col"><a href="{{ .Parent.RelPermalink }}" class=""><span>All collections of {{ .Parent.Params.name }}</span> <i class="bi bi-arrow-right-circle-fill"></i></a></div></div>
<div class="row">
<div class="col">{{ .Parent.Params.name }}</div>
</div>
{{ if .Parent.Params.ivo_regnum }}<div class="row">
<div class="col">Registration number at IVO: {{ .Parent.Params.ivo_regnum }}</div>
</div>{{ end }}
{{ if .Parent.Params.email }}<div class="row">
<div class="col"><i class="bi bi-envelope-fill mr-2"></i>{{ .Parent.Params.email }}</div>
</div>{{ end }}
{{ if .Parent.Params.website_url }}<div class="row">
<div class="col"><i class="bi bi-globe mr-2"></i><a href="{{ .Parent.Params.website_url }}"
target="_blank"><span>Biobank homepage</span></a></div>
</div>{{ end }}
<div class="row mt-2">
<div class="col"><a href="{{ .Parent.RelPermalink }}" class=""><span>All collections of
{{ .Parent.Params.name }}</span> <i class="bi bi-arrow-right-circle-fill"></i></a></div>
</div>
</div>
</div>
Expand All @@ -207,5 +234,6 @@ <h5>Biobank contact information</h5>
</div>
</div>
</div>
</div>

{{ end }}
{{ end }}
1 change: 1 addition & 0 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
<div id="collapseCollectionTypes" class="collapse" aria-labelledby="headingCollectionTypes">
<div class="card-body">
<div class="custom-control"><input type="checkbox" name="collectiontypes" class="form-check-input" value="Healthcare sample collection">Healthcare sample collection</div>
<div class="custom-control"><input type="checkbox" name="collectiontypes" class="form-check-input" value="National sample collection">National sample collection</div>
<div class="custom-control"><input type="checkbox" name="collectiontypes" class="form-check-input" value="Research sample collection">Research sample collection</div>
</div>
</div>
Expand Down
Loading

0 comments on commit c164552

Please sign in to comment.