lcalviell / ORFquant

An R package for Splice-aware quantification of translation using Ribo-seq data
GNU General Public License v3.0
15 stars 13 forks source link

Annotation file can not be loaded #12

Closed Whale-fall closed 2 years ago

Whale-fall commented 3 years ago

I followed the tutorial and get warnings and Errors below, how can I fix them? `` Creating the TxDb object --- Done! Mon Mar 22 09:59:24 2021 Extracting genomic regions ... Mon Mar 22 09:59:24 2021 Extracting ids and biotypes ... Mon Mar 22 09:59:31 2021 Defining most common start/stop codons ... Mon Mar 22 09:59:36 2021 Rannot object created! Mon Mar 22 09:59:41 2021 [1] "/home/yiliang/RPF_test_data/ORFquant_test/test_human_chrM_22.gtf_Rannot" 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.

run_ORFquant(for_ORFquant_file = "./HEK293_Aligned.sortedByCoord.out.bam_for_ORFquant", annotation_file = "./test_human_chrM_22.gtf_Rannot",n_cores = 1) Loading annotation and Ribo-seq signal ... Mon Mar 22 11:12:29 2021 Error in library(GTF_annotation$genome_package, character.only = T) : 'package' must be of length 1

load_annotation("./test_human_chrM_22.gtf_Rannot") Error in library(GTF_annotation$genome_package, character.only = T) : 'package' must be of length 1 ``

And here is my sessionInfo

`` sessionInfo() R version 3.6.1 (2019-07-05) Platform: x86_64-conda_cos6-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core) Matrix products: default BLAS/LAPACK: /home/yiliang/software/miniconda3/envs/translatomics/lib/R/lib/libRblas.so

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] grid parallel stats4 stats graphics grDevices utils
[8] datasets methods base

other attached packages: [1] BSgenome.Homo.sapiens.gencodev34_1.0 dplyr_1.0.5
[3] ORFquant_1.1.0 rmarkdown_2.7
[5] gridExtra_2.3 knitr_1.31
[7] cowplot_1.1.1 ggplot2_3.3.3
[9] reshape2_1.4.4 GenomicFiles_1.22.0
[11] GenomicAlignments_1.22.1 Rsamtools_2.2.3
[13] SummarizedExperiment_1.16.1 DelayedArray_0.12.3
[15] BiocParallel_1.20.1 matrixStats_0.58.0
[17] multitaper_1.0-15 doMC_1.3.7
[19] iterators_1.0.13 foreach_1.5.1
[21] GenomicFeatures_1.38.2 AnnotationDbi_1.48.0
[23] Biobase_2.46.0 devtools_2.3.2
[25] usethis_2.0.1 BSgenome_1.54.0
[27] Biostrings_2.54.0 XVector_0.26.0
[29] rtracklayer_1.46.0 GenomicRanges_1.38.0
[31] GenomeInfoDb_1.22.1 IRanges_2.20.2
[33] S4Vectors_0.24.4 BiocGenerics_0.32.0

loaded via a namespace (and not attached): [1] bitops_1.0-6 fs_1.5.0 bit64_4.0.5
[4] progress_1.2.2 httr_1.4.2 rprojroot_2.0.2
[7] tools_3.6.1 utf8_1.2.1 R6_2.5.0
[10] colorspace_2.0-0 DBI_1.1.1 withr_2.4.1
[13] tidyselect_1.1.0 prettyunits_1.1.1 processx_3.4.5
[16] bit_4.0.4 curl_4.3 compiler_3.6.1
[19] cli_2.3.1 desc_1.3.0 scales_1.1.1
[22] callr_3.5.1 askpass_1.1 rappdirs_0.3.3
[25] digest_0.6.27 stringr_1.4.0 htmltools_0.5.1.1
[28] pkgconfig_2.0.3 sessioninfo_1.1.1 dbplyr_2.1.0
[31] fastmap_1.1.0 rlang_0.4.10 rstudioapi_0.13
[34] RSQLite_2.2.4 generics_0.1.0 jsonlite_1.7.2
[37] VariantAnnotation_1.32.0 RCurl_1.98-1.2 magrittr_2.0.1
[40] GenomeInfoDbData_1.2.2 Matrix_1.3-2 munsell_0.5.0
[43] Rcpp_1.0.6 fansi_0.4.2 lifecycle_1.0.0
[46] stringi_1.5.3 zlibbioc_1.32.0 pkgbuild_1.2.0
[49] plyr_1.8.6 BiocFileCache_1.10.2 blob_1.2.1
[52] crayon_1.4.1 lattice_0.20-41 hms_1.0.0
[55] ps_1.6.0 pillar_1.5.1 codetools_0.2-18
[58] biomaRt_2.42.1 pkgload_1.2.0 XML_3.99-0.3
[61] glue_1.4.2 evaluate_0.14 remotes_2.2.0
[64] vctrs_0.3.6 testthat_3.0.2 gtable_0.3.0
[67] openssl_1.4.3 purrr_0.3.4 assertthat_0.2.1
[70] cachem_1.0.4 xfun_0.22 tibble_3.1.0
[73] memoise_2.0.0 ellipsis_0.3.1
``

Whale-fall commented 3 years ago

I am not familiar with Github,sorry for my bad editing

Whale-fall commented 3 years ago

And I install R and ORFquant via conda.Also, when I try to prepare an annotation file I got an error. May it could be the reason bug appears? Error in width(tocheck) %>% sum %>% .[. < 3] : could not find function "%>%"

lcalviell commented 3 years ago

Hi, I ran this section of the vignette using both R 3.6.1 and R 4.0.0 and I got the expected output with no errors Do you see again the error by running this code snippet?

Thanks! Lorenzo


install_github(repo = "lcalviell/ORFquant")

library("ORFquant")

download.file("https://drive.google.com/uc?export=download&id=1n6UA5cSz6djx0dY_7sI57177T-kyZhhT",destfile = "test_human.2bit")
download.file("https://drive.google.com/uc?export=download&id=19Am9-iMEyB-AcIsVRdIqrF-BVdQYrcaI",destfile = "test_human.gtf")

prepare_annotation_files(annotation_directory = ".",
                         twobit_file = "test_human.2bit",
                         gtf_file = "test_human.gtf",scientific_name = "Human.test",
                         annotation_name = "genc25_22M",export_bed_tables_TxDb = F,forge_BSgenome = T,create_TxDb = T)
load_annotation("test_human.gtf_Rannot")```