This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to Normalize and log tranform the miRNA Seq data using DeSeQ2 / EdgeR?

I wish to obtain log-transformed and upper quantile normalized expression data for my miRNA-Seq raw count data. How should I implement the script using EdgeR or DeSEQ2? The default option in DeSEQ2 is TMM normalization. Is there a way out for obtaining upper-quartile as in EdgeR? How can i accommodate in my script.

rawCountTable <- read.delim(file.choose(), row.names=1)                                   ## miRNA-Seq raw data##
Col_data = read.table(file = "COL_LUAD_miRNA.txt", header = T, sep = "\t")     ## miRNA-Seq Annotation data##
dgeFull <- DGEList(rawCountTable, group = Col_data$Condition)
dgeFull <- DGEList(dgeFull$counts[apply(dgeFull$counts, 1, sum) != 0, ], group=dgeFull$samples$group)
dgeFull <- calcNormFactors(dgeFull, method="upperquartile")
dgeFull <- estimateCommonDisp(dgeFull)
normCounts <- cpm(dgeFull, log=TRUE, prior.count = 0.25)
## Perform batch correction of normalized and log transformed values##

After implementing this script in EdgeR I'm obtaining some negative values in my expression data at the end.

r rna-seq software error

You obtain some negative values because you log transform count >0.25. Every log transformation from 0.25 to 1 will be end up negative. Try to set up prior.count to 1.

1 answer

Your script already does what you say you want. Negative values on the log-scale are not a problem, although you could reduce the number of negative values by leaving prior.count at the default value instead of setting it so small.

Log in to answer this question.