Created
March 11, 2013 19:34
-
-
Save sashaphanes/5136985 to your computer and use it in GitHub Desktop.
Exclude genes without a value over 2rpkm and select only columns marching string "rpkm"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source("http://bioconductor.org/biocLite.R") | |
biocLite("preprocessCore") | |
library(preprocessCore) | |
data <- read.delim(gzfile("fileOfInterest.txt.gz"), sep="\t") | |
data <- data[,grep("RPKM", colnames(data))] | |
filtered <- data[!apply(data, 1, function(x){ all(x <2) }),] | |
qn <- normalize.quantiles(as.matrix(filtered), copy = TRUE)] | |
qn <- as.data.frame(qn) | |
colnames(qn) <- colnames(filtered) | |
rownames(qn) <- rownames(filtered) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment