addAnnotationToTSR-methods: *addAnnotationToTSR*

Description Usage Arguments Value Note Examples

Description

addAnnotationToTSR associates an identified promoter with a given gene, if found upstream and on the same strand within a specified range.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
addAnnotationToTSR(
  experimentName,
  tsrSetType,
  tsrSet = 1,
  upstreamDist,
  downstreamDist,
  feature,
  featureColumnID,
  writeTable = TRUE
)

## S4 method for signature 
## 'tssObject,
##   character,
##   numeric,
##   numeric,
##   numeric,
##   character,
##   character,
##   logical'
addAnnotationToTSR(
  experimentName,
  tsrSetType,
  tsrSet = 1,
  upstreamDist = 1000,
  downstreamDist = 200,
  feature = "gene",
  featureColumnID = "ID",
  writeTable = TRUE
)

Arguments

experimentName

an object of class tssObject with occupied data slots @tsrData (and/or @tsrDataMerged). The tssObject must alrady have an annotation attached to the slot @annotation, which is provided by either importAnnotationExternal or importAnnotationHub.

tsrSetType

Specifies the type of TSR set to be processed. Options are "replicates" or "merged".

tsrSet

Number of the data set (of type tsrSetType) to be processed. (numeric)

upstreamDist

the maximum distance (in bp) upstream of the selected interval necessary to associate a TSR with a given annotation. (numeric)

downstreamDist

the maximum distance (in bp) downstream of the start of the selected interval to associate a TSR with a given annotation. (numeric)

feature

Specifies the feature to be used for annotation (typically "gene" [default] or "mRNA" for GFF3 input); set to "all" if all annotations from the input are to be used. (character)

featureColumnID

Name of the column identifier in the GRanges annotation object. This should be "ID" (default) for GFF3 input or "name" for bed input. (character)

writeTable

logical, specifying whether the output should be written to a tab-delimited file. Defaults to TRUE.

Value

addAnnotationToTSR adds feature annotation to the (merged) @tsrData data frame and returns the updated tssObject.

Note

An example similar to the this one can be found in the vignette (/inst/doc/TSRchitect.Rmd)

Examples

1
2
3
4
5
6
load(system.file("extdata", "tssObjectExample.RData",
package="TSRchitect"))
tssObjectExample <- addAnnotationToTSR(experimentName=tssObjectExample,
tsrSetType="merged", tsrSet=1, upstreamDist=1000, downstreamDist=200,
feature="transcript", featureColumnID="ID", writeTable=FALSE)
#if the object attached to @annotation is a gff/gff3 file

TSRchitect documentation built on Nov. 8, 2020, 8:11 p.m.