Skip to content

Instantly share code, notes, and snippets.

@mikelove
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikelove/04bf026d5b6aa2f10b3d to your computer and use it in GitHub Desktop.
Save mikelove/04bf026d5b6aa2f10b3d to your computer and use it in GitHub Desktop.
ph525x video stats
d <- read.csv("ph525x_vids.csv")
d <- d[-1,] # first 1 minute video
d$week <- factor(d$week)
sum(d$min)/60 # "hours of video")
barplot(tapply(d$min, d$week, sum)/60, main="hours of video / week")
barplot(table(d$week), main="video units / week")
stripchart(min ~ week, data=d, vertical=TRUE,
pch=1, method="jitter",
xlab="week", ylab="min", main="minutes per video unit")
abline(h=10, lwd=2, col="red")
library(ggplot2)
ggplot(data=d, aes(x=week, fill=kind)) + geom_bar(aes(weight=min)) + ylab("min")
with(d, plot(1:nrow(d), min, type="h",xlab="units",
col=kind, lwd=2, main="minutes / unit / kind"))
legend("topleft",lty=1,lwd=2,col=rev(1:3),rev(levels(d$kind)), cex=.65)
titles <- as.character(sapply(split(d$title1, d$week), `[`, 1))
xs <- sapply(1:8, function(i) which(d$week == i)[1])
par(mar=c(0,4,2,1),mfrow=c(2,1))
with(d, plot(1:nrow(d), min, type="h",xlab="",
xlim=c(0,175), ylim=c(0,max(d$min)+1), col=kind, lwd=2,
xaxt="n", bty="n",main="PH525x: Data Analysis for Genomics"))
legend("right",lty=1,lwd=2,col=rev(1:3),rev(levels(d$kind)), cex=.65)
par(mar=c(0,4,0,1))
plot(xs, seq(from=0, to=.9, length=8), pch=16, cex=.5,
xlab="",ylab="",xaxt="n",yaxt="n",
ylim=c(-.1,1), xlim=c(0,175), bty="n")
segments(xs, seq(from=0, to=.9, length=8),xs, rep(1,8), lty=3, lwd=2)
text(xs, seq(from=0, to=.9, length=8), titles, cex=.75, pos=4)
week title1 subsection title2 unit title3 min kind
0 pre-course 1 Introduction to Data Analysis for Genomics 1 Introduction to Data Analysis for Genomics 1 R lecture
1 Introduction 1 What we measure and why? 1 Introduction 2 R lecture
1 Introduction 1 What we measure and why? 2 The molecular basis for phenotypic variation 3.5 R lecture
1 Introduction 1 What we measure and why? 3 DNA: chromosomes, replication, SNPs and other variants 5.5 R lecture
1 Introduction 1 What we measure and why? 4 Gene expression 2.5 R lecture
1 Introduction 1 What we measure and why? 5 Epigenetics 2 R lecture
1 Introduction 2 R Programming Skills 1 RStudio 4.5 M lab
1 Introduction 2 R Programming Skills 2 R Refresher 5.5 M lab
1 Introduction 2 R Programming Skills 3 Installing Bioconductor and finding help 10 M lab
1 Introduction 3 Exploratory data analysis 1 EDA Introduction 2.5 R lab
1 Introduction 3 Exploratory data analysis 2 Histogram 4.5 R lab
1 Introduction 3 Exploratory data analysis 3 qq-plot 3.5 R lab
1 Introduction 3 Exploratory data analysis 4 Boxplot 3 R lab
1 Introduction 3 Exploratory data analysis 5 Scatterplot 7.5 R lab
1 Introduction 3 Exploratory data analysis 6 Median, Mad, and Spearman correlation 4.5 R lecture
1 Introduction 3 Exploratory data analysis 7 Log transformation 3 R lecture
1 Introduction 3 Exploratory data analysis 8 Symmetry of log ratios 2 R lecture
1 Introduction 3 Exploratory data analysis 9 Plots to avoid 5 R lecture
1 Introduction 3 Exploratory data analysis 10 Avoid pseudo 3D 1.5 R lecture
1 Introduction 3 Exploratory data analysis 11 Examples from genomics 6 R lecture
1 Introduction 4 Probability distributions 1 Introduction 3 R lecture
1 Introduction 4 Probability distributions 2 Normal distribution 6.5 R lecture
2 Measurement technology 1 Microarray technology 1 How hybridization works 9 R lecture
2 Measurement technology 1 Microarray technology 2 How microarrays work and two color arrays 4 R lecture
2 Measurement technology 1 Microarray technology 3 Applications of microarrays in genomics 7.5 R lecture
2 Measurement technology 2 Next generation sequencing technology 1 Brief introduction to the mechanics of NGS 8.5 R lecture
2 Measurement technology 2 Next generation sequencing technology 2 Applications of NGS in genomics 7 R lecture
2 Measurement technology 3 Working with data in R 1 Basic Bioconductor infrastructure: IRanges 6.5 M lab
2 Measurement technology 3 Working with data in R 2 Basic Bioconductor infrastructure: GRanges 8.5 M lab
2 Measurement technology 3 Working with data in R 3 Basic Bioconductor infrastructure: ExpressionSet and SummarizedExperiment 9 M lab
2 Measurement technology 3 Working with data in R 4 Installing from Github 2 M lab
2 Measurement technology 3 Working with data in R 5 Reading Microarray raw data 13.5 R lab
2 Measurement technology 3 Working with data in R 6 Microarray EDA 12 R lab
2 Measurement technology 3 Working with data in R 7 Mapping algorithms and software 12 M lab
2 Measurement technology 3 Working with data in R 8 NGS EDA 8 M lab
3 Inference 1 Inference 1 Introduction to statistical inference 2.5 R lecture
3 Inference 1 Inference 2 Association tests 8.5 R lecture
3 Inference 1 Inference 3 t-tests 5.5 R lecture
3 Inference 1 Inference 4 Central limit theorem (CLT) 6.5 R lecture
3 Inference 1 Inference 5 t-test in practice 8 R lecture
3 Inference 1 Inference 6 Gene expression example 6.5 R lecture
3 Inference 1 Inference 7 Inference in practice 7 R lecture
3 Inference 1 Inference 8 Mann-Whitney-Wilcoxon 4.5 R lecture
3 Inference 1 Inference 9 Monte carlo simulation 11.5 R lab
3 Inferece 1 Inference 10 Permutations 5.5 R lab
3 Inference 2 Linear models 1 Introduction to linear models 5.5 R lecture
3 Inference 2 Linear models 2 Matrix multiplication 4.5 R lecture
3 Inference 2 Linear models 3 Fitting linear models and testing 8.5 R lecture
3 Inference 2 Linear models 3 Expressing experimental design using R formula 8 M lab
3 Inference 2 Linear models 4 Basic inference on microarray gene expression I 10 M lab
3 Inference 2 Linear models 5 Basic inference on microarray gene expression II 9.5 M lab
4 Background correction and normalization 1 Modeling 1 Modeling basics 5 R lecture
4 Background correction and normalization 1 Modeling 2 Application of Poisson 5 R lecture
4 Background correction and normalization 1 Modeling 3 Maximum likelihood estimate (MLE) 4.5 R lecture
4 Background correction and normalization 1 Modeling 4 Modeling standard deviations 4 R lecture
4 Background correction and normalization 2 Background 1 Introduction to microarray background 7 R lecture
4 Background correction and normalization 2 Background 2 Background model 4 R lecture
4 Background correction and normalization 2 Background 3 Different approaches to background 8 R lecture
4 Background correction and normalization 3 Normalization 1 The need for normalization 4 R lecture
4 Background correction and normalization 3 Normalization 2 Local regression: loess 4.5 R lecture
4 Background correction and normalization 3 Normalization 3 Quantile normalization 5 R lecture
4 Background correction and normalization 3 Normalization 4 Variance stabilizing normalization 7 R lecture
4 Background correction and normalization 3 Normalization 5 When not to normalize 6.5 R lecture
4 Background correction and normalization 3 Normalization 6 Subset quantile normalization 3.5 R lecture
4 Background correction and normalization 3 Normalization 7 Normalization for RNA-seq 5 R lecture
4 Background correction and normalization 3 Normalization 8 Motivating normalization for microarrays with EDA 10.5 R lab
4 Background correction and normalization 3 Normalization 9 Loess normalization for microarrays 8.5 R lab
4 Background correction and normalization 3 Normalization 10 Quantile normalization for microarrays 1.5 R lab
5 Distance,clustering and prediction 1 Distance and clustering 1 Distance 5.5 R lecture
5 Distance,clustering and prediction 1 Distance and clustering 2 Multidimensional scaling (MDS) 2.5 R lecture
5 Distance,clustering and prediction 1 Distance and clustering 3 Clustering 6 R lecture
5 Distance,clustering and prediction 1 Distance and clustering 4 How randomness affects clustering 3 R lecture
5 Distance,clustering and prediction 1 Distance and clustering 5 K-means 4 R lecture
5 Distance,clustering and prediction 1 Distance and clustering 6 Gene clustering 6.5 R lecture
5 Distance,clustering and prediction 1 Distance and clustering 7 Batch effect 3 R lecture
5 Distance,clustering and prediction 1 Distance and clustering 8 Distances and clustering I 5 M lab
5 Distance,clustering and prediction 1 Distance and clustering 9 Distances and clustering II 8 M lab
5 Distance,clustering and prediction 1 Distance and clustering 10 Dimension reduction and heatmaps 9 M lab
5 Distance,clustering and prediction 2 Prediction 1 Conditional expectation 3 R lecture
5 Distance,clustering and prediction 2 Prediction 2 2 variable example: linear regression 5 R lecture
5 Distance,clustering and prediction 2 Prediction 3 k-nearest neighbors 7.5 R lecture
5 Distance,clustering and prediction 2 Prediction 4 Cross-validation 11.5 M lab
6 Batch effects 1 Statistical solutions to batch effects 1 Confounding 7 R lecture
6 Batch effects 1 Statistical solutions to batch effects 2 Confounding in genomics 3.5 R lecture
6 Batch effects 1 Statistical solutions to batch effects 3 Modeling batch effects 6.5 R lecture
6 Batch effects 1 Statistical solutions to batch effects 4 ComBat 3 R lecture
6 Batch effects 1 Statistical solutions to batch effects 5 Factor analysis 2.5 R lecture
6 Batch effects 1 Statistical solutions to batch effects 6 SVD and PCA 7.5 R lecture
6 Batch effects 1 Statistical solutions to batch effects 7 PCA example 5.5 R lecture
6 Batch effects 1 Statistical solutions to batch effects 8 Microarray example 4.5 R lecture
6 Batch effects 1 Statistical solutions to batch effects 9 Surrogate variable analysis (SVA) 6 R lecture
6 Batch effects 2 Applying batch effects solutions 1 Introduction to exploring batch effects in R 7 R lab
6 Batch effects 2 Applying batch effects solutions 2 ComBat in R 5 R lab
6 Batch effects 2 Applying batch effects solutions 3 SVA in R 5 R lab
6 Batch effects 2 Applying batch effects solutions 4 PCA and SVD 11.5 M lab
7 Advanced differential expression 1 Hierarchical modeling 1 Introduction to hierarchical models 4 R lecture
7 Advanced differential expression 1 Hierarchical modeling 2 Hierarchical models: baseball example 7.5 R lecture
7 Advanced differential expression 1 Hierarchical modeling 3 Hierarchical models for genes 5 R lecture
7 Advanced differential expression 1 Hierarchical modeling 4 Hierarchical models for genes in practice 2 R lecture
7 Advanced differential expression 1 Hierarchical modeling 5 Using the limma package 13 M lab
7 Advanced differential expression 2 Multiple comparisons 1 Introduction to multiple testing 6 R lecture
7 Advanced differential expression 2 Multiple comparisons 2 Combining null and non-null tests 2 R lecture
7 Advanced differential expression 2 Multiple comparisons 3 Multiple hypothesis testing 9 R lecture
7 Advanced differential expression 2 Multiple comparisons 4 False discovery rate 6 R lecture
7 Advanced differential expression 3 Gene set testing 1 Gene sets 5 R lecture
7 Advanced differential expression 3 Gene set testing 2 Summary statistics for gene sets 4 R lecture
7 Advanced differential expression 3 Gene set testing 3 Hypothesis testing 5.5 R lecture
7 Advanced differential expression 3 Gene set testing 4 Permutations 4.5 R lecture
7 Advanced differential expression 3 Gene set testing 5 Gene set testing in R part I 8.5 M lab
7 Advanced differential expression 3 Gene set testing 6 Gene set testing in R part II 9 M lab
7 Advanced differential expression 4 Gene and technology annotations 1 Annotating features 13.5 M lab
8 Advanced topics 1 Manipulating NGS data using Bioconductor 1 Visualizing NGS data part 1 6.5 M lab
8 Advanced topics 1 Manipulating NGS data using Bioconductor 2 Visualizing NGS data part 2 10 M lab
8 Advanced topics 1 Manipulating NGS data using Bioconductor 3 Visualizing NGS data part 3 7 M lab
8 Advanced topics 1 Manipulating NGS data using Bioconductor 4 Making an NGS read count table 15.5 M lab
8 Advanced topics 2 DNA Methylation 1 Introduction to DNA methylation 3.5 R lecture
8 Advanced topics 2 DNA Methylation 2 CpG islands 4 R lecture
8 Advanced topics 2 DNA Methylation 3 Bisulfite treatment 1.5 R lecture
8 Advanced topics 2 DNA Methylation 4 Measuring methylation from array 2 R lecture
8 Advanced topics 2 DNA Methylation 5 Measuring methylation from sequencing 2 R lecture
8 Advanced topics 2 DNA Methylation 6 DNA Methylation part 1 11.5 R lab
8 Advanced topics 2 DNA Methylation 7 DNA Methylation part 2 13 R lab
8 Advanced topics 2 DNA Methylation 8 Reading 450K files with minfi 8.5 R lab
8 Advanced topics 3 ChIP Sequencing 1 Introduction to ChIP-seq 3.5 R lecture
8 Advanced topics 3 ChIP Sequencing 2 Computational analysis of ChIP-seq 3 R lecture
8 Advanced topics 3 ChIP Sequencing 3 Statistical analysis of ChIP seq 3.5 R lecture
8 Advanced topics 3 ChIP Sequencing 4 ChIP-seq part 1 13 M lab
8 Advanced topics 3 ChIP Sequencing 5 ChIP-seq part 2 15 M lab
8 Advanced topics 4 RNA Sequencing 1 Introduction to RNA-seq 5.5 R lecture
8 Advanced topics 4 RNA Sequencing 2 Data generation and simple counts 5 R lecture
8 Advanced topics 4 RNA Sequencing 3 Model for quantification 4.5 R lecture
8 Advanced topics 4 RNA Sequencing 4 Transcript quantification 7 R lecture
8 Advanced topics 4 RNA Sequencing 5 Unstable quantification 5 R lecture
8 Advanced topics 4 RNA Sequencing 6 RNA-seq part 1 11 M lab
8 Advanced topics 4 RNA Sequencing 7 RNA-seq part 2 12.5 M lab
8 Advanced topics 4 RNA Sequencing 8 RNA-seq part 3 11.5 M lab
8 Advanced topics 5 Genome Variation 1 SNPs and SNVs 6 R lecture
8 Advanced topics 5 Genome Variation 2 Copy number variants from array 4 R lecture
8 Advanced topics 5 Genome Variation 3 Copy number variants from sequencing 4.5 R lecture
8 Advanced topics 5 Genome Variation 4 Variant calling part 1 12 M lab
8 Advanced topics 5 Genome Variation 5 Variant calling part 2 6.5 M lab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment