Skip to content

Instantly share code, notes, and snippets.

#include <string.h>
#include <cstring>
#include <iostream>
#include <fstream>
#include <gzstream.h>
#include <sstream>
using namespace std;
//get the id hash table and
//iterate over the fastq file
#!/usr/bin/env Rscript
source("http://bioconductor.org/biocLite.R")
packages <- c('data.table','readr',
'dplyr','plyr',
'ggplot2','cowplot',
'caret','RMySQL',
'tidyr','stringr',
'pheatmap','Rcpp')
# change prefix
unbind-key C-b
set -g prefix C-a
bind-key C-a send-prefix
#set -g default-terminal "xterm"
#set-window-option -g xterm-keys on
#set-option -g renumber-windows on
#power line
run-shell "powerline-daemon -q"
@wckdouglas
wckdouglas / jobSubmit.py
Created August 28, 2015 17:10
Job simitting
#!/bin/env python
import commands
import glob
import time
import os
import sys
maxJobLim = 46
joblist = glob.glob('./job_*.sge')
@wckdouglas
wckdouglas / writeSGE.py
Last active August 28, 2015 17:15
For high-throughput computing on TACC lonestar
import sys
import os
import fileinput
#==============================set parameter===================
time='1:30:00'
allocation = '{Allocation-name}'
projectPrerfix = '{name for the job}'
commandPerJob = 1
@wckdouglas
wckdouglas / install_packages.R
Last active September 30, 2016 19:12
install packages for tight-hamr predictions
#!/bin/snv Rscript
installPackages <- function(package){
if(package %in% rownames(installed.packages()) == FALSE)
{
message('Installing ',package)
install.packages(package, dependencies=TRUE)
}else{
message(package,' is installed')
}
#!/bin/env python
from multiprocessing import Pool, Manager
import numpy as np
def tryFunc(i, j,results):
results.append(i*j)
def main():
a = 10
#/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'
#!/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)
{
"mapQuality": ">10",
"isMapped" : "true",
"isMateMapped": "true",
"isPrimaryAlignment": "true",
"isProperPair": "true"
}