- Install jags: in the terminal using homebrew
brew install jags
- Install rjags: in R
install.packages("rjags")
library(rjags)
# install.packages(c("Matrix", "rhdf5", "tidyverse")) | |
library(Matrix) | |
library(rhdf5) | |
library(tidyverse) | |
library(glue) | |
my_h5_files <- Sys.glob( | |
"path/to/cellranger-per-channel/output/*/filtered_feature_bc_matrix.h5" | |
) |
# Easy extraction for a number of archive formats | |
extract () { | |
if [ -f $1 ] ; then | |
case $1 in | |
*.tar.bz2) tar xvjf $1 ;; | |
*.tar.gz) tar xvzf $1 ;; | |
*.bz2) bunzip2 $1 ;; | |
*.rar) unrar x $1 ;; | |
*.gz) gunzip $1 ;; | |
*.tar) tar xvf $1 ;; |
#!/usr/bin/env bash | |
# pdfoptim.sh | |
# | |
# Optimize a PDF with Ghostscript | |
# | |
# Usage: bash pdfoptim.sh FILE.pdf | |
# | |
# This will copy the input file to FILE-original.pdf | |
# And write an optimized file to FILE.pdf | |
# |
'use strict'; | |
(function(exports) { | |
var rank = { | |
/* | |
* Standart ranking | |
* | |
* The MIT License, Copyright (c) 2014 Ben Magyar | |
*/ |
#!/usr/bin/env bash | |
# make_aspera_manifest.sh | |
# Kamil Slowikowski | |
# | |
# Make a manifest file suitable for Aspera. | |
# | |
# Example | |
# ------- | |
# | |
# Suppose we wish to send a folder full of files called "data". We want |
brew install jags
install.packages("rjags")
library(rjags)
# ipak function: install and load multiple R packages. | |
# check to see if packages are installed. Install them if they are not, then load them into the R session. | |
ipak <- function(pkg){ | |
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])] | |
if (length(new.pkg)) | |
install.packages(new.pkg, dependencies = TRUE) | |
sapply(pkg, require, character.only = TRUE) | |
} |
// http://phrogz.net/SVG/convert_path_to_polygon.xhtml | |
function pathToPolygon(path,samples){ | |
if (!samples) samples = 0; | |
var doc = path.ownerDocument; | |
var poly = doc.createElementNS('http://www.w3.org/2000/svg','polygon'); | |
// Put all path segments in a queue | |
for (var segs=[],s=path.pathSegList,i=s.numberOfItems-1;i>=0;--i) segs[i] = s.getItem(i); | |
var segments = segs.concat(); |