Skip to content

Instantly share code, notes, and snippets.

View mg14's full-sized avatar

Moritz Gerstung mg14

View GitHub Profile
@mg14
mg14 / MutationTime.R
Last active May 22, 2020 09:21
[This has been migrated to https://github.com/gerstung-lab/MutationTime.R] Calculation of mutation copy numbers and timing parameters
#' # Calculation of mutation copy numbers and timing parameters
#' Minimal example
#' source("/Users/mg14/Projects/PCAWG-11/code/MutationTime.R")
#' vcf <- readVcf("final/final_consensus_12oct_passonly/snv_mnv/0040b1b6-b07a-4b6e-90ef-133523eaf412.consensus.20160830.somatic.snv_mnv.vcf.gz",genome="GRCh37")
#' bb <- loadBB("dp/20161213_vanloo_wedge_consSNV_prelimConsCNAallStar/4_copynumber/0040b1b6-b07a-4b6e-90ef-133523eaf412_segments.txt.gz")
#' clusters = read.table("dp/20161213_vanloo_wedge_consSNV_prelimConsCNAallStar/2_subclones/0040b1b6-b07a-4b6e-90ef-133523eaf412_subclonal_structure.txt.gz", header=TRUE, sep="\t")
#' purityPloidy <- read.table("dp/20161213_vanloo_wedge_consSNV_prelimConsCNAallStar/1_purity_ploidy/purity_ploidy.txt, header=TRUE, sep="\t")
#' purity <- purityPloidy[2,2]
#' MCN <- computeMutCn(vcf[1:1000], bb, clusters, purity)
#' # Check output
@mg14
mg14 / ncomms6901-s3.R
Last active May 19, 2018 06:08
Supplementary code and figures accompanying Combining gene mutation with gene expression data improves outcome prediction in myelodysplastic syndromes doi:10.1038/ncomms6901
#' Supplementary Data 2
#' =======================
#' ### Supplementary code and figures accompanying *Interconnections among mutations, gene expression, clinical variables and patient outcome in myelodysplastic syndromes*
#'
#' This document contains the complete code used in the analysis. It is purely written in `R` using a series of `R` and `Bioconductor` packages.
#' This report has been generated using the `knitr` R package (http://yihui.name/knitr/).
#' For a complete list of packages and their versions please have a look at the end of this document.
#+ options, echo=FALSE, eval=TRUE
options(width=120)