Skip to content

Instantly share code, notes, and snippets.

View kevinrue's full-sized avatar
:octocat:
Computational biology, software development, and R package development

Kevin Rue-Albrecht kevinrue

:octocat:
Computational biology, software development, and R package development
View GitHub Profile
@kevinrue
kevinrue / Seurat_PBMC3k_TENxPBMCData_tutorial.Rmd
Created November 27, 2018 21:51
Seurat - Guided Clustering Tutorial
---
title: "Seurat PBMC 3k tutorial using TENxPBMCData"
author: "Kevin Rue-Albrecht"
date: "27/11/2018"
output: html_document
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}
@kevinrue
kevinrue / Seurat_PBMC3k_tutorial.R
Created November 25, 2018 18:21
Seurat - Guided Clustering Tutorial
# Adapted from https://satijalab.org/seurat/pbmc3k_tutorial.html on 2018-11-24
timestamp()
message("Started")
library(BiocFileCache)
library(Seurat)
library(dplyr)
@kevinrue
kevinrue / Seurat_PBMC3k_proportion_signatures_per_cluster.Rmd
Created November 25, 2018 17:22
Use the signatures declared in the Seurat tutorial to identify the proportion of each cluster positive for each signature.
---
title: "Proportion of cells matching signatures"
author: "Kevin Rue-Albrecht"
date: "25/11/2018"
output: html_document
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}
@kevinrue
kevinrue / parse_R_dependencies.R
Created October 22, 2018 08:21
Identify the unique list of R packages loaded by "library" or "require" statements
# The following command:
# - Parses (recursively) all files within the "R/" folder (Change as relevant).
# - Identifies all lines that include the statements "require(" or "library(".
# - Trims everything before and including "require(" or "library(", and everything after the next ")", leaving only the package name.
# - Identifies the unique list of packages loaded in those ways.
grep -Rn '.*\(require\|library\)(.*' R/* | sed 's/.*\(require\|library\)(\(.*\)).*/\2/g' | sort | uniq
@kevinrue
kevinrue / newRscript.R
Last active March 26, 2019 14:39
Template for Rscript
# Introduction -----
timestamp()
message("Started")
# Packages ----
stopifnot(suppressPackageStartupMessages({
require(optparse)