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 / bioc-gitbook.css
Created July 8, 2020 08:26
CSS style sheet for Bioconductor GitBook
p.caption {
color: #777;
margin-top: 10px;
}
p code {
white-space: inherit;
}
pre {
word-break: normal;
word-wrap: normal;
@kevinrue
kevinrue / snakemake_alevin_10x-renv-20200706.error
Created July 6, 2020 15:15
Error log for snakemake_alevin_10x using `renv`
* Restoring project ...
The following package(s) will be updated:
# Bioconductor =======================
- Biobase [* -> 2.48.0]
- BiocGenerics [* -> 0.34.0]
- BiocParallel [* -> 1.22.0]
- BiocVersion [* -> 3.11.1]
- Biostrings [* -> 2.56.0]
- DelayedArray [* -> 0.14.0]
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build_check_deploy:
runs-on: ubuntu-latest
@kevinrue
kevinrue / iSEE_launcher.R
Created February 2, 2020 08:56 — forked from LTLA/iSEE_launcher.R
iSEE launching from link
############# The usual ################
library(scRNAseq)
# Example data ----
sce <- ReprocessedAllenData(assays="tophat_counts")
class(sce)
library(scater)
sce <- logNormCounts(sce, exprs_values="tophat_counts")
@kevinrue
kevinrue / panel_RedDimHexbinPlot.R
Created December 9, 2019 15:51
Proof of concept for creating new panel types in iSEE 2.0
setClass("RedDimHexbinPlot", contains="RedDimPlot")
#' The reduced dimension hexbin plot panel
#'
#' Plots reduced dimensions summarizing points into hexagon bins.
#'
#' @section Constructor:
#' \code{RedDimHexbinPlot()} creates an instance of a RedDimHexbinPlot class.
#'
#' @author Kevin Rue
@kevinrue
kevinrue / cloneRepo.R
Last active July 3, 2019 18:58
A function to clone the content of an R package (perhaps other repositories too)
cloneRepo <- function(from, to) {
repoFiles <- list.files(cloneSourceFolder, all.files = TRUE, include.dirs = TRUE)
repoFiles <- setdiff(repoFiles, c(".", "..", ".git"))
dir.create(to, recursive = TRUE)
for (rootFile in repoFiles) {
message(rootFile)
file.copy(
from = file.path(from, rootFile),
to = file.path(to),
recursive = TRUE, overwrite = TRUE)
@kevinrue
kevinrue / blogdown_kevinrue.sh
Created June 27, 2019 03:36
Script to automatically build and deploy my Blogdown website
#!/bin/bash
original_path=$(pwd)
source_path="/Users/kevin/git/kevinrue.github.io-academic"
site_path="/Users/kevin/git/kevinrue.github.io"
echo_eval () {
echo "> $1"
eval "$1"
@kevinrue
kevinrue / iSEE-xaxis-reddim.R
Last active May 24, 2019 09:59
Example apps to demonstrate the use of a reduced dimension on the x-axis of colDataPlot and featAssayPlot
library(scRNAseq)
data(allen)
class(allen)
# Example data ----
library(scater)
sce <- as(allen, "SingleCellExperiment")
counts(sce) <- assay(sce, "tophat_counts")
sce <- normalize(sce)
@kevinrue
kevinrue / clonePackageSource.R
Created February 22, 2019 11:05
Clone the content of an R package
clonePackageSource <- function(from, to, ignore=c(".git")) {
unisetRootFiles <- list.files(cloneSourceFolder, all.files = TRUE, include.dirs = TRUE)
unisetRootFiles <- setdiff(unisetRootFiles, c(".", "..", ".git"))
dir.create(cloneDestinationFolder, recursive = TRUE)
for (rootFile in unisetRootFiles) {
message(rootFile)
file.copy(
from = file.path(cloneSourceFolder, rootFile),
to = file.path(cloneDestinationFolder),
recursive = TRUE, overwrite = TRUE)
@kevinrue
kevinrue / Seurat_PBMC3k_proportion_signature.Rmd
Created November 27, 2018 21:58
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: "24/11/2018"
output: html_document
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}