Originally posted by Simon Anders
View Post
Code:
counts = read.csv( counts.file, header=TRUE, row.names=1 ) counts.i <- round(data.matrix( counts )) keep1 <- rowSums(counts.i[, ]) >= 1 #exclude those with ZERO at all conditions keep2 <- rowSums(counts.i[, ] >= 1 ) >= length(conditions) #exclude those with ZERO at any condition #> nrow(counts) #[1] 36004 #> sum(keep1) #[1] 28867 #> sum(keep2) #[1] 18330 deseq = newCountDataSet( counts.i, conditions ) deseq = estimateSizeFactors( deseq ) deseq1 = newCountDataSet( counts.i[keep1,], conditions ) deseq1 = estimateSizeFactors( deseq1 ) deseq2 = newCountDataSet( counts.i[keep2,], conditions ) deseq2 = estimateSizeFactors( deseq2 )
JNJ1 JNJ2 JNJ3 JNJ4 JNJ5 JNJ6 JNJ7 JNJ8 JNJ9 JNJ10 JNJ11 JNJ12
1.246 1.074 1.008 0.827 0.877 0.882 0.887 1.034 1.141 1.188 1.214 1.124
> sizeFactors(deseq2)
JNJ1 JNJ2 JNJ3 JNJ4 JNJ5 JNJ6 JNJ7 JNJ8 JNJ9 JNJ10 JNJ11 JNJ12
1.246 1.074 1.008 0.827 0.877 0.882 0.887 1.034 1.141 1.188 1.214 1.124
> sizeFactors(deseq1)
JNJ1 JNJ2 JNJ3 JNJ4 JNJ5 JNJ6 JNJ7 JNJ8 JNJ9 JNJ10 JNJ11 JNJ12
1.246 1.074 1.008 0.827 0.877 0.882 0.887 1.034 1.141 1.188 1.214 1.124
Leave a comment: