Description Usage Arguments Details Value Author(s) See Also Examples
Convert a count table obtained from the easyRNASeq function into an RPKM corrected count table.
1 2 3 4 5 6 7 8 9 |
obj |
An object of class |
from |
Determine the kind of coverage to use, choice limited to: exons, features, transcripts, bestExons, geneModels or islands. |
lib.size |
Precise the library size. It should be a named numeric list, i.e. named after the sample names. |
feature.size |
Precise the feature (e.g. exons, genes) sizes. It should be a named numeric list, named after the feature names. |
simplify |
If set to TRUE, whenever a feature (exon, feature, ...) is duplicated in the count table, it is only returned once. |
... |
additional arguments. See details |
RPKM accepts two sets of arguments:
RNAseq,character the
... are additional arguments to be passed to the
readCounts
method.
matrix,named vectornormalize a count matrix by providing the feature sizes (e.g. gene sizes) as a named vector where the names match the row names of the count matrix and the lib sizes as a named vector where the names match the column names of the count matrix.
A matrix
containing RPKM corrected read counts.
Nicolas Delhomme
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | ## Not run:
## get an RNAseq object
rnaSeq <- easyRNASeq(filesDirectory=
system.file(
"extdata",
package="RnaSeqTutorial"),
pattern="[A,C,T,G]{6}\\.bam$",
format="bam",
readLength=36L,
organism="Dmelanogaster",
chr.sizes=as.list(seqlengths(Dmelanogaster)),
annotationMethod="rda",
annotationFile=system.file(
"data",
"gAnnot.rda",
package="RnaSeqTutorial"),
count="exons",
outputFormat="RNAseq")
## get the RPKM
rpkm <- RPKM(rnaSeq,from="exons")
## the same from a count table
count.table <- readCounts(rnaSeq,count="exons")
## get the RPKM
## verify that the feature are sorted as the count.table
all(.getName(rnaSeq,"exon") == rownames(count.table))
feature.size <- unlist(width(ranges(rnaSeq)))
## verify that the samples are ordered in the same way
all(names(librarySize(rnaSeq)) == colnames(count.table))
## get the RPKM
rpkm <- RPKM(count.table,
feature.size=feature.size,
lib.size=librarySize(rnaSeq))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.