Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/getGeneExpression_call.R
Calculate either gene expression or relative within gene expression using transcript expression samples and transcript information file.
1 2 3 4 |
sampleFile |
File containing the transcript expression samples. |
outFile |
Name of the output file. If not used, function uses temporary file. |
trInfo |
|
trInfoFile |
Transcript information file. Either |
pretend |
Do not execute, only print out command line calls for the C++ version of the program. |
keepOrder |
If |
The getGeneExpression
function takes samples of transcript expression and produces file with expression of genes by adding up transcript expression.
The getWithinGeneExpression
function takes samples of transcript expression and produces file with relative within gene expression samples for each transcript.
Both function need valid transcript information which contains gene transcript mapping.
This can be provided either via DataFrame
trInfo
or file named trInfoFile
.
In case of a file, it should be formatted in following manner.
The first line should contain "# M <numberOfTranscripts>" and the following numberOfTranscripts
lines have to contain "<geneName> <transcriptName> <transcriptLength>".
Example is provided in extdata/ensSelect1.tr
.
Please note that the transcript information file automatically generated from alignment files are not sufficient because SAM/BAM files do not include gene names.
We hope to provide more convenient way in future versions of BitSeq.
Name of file containing the new expression samples.
Peter Glaus
getExpression
, tri.load
, tri.file.setGeneNames
, tri.file.hasGeneNames
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | setwd(system.file("extdata",package="BitSeq"))
## use transcript information as object
trinfo <- tri.load("ensSelect1.tr")
## gene expression
getGeneExpression("data-c0b1.rpkm", "data-c0b1-GE.rpkm", trInfo=trinfo)
gExpSamples <- loadSamples("data-c0b1-GE.rpkm")
gExpMeans <- rowMeans(as.data.frame(gExpSamples))
gExpMeans
## within gene expression
wgeFN <- getWithinGeneExpression("data-c0b1.rpkm", trInfoFile="ensSelect1.tr")
wgExpSamples <- loadSamples(wgeFN)
wgExpMeans <- rowMeans(as.data.frame(wgExpSamples))
head(wgExpMeans)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.