Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
88c484a
Smoothing weights should be inverse stdev
kdkorthauer Aug 10, 2016
cbf4d2b
Merge pull request #16 from sampoll/devel
sampoll May 9, 2017
cb971c9
v1.17.2 -- Adds supported for TxDb objects with gene ids from ENSEMBL…
lcolladotor May 9, 2017
6968443
turned on .verbose in foreach
sampoll Sep 8, 2017
00e8343
separating branches
Sep 19, 2017
c307b4f
Implemented wrapper for nearest
Sep 20, 2017
0feed57
The rest of the wrapper for nearest
Sep 20, 2017
ed6ad53
modifications to DESCRIPTION recommended by BiocCheck
sampoll Oct 3, 2017
2f843a2
Adds bumphunter to the repo
Dec 3, 2012
c1b704b
Continue adds bumphunter to repo
Dec 3, 2012
31e0e78
Continue adds bumphunter to the repo
Nov 2, 2018
bc0780f
Continue adds bumphunter to repo
Nov 2, 2018
2989914
version bump to standard format for new package.
Dec 4, 2012
d5afedd
added cutoff printout to bumphunter engine if verbose=TRUE
Dec 8, 2012
7de18ca
Changed the annotateNearest argument pointMatch=FALSE to annotate=TRUE.
Dec 14, 2012
4e4033b
Added 2 man pages and bumped the version.
Dec 14, 2012
fd43b84
RI: fixed bug in bumphunter. the order of tab was wrong: area instead…
Dec 21, 2012
fd4a22b
RI: upped version
Dec 21, 2012
18546c7
Fix to getSegments, which was treating assumeSorted backwards.
Dec 21, 2012
a475ee9
RI: made some major changes to bumphunterEngine
Jan 1, 2013
01a0569
More clean up of %dorng% constructs, and started a matchGenes help page.
Jan 8, 2013
95dbfc5
RI: fixed clobber
Jan 18, 2013
f931d21
RI: upping version
Jan 18, 2013
efa6c10
Made the binding of 'subMat' explicit, again.
Jan 18, 2013
ba1f5a8
This man page is not ready.
Jan 18, 2013
77c6615
Updated the unit test rdas
Jan 19, 2013
cb84a99
Bugfix: Weights were previously ignored when smoothing beta
Feb 5, 2013
877909a
matchGenes now semi-deprecated, functionality absorbed into annotateN…
Feb 6, 2013
3d36463
changed version to 0.99.31
Feb 7, 2013
9f9c6df
?matchGenes fleshed out
Feb 7, 2013
da16ced
more refining
Feb 8, 2013
ffbd6d0
Added data/TT.rda
Feb 15, 2013
551643c
Compressed TT.rda
Feb 18, 2013
51b0393
Depends R >= 2.10 because data/TT.rda saved with compress="xz"
Feb 18, 2013
488467c
matchGenes bugfixes
Feb 18, 2013
f0ef275
suppressed warning from IRanges::distance
Feb 19, 2013
12e47bc
bugfix to fuzzy.match2()
Feb 21, 2013
73d1859
simplified my work-around
Feb 25, 2013
4e30f06
fixed work-around again
Feb 25, 2013
aa329d1
fixed Windows problem
Mar 17, 2013
ad8a44a
formatting fix
Mar 17, 2013
803fc8b
Fixed the case where D$chr is a factor.
Apr 3, 2013
a04c3fb
bump y of x.y.z version number for BioC 2.12 release
dtenenba Apr 3, 2013
e1c9c0c
Bump y in version x.y.z to odd number in devel
dtenenba Apr 3, 2013
f07dcd3
RI: untested changes to bumphunter
Apr 10, 2013
252c376
RI: some changes
Apr 11, 2013
b75d27d
minor printout fix
Apr 11, 2013
16ee63b
RI: some changes
Apr 12, 2013
5b72d6c
added locfitByCluster
Apr 12, 2013
5c12067
changed defaults for locfitByCluster
Apr 12, 2013
24de9c8
added locfitByCluster to NAMESPACE
Apr 12, 2013
20b9299
RI: FIxed bug in bumphunter. smoother was missing a ... Also added pi…
Apr 12, 2013
c15883a
fixed re-ordering bug in smoother()
Apr 14, 2013
58df916
fixed message typo
Apr 14, 2013
abcdecf
some fixes so it now checks without error
May 1, 2013
f3ab753
foreach 'fixes'
May 3, 2013
c2c9e94
fixed a greater or equal issue; added some locfit man pages
Jun 30, 2013
259b547
forgot to svn add a man page
Jun 30, 2013
5d2dd7e
changes for the new (3.0) 'Hits' value of distanceToNearest
Jul 1, 2013
d6d59c2
trying to fix the R CMD check problem in example(bumphunter)
Jul 6, 2013
92a232b
added closeSockets
Jul 6, 2013
bf1b386
updated NEWS
Jul 6, 2013
116b84c
more bugfixes related to foreach on Windows
Jul 10, 2013
8d5aaff
comitted from subdir; more bugfixes related to foreach on Windows
Jul 10, 2013
9d4e4fe
hopefully final fix to windows
Jul 10, 2013
a0064fd
added class to output of bumphunter
Jul 15, 2013
d7cbcdb
an additional verbose message
Jul 15, 2013
f1f57bc
.matchGenes() was not passing the 'all' value to the children
Jul 29, 2013
9298559
Used to stop on NAs from nearest. These now lead to NA rows in the o…
Aug 19, 2013
345aa5a
Documenting new behavior of regionMatch for queries without matching …
Aug 19, 2013
4cedb70
speedup of fwer computations using foreach
Aug 20, 2013
0d89dcc
added boundedClusterMaker
Aug 22, 2013
0334ab6
Simplified the use of fuzzy.match2; makes annotation of "inside" quer…
Aug 27, 2013
e4224a7
fixed man page error leading to warnings in R CMD check
Aug 30, 2013
22c12c4
fixed bug in .getModT, which is not used elsewhere in bumphunter
Sep 11, 2013
e8ba01f
fixing some issues reported by R-devel re. NAMESPACE; also fixed a ma…
Sep 17, 2013
3a50d82
bump versions prior to creating BioC 2.13 branch
dtenenba Oct 14, 2013
3fa98a3
bump version after release branch has been created
dtenenba Oct 14, 2013
5f2b626
Rle instead of rle, thanks to M. Lawrence
Oct 21, 2013
bc10090
further use of parallel computing in bumphunterEngine
Oct 31, 2013
7a7f620
extensive additions to NAMESPACE
Nov 20, 2013
3768254
fixed NAMESPACE issues
Dec 4, 2013
3684923
nearestgene now loads TT into the local environment.
Dec 4, 2013
03a3248
resaved rda to make it smaller
Dec 10, 2013
b3e3ee1
In cases of multiple refseq ids for a given gene, the
Dec 12, 2013
8f4beed
ran tools::resaveRdaFiles
Dec 13, 2013
cec7586
modify to new biocViews to DESCRIPTION file
sonali-bioc Mar 4, 2014
cde90fe
First version bump prior to creating 2.14 branch.
dtenenba Apr 11, 2014
f6bc225
Second version bump after creating 2.14 release branch.
dtenenba Apr 11, 2014
3f95575
adding warning
Apr 30, 2014
dafb26c
adding functionality so user can supply permutations
May 1, 2014
fafda6d
minor change. up the version
May 1, 2014
bb13b76
minor cosmetic change
May 1, 2014
bff680e
resync with latest changes in S4Vectors/IRanges/GenomicRanges/GenomeI…
May 6, 2014
87393fc
Testing Git-SVN bridge
May 28, 2014
b3e4e95
Updated Rafa's maintainer email
May 28, 2014
557e2a3
follow Rle move from IRanges to S4Vectors
Jul 7, 2014
25fd490
Fixed matchGenes man page typo.
Jul 23, 2014
96b6595
Improvements to known_transcripts, now exported, and data/TT, now a
Aug 28, 2014
efe3c38
Commit made by the Bioconductor Git-SVN bridge.
Oct 7, 2014
d25e8a2
fix a typo......
dtenenba Oct 8, 2014
d177d5e
Bump package versions prior to creating the 3.0 branch.
dtenenba Oct 13, 2014
5e9fe6d
Bumping versions after creating 3.0 release branch.
dtenenba Oct 13, 2014
d1a787e
Commit made by the Bioconductor Git-SVN bridge.
Nov 15, 2014
3c0a140
Commit made by the Bioconductor Git-SVN bridge.
Nov 18, 2014
6181e82
Commit made by the Bioconductor Git-SVN bridge.
Nov 18, 2014
b103ff5
Commit made by the Bioconductor Git-SVN bridge.
Dec 11, 2014
268c7e8
Commit made by the Bioconductor Git-SVN bridge.
Mar 3, 2015
147b16e
Commit made by the Bioconductor Git-SVN bridge.
Mar 3, 2015
95fe9c4
Commit made by the Bioconductor Git-SVN bridge.
Mar 13, 2015
e826f0e
Commit made by the Bioconductor Git-SVN bridge.
Mar 13, 2015
89cca51
Bump versions prior to creating 3.1 branch.
dtenenba Apr 16, 2015
6e8ef20
Bump versions in trunk after creation of 3.1 branch.
dtenenba Apr 16, 2015
9a12c16
use makeTxDbFromUCSC() instead of makeTranscriptDbFromUCSC()
May 3, 2015
fdc2f92
resync with "split" methods moving from IRanges to S4Vectors
Oct 1, 2015
c343103
Bumped versions of all packages prior to creating 3.2 branch.
dtenenba Oct 13, 2015
583dcce
Bumped version number of all packages after creation of 3.2 branch.
dtenenba Oct 13, 2015
dc869a2
Commit made by the Bioconductor Git-SVN bridge.
Oct 21, 2015
2154446
Commit made by the Bioconductor Git-SVN bridge.
Oct 21, 2015
7402edc
Commit made by the Bioconductor Git-SVN bridge.
Oct 21, 2015
b17325c
elementLengths was renamed -> elementNROWS in S4Vectors (new name ref…
Jan 29, 2016
1ed8d62
Version was previously bumped to 1.11.0 and then (after more than one
dtenenba Jan 31, 2016
7d5dd35
t() implicit S4 generic and its methods are now defined in S4Vectors
Feb 24, 2016
b853bd3
Dummy edit and version bump. Testing git mirror
Mar 28, 2016
7bab5e7
v1.11.5 -- fixes https://github.com/ririzarr/bumphunter/issues/7
Mar 28, 2016
81256d5
Bump versions prior to creation of 3.3 branch
dtenenba May 3, 2016
a0e621f
bump version after creating 3.3 branch
dtenenba May 3, 2016
921662f
species() is defunct. Use organism() instead.
Jul 10, 2016
688d424
bump x.y.z versions to even 'y' prior to creation of 3_4 branch
Oct 17, 2016
eb59e4f
bump x.y.z versions to odd 'y' after creation of 3_4 branch
Oct 17, 2016
569f8c2
bump x.y.z versions to even y prior to creation of 3_5 branch
Apr 24, 2017
3d44877
bump x.y.z versions to odd y after creation of 3_5 branch
Apr 24, 2017
abf7882
whitespace change; checking permissions
sampoll May 19, 2017
2f60c0f
Merge with Bioconductor devel brach
sampoll May 19, 2017
c48733a
v1.17.2 -- Adds supported for TxDb objects with gene ids from ENSEMBL…
sampoll May 19, 2017
ca2c501
increment version number for bugfix
sampoll May 19, 2017
8b46c70
Updated URL for gencode
sampoll Oct 29, 2018
ecd24f3
bump x.y.z versions to even y prior to creation of RELEASE_3_6 branch
hpages Oct 30, 2017
4cf919a
bump x.y.z versions to odd y after creation of RELEASE_3_6 branch
hpages Oct 30, 2017
9e7234d
bump x.y.z versions to even y prior to creation of RELEASE_3_7 branch
Apr 30, 2018
e3b3742
bump x.y.z versions to odd y after creation of RELEASE_3_7 branch
Apr 30, 2018
3d4f308
bump x.y.z versions to even y prior to creation of RELEASE_3_8 branch
vobencha Oct 30, 2018
ac34111
Apply interval bugfix to sanitized master branch
sampoll Nov 2, 2018
96fd715
Bump version after cherry-picking bug fix,
nturaga Nov 5, 2018
b067fe7
Removed unit tests that rely on sporadically unreliable server
sampoll Nov 7, 2018
9410d92
Increment version number for bugfix
sampoll Nov 8, 2018
974ae9a
Remove data download from sporadically unavailable url
sampoll Nov 9, 2018
e5c9793
Increment version number
sampoll Nov 9, 2018
29b8740
Addition to BiocViews in DESCRIPTION
sampoll Nov 30, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: bumphunter
Version: 1.11.6
Version: 1.24.5
Title: Bump Hunter
Description: Tools for finding bumps in genomic data
Authors@R: c(person(c("Rafael", "A."), "Irizarry", role = c("cre","aut"), email
Expand All @@ -9,7 +9,7 @@ Authors@R: c(person(c("Rafael", "A."), "Irizarry", role = c("cre","aut"), email
"ctb"), person(c("Andrew", "E."), "Jaffe", role = "ctb"), person("Harris",
"Jaffee", role = "ctb"), person("Leonardo", "Collado-Torres", role="ctb"))
Depends:
R (>= 2.10),
R (>= 3.5),
S4Vectors (>= 0.9.25),
IRanges (>= 2.3.23),
GenomeInfoDb,
Expand All @@ -32,9 +32,11 @@ Imports:
BiocGenerics,
utils,
GenomicFeatures,
AnnotationDbi
AnnotationDbi,
stats
License: Artistic-2.0
LazyData: yes
URL: https://github.com/ririzarr/bumphunter
biocViews: DNAMethylation, Epigenetics, Infrastructure,
MultipleComparison
MultipleComparison, ImmunoOncology
RoxygenNote: 6.1.0
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ importClassesFrom(methods, matrix)
import(matrixStats)
import(BiocGenerics)
import(S4Vectors)
importFrom(IRanges,PartitioningByEnd)
importMethodsFrom(IRanges, as.list, as.matrix,
diff, distance, distanceToNearest,
end, mean,
Expand All @@ -24,6 +25,7 @@ importFrom(utils, data, packageDescription)
importFrom(parallel, mclapply, stopCluster)
importFrom(GenomicFeatures, exonsBy, cdsBy, transcriptsBy)
importFrom(AnnotationDbi, mappedkeys)
importMethodsFrom(AnnotationDbi, mapIds)

export(bumphunter, bumphunterEngine, clusterMaker, boundedClusterMaker,
dummyData, getSegments,
Expand Down
2 changes: 1 addition & 1 deletion R/bumphunter.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ bumphunterEngine<-function(mat, design, chr = NULL, pos,
tmp <- .getEstimate(mat = mat, design = design,
coef = coef, full = TRUE)
rawBeta <- tmp$coef
weights <- tmp$sigma
weights <- 1/tmp$sigma
rm(tmp)
} else {
rawBeta <- .getEstimate(mat = mat, design = design, coef = coef,
Expand Down
69 changes: 46 additions & 23 deletions R/matchGenes.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ annotateNearest <- function(x, subject, annotate=TRUE, ...) {
stop("select=\"all\" not supported (yet)")

# find nearests
NN <- nearest(x, subject, ...)
NN <- smarterNearest(x, subject, ...)
nearest_exists <- !is.na(NN)

# full return value
Expand Down Expand Up @@ -89,23 +89,23 @@ annotateNearest <- function(x, subject, annotate=TRUE, ...) {
#######################################################
#######################################################

annotateTranscripts <-function(txdb, annotationPackage=NULL, by=c("tx","gene"),codingOnly=FALSE,verbose=TRUE,requireAnnotation=FALSE){
annotateTranscripts <-function(txdb, annotationPackage=NULL, by=c("tx","gene"),codingOnly=FALSE,verbose=TRUE,requireAnnotation=FALSE, mappingInfo = NULL, simplifyGeneID = FALSE){

if( class(txdb)!="TxDb") stop("txdb must be of class TxDb")

if(is.null(annotationPackage)){
species <- species(txdb)
species <- strsplit(species," ")[[1]]
species <- paste0(substr(species[1],1,1),
tolower(substr(species[2],1,1)))
annotationPackage <- paste("org",species,"eg.db",sep=".")
organism <- organism(txdb)
organism <- strsplit(organism," ")[[1]]
organism <- paste0(substr(organism[1],1,1),
tolower(substr(organism[2],1,1)))
annotationPackage <- paste("org",organism,"eg.db",sep=".")
if(verbose)
message(sprintf("No annotationPackage supplied. Trying %s.",annotationPackage))
}

if(!require(annotationPackage,character.only=TRUE)){
if(requireAnnotation){
stop("Can't load ",annotationPackage,".\nMake sure library is installed.\nAnd make sure the species argument follows the convention here http://www.bioconductor.org/packages/release/data/annotation/.\nFor example for human use Hs")}else{
stop("Can't load ",annotationPackage,".\nMake sure library is installed.\nAnd make sure the organism argument follows the convention here http://www.bioconductor.org/packages/release/data/annotation/.\nFor example for human use Hs")}else{
message("Could not load ",annotationPackage,". Will continue without annotation")
annotationPackage <- NULL
}
Expand Down Expand Up @@ -136,7 +136,9 @@ annotateTranscripts <-function(txdb, annotationPackage=NULL, by=c("tx","gene"),c
strand <- unlist(CharacterList(strand(tt)))

RR <- ranges(tt)
entrez <- names(RR)
## Useful for switching Gencode IDs to Ensembl IDs
if(simplifyGeneID) names(RR) <- gsub('\\..*', '', names(RR))
geneid <- names(RR)
## starts / ends (left/right endpoints):
TSS <- unlist(start(RR))
TSE <- unlist(end(RR))
Expand Down Expand Up @@ -175,24 +177,30 @@ annotateTranscripts <-function(txdb, annotationPackage=NULL, by=c("tx","gene"),c

##now annotate genes
if(by=="tx") TT <- elementNROWS(tt) else TT <- rep(1,length(tt))
Entrez <- Rle(entrez, TT)
Geneid <- Rle(geneid, TT)

Tx <- txx

if(!is.null(annotationPackage)){
if(verbose) message("Annotating genes.")

if(!is.null(mappingInfo)) {
stopifnot(all(c('column', 'keytype', 'multiVals') %in% names(mappingInfo)))
geneid <- mapIds(get(annotationPackage), keys = geneid, column= mappingInfo$column, keytype = mappingInfo$keytype, multiVals = mappingInfo$multiVals)
}


##Annotate transcrtipt
##cant use select cause map is not 1-1
map <- get(gsub("\\.db", "SYMBOL",annotationPackage))
map <- get(gsub("\\.db", "SYMBOL", annotationPackage))
which <- mappedkeys(map)
symbols <- sapply(as.list(map[which]), paste, collapse=" ")
genes <- symbols[entrez]
genes <- symbols[geneid]

map <- get(gsub("\\.db", "REFSEQ",annotationPackage))
map <- get(gsub("\\.db", "REFSEQ", annotationPackage))
which <- mappedkeys(map)
symbols <- sapply(as.list(map[which]), paste, collapse=" ")
refseq <- symbols[entrez] # a handful of NA
refseq <- symbols[geneid] # a handful of NA

Gene <- Rle(genes, TT)
Refseq <- Rle(refseq, TT)
Expand All @@ -204,13 +212,12 @@ annotateTranscripts <-function(txdb, annotationPackage=NULL, by=c("tx","gene"),c
transcripts=GRanges(ranges=IRanges(start=TSS, end=TSE),
seqnames=chr, strand=strand,
seqinfo=seqinfo,
CSS, CSE, Tx, Entrez, Gene, Refseq, Nexons, Exons)
CSS, CSE, Tx, Geneid, Gene, Refseq, Nexons, Exons)
if(codingOnly) transcripts <- transcripts[!is.na(values(transcripts)$CSS),]
attributes(transcripts)$description <- "annotatedTranscripts"
return(transcripts)
}


matchGenes <- function(x,subject, type=c("any","fiveprime"),
promoterDist=2500,
skipExons=FALSE,
Expand All @@ -225,9 +232,9 @@ matchGenes <- function(x,subject, type=c("any","fiveprime"),
type=match.arg(type)

if(type=="fiveprime"){
map <- nearest(x,resize(subject,width=1))
map <- smarterNearest(x,resize(subject,width=1))
} else{
map <- nearest(x,subject)
map <- smarterNearest(x,subject)
}

ind <- which(!is.na(map))
Expand All @@ -252,13 +259,13 @@ matchGenes <- function(x,subject, type=c("any","fiveprime"),
subdist=rep(0,length(x))
genenames=rep("",length(x))
geneannotation=rep("",length(x))
entrez=rep("",length(x))
geneid=rep("",length(x))
strands=rep("",length(x))


genenames[ind]<-as.character(values(subject[map[ind],])$Gene)
geneannotation[ind]<-as.character(values(subject[map[ind],])$Refseq)
entrez[ind]<-as.character(values(subject[map[ind],])$Entrez)
geneid[ind]<-as.character(values(subject[map[ind],])$Geneid)
nexons[ind] <- values(subject[map[ind],])$Nexons
strands[ind] <- as.character(strand(subject[map[ind],]))

Expand Down Expand Up @@ -339,7 +346,7 @@ matchGenes <- function(x,subject, type=c("any","fiveprime"),
if( type[j]%in%c("overlaps 5'","overlaps 3'","inside") & !skipExons ){

ir=IRanges(start=c(S,E),width=1)
map2 = nearest(ir, exons)
map2 = smarterNearest(ir, exons)
dist2<-distance(ir,exons[map2])
pos <- start(ir) ##start end the same
dist2 <- dist2*ifelse(
Expand Down Expand Up @@ -476,9 +483,25 @@ matchGenes <- function(x,subject, type=c("any","fiveprime"),
strand=strands,
geneL=geneL,
codingL=codingL,
Entrez=entrez,
Geneid=geneid,
subjectHits=map)
return(tmp)
}

poverlapWidth <- function(query, subject) {
overlap_score <- pmin(end(query), end(subject)) -
pmax(start(query), start(subject)) + 1L

pmax(overlap_score, 0L)
}

smarterNearest <- function(x, subject) {
hits <- nearest(x, subject, select="all")
mcols(hits)$ovwidth <- poverlapWidth(x[queryHits(hits)],subject[subjectHits(hits)])

partitioning <- PartitioningByEnd(queryHits(hits),NG=queryLength(hits))
ovwidth <- relist(mcols(hits)$ovwidth, partitioning)
hits <- hits[unlist(ovwidth==max(ovwidth))]
selectHits(hits, select="arbitrary")
}


2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is the developer version of the [bumphunter](http://bioconductor.org/packages/devel/bioc/html/bumphunter.html) R/Bioconductor package.
This is the developer version of the [bumphunter](http://bioconductor.org/packages/devel/bioc/html/bumphunter.html) R/Bioconductor package.

[Bioconductor build/check report](http://master.bioconductor.org/checkResults/devel/bioc-LATEST/bumphunter/)

20 changes: 16 additions & 4 deletions man/annotateTranscripts.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Annotate transcripts
Annotate transcripts
}
\usage{
annotateTranscripts(txdb, annotationPackage = NULL, by = c("tx","gene"), codingOnly=FALSE, verbose = TRUE, requireAnnotation = FALSE)
annotateTranscripts(txdb, annotationPackage = NULL, by = c("tx","gene"), codingOnly=FALSE, verbose = TRUE, requireAnnotation = FALSE, mappingInfo = NULL, simplifyGeneID = FALSE)
}
\arguments{
\item{txdb}{
Expand All @@ -16,7 +16,7 @@ annotateTranscripts(txdb, annotationPackage = NULL, by = c("tx","gene"), codingO
\item{annotationPackage}{
An annotation data package from which to obtain gene/transcript
annotation. For example \code{org.Hs.eg.db}. If none is provided the
function tries to infer it from \code{species(txdb)} and if it can't it
function tries to infer it from \code{organism(txdb)} and if it can't it
proceeds without annotation unless \code{ requireAnnotation = TRUE}.
}
\item{by}{
Expand All @@ -34,6 +34,17 @@ annotateTranscripts(txdb, annotationPackage = NULL, by = c("tx","gene"), codingO
logical value. If 'TRUE' function will stop if no annotation package
is successfully loaded.
}
\item{mappingInfo}{
a named list with elements 'column', 'keytype' and 'multiVals'. If specified
this information will be used with \link[AnnotationDbi]{mapIds} when mapping
the gene ids using \code{annotationPackage}. This is useful when working
with a \code{txdb} object from ENSEMBL or GENCODE among other databases.
}
\item{simplifyGeneID}{
logical value. If 'TRUE', gene ids will be shortened to before a dot is
present in the id. This is useful for changing GENCODE gene ids to
ENSEMBL ids.
}
}
\details{
This function prepares a \code{GRanges} for the \code{\link{matchGenes}}
Expand All @@ -51,7 +62,8 @@ annotateTranscripts(txdb, annotationPackage = NULL, by = c("tx","gene"), codingO
number of exons, \code{Exons} is an \code{IRanges} with the exon information.
}
\author{
Harris Jaffee and Rafael A. Irizarry
Harris Jaffee and Rafael A. Irizarry.
'mappingInfo' and 'simplifyGeneID' contributed by Leonardo Collado-Torres.
}

\seealso{
Expand All @@ -66,4 +78,4 @@ annotateTranscripts(txdb, annotationPackage = NULL, by = c("tx","gene"), codingO
genes <- annotateTranscripts(TxDb.Hsapiens.UCSC.hg19.knownGene,annotation="org.Hs.eg.db")

}
}
}
Loading