hfang-bristol / XGR

An R package to increase interpretability of genes and SNPs (eg identified from GWAS and eQTL mapping)
http://galahad.well.ox.ac.uk/XGR
10 stars 3 forks source link

Error in as(chain, "Chain") : no method or default for coercing "NULL" to "Chain" #12

Open bschilder opened 3 years ago

bschilder commented 3 years ago

Hi there,

I seem to be having some issues running XGR's liftover function, which now returns some errors related to "Chain". Is there something else I need to install?

Example

## Construct example data
library(echolocatoR)

build.conversion="hg19.to.hg38"
chrom_col="CHR"
start_col="POS"
end_col="POS"
chr_format="NCBI"

dat <- echolocatoR::CORCES_2020.scATACseq_celltype_peaks
dat[,paste0("POS.",strsplit(build.conversion, "\\.")[[1]][1])] <- dat[[start_col]]

gr.dat <- GenomicRanges::makeGRangesFromDataFrame(df = dat,
                                                   keep.extra.columns = T,
                                                   seqnames.field = "chrom",
                                                   start.field = start_col,
                                                   end.field = end_col)

## Liftover
gr.lifted <- XGR::xLiftOver(data.file = gr.dat,
                               format.file = "GRanges",
                               build.conversion = "hg38.to.hg19",
                               verbose = F ,
                               merged = F)  # merge must =F in order to work
Error in as(chain, "Chain") : 
  no method or default for coercing "NULL" to "Chain"
packageVersion("XGR")
[1] '1.1.7'

I tried installing the BioConductor version, but it looks like it's not available for the last couple versions of R (currently up to v4.0.3):

BiocManager::install("XGR")

package 'XGR' is not available (for R version 3.6.3)

Thanks for your help!

Session Info

``` R version 3.6.3 (2020-02-29) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS 10.16 Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib locale: [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] readxl_1.3.1 backports_1.2.1 [3] Hmisc_4.4-2 corrplot_0.84 [5] BiocFileCache_1.10.2 RCircos_1.2.1 [7] plyr_1.8.6 igraph_1.2.6 [9] lazyeval_0.2.2 splines_3.6.3 [11] echolocatoR_0.1.0 BiocParallel_1.20.1 [13] GenomeInfoDb_1.22.1 ggnetwork_0.5.8 [15] ggplot2_3.3.3 digest_0.6.27 [17] ensembldb_2.10.2 htmltools_0.5.1 [19] fansi_0.4.2 magrittr_2.0.1 [21] checkmate_2.0.0 memoise_1.1.0 [23] BSgenome_1.54.0 cluster_2.1.0 [25] Biostrings_2.54.0 matrixStats_0.57.0 [27] R.utils_2.10.1 ggbio_1.34.0 [29] askpass_1.1 prettyunits_1.1.1 [31] jpeg_0.1-8.1 colorspace_2.0-0 [33] blob_1.2.1 rappdirs_0.3.1 [35] ggrepel_0.9.1 xfun_0.20 [37] dplyr_1.0.3 crayon_1.3.4 [39] RCurl_1.98-1.2 hexbin_1.28.2 [41] graph_1.64.0 Exact_2.1 [43] supraHex_1.24.0 survival_3.2-7 [45] VariantAnnotation_1.32.0 ape_5.4-1 [47] glue_1.4.2 gtable_0.3.0 [49] zlibbioc_1.32.0 XVector_0.26.0 [51] DelayedArray_0.12.3 Rgraphviz_2.30.0 [53] BiocGenerics_0.32.0 scales_1.1.1 [55] mvtnorm_1.1-1 DBI_1.1.1 [57] GGally_2.1.0 Rcpp_1.0.6 [59] progress_1.2.2 htmlTable_2.1.0 [61] foreign_0.8-75 bit_4.0.4 [63] OrganismDbi_1.28.0 Formula_1.2-4 [65] stats4_3.6.3 DT_0.17 [67] htmlwidgets_1.5.3 httr_1.4.2 [69] RColorBrewer_1.1-2 ellipsis_0.3.1 [71] pkgconfig_2.0.3 reshape_0.8.8 [73] XML_3.99-0.3 R.methodsS3_1.8.1 [75] nnet_7.3-14 dbplyr_2.0.0 [77] tidyselect_1.1.0 rlang_0.4.10 [79] reshape2_1.4.4 AnnotationDbi_1.48.0 [81] cellranger_1.1.0 munsell_0.5.0 [83] tools_3.6.3 cli_2.2.0 [85] generics_0.1.0 RSQLite_2.2.2 [87] evaluate_0.14 stringr_1.4.0 [89] yaml_2.2.1 knitr_1.30 [91] bit64_4.0.5 purrr_0.3.4 [93] AnnotationFilter_1.10.0 rootSolve_1.8.2.1 [95] RBGL_1.62.1 nlme_3.1-151 [97] R.oo_1.24.0 biomaRt_2.42.1 [99] compiler_3.6.3 rstudioapi_0.13 [101] curl_4.3 png_0.1-7 [103] e1071_1.7-4 tibble_3.0.5 [105] DescTools_0.99.39 stringi_1.5.3 [107] GenomicFeatures_1.38.2 lattice_0.20-41 [109] ProtGenerics_1.18.0 Matrix_1.3-2 [111] vctrs_0.3.6 pillar_1.4.7 [113] lifecycle_0.2.0 BiocManager_1.30.10 [115] data.table_1.13.6 bitops_1.0-6 [117] dnet_1.1.7 lmom_2.8 [119] patchwork_1.1.1 rtracklayer_1.46.0 [121] GenomicRanges_1.38.0 R6_2.5.0 [123] latticeExtra_0.6-29 XGR_1.1.7 [125] gridExtra_2.3 IRanges_2.20.2 [127] gld_2.6.2 sessioninfo_1.1.1 [129] dichromat_2.0-0 boot_1.3-25 [131] MASS_7.3-53 assertthat_0.2.1 [133] SummarizedExperiment_1.16.1 openssl_1.4.3 [135] withr_2.4.0 GenomicAlignments_1.22.1 [137] Rsamtools_2.2.3 S4Vectors_0.24.4 [139] GenomeInfoDbData_1.2.2 expm_0.999-6 [141] parallel_3.6.3 hms_1.0.0 [143] grid_3.6.3 rpart_4.1-15 [145] tidyr_1.1.2 class_7.3-17 [147] rmarkdown_2.6 biovizBase_1.34.1 [149] Biobase_2.46.0 base64enc_0.1-3 ```
bschilder commented 3 years ago

Hi @hfang-bristol , just wondering if there's been any headway with this. XGR was one of the dependencies for my R package echolocatoR but I've had to remove it due to these issues, especially those pertaining to installation 😢 . I'd really like to add it back in because I think it offers a lot!

Thanks again, Brian