Hi,
I wanted to get the gene coordinates for Mmul8.0.1, and download the file from ensembl (ftp://ftp.ensembl.org/pub/release-97/gtf/macacamulatta/Macacamulatta.Mmul8.0.1.97.chr.gtf.gz).
When I load the package to txdb object using GenomicFeatures, I don't seem to be getting the genes. The transcripts, cds appears to be ok, but not genes. What am I doing wrong?
thanks for your help!
> library(GenomicFeatures)
> txdbmm <- makeTxDbFromGFF(file = paste0(mmdir,'Macaca_mulatta.Mmul_8.0.1.97.chr.gtf'))
Import genomic features from the file as a GRanges object ... OK
Prepare the 'metadata' data frame ... OK
Make the TxDb object ... OK
Warning message:
In .get_cds_IDX(mcols0$type, mcols0$phase) :
The "phase" metadata column contains non-NA values for features of type stop_codon. This information was ignored.
> seqlevelsStyle(txdbmm) <- "UCSC"
> xx <- transcripts(txdbmm)
> yy <- cds(txdbmm)
> zz <- genes(txdbmm)
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function 'genes' for signature '"TxDb"'
> txdbmm
TxDb object:
# Db type: TxDb
# Supporting package: GenomicFeatures
# Data source: /Users/Mmul_8.0.1/Macaca_mulatta.Mmul_8.0.1.97.chr.gtf
# Organism: NA
# Taxonomy ID: NA
# miRBase build ID: NA
# Genome: NA
# Nb of transcripts: 55075
# Db created by: GenomicFeatures package from Bioconductor
# Creation time: 2020-07-11 15:51:11 -0400 (Sat, 11 Jul 2020)
# GenomicFeatures version at creation time: 1.40.1
# RSQLite version at creation time: 2.2.0
# DBSCHEMAVERSION: 1.2
My sessionInfo() is:
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS High Sierra 10.13.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] grid parallel stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] circlize_0.4.10 annotatr_1.14.0 dplyr_1.0.0
[4] regioneR_1.20.1 Gviz_1.32.0 org.Mmu.eg.db_3.11.4
[7] pvclust_2.2-0 zoo_1.8-8 data.table_1.12.8
[10] foreign_0.8-80 gtools_3.8.2 BSgenome.Hsapiens.UCSC.hg38_1.4.3
[13] BSgenome.Mmulatta.UCSC.rheMac8_1.4.2 BSgenome_1.56.0 rtracklayer_1.47.0
[16] Biostrings_2.56.0 XVector_0.28.0 biomaRt_2.44.1
[19] topGO_2.40.0 SparseM_1.78 GO.db_3.11.4
[22] graph_1.66.0 org.Hs.eg.db_3.11.4 reutils_0.2.3
[25] XML_3.99-0.4 DSS_2.36.0 BiocParallel_1.22.0
[28] bsseq_1.24.4 SummarizedExperiment_1.18.2 DelayedArray_0.14.0
[31] matrixStats_0.56.0 GenomicFeatures_1.40.1 AnnotationDbi_1.50.1
[34] Biobase_2.48.0 GenomicRanges_1.40.0 GenomeInfoDb_1.24.2
[37] IRanges_2.22.2 S4Vectors_0.26.1 BiocGenerics_0.34.0
loaded via a namespace (and not attached):
[1] backports_1.1.8 Hmisc_4.4-0 AnnotationHub_2.20.0 BiocFileCache_1.12.0
[5] plyr_1.8.6 lazyeval_0.2.2 splines_4.0.2 ggplot2_3.3.2
[9] digest_0.6.25 ensembldb_2.12.1 htmltools_0.5.0 magrittr_1.5
[13] checkmate_2.0.0 memoise_1.1.0 cluster_2.1.0 limma_3.44.3
[17] readr_1.3.1 R.utils_2.9.2 askpass_1.1 prettyunits_1.1.1
[21] jpeg_0.1-8.1 colorspace_1.4-1 blob_1.2.1 rappdirs_0.3.1
[25] xfun_0.15 crayon_1.3.4 RCurl_1.98-1.2 survival_3.2-3
[29] VariantAnnotation_1.34.0 glue_1.4.1 gtable_0.3.0 zlibbioc_1.34.0
[33] Rhdf5lib_1.10.1 shape_1.4.4 HDF5Array_1.16.1 scales_1.1.1
[37] DBI_1.1.0 Rcpp_1.0.5 xtable_1.8-4 progress_1.2.2
[41] htmlTable_2.0.1 bit_1.1-15.2 Formula_1.2-3 htmlwidgets_1.5.1
[45] httr_1.4.1 RColorBrewer_1.1-2 acepack_1.4.1 ellipsis_0.3.1
[49] pkgconfig_2.0.3 R.methodsS3_1.8.0 nnet_7.3-14 dbplyr_1.4.4
[53] locfit_1.5-9.4 reshape2_1.4.4 tidyselect_1.1.0 rlang_0.4.6
[57] later_1.1.0.1 munsell_0.5.0 BiocVersion_3.11.1 tools_4.0.2
[61] generics_0.0.2 RSQLite_2.2.0 fastmap_1.0.1 stringr_1.4.0
[65] yaml_2.2.1 knitr_1.29 bit64_0.9-7 purrr_0.3.4
[69] AnnotationFilter_1.12.0 mime_0.9 R.oo_1.23.0 compiler_4.0.2
[73] rstudioapi_0.11 curl_4.3 png_0.1-7 interactiveDisplayBase_1.26.3
[77] tibble_3.0.2 stringi_1.4.6 lattice_0.20-41 ProtGenerics_1.20.0
[81] Matrix_1.2-18 permute_0.9-5 vctrs_0.3.1 pillar_1.4.6
[85] lifecycle_0.2.0 BiocManager_1.30.10 GlobalOptions_0.1.2 bitops_1.0-6
[89] httpuv_1.5.4 R6_2.4.1 latticeExtra_0.6-29 promises_1.1.1
[93] gridExtra_2.3 dichromat_2.0-0 assertthat_0.2.1 rhdf5_2.32.2
[97] openssl_1.4.2 GenomicAlignments_1.24.0 Rsamtools_2.4.0 GenomeInfoDbData_1.2.3
[101] hms_0.5.3 rpart_4.1-15 DelayedMatrixStats_1.10.1 biovizBase_1.36.0
[105] shiny_1.5.0 base64enc_0.1-3
Can you try this from a clean session start? I cannot confirm. It seems your genes() method is being clobbered by some other package. Disambiguating with GenomicFeatures::genes might work better.
Hi Vincent, Sorry!! I totally missed your reply! You are, of course, absolutely right about genes() getting clobbered. I did as you suggested and everything is working out! Thanks for your help!