diff --git a/DESCRIPTION b/DESCRIPTION index 8370cfa..b0ce5a3 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: GenomicState Title: Build and access GenomicState objects for use with derfinder tools from sources like Gencode -Version: 0.99.15 -Date: 2021-08-09 +Version: 0.99.16 +Date: 2024-12-12 Authors@R: person("Leonardo", "Collado-Torres", role = c("aut", "cre"), email = "lcolladotor@gmail.com", comment = c(ORCID = "0000-0003-2140-308X")) @@ -22,9 +22,10 @@ Imports: IRanges, org.Hs.eg.db, utils, - methods + methods, + txdbmaker Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.2 Suggests: knitr, rmarkdown, diff --git a/NAMESPACE b/NAMESPACE index 897228e..65ac60a 100755 --- a/NAMESPACE +++ b/NAMESPACE @@ -8,3 +8,4 @@ export(gencode_txdb) export(local_metadata) import(AnnotationHub) importFrom(methods,is) +importFrom(txdbmaker,makeTxDbFromGFF) diff --git a/R/gencode_txdb.R b/R/gencode_txdb.R index 9929619..384f049 100755 --- a/R/gencode_txdb.R +++ b/R/gencode_txdb.R @@ -13,6 +13,7 @@ #' #' @return A [GenomicFeatures::TxDb-class] object. #' @export +#' @importFrom txdbmaker makeTxDbFromGFF #' @author Leonardo Collado-Torres #' @references Based on code for the `brainflowprobes` package at: #' @@ -52,7 +53,7 @@ gencode_txdb <- function( # gencode_txdb("31", "hg19", chrs = "chr21") ## though it works with # gencode_txdb("31", "hg18") - # txdb <- GenomicFeatures::makeTxDbFromGFF( + # txdb <- txdbmaker::makeTxDbFromGFF( # gtf_file, # organism = 'Homo sapiens', # chrominfo = GenomeInfoDb::Seqinfo(genome = genome) @@ -71,21 +72,21 @@ gencode_txdb <- function( ) # message(paste(Sys.time(), "preparing metadata")) - metadata <- GenomicFeatures:::.prepareGFFMetadata( + metadata <- txdbmaker:::.prepareGFFMetadata( file = gtf_file, dataSource = NA, organism = "Homo sapiens", taxonomyId = NA, miRBaseBuild = NA, metadata = NULL ) message(paste(Sys.time(), "building the txdb object")) - gr <- GenomicFeatures:::.tidy_seqinfo( + gr <- txdbmaker:::.tidy_seqinfo( gr = gencode_gtf, chrominfo = GenomeInfoDb::Seqinfo(genome = genome) ) ## Prune again since GenomeInfoDb::Seqinfo() will return many seqlevels gr <- GenomeInfoDb::keepSeqlevels(gr, chrs, pruning.mode = "coarse") - txdb <- GenomicFeatures::makeTxDbFromGRanges(gr, metadata = metadata) + txdb <- txdbmaker::makeTxDbFromGRanges(gr, metadata = metadata) return(txdb) } diff --git a/vignettes/GenomicState.Rmd b/vignettes/GenomicState.Rmd index 0b9825c..e7b6c85 100755 --- a/vignettes/GenomicState.Rmd +++ b/vignettes/GenomicState.Rmd @@ -60,7 +60,8 @@ bib <- c( glue = citation("glue")[1], AnnotationHub = citation("AnnotationHub")[1], AnnotationHubData = citation("AnnotationHubData")[1], - GenomicRanges = citation("GenomicRanges")[1] + GenomicRanges = citation("GenomicRanges")[1], + txdbmaker = citation("txdbmaker")[1] ) ``` @@ -332,6 +333,7 @@ The `r Biocpkg('GenomicState')` package `r Citep(bib[['GenomicState']])` was mad * `r Biocpkg('AnnotationHub')` `r Citep(bib[['AnnotationHub']])` * `r Biocpkg('AnnotationHubData')` `r Citep(bib[['AnnotationHubData']])` * `r Biocpkg('GenomicRanges')` `r Citep(bib[['GenomicRanges']])` +* `r Biocpkg('txdbmaker')` `r Citep(bib[['txdbmaker']])` Code for creating the vignette