Skip to content

Instantly share code, notes, and snippets.

View mdozmorov's full-sized avatar

Mikhail Dozmorov mdozmorov

View GitHub Profile
@mdozmorov
mdozmorov / SVA_RNA-seq.R
Last active February 2, 2017 02:02
Factor analysis by SVA
# Source: Additional file 1 from Łabaj, Paweł P., and David P. Kreil. “Sensitivity, Specificity, and Reproducibility of RNA-Seq Differential Expression Calls.” Biology Direct 11, no. 1 (December 20, 2016): 66. doi:10.1186/s13062-016-0169-7.
# https://static-content.springer.com/esm/art%3A10.1186%2Fs13062-016-0169-7/MediaObjects/13062_2016_169_MOESM1_ESM.pdf
samples.fc <- c()
for (x in colnames(data.in)) {
sampl <- substr(x, 5, 5)
samples.fc <- c(samples.fc, sampl)
}
group = as.factor(samples.fc)
mod1 = model.matrix(~group)
@mdozmorov
mdozmorov / autoloess.R
Created January 20, 2017 20:40 — forked from kylebgorman/autoloess.R
autoloess.R: set the "span" (smoothing) hyperparameter for a LOESS curve so as to minimize AIC_c (includes a cute demonstration)
# autoloess.R: compute loess metaparameters automatically
# Kyle Gorman <gormanky@ohsu.edu>
aicc.loess <- function(fit) {
# compute AIC_C for a LOESS fit, from:
#
# Hurvich, C.M., Simonoff, J.S., and Tsai, C. L. 1998. Smoothing
# parameter selection in nonparametric regression using an improved
# Akaike Information Criterion. Journal of the Royal Statistical
# Society B 60: 271–293.
@mdozmorov
mdozmorov / human-bodymap2.0-fpkms.bash
Created November 21, 2015 14:08 — forked from ericminikel/human-bodymap2.0-fpkms.bash
Bash script to calculate FPKMs from the Human BodyMap 2.0 mRNA-seq data.
# Eric Minikel
# CureFFI.org
# 2013-07-04
# Bash script to generate FPKMs from Ensembl Human Bodymap 2.0 RNA-seq data
# Announcement of Human BodyMap 2.0 data availability: http://www.ensembl.info/blog/2011/05/24/human-bodymap-2-0-data-from-illumina/
# BAM list: ftp://ftp.ensembl.org/pub/release-70/bam/homo_sapiens/genebuild/
# STEP 1: DOWNLOAD THE BAMS FROM ENSEMBL
@mdozmorov
mdozmorov / GenomeRunner_2012
Created September 11, 2015 20:34
GenomeRunner 2012 BibTex entry
@article{Dozmorov2012,
abstract = {MOTIVATION: One of the challenges in interpreting high-throughput genomic studies such as a genome-wide associations, microarray or ChIP-seq is their open-ended nature-once a set of experimentally identified regions is identified as statistically significant, at least two questions arise: (i) besides P-value, do any of these significant regions stand out in terms of biological implications? (ii) Does the set of significant regions, as a whole, have anything in common genome wide? These issues are difficult to address because of the growing number of annotated genomic features (e.g. single nucleotide polymorphisms, transcription factor binding sites, methylation peaks, etc.), and it is difficult to know a priori which features would be most fruitful to analyze. Our goal is to provide partial automation of this process to begin examining associations between experimental features and annotated genomic regions in a hypothesis-free, data-driven manner.
RESULTS: We created Genom
@mdozmorov
mdozmorov / SLE.bed
Created August 31, 2015 14:18
Systemic lupus erythematosus SNPs and their genomic coordinates in BED format
chr1 173191474 173191475 rs2205960
chr10 50110014 50110015 rs7068839
chr10 50110231 50110232 rs7069142
chr10 50119053 50119054 rs1913517
chr10 50120706 50120707 rs6537583
chr10 63803471 63803472 rs12357548
chr10 63805375 63805376 rs12355313
chr10 63805616 63805617 rs4948496
chr10 63805734 63805735 rs6479781
chr10 63811677 63811678 rs10821949
@mdozmorov
mdozmorov / tmux-cheatsheet.markdown
Last active August 29, 2015 14:28 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@mdozmorov
mdozmorov / Makefile_canned_recipes
Last active August 29, 2015 13:57
Makefile, canned recipes
AN1 = foo
AN2 = bar
#Variable 'an' serves as proxy for a function, executed depending on targer $@
define an
echo $@
touch $@
endef
all: $(AN1).txt $(AN2).txt