matchGenes(x, subject, type = c("any", "fiveprime"), promoterDist = 2500, skipExons = FALSE, verbose = TRUE)
IRanges
or GenomicRanges
object, or a
data.frame
with columns for start
, end
,
and, optionally, chr
or seqnames
.
GenomicRanges
object containing transcripts or genes that
have been annotated by the function
annotateTranscripts
.
c("name",
"annotation", "description", "region", "distance", "subregion",
"insideDistance", "exonnumber", "nexons", "UTR", "strand", "geneL", "codingL","Entrez","subhectHits")
.
The first column is the _gene_ nearest the query, by virtue of it
owning the transcript determined (or chosen by nearest
) to be
nearest the query. Note that the nearest gene to a given
query, in column 3, may not be unique and we arbitrarily chose one as
done by default by nearest
.The "distance" column is the distance from the query to the 5' end of the
nearest transcript, so may be different from the distance computed by
nearest
to that transcript, as a range.c("upstream", "promoter",
"overlaps 5'", "inside intron", "inside exon", "covers exon(s)",
"overlaps exon upstream", "overlaps exon downstream",
"overlaps two exons", "overlaps 3'", "close to 3'", "downstream",
"covers")
c("upstream", "promoter", "overlaps 5'",
"inside", "overlaps 3'", "close to 3'", "downstream", "covers")
c("inside intron", "inside exon",
"covers exon(s)", "overlaps exon upstream", "overlaps exon downstream",
"overlaps two exons")
c("inside transcription region", "5' UTR",
"overlaps 5' UTR", "3'UTR", "overlaps 3'UTR", "covers transcription region")
nearest
and then annotates
the the relationship between the region and the transcript/gene that is
closest. Many details are provided on this relationship as described in
the next section. annotateNearest
, annotateTranscripts
## Not run:
# islands=makeGRangesFromDataFrame(read.delim("http://rafalab.jhsph.edu/CGI/model-based-cpg-islands-hg19.txt")[1:100,])
# library("TxDb.Hsapiens.UCSC.hg19.knownGene")
# genes <- annotateTranscripts(TxDb.Hsapiens.UCSC.hg19.knownGene)
# tab<- matchGenes(islands,genes)
# ## End(Not run)
Run the code above in your browser using DataLab