getDistrs {casper} | R Documentation |
Compute fragment start distributions by using reads aligned to genes with only one annotated variant. Estimate fragment length distribution using fragments aligned to long exons (>1000nt). Fragment length is defined as the distance between the start of the left-end read and the end of the right-end read.
getDistrs(DB, bam, pbam, islandid=NULL, verbose=FALSE, nreads=4*10^6, readLength, min.gt.freq = NULL, tgroups=5, mc.cores=1)
DB |
Annotated genome. Object of class |
bam |
Aligned reads, as returned by |
pbam |
Processed BAM object of class |
islandid |
Island IDs of islands to be used in the read start distribution calculations (defaults to genes with only one annotated variant) |
verbose |
Set to |
nreads |
To speed up computations, only the first |
readLength |
Read length in bp, e.g. in a paired-end experiment where
75bp are sequenced on each end one would set |
min.gt.freq |
(Only for genomes with information of gene type) Minimum frequency of gene type to define a new class. All types with lower frequencies are collapsed. |
tgroups |
(Only for genomes with information of gene type) Maximum number of gene types. Types with low frequencies are collapsed. |
mc.cores |
Number of cores to use in parallel computation. |
An object of class readDistrs with slots:
lenDis |
Table with number of fragments with a given length |
stDis |
Cumulative distribution function (object of type closure) for relative start position |
Camille Stephan-Otto Attolini, David Rossell
data(K562.r1l1) data(hg19DB) bam0 <- rmShortInserts(K562.r1l1, isizeMin=100) distrs <- getDistrs(hg19DB,bam=bam0,readLength=75) #Fragment length distribution plot(distrs,'fragLength') #Fragment start distribution (relative to transcript length) plot(distrs,'readSt')