Skip to content

Instantly share code, notes, and snippets.

View gatoravi's full-sized avatar

Avinash R gatoravi

View GitHub Profile
@gatoravi
gatoravi / lsf_job_groups.md
Last active May 26, 2016 20:05
LSF job groups notes.

List lsf job groups bjgroup -s /username

Make a new one: bgadd -L <job_limit> <name>

Alter the limit later: bgmod

@gatoravi
gatoravi / tomasetti-vogelstein-table-s1.tsv
Created April 29, 2016 21:27 — forked from lmmx/tomasetti-vogelstein-table-s1.tsv
Tomasetti & Vogelstein (2015) Science 'bad luck of cancer' paper supplementary table S1. Finalised via Yaniv Erlich & Aaron Quinlan's draft clean-ups of the PDF supplement
Cancer_type Lifetime_cancer_incidence Total_cells_tissue Total_Stem_Cells Stem_cell_divisions_per_year Stem_cell_divisions_per_lifetime LSCD
ALL 0.0041 3000000000000 135000000 12 960 129900000000
BCC 0.3 180000000000 5820000000 7.6 608 3550000000000
CLL 0.0052 3000000000000 135000000 12 960 129900000000
Colorectal 0.048 30000000000 200000000 73 5840 1168000000000
Colorectal_FAP 1 30000000000 200000000 73 5840 1168000000000
Colorectal_Lynch 0.5 30000000000 200000000 73 5840 1168000000000
Duodenum_adenocarcinoma 0.0003 680000000 4000000 24 1947 7796000000
Duodenum_adenocarcinoma_with_FAP 0.035 680000000 4000000 24 1947 7796000000
Esophageal_squamous_cell_carcinoma 0.001938 3240000000 846000 17.4 1390 1203000000
@gatoravi
gatoravi / vim_tabs.txt
Created April 21, 2016 15:06
Turning on and off tabs in Vim
set expandtab #convert tabs to spaces
set noexpandtab #don't convert tabs to spaces
@gatoravi
gatoravi / regtools_docker_install.sh
Created April 20, 2016 21:49
List of commands to install regtools on a Docker Ubuntu image
sudo apt-get install git
sudo apt-get install cmake
sudo apt-get update
sudo apt-get install zlib1g-dev
sudo apt-get install g++
cd /home && mkdir src && cd src
git clone https://github.com/griffithlab/regtools
cd regtools && mkdir build && cd build
cmake .. && make
cp regtools /usr/local/bin/
@gatoravi
gatoravi / biology_books.md
Last active March 29, 2016 21:04
Books on Biology

Essential cell biology / Bruce Alberts [and others].

Coming to Life: How Genes Drive Development by Christiane Nüsslein-Volhard

@gatoravi
gatoravi / tsv_to_vcf.sh
Created March 21, 2016 21:21
Convert hcc1395 tsv to vcf
awk '{ gsub("\,", "");gsub("\"", ""); gsub ("\r", "\n"); print }' SupplementaryData1_Tier1_SNVs.txt | awk 'BEGIN { print "##fileformat=VCFv4.1\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO" } !/Chrom/ { if($1 !~ /GL/) print $1"\t"$2"\t.\t"$4"\t"$5"\t.\tPASS\t." }' > hcc1395_somatic.vcf
@gatoravi
gatoravi / CMakeLists.txt
Last active November 30, 2015 05:46
capnp example using cmake
include_directories(../src/mash/capnp/)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_MODULE_PATH
".;${CMAKE_MODULE_PATH}")
find_package(CapnProto REQUIRED)
include_directories(${CAPNP_INCLUDE_DIRS})
add_definitions(${CAPNP_DEFINITIONS})
capnp_generate_cpp(CAPNP_SRCS CAPNP_HDRS MinHash.capnp)
sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName
@gatoravi
gatoravi / get_count_with_sufficient_coverage.cc
Last active November 4, 2015 15:47 — forked from anonymous/get_count_with_sufficient_coverage.cc
Parse 'samtools depth' and obtain lines with sufficient coverage. Assumes two samples in the output. Same as, awk '$3 >= cutoff && $4 >= cutoff'
#include <stdint.h>
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <sstream>
using namespace std;
void usage() {
cerr << "Usage: ./get_count_with_sufficient_coverage samtools_depth_file cutoff[INT]";
cerr << "Assumes 2 samples.";
@gatoravi
gatoravi / vim_tabs_spaces
Created October 13, 2015 22:00
Switching from tabs to spaces and vice-versa in Vim
http://vim.wikia.com/wiki/Converting_tabs_to_spaces
To switch to Tabs from Spaces
:set noexpandtab
Switch to spaces
:set expandtab
:set tabstop=4