getRPKM | R Documentation |
For some analyses you might be interested in transforming the counts into RPKMs which you can do with this function.
getRPKM(rse, length_var = "bp_length", mapped_var = NULL)
rse |
A RangedSummarizedExperiment-class object as downloaded with download_study. |
length_var |
A length 1 character vector with the column name from
|
mapped_var |
A length 1 character vector with the column name from
|
For gene RSE objects, you will want to specify the length_var
because otherwise you will be adjusting for the total gene length instead
of the total exonic sequence length of the gene.
A matrix with the RPKM values.
Andrew Jaffe, Leonardo Collado-Torres
scale_counts
## get RPKM matrix
rpkm <- getRPKM(rse_gene_SRP009615)
## You can also get an RPKM matrix after running scale_counts()
## with similar RPKM values
rpkm2 <- getRPKM(scale_counts(rse_gene_SRP009615))
rpkm3 <- getRPKM(scale_counts(rse_gene_SRP009615, by = "mapped_reads"))
summary(rpkm - rpkm2)
summary(rpkm - rpkm3)
summary(rpkm2 - rpkm3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.