Commit 220d63ec authored by Georgi Tushev's avatar Georgi Tushev
Browse files

add normed counts

parent 4a7d1a6b
This diff is collapsed.
......@@ -14,6 +14,7 @@ rm(list = ls());
# read UTR counts
utrs<-as.matrix(read.table("/Users/tushevg/Desktop/UTRPolyribosomes/countTable_UTRPolysomes_UTRs_21Nov2017.txt",stringsAsFactors=F, header=T, row.names=1, check.names=F, colClasses=c("factor", rep("NULL", 5), rep("integer", 12))));
filterUTRs<-grep("group", rownames(utrs));
# read ERCC counts
ercc<-as.matrix(read.table("/Users/tushevg/Desktop/UTRPolyribosomes/countTable_UTRPolysomes_ERCC_21Nov2017.txt",stringsAsFactors=F, header=T, row.names=1, check.names=F));
......@@ -33,9 +34,15 @@ data<-rbind(utrs, ercc);
filter<-apply(data, 1,function(x) length(x[x>=5])>=2);
data<-data[filter,];
utrs<-rownames(data)[grep("^ERCC", rownames(data), invert=TRUE)];
utrs<-rownames(data)[grep("group", rownames(data))];
ercc<-rownames(data)[grep("^ERCC", rownames(data))];
# normalize with loess regression
weights<-c(7/100,7/100,10/1000,10/1000,16/1000,16/1000,22/1000,22/1000,24/1000,24/1000,7/100,7/100);
# set factors
levelSample<-as.factor(rep(c("Input","80S","2and3","4and5","6and7","bigger7"), each=2));
......@@ -59,6 +66,8 @@ pData(set1)
plotRLE(set, outline=FALSE, ylim=c(-4,4), col=colors[levelSample]);
plotPCA(set, col=colors[levelSample]);
write.table(normCounts(set1),"/Users/tushevg/Desktop/UTRPolyribosomes/countTable_UTRPolysomes_RUVg_22Nov2017.txt",quote=FALSE,sep="\t",col.names=TRUE);
# differential expression analysis EdgeR
design<-model.matrix(~levelSample + W_1, data=pData(set1));
y<-DGEList(counts=counts(set1), group=levelSample);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment