Skip to content

Instantly share code, notes, and snippets.

View rhshah's full-sized avatar

Ronak Shah rhshah

View GitHub Profile
@dsparks
dsparks / Marimekko.R
Created September 23, 2012 14:34
Simplest marimekko/mosaic plot
# Simplest possible marimekko/mosaic plot
doInstall <- TRUE # Change to FALSE if you don't want packages installed.
toInstall <- c("vcd", "ggplot2", "RColorBrewer")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
theme_set(theme_gray(base_size = 7))
# All you need to start with is individual count data, and a grouping variable
@dakl
dakl / tcga-maf-to-vcf.sh
Last active February 12, 2021 14:06
Convert TCGA MAFs to VCFs to use to annotate other VCF files with variant frequency in the various TCGA projects (including pancan12).
REF=/proj/b2010040/private/nobackup/autoseqer-genome/genome/human_g1k_v37_decoy.fasta
DICT=/proj/b2010040/private/nobackup/autoseqer-genome/genome/human_g1k_v37_decoy.dict
GATKJAR=/home/daniel.klevebring/projects/tcga-maf-to-vcf/GenomeAnalysisTK.jar
WORKDIR=$HOME/Crisp/dakl/tcga-maf-to-vcf
mkdir -p $WORKDIR
cd $WORKDIR
#unpack maf to workdir
tar xvfz ~/projects/tcga-maf-to-vcf/pancan_cleaned_mafs.tar.gz
@pachadotdev
pachadotdev / r_python_homebrew.sh
Last active October 9, 2022 06:41
Install R and Python via Homebrew
# See http://pacha.hk/2017-07-12_r_and_python_via_homebrew.html
# XCode CLT
xcode-select --install
# Update Homebrew and add formulae
brew update
# Check for broken dependencies and/or outdated packages
brew doctor
@tanaikech
tanaikech / submit.md
Last active July 6, 2024 13:39
Downloading Shared Files on Google Drive Using Curl

Downloading Shared Files on Google Drive Using Curl

When the shared files on Google Drive is downloaded, it is necessary to change the download method by the file size. The boundary of file size when the method is changed is about 40MB.

File size < 40MB

CURL

filename="### filename ###"
fileid="### file ID ###"
curl -L -o ${filename} "https://drive.google.com/uc?export=download&amp;id=${fileid}"
@ionox0
ionox0 / reverse_clip.py
Last active July 22, 2019 18:35
Add UMIs from read names back into reads themselves, with support bases
# Script to reverse engineer UMI-tagged fastqs from Marianas UMI-processed fastqs
# ---
import sys
import gzip
from itertools import izip
# Usage: python reverse_clip.py <read 1 paired fastq with umis in read headers>
# We start with R1 and R2 that have been clipped with Marianas, and UMIs have been placed in the read name.
@ckandoth
ckandoth / ensembl_vep_102_with_offline_cache.md
Last active November 7, 2023 14:32
Install Ensembl's VEP v102 with local cache for running offline

Ensembl's VEP (Variant Effect Predictor) is popular for how it picks a single effect per gene as detailed here, its CLIA-compliant HGVS variant format, and Sequence Ontology nomenclature for variant effects.

Instead of the official instructions, we will use conda to install VEP and its dependencies. If you don't already have conda, install it into $HOME/miniconda3 as follows:

curl -sL https://repo.anaconda.com/miniconda/Miniconda3-py37_4.9.2-Linux-x86_64.sh -o /tmp/miniconda.sh
sh /tmp/miniconda.sh -bfp $HOME/miniconda3

Add the conda bin folder into your $PATH so that all installed tools are accessible via command-line. You can also add this to your ~/.bashrc