Skip to content

Instantly share code, notes, and snippets.

@wckdouglas
wckdouglas / gvimrc
Created March 23, 2016 23:09
for macvim
set guioptions=T
colorscheme onedark
let g:airline#extensions#tabline#enabled = 1
let g:airline_theme='onedark'
set laststatus=2
"tab
noremap <D-1> :tabn 1<CR>
#!/bin/bash
if ! [ -x $(command -v conda) ]
then
echo Conda not installed in PATH
exit
else
if ! [ -x $(command -v pip) ]
then
#!/bin/env Rscript
library(readr)
library(DESeq2)
library(BiocParallel)
library(dplyr)
library(stringr)
library(tidyr)
library(cowplot)
library(ggrepel)
#!/bin/bash
BAMPATH=.
RESULTPATH=.
GENESFILE=allRegions.SAF
STRANDENESS=1
THREADS=20
featureCounts -a $GENESFILE -F SAF \
-o /dev/stdout -O -s $STRANDENESS -Q 5 \
#!/bin/env Rscript
library(RMySQL)
library(dplyr)
library(stringr)
library(readr)
conn <- dbConnect(MySQL(),
user='genome',
dbname='hg38',
@wckdouglas
wckdouglas / cleanBib.py
Last active January 27, 2016 16:38
cleaning bibtex file for correct upper case title and remove url record. Running by: PYTHONIOENCODING=utf-8 python cleanBib.py
#!/bin/env python
import bibtexparser
import argparse
import sys
import re
from bibtexparser.bibdatabase import BibDatabase
from bibtexparser.bwriter import BibTexWriter
def modifiedTitle(title):
#!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
if (length(args)<1) {
stop("A Rmarkdown file has to be specified\n", call.=FALSE)
} else if (length(args)>0) {
# default output file
markdownFile = args[1]
for (markdownFile in args){
rmarkdown::render(markdownFile)
{
"mapQuality": ">10",
"isMapped" : "true",
"isMateMapped": "true",
"isPrimaryAlignment": "true",
"isProperPair": "true"
}
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $INSTALLPATH/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
INSTALLPATH=$(pwd)
#/usr/bin/env python
from Bio import SeqIO
import sys
def guessFileType(filename):
if filename.endswith('fasta') or filename.endswith('fa'):
fileType = 'fasta'
elif filename.endswith('fastq') or filename.endswith('fq'):
fileType = 'fastq'