% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/importAnnotationExternal.R
\docType{methods}
\name{importAnnotationExternal}
\alias{importAnnotationExternal}
\alias{importAnnotationExternal,tssObject,character,character-method}
\title{\strong{importAnnotationExternal}}
\usage{
importAnnotationExternal(experimentName, fileType, annotFile)


  \S4method{importAnnotationExternal}{tssObject,character,character}(experimentName,
  fileType = c("bed", "gff", "gff3"), annotFile)
}
\arguments{
\item{experimentName}{- an S4 object of class \emph{tssObject}
that contains information about the experiment}

\item{fileType}{- the format of the annotation file to be imported.
Must be one of: "bed", "gff" or "gff3".}

\item{annotFile}{- a path (full or relative) to the annotation
file to be imported.}
}
\value{
fills the slot \emph{@annotation} in the returned
\emph{tssObject} with a \linkS4class{GRanges} object contining a
parsed annotation file of the selected type.
}
\description{
\code{importAnnotationExternal} imports an
annotation from an external file and attaches it to the
\emph{tssObject}
}
\note{
\code{importAnnotationExternal} makes use of three functions from the
\emph{rtracklayer} package: \code{\link[rtracklayer]{import.bed}},
\code{\link[rtracklayer]{import.gff}}, and
\code{\link[rtracklayer]{import.gff3}}

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

To import directly from the AnnotationHub client, please
refer to \code{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)

}
