TelescopeParam-class {atena}R Documentation

Telescope parameter class

Description

This is a class for storing parameters provided to the Telescope algorithm.

Build an object of the class TelescopeParam.

Usage

TelescopeParam(
  bfl,
  teFeatures,
  aggregateby = character(0),
  geneFeatures = NA,
  singleEnd = TRUE,
  strandMode = 1L,
  ignoreStrand = FALSE,
  fragments = FALSE,
  pi_prior = 0L,
  theta_prior = 0L,
  em_epsilon = 1e-07,
  maxIter = 100L
)

## S4 method for signature 'TelescopeParam'
show(object)

Arguments

bfl

A BamFile or BamFileList object, or a character string vector of BAM filenames.

teFeatures

A GRanges or GRangesList object. Elements in this object should have names, which will be used as a grouping factor for ranges forming a common locus (equivalent to "locus" column in Telescope), unless other metadata column names are specified in the aggregateby parameter.

aggregateby

Character vector with column names from the annotation to be used to aggregate quantifications. By default, this is an empty vector, which means that the names of the input GRanges or GRangesList object given in the teFeatures parameter are used to aggregate quantifications.

geneFeatures

A GRanges or GRangesList object with the gene annotated features to be quantified. The TEtranscripts approach for gene expression quantification is used, in which overlaps with unique reads are first tallied with respect to these gene features whereas multi-mapping reads are preferentially assigned to TEs. Elements should have names indicating the gene name/id. In case that geneFeatures contains a metadata column named type, only the elements with type = exon are considered for the analysis. Then, exon counts are summarized to the gene level.

singleEnd

(Default TRUE) Logical value indicating if reads are single (TRUE) or paired-end (FALSE).

strandMode

(Default 1) Numeric vector which can take values 0, 1 or 2. The strand mode is a per-object switch on GAlignmentPairs objects that controls the behavior of the strand getter. See GAlignmentPairs class for further detail. If singleEnd = TRUE, then strandMode is ignored.

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 ignoreStrand = FALSE, an aligned read is considered to be overlapping an annotated feature as long as they have a non-empty intersecting genomic range on the same strand, while when ignoreStrand = TRUE the strand is not considered.

fragments

(Default FALSE) A logical; applied to paired-end data only. When fragments=FALSE (default), the read-counting method only counts ‘mated pairs’ from opposite strands, while when fragments=TRUE, same-strand pairs, singletons, reads with unmapped pairs and other fragments are also counted. For further details see summarizeOverlaps().

pi_prior

(Default 0) A positive integer scalar indicating the prior on pi. This is equivalent to adding n unique reads.

theta_prior

(Default 0) A positive integer scalar storing the prior on Q. Equivalent to adding n non-unique reads.

em_epsilon

(Default 1e-7) A numeric scalar indicating the EM Algorithm Epsilon cutoff.

maxIter

A positive integer scalar storing the maximum number of iterations of the EM SQUAREM algorithm (Du and Varadhan, 2020). Default is 100 and this value is passed to the maxiter parameter of the squarem() function.

object

A TelescopeParam object.

Details

This is the constructor function for objects of the class TelescopeParam-class. This type of object is the input to the function qtex() for quantifying expression of transposable elements, which will call the Telescope algorithm Bendall et al. (2019) with this type of object.

Value

A TelescopeParam object.

Slots

singleEnd

(Default TRUE) Logical value indicating if reads are single (TRUE) or paired-end (FALSE).

strandMode

(Default 1) Numeric vector which can take values 0, 1 or 2. The strand mode is a per-object switch on GAlignmentPairs objects that controls the behavior of the strand getter. See GAlignmentPairs class for further detail. If singleEnd = TRUE, then strandMode is ignored.

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 ignoreStrand = FALSE, an aligned read is considered to be overlapping an annotated feature as long as they have a non-empty intersecting genomic range on the same strand, while when ignoreStrand = TRUE the strand is not considered.

fragments

(Default FALSE) A logical; applied to paired-end data only. When fragments=FALSE (default), the read-counting method only counts ‘mated pairs’ from opposite strands, while when fragments=TRUE, same-strand pairs, singletons, reads with unmapped pairs and other fragments are also counted. For further details see summarizeOverlaps().

pi_prior

(Default 0) A positive integer scalar indicating the prior on pi. This is equivalent to adding n unique reads.

theta_prior

(Default 0) A positive integer scalar storing the prior on Q. Equivalent to adding n non-unique reads.

em_epsilon

(Default 1e-7) A numeric scalar indicating the EM Algorithm Epsilon cutoff.

maxIter

A positive integer scalar storing the maximum number of iterations of the EM SQUAREM algorithm (Du and Varadhan, 2020). Default is 100 and this value is passed to the maxiter parameter of the squarem() function.

References

Bendall et al. Telescope: characterization of the retrotranscriptome by accurate estimation of transposable element expression. PLOS Comp. Biol. 2019;15(9):e1006453. DOI: https://doi.org/10.1371/journal.pcbi.1006453

Bendall et al. Telescope: characterization of the retrotranscriptome by accurate estimation of transposable element expression. PLOS Comp. Biol. 2019;15(9):e1006453. DOI: https://doi.org/10.1371/journal.pcbi.1006453

Examples

bamfiles <- list.files(system.file("extdata", package="atena"),
                       pattern="*.bam", full.names=TRUE)
TE_annot <- readRDS(file = system.file("extdata", "Top28TEs.rds",
                    package="atena"))
gene_annot <- readRDS(file = system.file("extdata", "Top50genes.rds",
                                         package="atena"))
tspar <- TelescopeParam(bfl=bamfiles, teFeatures=TE_annot,
                        geneFeatures = gene_annot,
                        singleEnd = TRUE, ignoreStrand=TRUE)
tspar


[Package atena version 0.99.43 Index]