calculateRPKM {customProDB} | R Documentation |
Normalized expression level based on exon read counts. The default output is a vector containing RPKMs for each transcript. vector name is the transcript name. calculate the RPKMs by chromosome. If proteincodingonly=TRUE, vetor name will be set to protein name, and only output RPKMs for the protein coding transcripts.
calculateRPKM(bamFile, exon, proteincodingonly = TRUE, ids = NULL, ...)
bamFile |
a the input BAM file name. |
exon |
a dataframe of exon annotations. |
proteincodingonly |
if TRUE only output RPKMs for protein coding transcripts, the name of output vector will be protein id. if FALSE, output the RPKM for all transcripts. |
ids |
a dataframe containing gene/transcript/protein id mapping information. |
... |
additional arguments |
caculate RPKM from a BAM file based on exon read counts
RPKM value for all transcripts or protein coding transcripts.
Xiaojing Wang
##test1.bam file is part of the whole bam file. load(system.file("extdata/refseq", "exon_anno.RData", package="customProDB")) bamFile <- system.file("extdata/bams", "test1_sort.bam", package="customProDB") load(system.file("extdata/refseq", "ids.RData", package="customProDB")) RPKM <- calculateRPKM(bamFile,exon,proteincodingonly=TRUE,ids)