Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • R3/school/courses
  • vilem.ded/courses
  • todor.kondic/courses
  • noua.toukourou/courses
  • nene.barry/courses
  • laurent.heirendt/courses
  • marina.popleteeva/courses
  • jenny.tran/courses
8 results
Show changes
Commits on Source (515)
Showing
with 608 additions and 50 deletions
<div id="lap-cookies-banner" class="presentation-banner">
<div class="banner-intro">
<div class="close-button">
<a class="lap-refuse">
<i class="fa fa-times" aria-hidden="true"></i>
</a>
</div>
<div class="banner-img">
<img src="https://analytics.lcsb.uni.lu/lap/static/logos/r3-logo.svg" type="image/svg+xml"/>
</div>
<div class="banner-title">This website needs some cookies and similar means to function.</div>
<div class="banner-text">If you permit us, we will use those means to collect data on your visits for aggregated
statistics to improve our service.
</div>
</div>
<div class="banner-buttons">
<a class="btn lap-accept">Accept cookies for aggregated statistics</a>
<a class="btn lap-refuse">No thanks, only technically necessary cookies</a>
<a class="btn lap-cookies-more" href="https://courses.lcsb.uni.lu/privacy-policy">More information</a>
</div>
</div>
\ No newline at end of file
<script>
const settings = {
expires: "180",
matomoURL: "https://analytics.lcsb.uni.lu/hub/",
siteID: "8", //you get this siteID by sending an email to lcsb-r3@uni.lu
accept_all_text: "Aggregate statistics cookies accepted",
only_necessary_text: "Only necessary cookies accepted",
doNotTrack_text: "Do Not Track is enabled",
cookieName: "lap",
bots: /bot|crawler|spider|crawling/i,
timeout_hidebanner: "500",
cookieDomain: "courses.lcsb.uni.lu"
};
</script>
<script src="https://analytics.lcsb.uni.lu/lap/static/js/jquery.min.js"></script>
<script src="https://analytics.lcsb.uni.lu/lap/static/js/lap.js"></script>
<link rel="stylesheet" type="text/css" href="https://analytics.lcsb.uni.lu/lap/static/css/lap.css" />
<div class="bottomPrivacy">
<a href="https://courses.lcsb.uni.lu/privacy-policy">Privacy Policy</a>
(<span id="doNotTrack-text"><span id="gdpr-result-text"></span> - <a href="javascript: showBanner();">change</a></span>)
</div>
\ No newline at end of file
#!/bin/bash
PAGEURL="https://r3.pages.uni.lu/school/courses"
PAGEURL="https://courses.lcsb.uni.lu"
rootDir=$(pwd)
echo $rootDir
# clean previous builds
rm -rf $rootDir/public
rm -rf $rootDir/theme
mkdir $rootDir/public
if [[ $CI_COMMIT_REF_NAME == "develop" ]]; then
version="latest";
elif [[ $CI_COMMIT_REF_NAME == "master" ]]; then
version="stable";
else
version="unstable";
fi
# build the unstable version - can be optimized
git submodule update --init --recursive
# add matomo
sed -i "/matomohead/r./.ci/analytics/head.html" theme/templates/_index.html
sed -i "/matomopolicy/r./.ci/analytics/policy.html" theme/templates/_index.html
sed -i "/matomobanner/r./.ci/analytics/gdpr-banner.html" theme/templates/_index.html
echo " > LAP included"
# loop through all the presentations
nBlades=0
for d in $(find . -maxdepth 1 -type d)
do
if [[ "${d}" == *20* ]]; then
cd "${d}"
pushd "${d}"
echo "changed to ${d}"
for d1 in $(find . -maxdepth 1 -type d)
do
if [[ ${#d1} -ge 2 ]]; then
let "nBlades+=1"
#blades[$nBlades]="$tutorial"
BLADE=${d1:2}
echo " > -----------------------------------------------------"
echo "Building ... ${d1}"
# create the required folders in public
mkdir $rootDir/public/$BLADE
mkdir $rootDir/public/$BLADE/unstable
mkdir $rootDir/public/$BLADE/latest
mkdir $rootDir/public/$BLADE/stable
# change to the blade directory to be built
cd $BLADE
mkdir -p $rootDir/public/$BLADE/$version
# build the unstable version - can be optimized
git config submodule.theme.url https://$CI_DEPLOY_USER:$CI_DEPLOY_PASSWORD@git-r3lab.uni.lu/R3-core/outreach/theme.git
git submodule update --recursive --init
echo "going to $BLADE..."
pushd $BLADE
# run contribute
cp ../../template/Gruntfile.coffee .
ln -s ../../theme/package.json package.json
ln -s ../../theme theme
cp -v ../../template/Gruntfile.coffee .
ln -sv ../../theme/package.json package.json
ln -sv ../../theme theme
# install npm
#npm install -g npm@latest yo grunt-cli generator-reveal
#npm install
yarn global add grunt-cli generator-reveal
echo "installing deps"
yarn add grunt-cli generator-reveal grunt
yarn install
grunt dist
mv public/* $rootDir/public/$BLADE/unstable/.
echo " > unstable built for file set ${BLADE}"
# build the master version into stable
git fetch --tags
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)
git stash
git checkout $latestTag
git submodule update --init
grunt dist
mv public/* $rootDir/public/$BLADE/stable/.
echo " > stable built for file set ${BLADE}"
# build the develop version into latest
git stash
git checkout -f develop
git fetch origin develop
git reset --hard origin/develop
git submodule update --init
grunt dist
mv public/* $rootDir/public/$BLADE/latest/.
echo "running dist"
yarn exec grunt dist
echo "copying to common public dir"
cp -rLv public/* $rootDir/public/$BLADE/$version/.
echo " > latest built for file set ${BLADE}"
# auto redirect file to the stable version
......@@ -85,9 +78,10 @@ do
echo "autoredirect file set"
# move back out
cd ..
popd
echo " > -----------------------------------------------------"
fi
done
popd
fi
done
import os, re
from os import path
def build_link(title, href):
return f'- <a href="{href}">{title}</a>\n'
def build_section_start(title):
return f'\n' #<h3>{title}</h3>\n
def build_section_end():
return "" #\t\t</ul>\n\t</div>
def camel_to_snake(name):
name = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', name).lower()
# loop through the entire internal tree
localroot = os.getcwd()
# generate the index properly speaking
cardDirs = ["2023", "2022", "2021", "2020", "2019"]
index=''
# determine first the directories
for direct in cardDirs:
if path.isdir(direct):
dirs = os.listdir(direct)
dirs.sort(reverse=True);
index += "\n# " + direct + "\n\n"
for d in dirs:
if d[0] != ".":
href = 'https://courses.lcsb.uni.lu/'+d
linkText = camel_to_snake(d)
linkText = linkText.replace("_", " ")
linkText = linkText.title()
# special rules
linkText = linkText.replace("Dm", "Data Management")
linkText = linkText.replace("It", "IT")
linkText = linkText.replace("Siu", "SIU")
index += build_link(linkText, href)
# output the index
print(index)
# Read in the file
repoName = "courses.lcsb.uni.lu"
os.chdir(repoName)
indexFile = "index.md"
filedata = ""
with open(indexFile, 'r') as file :
for line in file:
filedata += line
# stop reading once the index place holder has been reached
if re.search("<!-- index -->", line):
filedata += "[[ index ]]"
break
# Replace the target string
filedata = filedata.replace('[[ index ]]', index)
# Write the file out again
with open(indexFile, 'w') as file:
file.write(filedata)
print("\n > New index generated and saved in " + indexFile)
os.chdir("..")
*.ai
site/
courses.lcsb.uni.lu
index.html
package-lock.json
dist/
......@@ -20,3 +23,4 @@ package.json
./theme/package.json
__pycache__/
contribute.egg-info/
.*.swp
image: digitallyseamless/nodejs-bower-grunt
stages:
- retrieve
- generate
- build
- deploy
pages:
stage: deploy
retrieve:repo:
image:
name: alpine/git:latest
entrypoint: [""]
stage: retrieve
script:
- bash .ci/deploy.sh
- git clone https://$CI_DEPLOY_TOKEN:$CI_DEPLOY_PASSWORD@git-r3lab.uni.lu/R3/school/courses.lcsb.uni.lu.git
artifacts:
expire_in: 1 day
paths:
- courses.lcsb.uni.lu
rules:
- if: $CI_COMMIT_BRANCH == "develop"
- if: $CI_COMMIT_BRANCH == "master"
generate:index:
image: python
stage: generate
rules:
- if: $CI_COMMIT_BRANCH == "develop"
- if: $CI_COMMIT_BRANCH == "master"
script:
- python .ci/generateIndex.py
artifacts:
expire_in: 1 day
paths:
- courses.lcsb.uni.lu
build:website:
image: git-r3lab.uni.lu:4567/r3/docker/jekyll-lcsb
stage: build
rules:
- if: $CI_COMMIT_BRANCH == "develop"
- if: $CI_COMMIT_BRANCH == "master"
before_script:
- cd courses.lcsb.uni.lu
- gem install bundler -v2.0.2
- bundle install && bundle update jekyll-theme-lcsb-default && bundle update jekyll-theme-lcsb-frozen-components
- cd ..
script:
- cd courses.lcsb.uni.lu
- bundle exec jekyll build -d site --config "_config.yml"
- mv site ../.
- cd ..
artifacts:
expire_in: 1 week
expire_in: 1 day
paths:
- site
variables:
JEKYLL_ENV: production
build:courses:
image: node:19-bullseye
stage: build
rules:
- if: $CI_COMMIT_BRANCH == "develop"
- if: $CI_COMMIT_BRANCH == "master"
script:
- bash .ci/deploy.sh
artifacts:
expire_in: 1 day
paths:
- public
upload:
stage: deploy
image: alpine
before_script:
- apk add rsync
- 'which ssh-agent || ( apk add --update openssh )'
- eval $(ssh-agent -s)
- echo "$B64SSHPRIVKEY" | base64 -d | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
- 'echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- echo "$KNOWNHOSTS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
rules:
- if: $CI_COMMIT_BRANCH == "develop"
- if: $CI_COMMIT_BRANCH == "master"
script:
- rsync -ravu --info=progress2 -e "ssh -p $SSHPORT" site/* $SSHCONNECT:~/web/latest
- rsync -ravu --info=progress2 -e "ssh -p $SSHPORT" public/* $SSHCONNECT:~/web/latest
[submodule "theme"]
path = theme
url = https://git-r3lab.uni.lu/R3/outreach/theme.git
url = https://gitlab.lcsb.uni.lu/R3/outreach/theme.git
......@@ -71,7 +71,7 @@ shall **be avoided**!
# How to update my fork?
As you have your own fork, it will not automatically update once the original repository is update.
As you have your own fork, it will not automatically be updated once the original repository is updated.
![bulb](slides/img/bulb.png) You have to update it yourself!
......
......@@ -38,5 +38,5 @@
Contact us if you need help:
r3lab.core@uni.lu
lcsb-r3@uni.lu
# Code versioning
<div style="position:absolute; width:40%">
**git**
* Current standard for code versioning
* Maintain versions of your code as it develops
* Local system, which does not require an online repository
* Repositories allow distributed development
<img align="middle" height="300px" src="slides/img/Git-logo.png">
</div>
<div class="fragment" style="position:absolute; left:50%; width:40%"">
**git@lcsb**
* Recommended, supported repository
* Allows tracking of issues
* Ready for continous integration - code checked on commits to the repository.
* [https://git-r3lab.uni.lu](https://git-r3lab.uni.lu)
**Use at LCSB**
* All analyses code should be in a repository
* Minimally at submission of a manuscript
* Better daily
* Even better "analyses chunkwise"
</div>
<aside class="notes">
Policy! - code in central repository
</aside>
# Data housekeeping
## File names
<div style="display:flex; position:static; width:100%">
<div class="fragment" data-fragment-index="0" style="position:static; width:30%">
### General pricinples
* Machine readable
* Human readable
* Plays well with default ordering
</div>
<div class="fragment" data-fragment-index="1" style="position:absolute; left:33%; width:30%">
### Separators
* No spaces
* Underscore to separate
* Hyphen to combine
</div>
<div class="fragment" data-fragment-index="2" style="position:absolute; left:66%; width:30%">
### Date format follows **ISO 8601**<br>
2018-12-03<br>
2018-12-06_1700
</div>
</div>
<div class="fragment" data-fragment-index="3" style="width:100%; position:static">
<div style="position:absolute;width:40%">
<b>Bad</b> names
```
PhD-project-Jan19 alldata_final.foo
Finacial detailes BIocore 19/11/12.xls
ATACseq1Londonmapped.bam
```
</div>
<div style="position:relative;width:40%; bottom:20%; left:50%">
<b>Good</b> names
```
Iris-setosa_samples_1927-05-12.csv
PI102_Mouse12_EEG_2018-11-03_1245.tsv
Bioinfiniti_FullProposal_2018-11-15_1655.do
```
</div>
</div>
<div class="fragment" data-fragment-index="3" style="width:100%; position:static">
From Jenny Bryan by CC-BY
(https://speakerdeck.com/jennybc/how-to-name-files)
</div>
# Data housekeeping
## File organization
* Have folder organization conventions for your **group**
* Per Paper
* Per Study/Project
* Per Collaborator
* Keep <b>readme files</b> for data
* Title
* Date of Creation/Receipt
* Instrument or software specific information
* People involved
* Relations between multiple files/folders
* Orient newcomers to the group's conventions
# Data housekeeping
<div style="position:absolute">
## When working
* Clarify and separate source and intermediate data
* keep data copies to a **minimum**
* Cleanup post-analysis
* Cleanup copies created for presentations or for sharing
* Handover data to a new responsible when leaving
</div>
<div style="position:relative;left:50%; width:40%">
<img src="slides/img/cleaning-table.jpg" height="450px">
</div>
# Data housekeeping
## End of project
* data should be kept as a single copy on server-side storage
* non-proprietary formats
* minimal metadata:
* source
* context of generation
* data structure
* content
* sensitive data (e.g. whole genome) **must** be encrypted
* remove all other copies from desktops and external devices
* If not specified otherwise, data must be kept for **10 years** following project end for reproducibility purposes
<aside class="notes">
Note: sometimes it is hard to find/understand dataset 10 days old
</aside>
## In doubt on data archival?
Contact R<sup>3</sup> for support on archival of datasets using tickets:
* https://service.uni.lu/sp
* Home > Catalog > LCSB > Biocore: Application services > Request for: Support
# Data housekeeping - Summary
* Use institutional media for storage of **all** data
* Research data (particularly sensitive data) should be in a single source location
* Enable encryption for data stored on movable media
* Clarify and separate source and intermediate data
* Disable write access to relevant source data (read-only)
* Backup research data!
* Download Anti-virus software
* Generate checksums
<div class="fragment">
## Server is your friend!
</div>
# Data and metadata
<div style="display:grid;grid-gap:100px;grid-template-columns: 40% 40%">
<div >
## Data
* "*information in digital form that can be transmitted or processed*"
<p align="right">-- Merriam-Webster dictionary</p>
* "*information in an electronic form that can be stored and processed by a computer*"
<p align="right">--Cambridge dictionary</p>
</div>
<div>
## Metadata
* data describing other data
* information that is given to describe or help you use other information
* metadata are data
* can be processed and analyzed
</div>
</div>
<div class="fragment">
## Metadata examples:
<div style="position:absolute">
<ul>
<li> LabBook </li>
<li> author/owner of the data</li>
<li> origin of the data
<li> data type
</ul>
</div>
<div style="position:absolute;left:25%">
<ul>
<li> description of content </li>
<li> modification date </li>
<li> description of modification </li>
<li> location </li>
</ul>
</div>
<div style="position:relative;left:50%;top:0.7em">
<ul>
<li> calibration readings</li>
<li> software/firmware version</li>
<li> data purpose</li>
<li> means of creation</li>
</ul>
</div>
</div>
<div class="fragment">
<br>
</center>
<center style="color:red">!Insufficient metadata make the data useless!</center>
</div>
<aside class="notes">
Sometimes metadata collection takes more time than data collection
</aside>
# LCSB research data
three categories:
* **Primary data**
* scientific data
* measurements, images, observations, notes, surveys, ...
* models, software codes, libraries, ...
* metadata directly describing the data
* data dictionaries
* format, version, coverage descriptions, ...
* **Research record**
* description of the research process, including experiment
* experiment set-up
* followed protocols
* ...
* **Project accompanying documentation**
* ethical approvals, information on the consent)
* collaboration agreements
* intellectual property ownership
* other relevant documentation
# Typical flow of data
<div style="display:grid;grid-gap:10px;grid-template-columns: 30% 20% 30%;
grid-auto-flow:column;grid-template-rows: repeat(4,auto);position:relative;left:8%">
<div class="content-box fragment" data-fragment-index="1">
<div class="box-title red">Source data</div>
<div class="content">
* Experimental results
* Large data sets
* Manually collected data
* External
</div>
</div>
<div class="content-box fragment" data-fragment-index="2">
<div class="box-title yellow">Intermediate</div>
<div class="content">
* Derived data
* Tidy data
* Curated sets
</div>
</div>
<div class="content-box fragment" data-fragment-index="3">
<div class="box-title blue">Analyses</div>
<div class="content">
* Exploratory
* Model building
* Hypothesis testing
</div>
</div>
<div class="content-box fragment" data-fragment-index="4">
<div class="box-title green">Dissemination</div>
<div class="content">
* Manuscript, report, presentation, ...
</div>
</div>
<center>
<img src="slides/img/data-flow_sources.png" height=60%>
</center>
<center>
<img src="slides/img/data-flow_transformation.png" height=60%>
</center>
<center>
<img src="slides/img/data-flow_chart.png" height=60%>
</center>
<center>
<img src="slides/img/data-flow_paper.png" height=60%>
</center>
<div class="content-box fragment" data-fragment-index="5">
<div class="box-title red">Preserve</div>
<div class="content">
* Version data sets
* Backup
* Protect
</div>
</div>
<div class="content-box fragment" data-fragment-index="6">
<div class="box-title yellow">Reproduce</div>
<div class="content">
* Automate your builds
* Use workflow tools (e.g. Snakemake)
</div>
</div>
<div class="content-box fragment" data-fragment-index="7">
<div class="box-title blue">Trace</div>
<div class="content">
* Multiple iterations.
* Code versioning (Git)
</div>
</div>
<div class="content-box fragment" data-fragment-index="8">
<div class="box-title green">Track</div>
<div class="content">
* Through multiple versions
</div>
</div>
</div>
<aside class="notes">
flow of the data is downstream (mostly), but you are going back and forth
applies to all data (financial report, lab safety assessment)
</aside>
# FAIR (meta)data principles
* dates back to 2014
* well accepted by scientific community
* necessity in data driven science
* officially embraced by EU and G20
* required by funding agencies and journal publishers
<center>
<img src="slides/img/fair-principles.png" height="400px">
</center>
<br>
<br>
# LCSB How-Tos
<br>
https://howto.lcsb.uni.lu/
<center>
<img src="slides/img/howtocard.png" width="50%" style="border: 1px solid #555;">
</center>
2019/2019-08-22_IT101-DM/slides/img/3pillars-full.png

131 KiB

2019/2019-08-22_IT101-DM/slides/img/DinoSequentialSmaller.gif

4.34 MiB

2019/2019-08-22_IT101-DM/slides/img/Git-logo.png

5.55 KiB

2019/2019-08-22_IT101-DM/slides/img/LCSB_storages_backed-up.png

139 KiB