Thanks for your attention to my question.
Here is my question.
I usually use RUVg
normalization for normalize unwanted variations like batch effect and etc. and I use plotRLE
and plotPCA
functions for QC of my count-table.
But, when I normalize my data using RUVg
, there are some negative values after normalization (I guess they are usually from zero counts of raw count table).
So, here is the point. When I use plotRLE
function with RUVg-normalized data, it doesn't work because of the negative values (I already know there can't be negative in log" ")
How can I manage it? Or is there any codes to solve this problem?
I appreciate your help.
runRUVg <- function(dds, symbol=TRUE, k, dirn='.', ...) {
dds <- data.matrix(dds)
seq <- newSeqExpressionSet(dds)
a <- rownames(seq)
if (symbol) {
UsedHKG <- intersect(a,hkg_symbols) # Genes included both data and hkg list
UnusedHKG <- setdiff(a,hkg_symbols) # Genes are not included in data
} else {
UsedHKG <- intersect(a,hkg_ids) # Genes included both data and hkg list
UnusedHKG <- setdiff(a,hkg_ids) # Genes are not included in data
}
seqRUVg <- RUVg(seq,UsedHKG,k <- k,round=T)
counts <- counts(seqRUVg)
#plot export
png(filename="unnorm.png",width=2000,height=1600)
plotRLE(seq,outline=F,main='Unnormalized',ylim=c(-2.5,2.5))
dev.off()
png(filename="RUVgnorm.png",width=2000,height=1600)
plotRLE(seqRUVg,outline=F,main='Normalized by RUVg',ylim=c(-2.5,2.5))
dev.off
}
Of course, in plot export code, unnorm plot has no problem.
- Here's the data. I mined this data from TCGA-LUAD-RNA-sequencing database using FireBrowse.