Skip to content

Instantly share code, notes, and snippets.

View lovrot's full-sized avatar

John Lövrot lovrot

View GitHub Profile
@lovrot
lovrot / ki-box-on-ubuntu.md
Last active May 25, 2017 08:47
Mount KI Box cloud storage on Ubuntu 14.04

Mount KI Box cloud storage on Ubuntu 14.04

Authors: John Lövrot, Max Gordon

Background

KI Box uses the online file sharing and personal cloud content management service by Box.

@lovrot
lovrot / variable_naming_convention.tsv
Last active November 9, 2015 12:43
A variable naming convention for breast cancer study data
variableName labelDescription type RClass controlledTermsOrFormat reference comment
studyid Study Identifier Char character SDTM 2.2.4
siteid Study Site Identifier Char character
usubjid Unique Subject Identifier Char character SDTM 2.2.4
subjid Subject Identifier for the Study Char character
brthdtc Date of Birth - Character Char character ISO 8601 SDSIG 4.1.4.1
brthdtm Date of Birth Num Date R's Date class SDSIG 4.1.4.3
age Age at Reference Date Num integer SDSIG 5.1.1
ageu Age Units Char character decades, years, months, days SDSIG 5.1.1
agerfdt Reference Date for Age Char character ISO 8601, vaiable name, or free text (e.g. 'Diagnosis') 'rf' from CDISC naming fragments; 'dt' see SDSIG 4.1.4.2
@lovrot
lovrot / pie-chart-pyramid.R
Last active November 10, 2015 08:51
[Humour] Pie chart pyramid
## A paraphrase of http://flowingdata.com/2014/12/01/pie-chart-pyramid/
## See also https://github.com/lovrot/pie-chart-pyramid
library(ggplot2)
theme_set(theme_bw())
palette_part <- c(
"Sky"="deepskyblue3",
"Sunny side of pyramid"="yellow1",
"Shady side of pyramid"="yellow3")
@lovrot
lovrot / ggplot-billiard-ball-geom-w-aes-for-factors.R
Last active April 1, 2016 20:07
[ggplot2] Billiard ball "geom" with aestetics for factors - numbers in symbols
library(ggplot2)
ggplot2::theme_set(theme_classic())
## Create a dataframe with dummy data
set.seed(123)
n <- 20
n_categories <- 5
df <- data.frame(
x = 1:n + rnorm(n),
y = 1:n + rnorm(n),
@lovrot
lovrot / biostat-aspects.md
Last active September 27, 2019 06:29
[Biostatistics] Aspects

Biostatistical aspects

  • Biomarker: Predictive or Prognostic?
    • Ballman KV (2015). J Clin Oncol 33(33):3968-71. PMID 26392104
  • Judging new markers by their ability to improve predictive accuracy
    • Kattan MW (2003). J Natl Cancer Inst 95(9):634-5.
@lovrot
lovrot / cbioportal-metabric.R
Last active February 22, 2019 13:02
Retrive METABRIC data from cBioPortal
library(dplyr)
library(tidyr)
library(ggplot2)
library(cgdsr)
ggplot2::theme_set(theme_classic())
conn <- CGDS("http://www.cbioportal.org/")
test(conn)
@lovrot
lovrot / installation-macosx.md
Last active November 22, 2019 08:53
Installation on Mac OS X