% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/annotateInteractions.R
\name{convertTranscriptsToTSS}
\alias{convertTranscriptsToTSS}
\title{Convert gene transcripts to Transcription Start Sites}
\usage{
convertTranscriptsToTSS(
  transcripts,
  geneid_column = c("gene_id", "GENEID", "geneID")
)
}
\arguments{
\item{transcripts}{\code{TxDb} annotation or other \code{GRanges} object}

\item{geneid_column}{A character vector of recognized names for the metadata
column in \code{transcripts} that contains gene identifiers. If none or more
than one is found, an error is raised.}
}
\value{
A \code{GRanges} object with gene identifiers in metadata column
\code{geneID} being a vector.
}
\description{
Convert a \code{GRanges} object with gene transcripts to a \code{GRanges}
object with gene TSSes of length 1 bp, with duplicate rows removed. Assumes
that gene identifiers are provided in one of the metadata columns, either as
a vector (possibly containing \code{NA} values) or a \code{CharacterList}.
The function is idempotent, i.e. can be applied multiple times without
changing the result.
}
\examples{
library(TxDb.Hsapiens.UCSC.hg19.knownGene)

# take only the transcripts of coding genes by ensuring that the coding
# sequence strand is not NA
transcripts <- transcripts(TxDb.Hsapiens.UCSC.hg19.knownGene,
    columns = "gene_id", filter = list(cds_strand = c("-", "+"))
)

convertTranscriptsToTSS(transcripts)
}
