Skip to content

Instantly share code, notes, and snippets.

View mdozmorov's full-sized avatar

Mikhail Dozmorov mdozmorov

View GitHub Profile
@ilevantis
ilevantis / bedtools_cheatsheet.md
Last active July 9, 2024 01:49
Bedtools cheatsheet

Bedtools Cheatsheet

General:

Tools Description
flank Create new intervals from the flanks of existing intervals.
slop Adjust the size of intervals.
shift Adjust the position of intervals.
subtract Remove intervals based on overlaps b/w two files.
@aaronwolen
aaronwolen / unembed.r
Last active August 29, 2015 14:07
Extract and append multiple values embedded in rows
# Extract and append multiple values embedded in rows
#
# data: data.frame
# col: column name containing embedded values
# sep: regular expression to split column by
#
# df <- data.frame(key = c("a", "a;b", "a;b;c"), val = 1:3)
# unembed(df, "key", ";")
unembed <- function(data, col, sep, ...) {
@lmullen
lmullen / Makefile
Last active May 30, 2024 09:34
PDF slides and handouts using Pandoc and Beamer
SLIDES := $(patsubst %.md,%.md.slides.pdf,$(wildcard *.md))
HANDOUTS := $(patsubst %.md,%.md.handout.pdf,$(wildcard *.md))
all : $(SLIDES) $(HANDOUTS)
%.md.slides.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -o $@
%.md.handout.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -V handout -o $@
@stephenturner
stephenturner / eset_from_beadarray.r
Last active August 31, 2018 04:20
Create ExpressionSet object in R from Illumina Beadarray Data
## Stephen Turner
## University of Virginia Bioinformatics Core
## November 28, 2012
## Useful references:
# http://www.ploscompbiol.org/article/info%3Adoi%2F10.1371%2Fjournal.pcbi.1002276
# http://www.bioconductor.org/help/course-materials/2007/BioC2007/labs/beadarray/BioC2007_beadarray_slides.pdf
# http://www.bioconductor.org/help/course-materials/2007/BioC2007/labs/beadarray/beadarrayBioc07.pdf
## Instructions:
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 21, 2024 20:54
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@esperlu
esperlu / mysql2sqlite.sh
Created April 27, 2011 05:46
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite