importAnnotationExternal {TSRchitect}R Documentation

importAnnotationExternal

Description

importAnnotationExternal imports an annotation from an external file and attaches it to the tssObject

Usage

importAnnotationExternal(experimentName, fileType, annotFile)


  ## S4 method for signature 'tssObject,character,character'
importAnnotationExternal(experimentName,
  fileType = c("bed", "gff", "gff3"), annotFile)

Arguments

experimentName

- an S4 object of class tssObject that contains information about the experiment

fileType

- the format of the annotation file to be imported. Must be one of: "bed", "gff" or "gff3".

annotFile

- a path (full or relative) to the annotation file to be imported.

Value

fills the slot @annotation in the returned tssObject with a GRanges object contining a parsed annotation file of the selected type.

Note

importAnnotationExternal makes use of three functions from the rtracklayer package: import.bed, import.gff, and import.gff3

An example similar to the one provided can be found in Example 2 from the vignette (/inst/doc/TSRchitect.Rmd)

To import directly from the AnnotationHub client, please refer to importAnnotationHub

Examples

load(system.file("extdata", "tssObjectExample.RData", package="TSRchitect"))
extdata.dir <- system.file("extdata", package="TSRchitect")
annotation <- dir(extdata.dir, pattern="\\.gff3$", full.names=TRUE)
tssObjectExample <- importAnnotationExternal(experimentName=tssObjectExample,
fileType="gff3", annotFile=annotation)


[Package TSRchitect version 1.10.0 Index]