Skip to content

Instantly share code, notes, and snippets.

View vd4mmind's full-sized avatar
💭
I may be slow to respond.

ivivek87 vd4mmind

💭
I may be slow to respond.
View GitHub Profile
@vd4mmind
vd4mmind / ipak.R
Last active March 23, 2018 22:11 — forked from stevenworthington/ipak.R
Install and load multiple R packages at once
# ipak function: install and load multiple R packages.
# check to see if packages are installed. Install them if they are not, then load them into the R session.
ipak <- function(pkg){
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
if (length(new.pkg))
install.packages(new.pkg, dependencies = TRUE)
sapply(pkg, require, character.only = TRUE)
}
@vd4mmind
vd4mmind / coding_lengths.png
Created July 31, 2017 08:02 — forked from slowkow/coding_lengths.png
Count the number of coding base pairs in each Gencode gene.
coding_lengths.png
@vd4mmind
vd4mmind / ISMB_Tools.md
Created July 25, 2017 13:21 — forked from itsvenu/ISMB_Tools.md
Tools collected from different talks at ISMBECCB 2017
Tool Use Link
Chip enrich Functional enrichment of ChIP enriched regions http://chip-enrich.med.umich.edu/chipMain.jsp
REDItools RNA editing detection https://www.ncbi.nlm.nih.gov/pubmed/23742983
Screw Single-cell epigenomics workflow https://github.com/Epigenomics-Screw/Screw
Google classroom Handy teaching tool https://classroom.google.com/h
Piazza QA platform Free Q&A platform https://piazza.com/
Latex slides Easy to edit slides (best for teaching) https://www.overleaf.com/gallery/tagged/presentation#.WXMl9tOGP6Y
Moodle Create your own course https://moodle.org/?lang=nn
MultiQC NGS data QC tool  http://multiqc.info/
@vd4mmind
vd4mmind / readBAM.R
Created May 3, 2017 11:28 — forked from SamBuckberry/readBAM.R
Import a bam file into R
# install the Rsamtools package if necessary
source("http://bioconductor.org/biocLite.R")
biocLite("Rsamtools")
# load the library
library(Rsamtools)
# specify the bam file you want to import
bamFile <- "test.bam"
@vd4mmind
vd4mmind / random_region.R
Created December 5, 2016 13:02 — forked from davetang/random_region.R
Sampling random regions of the hg19 genome and obtaining the corresponding sequence
#how many regions to sample?
number <- 50000
#how many bp to add to start
span <- 4
#some necessary packages
#install if necessary
source("http://bioconductor.org/biocLite.R")
biocLite("BSgenome")
@vd4mmind
vd4mmind / README.md
Created September 15, 2016 09:23 — forked from jdblischak/README.md
rnaseq-de-tutorial

Differential expression analysis with edgeR

This is a tutorial I have presented for the class Genomics and Systems Biology at the University of Chicago. In this course the students learn about study design, normalization, and statistical testing for genomic studies. This is meant to introduce them to how these ideas are implemented in practice. The specific example is a differential expression analysis with edgeR starting with a table of counts and ending with a list of differentially expressed genes.

Past versions:

@vd4mmind
vd4mmind / deseq2-analysis-template.R
Created August 10, 2016 18:33 — forked from stephenturner/deseq2-analysis-template.R
Template for analysis with DESeq2
## RNA-seq analysis with DESeq2
## Stephen Turner, @genetics_blog
# RNA-seq data from GSE52202
# http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=gse52202. All patients with
# ALS, 4 with C9 expansion ("exp"), 4 controls without expansion ("ctl")
# Import & pre-process ----------------------------------------------------
# Import data from featureCounts
#! /usr/bin/perl
use strict;
use warnings;
use FileHandle;
#arg 0 - copy number calls produced by varscan "copyCaller" step
#arg 1 - segments of LOH, which give a reliable centering estimate (optional)
if(!$ARGV[0])
@vd4mmind
vd4mmind / vcf_downgrade.sh
Created May 3, 2016 16:54 — forked from danielecook/vcf_downgrade.sh
Downgrade VCF 4.2 to VCF 4.1 for viewing in IGV
# If you are trying to view VCF 4.2 files in IGV - you may run into issues. This function might help you.
# This script will:
# 1. Rename the file as version 4.1
# 2. Replace parentheses in the INFO lines (IGV doesn't like these!)
function vcf_downgrade() {
outfile=${1/.bcf/}
outfile=${outfile/.gz/}
outfile=${outfile/.vcf/}
bcftools view --max-alleles 2 -O v $1 | \