wrapKnown(bamFile, verbose=FALSE, seed=1, mc.cores.int=1,
mc.cores=1, genomeDB, readLength, rpkm=TRUE, priorq=2, priorqGeneExpr=2,
citype='none', niter=10^3, burnin=100, keep.pbam=FALSE,
keep.multihits=TRUE, chroms=NULL)
TRUE
to display progress information.
annotatedGenome
object containing annotated genome,
as returned by the procGenome
function.
readLength=75
.
TRUE
to return reads per kilobase per million (RPKM).
Set to FALSE
to return relative expression levels.
Important, relative expression adds up to 1 within gene island, NOT
within gene. To get relative expressions within gene run
relexprByGene
afterwards. See details.
priorq=2
for estimation, as it pools the
estimated expression away from 0 and 1 and returned lower
estimation errors than priorq=1
in our simulated
experiments.
"none"
to return no credibility intervals. Set to
"asymp"
to return approximate 95% CIs (obtained via the
delta method). Set to "exact"
to obtain exact
CIs via Monte Carlo simulation. Options "asymp"
and especially "exact"
can increase the
computation time substantially.
citype=="exact"
.
citype=="exact"
.
TRUE
to save processed bam object, as
returned by procBam
. This object can require substantial memory
during execution and disk storage upon saving and is not needed
for a default analysis.
FALSE
to discard reads aligned to
multiple positions.
readDistrs
procBam
with one element
per chromosomepathCounts
ExpressionSet
procBam
, getDistrs
and pathCounts
in parallel for each chromosome, but is much more efficient in cpu
speed and memory usage than running these functions separately.
Data from multiple samples are then combined using mergeExp
.
Note that further normalization (e.g. quantileNorm
)
may be needed preliminary to actual data analysis. When rpkm
is false the function returns the estimated
proportion of reads arising from each isoform within a gene island.
casper groups two or more genes into a gene island whenever these
genes share an exon (or part of an exon). Because exons are shared,
isoform quantification must be done simultaneously for all those
genes.
That is, the output from wrapKnown
when rpkm
is FALSE
are proportions that add up
to 1 within each island. If you would like to re-normalize these
expressions so that they add up to 1 within each gene, see the help
for function relexprByGene
.
One last remark: casper returns the estimated proportion of reads
generated by each isoform, which is not the same as relative
isoform expressions. Longer isoforms tend to
produce more reads than shorter isoforms. This is easily accounted for
by dividing relative expressions by isoform length, see relexprByGene
.
procGenome
, relexprByGene
, quantileNorm
## genDB<-makeTranscriptDbFromUCSC(genome="hg19", tablename="refGene")
## hg19DB <- procGenome(genDB, "hg19")
## bamFile="/path_to_bam/sorted.bam"
## ans <- wrapKnown(bamFile=bamFile, mc.cores.int=4, mc.cores=3, genomeDB=hg19DB, readLength=101)
## names(ans)
## head(exprs(ans\$exp))
Run the code above in your browser using DataLab