Skip to content

Instantly share code, notes, and snippets.

channels:
- jfear
dependencies:
- sratoolkit==2.8.1
@jfear
jfear / Vagrantfile
Last active May 16, 2017 21:54
A vagrant file for building a VM for running isoseq v4.0 workflow.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# for issue at https://github.com/PacificBiosciences/Bioinformatics-Training/issues/15
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.network "forwarded_port", guest:8080, host:8080
config.vm.synced_folder "/Volumes/Promise_Pegasus/fearjm/pacbio_prelim", "/home/ubuntu/pacbio_prelim", :mount_options => ["dmode=755", "fmode=644"] config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "20048"]
@jfear
jfear / gist:746b9e9201230f8e50eb27abffee60f8
Created May 25, 2017 14:21 — forked from craigminihan/gist:b23c06afd9073ec32e0c
Build GCC 4.9.2 for C/C++ on CentOS 7
sudo yum install libmpc-devel mpfr-devel gmp-devel
cd ~/Downloads
curl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2 -O
tar xvfj gcc-4.9.2.tar.bz2
cd gcc-4.9.2
./configure --disable-multilib --enable-languages=c,c++
make -j 4
make install
# Copied from:
# https://raw.githubusercontent.com/thisisarray/GitHub-Issues-Process/master/set-github-labels.sh
echo ''
echo 'This script will remove the GitHub default labels and create the 80|20 process labels for your repo. A personal access token is required to access private repos.'
echo ''
echo -n 'GitHub Personal Access Token: '
read -s TOKEN
@jfear
jfear / tmux_function
Created January 17, 2018 16:25
Tmux function to look for .tmux file
# Tmux
function tmux() {
# Make sure even pre-existing tmux sessions use the latest SSH_AUTH_SOCK.
# (Inspired by: https://gist.github.com/lann/6771001)
local SOCK_SYMLINK=~/.ssh/ssh_auth_sock
if [ -r "$SSH_AUTH_SOCK" -a ! -L "$SSH_AUTH_SOCK" ]; then
ln -sf "$SSH_AUTH_SOCK" $SOCK_SYMLINK
fi
# If provided with args, pass them through.
@jfear
jfear / .tmux
Created January 17, 2018 16:26
Example of .tmux
#!/bin/sh
set -e
SESSION_NAME=$(basename "$(pwd)")
if tmux has-session -t $SESSION_NAME 2> /dev/null; then
tmux attach -t $SESSION_NAME
fi
"""Plot heatmap of all genes.
Plots the tpm normalized zscores of all genes as a heatmap.
"""
import numpy as np
import pandas as pd
from scipy.stats import fisher_exact
import matplotlib as mpl
from matplotlib.gridspec import GridSpec, GridSpecFromSubplotSpec
import matplotlib.pyplot as plt
@jfear
jfear / README-setup-tunnel-as-systemd-service.md
Created February 19, 2019 15:46 — forked from drmalex07/README-setup-tunnel-as-systemd-service.md
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@jfear
jfear / jupyterlab_setup.sh
Last active February 20, 2019 15:38
My basic setup for jupyterlab.
#!/bin/bash
conda create -n jupyter jupyterlab jupytext nodejs nb_conda ipywidgets nbdime ipympl jupyterlab-git
source activate jupyter
jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install jupyterlab_vim
jupyter labextension install @jupyterlab/git
jupyter serverextension enable --py jupyterlab_git
jupyter labextension install @jupyterlab/toc
jupyter labextension install jupyterlab_bokeh
jupyter labextension install @ijmbarr/jupyterlab_spellchecker