ovUnion | R Documentation |
The following functions control the way in which overlaps between aligned reads and annotated features are resolved when an aligned read overlaps more than one feature on the same locus:
ovUnion(reads, features, ignoreStrand, inter.feature = TRUE)
ovIntersectionStrict(reads, features, ignoreStrand, inter.feature = TRUE)
reads |
A |
features |
A |
ignoreStrand |
(Default FALSE) A logical which defines if the strand
should be taken into consideration when computing the overlap between reads
and annotated features. When |
inter.feature |
When TRUE, ambiguous alignments (alignments
overlapping > 1 features) are removed and not counted. When
|
ovUnion()
: (default)
ovIntersectionStrict()
:
User supplied: a function taking the same parameters as the
previous three functions and returning a
Hits
object.
They take the following parameters:
These functions are given to the mode
parameter of the
qtex()
function and are similar to the functions
Union()
and
IntersectionStrict()
from the
GenomicAlignments
package, with the difference that instead
of returning counts of reads overlapping annotated features, they
return the actual overlaps, because the counting is deferred to other
algorithms that follow some specific strategy when a read maps to
more than one feature. For this same reason, these functions lack
the inter.feature
argument found in the corresponding functions
from the GenomicAlignments
package.
A Hits
object; see the Hits-class
manual page.
bamfiles <- list.files(system.file("extdata", package="atena"),
pattern="*.bam", full.names=TRUE)
## Not run:
## use the following two instructions to fetch annotations, they are here
## commented out to enable running this example quickly when building and
## checking the package
rmskat <- annotaTEs(genome="dm6", parsefun=rmskatenaparser,
strict=FALSE, insert=500)
rmskLTR <- getLTRs(rmskat, relLength=0.8, fullLength=TRUE, partial=TRUE,
otherLTR=TRUE)
## End(Not run)
## DO NOT TYPE THIS INSTRUCTION, WHICH JUST LOADS A PRE-COMPUTED ANNOTATION
## YOU SHOULD USE THE INSTRUCTIONS ABOVE TO FETCH ANNOTATIONS
rmskLTR <- readRDS(system.file("extdata", "rmskatLTRrlen80flenpartoth.rds",
package="atena"))
## build a parameter object for Telescope
tspar <- TelescopeParam(bfl=bamfiles,
teFeatures=rmskLTR,
singleEnd=TRUE,
ignoreStrand=TRUE)
## quantify expression using the 'ovIntersectionStrict()' mode function
tsquant <- qtex(tspar, mode=ovIntersectionStrict)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.