This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# KH: This is modified from the original lastjoboutput script. | |
# | |
# Shows the output of the last N jobs that finished running on the cluster | |
# with an exit status OTHER THAN ZERO. | |
# Convenience function to avoid having to find the most recent job output file | |
use strict; | |
use warnings; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
import sys | |
import fileinput | |
from optparse import OptionParser, OptionGroup | |
import multiprocessing | |
import time | |
from itertools import izip_longest, izip, repeat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sample code for performing hierarchical clustering | |
# install.packages("gplots") | |
library(gplots) | |
library(RColorBrewer) | |
##### Use iris dataset #### | |
# See ?iris for more info | |
data <- as.matrix(iris[,1:4]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $Date: 2010-10-29 16:09:50 -0400 (Fri, 29 Oct 2010) $ | |
# Filename: stats.py | |
# | |
# A bunch of math/stats functions | |
import math | |
'''calculate average''' | |
def calcAvg(ls): | |
n, mean = len(ls), 0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rprofile.site file | |
.First <- function() { | |
#.libPaths(c("~/lib/R/3.0", .libPaths())) | |
if (Sys.getenv("TERM") == "xterm-256color") { | |
library("colorout") | |
} | |
} | |
.Last <- function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install if necessary | |
source("http://bioconductor.org/biocLite.R") | |
biocLite("seqLogo") | |
biocLite("Biostrings") | |
library(seqLogo) | |
library(Biostrings) | |
strings <- c("GATTACA", "GATAACA", "GATAAAA", "GATTAGA") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# these examples rely on the R/qtl package, www.rqtl.org | |
# install R/qtl package, within R, by typing install.packages("qtl") | |
all: knitr_example.html knitr_example_asciidoc.html knitr_example.pdf markdown_example.html | |
R_OPTS=--no-save --no-restore --no-init-file --no-site-file # vanilla, but with --environ | |
knitr_example.html: knitr_example.Rmd | |
R ${R_OPTS} -e 'library(knitr);knit2html("knitr_example.Rmd")' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
check_exit_status() { | |
# Checks the latest exit status and exits if status is non-zero | |
# usage: check_exit_status $? "my_function" | |
EXITSTAT=$1 | |
FUNC=$2 | |
if [ "$EXITSTAT" -ne "0" ]; then | |
echo "=> ["`date`"] $FUNC failed" | |
exit $EXITSTAT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
N=4 # Chunk size | |
C=0 # Counter | |
for i in {1..12}; | |
do | |
# submitjob here... | |
echo $i | |
((C=C+1)) | |
if [[ `expr $C % $N` == 0 ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(readr) | |
library(dplyr) | |
library(tm) | |
library(wordcloud) | |
library(SnowballC) | |
library(RColorBrewer) | |
m <- read_csv("node_table.csv.gz") %>% | |
filter(EM1_fwer_qvalue_dataset1 < 0.5, EM1_gs_size_dataset1 > 95) |
OlderNewer