Entering edit mode
I am trying to get normalised RNASeq expression matrices using different methods.
I have a read count matrix:
> matrix sample1 sample2 sample3 gene1 13456 16172 13303 gene2 988 830 857 gene3 11780 13831 10550
And I calculated scaling factors with the 3 methods available from the EdgeR calcNormFactors
function:
> upQuartileFactors <- calcNormFactors(matrix, method="upperquartile", p=0.75) > upQuartileFactors sample1 sample2 sample3 0.9952710 1.0063954 0.9983665 > tmmFactors <- calcNormFactors(in_matrix, method="TMM") > tmmfactors [1] 0.9962241 1.0020331 1.0017536 > rleFactors <- calcNormFactors(in_matrix, method="RLE") > rleFactors sample1 sample2 sample3 1.0038347 0.9851548 1.0111914
QUESTIONS:
I do I get a normalised expression matrix for each of the normalisation method employed?
Can I do one of the following and for which method?
matrix / scaled_factors matrix * scaled_factors matrix / (library_size * scaled_factors)
Thanks Ryan. The only way I see I could use the
cpm
function would be as follows:Is it correct?
Does it not add another normalisation layer with the count per million though?
It would be easiest if you used the DGEList class to contain both the counts and normalization factors. For example:
Ok, I see. Thanks Ryan !
Also note that the cpm() function does not have an argument called 'weights', so using that argument will not do anything.