Giter Club home page Giter Club logo

echolocator's Introduction





R build status License: GPL-3

¶ Authors: Brian Schilder, Jack Humphrey, Towfique Raj

¶ README updated: Jan-20-2023

echolocatoR: Automated statistical and functional fine-mapping

with extensive access to genome-wide datasets.

The echoverse

echolocatoR is part of the echoverse, a suite of R packages designed to facilitate different steps in genetic fine-mapping.

echolocatoR calls each of these other packages (i.e. “modules”) internally to create a unified pipeline. However, you can also use each module independently to create your own custom workflows.

echoverse dependency graph

Made with echodeps, yet another echoverse module. See here for the interactive version with package descriptions and links to each GitHub repo.

Citation

If you use echolocatoR, or any of the echoverse modules, please cite:

Brian M Schilder, Jack Humphrey, Towfique Raj (2021) echolocatoR: an automated end-to-end statistical and functional genomic fine-mapping pipeline, Bioinformatics; btab658, https://doi.org/10.1093/bioinformatics/btab658

Installation

if(!require("remotes")) install.packages("remotes")

remotes::install_github("RajLabMSSM/echolocatoR")
library(echolocatoR)

Installation troubleshooting

  • Because echolocatoR now relies on many subpackages that rely on one another, sometimes errors can occur when R tries to update one R package before updating its echoverse dependencies (and thus is unable to find new functions). As echoverse stabilizes over time, this should happen less frequently. However, in the meantime the solution is to simply rerun remotes::install_github("RajLabMSSM/echolocatoR") until all subpackages are fully updates.
  • susieR: Sometimes an older version of susieR is installed from CRAN (e.g. 0.11.92), but echofinemap requires version >= 0.12.0. To get around this, you can install susieR directly from GitHub: devtools::install_github("stephenslab/susieR")
  • System dependencies can sometimes cause issues when using different packages. I’ve tried to account for as many of these as possible automatically within the code, but using the Docker/Singularity provided below can further mitigate these issues.
  • The R package XML (which some echoverse subpackages depend on) has some additional system dependencies that must be installed beforehand. If XML does not install automatically, try installing lbxml on your system using brew install libxml2 (MacOS), sudo apt-get install libxml2 (Linux) or conda install r-xml if you are running echolocatoR from within a conda environment.

echolocatoR now has its own dedicated Docker/Singularity container! This greatly reduces issues related to system dependency conflicts and provides a containerized interface for Rstudio through your web browser. See here for installation instructions.

Documentation

Please report any bugs/requests on GitHub Issues.

Contributions are welcome!

All echoverse vignettes

echoverse <- c('echolocatoR','echodata','echotabix',
               'echoannot','echoconda','echoLD',
               'echoplot','catalogueR','downloadR',
               'echofinemap','echodeps', # under construction
               'echogithub')
toc <- echogithub::github_pages_vignettes(owner = "RajLabMSSM",
                                          repo = echoverse,
                                          as_toc = TRUE,
                                          verbose = FALSE)

Introduction

Fine-mapping methods are a powerful means of identifying causal variants underlying a given phenotype, but are underutilized due to the technical challenges of implementation. echolocatoR is an R package that automates end-to-end genomics fine-mapping, annotation, and plotting in order to identify the most probable causal variants associated with a given phenotype.

It requires minimal input from users (a GWAS or QTL summary statistics file), and includes a suite of statistical and functional fine-mapping tools. It also includes extensive access to datasets (linkage disequilibrium panels, epigenomic and genome-wide annotations, QTL).

The elimination of data gathering and preprocessing steps enables rapid fine-mapping of many loci in any phenotype, complete with locus-specific publication-ready figure generation. All results are merged into a single per-SNP summary file for additional downstream analysis and results sharing. Therefore echolocatoR drastically reduces the barriers to identifying causal variants by making the entire fine-mapping pipeline rapid, robust and scalable.

Literature

For applications of echolocatoR in the literature, please see:

  1. E Navarro, E Udine, K de Paiva Lopes, M Parks, G Riboldi, BM Schilder…T Raj (2020) Dysregulation of mitochondrial and proteo-lysosomal genes in Parkinson’s disease myeloid cells. Nature Genetics. https://doi.org/10.1101/2020.07.20.212407
  2. BM Schilder, T Raj (2021) Fine-Mapping of Parkinson’s Disease Susceptibility Loci Identifies Putative Causal Variants. Human Molecular Genetics, ddab294, https://doi.org/10.1093/hmg/ddab294
  3. K de Paiva Lopes, G JL Snijders, J Humphrey, A Allan, M Sneeboer, E Navarro, BM Schilder…T Raj (2022) Genetic analysis of the human microglial transcriptome across brain regions, aging and disease pathologies. Nature Genetics, https://doi.org/10.1038/s41588-021-00976-y

echolocatoR v1.0 vs. v2.0

There have been a series of major updates between echolocatoR v1.0 and v2.0. Here are some of the most notable ones (see Details):

  • echoverse subpackages: echolocatoR has been broken into separate subpackages, making it much easier to edit/debug each step of the full finemap_loci pipeline, and improving robustness throughout. It also provides greater flexibility for users to construct their own custom pipelines from these modules.
  • GITHUB_TOKEN: GitHub now requires users to create Personal Authentication Tokens (PAT) to avoid download limits. This is essential for installing echolocatoR as many resources from GitHub need to be downloaded. See here for further instructions. = echodata::construct_colmap(): Previously, users were required to input key column name mappings as separate arguments to echolocatoR::finemap_loci. This functionality has been deprecated and replaced with a single argument, colmap=. This allows users to save the construct_colmap() output as a single variable and reuse it later without having to write out each mapping argument again (and helps reduce an already crowded list of arguments).
  • MungeSumstats: finemap_loci now accepts the output of MungeSumstats::format_sumstats/import_sumstats as-is (without requiring colmap=, so long as munged=TRUE). Standardizing your GWAS/QTL summary stats this way greatly reduces (or eliminates) the time taken to do manual formatting.
  • echolocatoR::finemap_loci arguments: Several arguments have been deprecated or had their names changed to be harmonized across all the subpackages and use a unified naming convention. See ?echolocatoR::finemap_loci for details.
  • echoconda: The echoverse subpackage echoconda now handles all conda environment creation/use internally and automatically, without the need for users to create the conda environment themselves as a separate step. Also, the default conda env echoR has been replaced by echoR_mini, which reduces the number of dependencies to just the bare minimum (thus greatly speeding up build time and reducing potential version conflicts).
  • FINEMAP: More outputs from the tool FINEMAP are now recorded in the echolocatoR results (see ?echofinemap::FINEMAP or this Issue for details). Also, a common dependency conflict between FINEMAP>=1.4 and MacOS has been resolved (see this Issue for details.
  • echodata: All example data and data transformation functions have been moved to the echoverse subpackage echodata.
  • LD_reference=: In addition to the UKB, 1KGphase1/3 LD reference panels, finemap_loci() can now take custom LD panels by supplying finemap_loci(LD_reference=) with a list of paths to VCF files (.vcf / vcf.gz / vcf.bgz) or pre-computed LD matrices with RSIDs as the row/col names (.rda / .rds / .csv / .tsv. / .txt / .csv.gz / tsv.gz / txt.gz).
  • Expanded fine-mapping methods: “ABF”, “COJO_conditional”, “COJO_joint” “COJO_stepwise”,“FINEMAP”,“PAINTOR” (including multi-GWAS and multi-ancestry fine-mapping),“POLYFUN_FINEMAP” ,“POLYFUN_SUSIE”,“SUSIE”
  • FINEMAP fixed: There were a number of issues with FINEMAP due to differing output formats across different versions, system dependency conflicts, and the fact that it can produce multiple Credible Sets. All of these have been fixed and the latest version of FINEMAP can be run on all OS platforms.
  • Debug mode: Within finemap_loci() I use a tryCatch() when iterating across loci so that if one locus fails, the rest can continue. However this prevents using traceback feature in R, making debugging hard. Thus I now enabled debugging mode via a new argument: use_tryCatch=FALSE.

Output descriptions

By default, echolocatoR::finemap_loci() returns a nested list containing grouped by locus names (e.g. $BST1, $MEX3C). The results of each locus contain the following elements:

  • finemap_dat: Fine-mapping results from all selected methods merged with the original summary statistics (i.e. Multi-finemap results).
  • locus_plot: A nested list containing one or more zoomed views of locus plots.
  • LD_matrix: The post-processed LD matrix used for fine-mapping.
  • LD_plot: An LD plot (if used).
  • locus_dir: Locus directory results are saved in.
  • arguments: A record of the arguments supplied to finemap_loci.

In addition, the following object summarizes the results from the locus-specific elements:

  • merged_dat: A merged data.table with all fine-mapping results from all loci.

Multi-finemap results files

The main output of echolocatoR are the multi-finemap files (for example, echodata::BST1). They are stored in the locus-specific Multi-finemap subfolders.

Column descriptions

  • Standardized GWAS/QTL summary statistics: e.g. SNP,CHR,POS,Effect,StdErr. See ?finemap_loci() for descriptions of each.
  • leadSNP: The designated proxy SNP per locus, which is the SNP with the smallest p-value by default.
  • <tool>.CS: The 95% probability Credible Set (CS) to which a SNP belongs within a given fine-mapping tool’s results. If a SNP is not in any of the tool’s CS, it is assigned NA (or 0 for the purposes of plotting).
  • <tool>.PP: The posterior probability that a SNP is causal for a given GWAS/QTL trait.
  • Support: The total number of fine-mapping tools that include the SNP in its CS.
  • Consensus_SNP: By default, defined as a SNP that is included in the CS of more than N fine-mapping tool(s), i.e. Support>1 (default: N=1).
  • mean.PP: The mean SNP-wise PP across all fine-mapping tools used.
  • mean.CS: If mean PP is greater than the 95% probability threshold (mean.PP>0.95) then mean.CS is 1, else 0. This tends to be a very stringent threshold as it requires a high degree of agreement between fine-mapping tools.

Notes

  • Separate multi-finemap files are generated for each LD reference panel used, which is included in the file name (e.g. UKB_LD.Multi-finemap.tsv.gz).
  • Each fine-mapping tool defines its CS and PP slightly differently, so please refer to the associated original publications for the exact details of how these are calculated (links provided above).

Fine-mapping tools

Fine-mapping functions are now implemented via echofinemap:

  • echolocatoR will automatically check whether you have the necessary columns to run each tool you selected in echolocatoR::finemap_loci(finemap_methods=...). It will remove any tools that for which there are missing necessary columns, and produces a message letting you know which columns are missing.
  • Note that some columns (e.g. MAF,N,t-stat) will be automatically inferred if missing.
  • For easy reference, we list the necessary columns here as well.
    See ?echodata::construct_colmap() for descriptions of these columns.
    All methods require the columns: SNP,CHR,POS,Effect,StdErr

fm_methods <- echofinemap::required_cols(add_versions = FALSE, 
                                         embed_links = TRUE,
                                         verbose = FALSE)
## Registered S3 method overwritten by 'GGally':
##   method from   
##   +.gg   ggplot2
knitr::kable(x = fm_methods)
method required suggested source citation
ABF SNP, CHR…. source cite
COJO_conditional SNP, CHR…. Freq, P, N source cite
COJO_joint SNP, CHR…. Freq, P, N source cite
COJO_stepwise SNP, CHR…. Freq, P, N source cite
FINEMAP SNP, CHR…. A1, A2, …. source cite
PAINTOR SNP, CHR…. MAF source cite
POLYFUN_FINEMAP SNP, CHR…. MAF, N source cite
POLYFUN_SUSIE SNP, CHR…. MAF, N source cite
SUSIE SNP, CHR…. N source cite

Datasets

Datasets are now stored/retrieved via the following echoverse subpackages:

  • echodata: Pre-computed fine-mapping results. Also handles the semi-automated standardization of summary statistics.
  • echoannot: Annotates GWAS/QTL summary statistics using epigenomics, pre-compiled annotation matrices, and machine learning model predictions of variant-specific functional impacts.
  • catalogueR: Large compendium of fully standardized e/s/t-QTL summary statistics.

For more detailed information about each dataset, use ?:

### Examples ###

library(echoannot)   
?NOTT_2019.interactome # epigenomic annotations
library(echodata) 
?BST1 # fine-mapping results 
  • You can search, import, and standardize any GWAS in the Open GWAS database via MungeSumstats, specifically the functions find_sumstats and import_sumstats.

eQTL Catalogue: catalogueR::eQTL_Catalogue.query()

  • API access to full summary statistics from many standardized e/s/t-QTL datasets.
  • Data access and colocalization tests facilitated through the catalogueR R package.

echodata: fine-mapping results

echolocatoR Fine-mapping Portal: pre-computed fine-mapping results

  • You can visit the echolocatoR Fine-mapping Portal to interactively visualize and download pre-computed fine-mapping results across a variety of phenotypes.
  • This data can be searched and imported programmatically using echodata::portal_query().

echoannot: Epigenomic & genome-wide annotations

Nott et al. (2019): echoannot::NOTT2019_*()

  • Data from this publication contains results from cell type-specific (neurons, oligodendrocytes, astrocytes, microglia, & peripheral myeloid cells) epigenomic assays (H3K27ac, ATAC, H3K4me3) from ex vivo pediatric human brain tissue.

Corces et al.2020: echoannot::CORCES2020_*()

  • Data from this publication contains results from single-cell and bulk chromatin accessibility assays ([sc]ATAC-seq) and chromatin interactions ( FitHiChIP) from postmortem adult human brain tissue.

XGR: echoannot::XGR_download_and_standardize()

  • API access to a diverse library of cell type/line-specific epigenomic (e.g. ENCODE) and other genome-wide annotations.

Roadmap: echoannot::ROADMAP_query()

  • API access to cell type-specific epigenomic data.

biomaRt: echoannot::annotate_snps()

  • API access to various genome-wide SNP annotations (e.g. missense, nonsynonmous, intronic, enhancer).

HaploR: echoannot::annotate_snps()

  • API access to known per-SNP QTL and epigenomic data hits.

Enrichment tools

Annotation enrichment functions are now implemented via echoannot:

Implemented

XGR: echoannot::XGR_enrichment()

  • Binomial enrichment tests between customisable foreground and background SNPs.

motifbreakR: echoannot::MOTIFBREAKR()

  • Identification of transcript factor binding motifs (TFBM) and prediction of SNP disruption to said motifs.
  • Includes a comprehensive list of TFBM databases via MotifDB (9,900+ annotated position frequency matrices from 14 public sources, for multiple organisms).

regioneR: echoannot::test_enrichment()

  • Iterative pairwise permutation testing of overlap between all combinations of two GRangesList objects.

Under construction

  • Genomic enrichment with LD-informed heuristics.
  • LD-informed iterative enrichment analysis.
  • Genome-wide stratified LD score regression.
  • Inlccles 187-annotation baseline model from Gazal et al. 2018.
  • You can alternatively supply a custom annotations matrix.

LD reference panels

LD reference panels are now queried/processed by echoLD, specifically the function get_LD():

Custom LD panel:

  • From user-supplied VCFs

Custom LD panel

  • From user-supplied precomputed LD matrices

Plotting

Plotting functions are now implemented via:

  • echoplot: Multi-track locus plots with GWAS, fine-mapping results, and functional annotations (plot_locus()). Can also plot multi-GWAS/QTL and multi-ancestry results (plot_locus_multi()).
  • echoannot: Study-level summary plots showing aggregted info across many loci at once (super_summary_plot()).
  • echoLD: Plot an LD matrix using one of several differnt plotting methods (plot_LD()).

Tabix queries

All queries of tabix-indexed files (for rapid data subset extraction) are implemented via echotabix.

  • echotabix::convert_and_query() detects whether the GWAS summary statistics file you provided is already tabix-indexed, and it not, automatically performs all steps necessary to convert it (sorting, bgzip-compression, indexing) across a wide variety of scenarios.
  • echotabix::query() contains many different methods for making tabix queries (e.g. Rtracklayer,echoconda,VariantAnnotation,seqminer), each of which fail in certain circumstances. To avoid this, query() automatically selects the method that will work for the particular file being queried and your machine’s particular versions of R/Bioconductor/OS, taking the guesswork and troubleshooting out of tabix queries.

Downloads

Single- and multi-threaded downloads are now implemented via downloadR.

  • Multi-threaded downloading is performed using axel, and is particularly useful for speeding up downloads of large files.
  • axel is installed via the official echoverse conda environment: “echoR_mini”. This environment is automatically created by the function echoconda::yaml_to_env() when needed.

Developer

Brian M. Schilder, Bioinformatician II
Raj Lab
Department of Neuroscience, Icahn School of Medicine at Mount Sinai


Session info

utils::sessionInfo()
## R version 4.2.1 (2022-06-23)
## Platform: x86_64-apple-darwin17.0 (64-bit)
## Running under: macOS Big Sur ... 10.16
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/4.2/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] stats     graphics  grDevices utils     datasets  methods   base     
## 
## loaded via a namespace (and not attached):
##   [1] utf8_1.2.2                  reticulate_1.27            
##   [3] R.utils_2.12.2              tidyselect_1.2.0           
##   [5] RSQLite_2.2.20              AnnotationDbi_1.60.0       
##   [7] htmlwidgets_1.6.1           grid_4.2.1                 
##   [9] BiocParallel_1.32.5         echogithub_0.99.1          
##  [11] XGR_1.1.8                   munsell_0.5.0              
##  [13] codetools_0.2-18            interp_1.1-3               
##  [15] DT_0.27                     colorspace_2.0-3           
##  [17] OrganismDbi_1.40.0          Biobase_2.58.0             
##  [19] filelock_1.0.2              highr_0.10                 
##  [21] knitr_1.41                  supraHex_1.36.0            
##  [23] rstudioapi_0.14             stats4_4.2.1               
##  [25] DescTools_0.99.47           gitcreds_0.1.2             
##  [27] MatrixGenerics_1.10.0       GenomeInfoDbData_1.2.9     
##  [29] mixsqp_0.3-48               bit64_4.0.5                
##  [31] echoconda_0.99.9            rprojroot_2.0.3            
##  [33] basilisk_1.10.2             vctrs_0.5.1                
##  [35] generics_0.1.3              xfun_0.36                  
##  [37] biovizBase_1.46.0           BiocFileCache_2.6.0        
##  [39] R6_2.5.1                    GenomeInfoDb_1.34.6        
##  [41] AnnotationFilter_1.22.0     bitops_1.0-7               
##  [43] cachem_1.0.6                reshape_0.8.9              
##  [45] DelayedArray_0.24.0         assertthat_0.2.1           
##  [47] BiocIO_1.8.0                scales_1.2.1               
##  [49] nnet_7.3-18                 rootSolve_1.8.2.3          
##  [51] gtable_0.3.1                ggbio_1.46.0               
##  [53] lmom_2.9                    ensembldb_2.22.0           
##  [55] rlang_1.0.6                 echodata_0.99.16           
##  [57] splines_4.2.1               lazyeval_0.2.2             
##  [59] rtracklayer_1.58.0          dichromat_2.0-0.1          
##  [61] hexbin_1.28.2               checkmate_2.1.0            
##  [63] reshape2_1.4.4              BiocManager_1.30.19        
##  [65] yaml_2.3.6                  backports_1.4.1            
##  [67] snpStats_1.48.0             GenomicFeatures_1.50.3     
##  [69] ggnetwork_0.5.10            Hmisc_4.7-2                
##  [71] RBGL_1.74.0                 tools_4.2.1                
##  [73] ggplot2_3.4.0               ellipsis_0.3.2             
##  [75] RColorBrewer_1.1-3          proxy_0.4-27               
##  [77] BiocGenerics_0.44.0         coloc_5.1.0.1              
##  [79] Rcpp_1.0.9                  plyr_1.8.8                 
##  [81] base64enc_0.1-3             progress_1.2.2             
##  [83] zlibbioc_1.44.0             purrr_1.0.1                
##  [85] RCurl_1.98-1.9              basilisk.utils_1.10.0      
##  [87] prettyunits_1.1.1           rpart_4.1.19               
##  [89] deldir_1.0-6                viridis_0.6.2              
##  [91] S4Vectors_0.36.1            cluster_2.1.4              
##  [93] SummarizedExperiment_1.28.0 ggrepel_0.9.2              
##  [95] fs_1.5.2                    here_1.0.1                 
##  [97] crul_1.3                    magrittr_2.0.3             
##  [99] data.table_1.14.6           echotabix_0.99.8           
## [101] dnet_1.1.7                  openxlsx_4.2.5.1           
## [103] gh_1.3.1                    mvtnorm_1.1-3              
## [105] ProtGenerics_1.30.0         matrixStats_0.63.0         
## [107] patchwork_1.1.2             hms_1.1.2                  
## [109] evaluate_0.20               rworkflows_0.99.5          
## [111] XML_3.99-0.13               jpeg_0.1-10                
## [113] readxl_1.4.1                IRanges_2.32.0             
## [115] gridExtra_2.3               testthat_3.1.6             
## [117] compiler_4.2.1              biomaRt_2.54.0             
## [119] tibble_3.1.8                crayon_1.5.2               
## [121] R.oo_1.25.0                 htmltools_0.5.4            
## [123] echoannot_0.99.10           tzdb_0.3.0                 
## [125] Formula_1.2-4               tidyr_1.2.1                
## [127] expm_0.999-7                Exact_3.2                  
## [129] DBI_1.1.3                   dbplyr_2.3.0               
## [131] MASS_7.3-58.1               rappdirs_0.3.3             
## [133] boot_1.3-28.1               dlstats_0.1.6              
## [135] Matrix_1.5-3                badger_0.2.2               
## [137] readr_2.1.3                 piggyback_0.1.4            
## [139] brio_1.1.3                  cli_3.6.0                  
## [141] R.methodsS3_1.8.2           parallel_4.2.1             
## [143] echofinemap_0.99.4          igraph_1.3.5               
## [145] GenomicRanges_1.50.2        pkgconfig_2.0.3            
## [147] rvcheck_0.2.1               GenomicAlignments_1.34.0   
## [149] dir.expiry_1.6.0            RCircos_1.2.2              
## [151] foreign_0.8-84              osfr_0.2.9                 
## [153] xml2_1.3.3                  XVector_0.38.0             
## [155] yulab.utils_0.0.6           echoLD_0.99.8              
## [157] stringr_1.5.0               VariantAnnotation_1.44.0   
## [159] digest_0.6.31               graph_1.76.0               
## [161] httpcode_0.3.0              Biostrings_2.66.0          
## [163] rmarkdown_2.19              cellranger_1.1.0           
## [165] htmlTable_2.4.1             gld_2.6.6                  
## [167] restfulr_0.0.15             curl_5.0.0                 
## [169] Rsamtools_2.14.0            rjson_0.2.21               
## [171] lifecycle_1.0.3             nlme_3.1-161               
## [173] jsonlite_1.8.4              desc_1.4.2                 
## [175] viridisLite_0.4.1           BSgenome_1.66.2            
## [177] fansi_1.0.3                 downloadR_0.99.5           
## [179] pillar_1.8.1                susieR_0.12.27             
## [181] GGally_2.1.2                lattice_0.20-45            
## [183] KEGGREST_1.38.0             fastmap_1.1.0              
## [185] httr_1.4.4                  survival_3.5-0             
## [187] glue_1.6.2                  zip_2.2.2                  
## [189] png_0.1-8                   bit_4.0.5                  
## [191] Rgraphviz_2.42.0            class_7.3-20               
## [193] stringi_1.7.12              blob_1.2.3                 
## [195] latticeExtra_0.6-30         memoise_2.0.1              
## [197] dplyr_1.0.10                irlba_2.3.5.1              
## [199] e1071_1.7-12                ape_5.6-2

echolocator's People

Contributors

amcalejandro avatar bschilder avatar jackhump avatar jdblischak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

echolocator's Issues

susieR not installing automatically

susieR is listed as a Remote in the DESCRIPTION file...

Remotes:
  github::stephenslab/susieR 

but isn't automatically being installed with echolocatoR for some reason. Including susieR as part of extra_installs() for now.

Update "echoR" conda env to meet new PolyFun requirements

There's been some updates to PolyFun that now require some extra packages. Add these to the yaml in echolocatoR@master and echoconda:

dependencies:
- pandas-plink

Note: Installing pandas-plink does force a number of other deps to downgrade, but does solve quickly enough:

Conda output

``` ⋊> ~/Desktop conda install -c conda-forge pandas-plink (echoR) 17:23:25

Collecting package metadata (current_repodata.json): done
Solving environment: done

==> WARNING: A newer version of conda exists. <==
current version: 4.10.3
latest version: 4.11.0

Please update conda by running

$ conda update -n base conda

Package Plan

environment location: /opt/anaconda3/envs/echoR

added / updated specs:
- pandas-plink

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
arrow-cpp-7.0.0            |py39h731a60b_2_cpu        19.7 MB  conda-forge
attrs-21.4.0               |     pyhd8ed1ab_0          49 KB  conda-forge
bitarray-2.4.0             |   py39h63b48b0_0         139 KB  conda-forge
bokeh-2.4.2                |   py39h6e9494a_0        13.8 MB  conda-forge
brotlipy-0.7.0             |py39h89e85a6_1003         358 KB  conda-forge
certifi-2021.10.8          |   py39h6e9494a_1         145 KB  conda-forge
cffi-1.15.0                |   py39he338e87_0         219 KB  conda-forge
click-8.0.4                |   py39h6e9494a_0         147 KB  conda-forge
cloudpickle-2.0.0          |     pyhd8ed1ab_0          24 KB  conda-forge
cryptography-36.0.1        |   py39h209aa08_0         1.3 MB  conda-forge
cytoolz-0.11.2             |   py39h89e85a6_1         341 KB  conda-forge
dask-2022.2.1              |     pyhd8ed1ab_0           5 KB  conda-forge
dask-core-2022.2.1         |     pyhd8ed1ab_0         806 KB  conda-forge
deprecated-1.2.13          |     pyh6c4a22f_0          12 KB  conda-forge
distributed-2022.2.1       |     pyhd8ed1ab_0         706 KB  conda-forge
fastparquet-0.5.0          |   py39he3068b8_0         173 KB
importlib-metadata-4.11.2  |   py39h6e9494a_0          33 KB  conda-forge
importlib_metadata-4.11.2  |       hd8ed1ab_0           4 KB  conda-forge
kiwisolver-1.3.2           |   py39hf018cea_1          59 KB  conda-forge
libllvm11-11.1.0           |       hd011deb_3        22.5 MB  conda-forge
llvmlite-0.38.0            |   py39h798a4f4_0         249 KB  conda-forge
markupsafe-2.1.0           |   py39h63b48b0_0          21 KB  conda-forge
matplotlib-base-3.4.3      |   py39hb07454d_2         7.3 MB  conda-forge
msgpack-python-1.0.3       |   py39hf018cea_0          82 KB  conda-forge
numba-0.55.1               |   py39h58500fb_0         3.8 MB  conda-forge
numpy-1.21.5               |   py39h516c64c_0         6.0 MB  conda-forge
pandas-1.4.1               |   py39h4d6be9b_0        12.0 MB  conda-forge
pandas-plink-2.2.9         |   py39h89e85a6_0          88 KB  conda-forge
pillow-9.0.1               |   py39hd2c7aa1_2        44.2 MB  conda-forge
pluggy-1.0.0               |   py39h6e9494a_2          25 KB  conda-forge
psutil-5.9.0               |   py39h89e85a6_0         355 KB  conda-forge
py-1.11.0                  |     pyh6c4a22f_0          74 KB  conda-forge
pyarrow-7.0.0              |py39h4d6536f_2_cpu         2.8 MB  conda-forge
pysocks-1.7.1              |   py39h6e9494a_4          28 KB  conda-forge
pytest-7.0.1               |   py39h6e9494a_0         463 KB  conda-forge
python-3.9.10              |h1dd9edd_2_cpython        12.4 MB  conda-forge
pyyaml-6.0                 |   py39h89e85a6_3         171 KB  conda-forge
rchitect-0.3.36            |   py39h63b48b0_0          93 KB  conda-forge
rpy2-3.4.5                 |py39r40hc89836e_3         380 KB  conda-forge
scikit-learn-1.0.2         |   py39hd4eea88_0         7.3 MB  conda-forge
scipy-1.8.0                |   py39h056f1c0_1        21.7 MB  conda-forge
setuptools-59.8.0          |   py39h6e9494a_0         1.0 MB  conda-forge
thrift-0.16.0              |   py39h9fcab8e_0         121 KB  conda-forge
tomli-2.0.1                |     pyhd8ed1ab_0          16 KB  conda-forge
toolz-0.11.2               |     pyhd8ed1ab_0          48 KB  conda-forge
tornado-6.1                |   py39h89e85a6_2         650 KB  conda-forge
typing_extensions-4.1.1    |     pyha770c72_0          29 KB  conda-forge
tzlocal-3.0                |   py39h6e9494a_2          27 KB  conda-forge
wrapt-1.13.3               |   py39h89e85a6_1          44 KB  conda-forge
xarray-2022.3.0            |     pyhd8ed1ab_0         650 KB  conda-forge
yaml-0.2.5                 |       h0d85af4_2          82 KB  conda-forge
zict-2.1.0                 |     pyhd8ed1ab_0          12 KB  conda-forge
zipp-3.7.0                 |     pyhd8ed1ab_1          12 KB  conda-forge
zstandard-0.17.0           |   py39h89e85a6_0         796 KB  conda-forge
------------------------------------------------------------
                                       Total:       183.3 MB

The following NEW packages will be INSTALLED:

attrs conda-forge/noarch::attrs-21.4.0-pyhd8ed1ab_0
bokeh conda-forge/osx-64::bokeh-2.4.2-py39h6e9494a_0
click conda-forge/osx-64::click-8.0.4-py39h6e9494a_0
cloudpickle conda-forge/noarch::cloudpickle-2.0.0-pyhd8ed1ab_0
cytoolz conda-forge/osx-64::cytoolz-0.11.2-py39h89e85a6_1
dask conda-forge/noarch::dask-2022.2.1-pyhd8ed1ab_0
dask-core conda-forge/noarch::dask-core-2022.2.1-pyhd8ed1ab_0
deprecated conda-forge/noarch::deprecated-1.2.13-pyh6c4a22f_0
distributed conda-forge/noarch::distributed-2022.2.1-pyhd8ed1ab_0
heapdict conda-forge/noarch::heapdict-1.0.1-py_0
importlib-metadata conda-forge/osx-64::importlib-metadata-4.11.2-py39h6e9494a_0
importlib_metadata conda-forge/noarch::importlib_metadata-4.11.2-hd8ed1ab_0
iniconfig conda-forge/noarch::iniconfig-1.1.1-pyh9f0ad1d_0
libllvm11 conda-forge/osx-64::libllvm11-11.1.0-hd011deb_3
llvmlite conda-forge/osx-64::llvmlite-0.38.0-py39h798a4f4_0
locket conda-forge/noarch::locket-0.2.0-py_2
msgpack-python conda-forge/osx-64::msgpack-python-1.0.3-py39hf018cea_0
numba conda-forge/osx-64::numba-0.55.1-py39h58500fb_0
pandas-plink conda-forge/osx-64::pandas-plink-2.2.9-py39h89e85a6_0
partd conda-forge/noarch::partd-1.2.0-pyhd8ed1ab_0
pluggy conda-forge/osx-64::pluggy-1.0.0-py39h6e9494a_2
psutil conda-forge/osx-64::psutil-5.9.0-py39h89e85a6_0
py conda-forge/noarch::py-1.11.0-pyh6c4a22f_0
pytest conda-forge/osx-64::pytest-7.0.1-py39h6e9494a_0
pyyaml conda-forge/osx-64::pyyaml-6.0-py39h89e85a6_3
sortedcontainers conda-forge/noarch::sortedcontainers-2.4.0-pyhd8ed1ab_0
tblib conda-forge/noarch::tblib-1.7.0-pyhd8ed1ab_0
thrift conda-forge/osx-64::thrift-0.16.0-py39h9fcab8e_0
tomli conda-forge/noarch::tomli-2.0.1-pyhd8ed1ab_0
toolz conda-forge/noarch::toolz-0.11.2-pyhd8ed1ab_0
tornado conda-forge/osx-64::tornado-6.1-py39h89e85a6_2
typing_extensions conda-forge/noarch::typing_extensions-4.1.1-pyha770c72_0
wrapt conda-forge/osx-64::wrapt-1.13.3-py39h89e85a6_1
xarray conda-forge/noarch::xarray-2022.3.0-pyhd8ed1ab_0
yaml conda-forge/osx-64::yaml-0.2.5-h0d85af4_2
zict conda-forge/noarch::zict-2.1.0-pyhd8ed1ab_0
zipp conda-forge/noarch::zipp-3.7.0-pyhd8ed1ab_1
zstandard conda-forge/osx-64::zstandard-0.17.0-py39h89e85a6_0

The following packages will be REMOVED:

cramjam-2.5.0-py310hcf052fe_0
fonttools-4.29.1-py310he24745e_0
pytz-deprecation-shim-0.1.0.post0-py310h2ec42d9_1
unicodedata2-14.0.0-py310he24745e_0

The following packages will be UPDATED:

bitarray 2.3.6-py310he24745e_0 --> 2.4.0-py39h63b48b0_0

The following packages will be SUPERSEDED by a higher-priority channel:

fastparquet conda-forge::fastparquet-0.8.0-py310h~ --> pkgs/main::fastparquet-0.5.0-py39he3068b8_0

The following packages will be DOWNGRADED:

arrow-cpp 7.0.0-py310h5d67baf_2_cpu --> 7.0.0-py39h731a60b_2_cpu
brotlipy 0.7.0-py310he24745e_1003 --> 0.7.0-py39h89e85a6_1003
certifi 2021.10.8-py310h2ec42d9_1 --> 2021.10.8-py39h6e9494a_1
cffi 1.15.0-py310hcc37b68_0 --> 1.15.0-py39he338e87_0
cryptography 36.0.1-py310ha82f1d4_0 --> 36.0.1-py39h209aa08_0
kiwisolver 1.3.2-py310h2fea185_1 --> 1.3.2-py39hf018cea_1
markupsafe 2.1.0-py310h1961e1f_0 --> 2.1.0-py39h63b48b0_0
matplotlib-base 3.5.1-py310hfc59cd6_0 --> 3.4.3-py39hb07454d_2
numpy 1.22.2-py310hfbbbacf_0 --> 1.21.5-py39h516c64c_0
pandas 1.4.1-py310hdd25497_0 --> 1.4.1-py39h4d6be9b_0
pillow 9.0.1-py310h382dc3b_2 --> 9.0.1-py39hd2c7aa1_2
pyarrow 7.0.0-py310hcc86d33_2_cpu --> 7.0.0-py39h4d6536f_2_cpu
pysocks 1.7.1-py310h2ec42d9_4 --> 1.7.1-py39h6e9494a_4
python 3.10.2-h1dd9edd_3_cpython --> 3.9.10-h1dd9edd_2_cpython
python_abi 3.10-2_cp310 --> 3.9-2_cp39
rchitect 0.3.36-py310h1961e1f_0 --> 0.3.36-py39h63b48b0_0
rpy2 3.4.5-py310r40h81f86ea_3 --> 3.4.5-py39r40hc89836e_3
scikit-learn 1.0.2-py310h598de7d_0 --> 1.0.2-py39hd4eea88_0
scipy 1.8.0-py310h47774c9_1 --> 1.8.0-py39h056f1c0_1
setuptools 60.9.3-py310h2ec42d9_0 --> 59.8.0-py39h6e9494a_0
tzlocal 4.1-py310h2ec42d9_1 --> 3.0-py39h6e9494a_2

Proceed ([y]/n)? y

Downloading and Extracting Packages
attrs-21.4.0 | 49 KB | #################################################################################### | 100%
cffi-1.15.0 | 219 KB | #################################################################################### | 100%
pysocks-1.7.1 | 28 KB | #################################################################################### | 100%
distributed-2022.2.1 | 706 KB | #################################################################################### | 100%
markupsafe-2.1.0 | 21 KB | #################################################################################### | 100%
xarray-2022.3.0 | 650 KB | #################################################################################### | 100%
pyyaml-6.0 | 171 KB | #################################################################################### | 100%
arrow-cpp-7.0.0 | 19.7 MB | #################################################################################### | 100%
scipy-1.8.0 | 21.7 MB | #################################################################################### | 100%
matplotlib-base-3.4. | 7.3 MB | #################################################################################### | 100%
scikit-learn-1.0.2 | 7.3 MB | #################################################################################### | 100%
importlib_metadata-4 | 4 KB | #################################################################################### | 100%
tomli-2.0.1 | 16 KB | #################################################################################### | 100%
toolz-0.11.2 | 48 KB | #################################################################################### | 100%
rpy2-3.4.5 | 380 KB | #################################################################################### | 100%
zict-2.1.0 | 12 KB | #################################################################################### | 100%
yaml-0.2.5 | 82 KB | #################################################################################### | 100%
click-8.0.4 | 147 KB | #################################################################################### | 100%
llvmlite-0.38.0 | 249 KB | #################################################################################### | 100%
setuptools-59.8.0 | 1.0 MB | #################################################################################### | 100%
cloudpickle-2.0.0 | 24 KB | #################################################################################### | 100%
typing_extensions-4. | 29 KB | #################################################################################### | 100%
tornado-6.1 | 650 KB | #################################################################################### | 100%
numba-0.55.1 | 3.8 MB | #################################################################################### | 100%
rchitect-0.3.36 | 93 KB | #################################################################################### | 100%
deprecated-1.2.13 | 12 KB | #################################################################################### | 100%
bitarray-2.4.0 | 139 KB | #################################################################################### | 100%
importlib-metadata-4 | 33 KB | #################################################################################### | 100%
tzlocal-3.0 | 27 KB | #################################################################################### | 100%
pandas-plink-2.2.9 | 88 KB | #################################################################################### | 100%
cytoolz-0.11.2 | 341 KB | #################################################################################### | 100%
pyarrow-7.0.0 | 2.8 MB | #################################################################################### | 100%
thrift-0.16.0 | 121 KB | #################################################################################### | 100%
msgpack-python-1.0.3 | 82 KB | #################################################################################### | 100%
numpy-1.21.5 | 6.0 MB | #################################################################################### | 100%
pandas-1.4.1 | 12.0 MB | #################################################################################### | 100%
libllvm11-11.1.0 | 22.5 MB | #################################################################################### | 100%
dask-core-2022.2.1 | 806 KB | #################################################################################### | 100%
pillow-9.0.1 | 44.2 MB | #################################################################################### | 100%
brotlipy-0.7.0 | 358 KB | #################################################################################### | 100%
dask-2022.2.1 | 5 KB | #################################################################################### | 100%
wrapt-1.13.3 | 44 KB | #################################################################################### | 100%
zipp-3.7.0 | 12 KB | #################################################################################### | 100%
python-3.9.10 | 12.4 MB | #################################################################################### | 100%
zstandard-0.17.0 | 796 KB | #################################################################################### | 100%
cryptography-36.0.1 | 1.3 MB | #################################################################################### | 100%
psutil-5.9.0 | 355 KB | #################################################################################### | 100%
kiwisolver-1.3.2 | 59 KB | #################################################################################### | 100%
bokeh-2.4.2 | 13.8 MB | #################################################################################### | 100%
pluggy-1.0.0 | 25 KB | #################################################################################### | 100%
py-1.11.0 | 74 KB | #################################################################################### | 100%
fastparquet-0.5.0 | 173 KB | #################################################################################### | 100%
certifi-2021.10.8 | 145 KB | #################################################################################### | 100%
pytest-7.0.1 | 463 KB | #################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

</details>

Build PDF manual

Running into an error when trying to build the PDF version of the documentation.

devtools::build_manual()
Converting Rd files to LaTeX .............................
Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,  : 
  Running 'texi2dvi' on 'Rd2.tex' failed.
Output:
You don't have a working TeX binary (tex) installed anywhere in
your PATH, and texi2dvi cannot proceed without one.  If you want to use
this script, you'll need to install TeX (if you don't have it) or change
your PATH or TEX environment variable (if you do).  See the --help
output for more details.

For information about obtaining TeX, please see http://tug.org/texlive,
or do a web search for TeX and your operating system or distro.
Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,  : 
  Running 'texi2dvi' on 'Rd2.tex' failed.
Output:
You don't have a working TeX binary (tex) installed anywhere in
your PATH, and texi2dvi cannot proceed without one.  If you want to use
this script, you'll need to install TeX (if you don't have it) or change
your PATH or TEX environment variable (if you do).  See the --help
output for more details.

For information about obtaining TeX, please see http://tug.org/texlive,
or do a web search for TeX and your operating system or distro.
Error in running tools::texi2pdf()
Error: Failed to build manual

Session Info

─ Session info ─────────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 3.6.3 (2020-02-29)
 os       macOS  10.16                
 system   x86_64, darwin15.6.0        
 ui       RStudio                     
 language (EN)                        
 collate  en_GB.UTF-8                 
 ctype    en_GB.UTF-8                 
 tz       Europe/London               
 date     2021-01-19                  

─ Packages ─────────────────────────────────────────────────────────────────────
 ! package              * version  date       lib
   abind                  1.4-5    2016-07-21 [1]
   ade4                   1.7-16   2020-10-28 [1]
   AnnotationDbi          1.48.0   2019-10-29 [1]
   AnnotationFilter       1.10.0   2019-10-29 [1]
   ape                    5.4-1    2020-08-13 [1]
   askpass                1.1      2019-01-13 [1]
   assertthat             0.2.1    2019-03-21 [1]
   backports              1.2.1    2020-12-09 [1]
   base64enc              0.1-3    2015-07-28 [1]
   Biobase                2.46.0   2019-10-29 [1]
   BiocFileCache          1.10.2   2019-11-08 [1]
   BiocGenerics           0.32.0   2019-10-29 [1]
   BiocManager            1.30.10  2019-11-16 [1]
   BiocParallel           1.20.1   2019-12-21 [1]
   biomaRt                2.42.1   2020-03-26 [1]
   Biostrings             2.54.0   2019-10-29 [1]
   biovizBase             1.34.1   2019-12-04 [1]
   bit                    4.0.4    2020-08-04 [1]
   bit64                  4.0.5    2020-08-30 [1]
   bitops                 1.0-6    2013-08-17 [1]
   blob                   1.2.1    2020-01-20 [1]
   BMA                    3.18.14  2020-12-12 [1]
   boot                   1.3-25   2020-04-26 [1]
   broom                  0.7.3    2020-12-16 [1]
   BSgenome               1.54.0   2019-10-29 [1]
   callr                  3.5.1    2020-10-13 [1]
   car                    3.0-10   2020-09-29 [1]
   carData                3.0-4    2020-05-22 [1]
   cellranger             1.1.0    2016-07-27 [1]
   checkmate              2.0.0    2020-02-06 [1]
   Ckmeans.1d.dp          4.3.3    2020-07-22 [1]
   class                  7.3-17   2020-04-26 [1]
   cli                    2.2.0    2020-11-20 [1]
   cluster                2.1.0    2019-06-19 [1]
   codetools              0.2-18   2020-11-04 [1]
   coin                   1.4-0    2021-01-16 [1]
   coloc                  3.2-1    2019-05-17 [1]
   colorspace             2.0-0    2020-11-11 [1]
   crayon                 1.3.4    2017-09-16 [1]
   curl                   4.3      2019-12-02 [1]
   data.table             1.13.6   2020-12-30 [1]
   DBI                    1.1.1    2021-01-15 [1]
   dbplyr                 2.0.0    2020-11-03 [1]
   DelayedArray           0.12.3   2020-04-09 [1]
   DEoptimR               1.0-8    2016-11-19 [1]
   desc                   1.2.0    2018-05-01 [1]
   DescTools              0.99.39  2020-12-07 [1]
   devtools               2.3.2    2020-09-18 [1]
   dichromat              2.0-0    2013-01-24 [1]
   digest                 0.6.27   2020-10-24 [1]
   dnet                   1.1.7    2020-02-20 [1]
   downlit                0.2.1    2020-11-04 [1]
   dplyr                * 1.0.3    2021-01-15 [1]
   e1071                  1.7-4    2020-10-14 [1]
 P echolocatoR          * 0.1.1    2021-01-19 [?]
   ellipsis               0.3.1    2020-05-15 [1]
   EnsDb.Hsapiens.v75     2.99.0   2020-11-23 [1]
   ensembldb              2.10.2   2019-11-20 [1]
   evaluate               0.14     2019-05-28 [1]
   Exact                  2.1      2020-10-02 [1]
   expm                   0.999-6  2021-01-13 [1]
   fansi                  0.4.2    2021-01-15 [1]
   farver                 2.0.3    2020-01-16 [1]
   forcats                0.5.0    2020-03-01 [1]
   foreign                0.8-75   2020-01-20 [1]
   Formula                1.2-4    2020-10-16 [1]
   fs                     1.5.0    2020-07-31 [1]
   gaston                 1.5.7    2020-09-24 [1]
   gbRd                   0.4-11   2012-10-01 [1]
   generics               0.1.0    2020-10-31 [1]
   GenomeInfoDb           1.22.1   2020-03-27 [1]
   GenomeInfoDbData       1.2.2    2020-11-16 [1]
   GenomicAlignments      1.22.1   2019-11-12 [1]
   GenomicFeatures        1.38.2   2020-02-15 [1]
   GenomicRanges          1.38.0   2019-10-29 [1]
   GGally                 2.1.0    2021-01-06 [1]
   ggbio                  1.34.0   2020-11-23 [1]
   ggnetwork              0.5.8    2020-02-12 [1]
   ggplot2                3.3.3    2020-12-30 [1]
   ggpubr                 0.4.0    2020-06-27 [1]
   ggrepel                0.9.1    2021-01-15 [1]
   ggridges               0.5.3    2021-01-08 [1]
   ggsignif               0.6.0    2019-08-08 [1]
   gld                    2.6.2    2020-01-08 [1]
   glue                   1.4.2    2020-08-27 [1]
   graph                  1.64.0   2019-10-29 [1]
   gridExtra              2.3      2017-09-09 [1]
   grImport2              0.2-0    2019-11-25 [1]
   gtable                 0.3.0    2019-03-25 [1]
   Gviz                   1.30.3   2020-02-17 [1]
   haven                  2.3.1    2020-06-01 [1]
   hexbin                 1.28.2   2021-01-08 [1]
   Hmisc                  4.4-2    2020-11-29 [1]
   hms                    1.0.0    2021-01-13 [1]
   htmlTable              2.1.0    2020-09-16 [1]
   htmltools              0.5.1    2021-01-12 [1]
   htmlwidgets            1.5.3    2020-12-10 [1]
   httr                   1.4.2    2020-07-20 [1]
   igraph                 1.2.6    2020-10-06 [1]
   inline                 0.3.17   2020-12-01 [1]
   IRanges                2.20.2   2020-01-13 [1]
   jpeg                   0.1-8.1  2019-10-24 [1]
   jsonlite               1.7.2    2020-12-09 [1]
   knitr                  1.30     2020-09-22 [1]
   labeling               0.4.2    2020-10-20 [1]
   lattice                0.20-41  2020-04-02 [1]
   latticeExtra           0.6-29   2019-12-19 [1]
   lazyeval               0.2.2    2019-03-15 [1]
   leaps                  3.1      2020-01-16 [1]
   libcoin                1.0-7    2021-01-15 [1]
   lifecycle              0.2.0    2020-03-06 [1]
   lmom                   2.8      2019-03-12 [1]
   lubridate              1.7.9.2  2020-11-13 [1]
   magrittr               2.0.1    2020-11-17 [1]
   mapproj                1.2.7    2020-02-03 [1]
   maps                   3.3.0    2018-04-03 [1]
   MASS                   7.3-53   2020-09-09 [1]
   Matrix                 1.3-2    2021-01-06 [1]
   matrixStats            0.57.0   2020-09-25 [1]
   memoise                1.1.0    2017-04-21 [1]
   modelr                 0.1.8    2020-05-19 [1]
   modeltools             0.2-23   2020-03-05 [1]
   motifbreakR            2.3.1    2021-01-12 [1]
   motifStack             1.30.0   2019-10-29 [1]
   MotIV                  1.42.0   2019-10-29 [1]
   multcomp               1.4-15   2020-11-14 [1]
   munsell                0.5.0    2018-06-12 [1]
   mvtnorm                1.1-1    2020-06-09 [1]
   nlme                   3.1-151  2020-12-10 [1]
   nnet                   7.3-14   2020-04-26 [1]
   openssl                1.4.3    2020-09-18 [1]
   openxlsx               4.2.3    2020-10-27 [1]
   OrganismDbi            1.28.0   2019-10-29 [1]
   pals                   1.6      2019-12-04 [1]
   patchwork              1.1.1    2020-12-17 [1]
   pcaPP                  1.9-73   2018-01-14 [1]
   pillar                 1.4.7    2020-11-20 [1]
   pkgbuild               1.2.0    2020-12-15 [1]
   pkgconfig              2.0.3    2019-09-22 [1]
   pkgdown                1.6.1    2020-09-12 [1]
   pkgload                1.1.0    2020-05-29 [1]
   plyr                   1.8.6    2020-03-03 [1]
   png                    0.1-7    2013-12-03 [1]
   prettyunits            1.1.1    2020-01-24 [1]
   processx               3.4.5    2020-11-30 [1]
   progress               1.2.2    2019-05-16 [1]
   ProtGenerics           1.18.0   2019-10-29 [1]
   ps                     1.5.0    2020-12-05 [1]
   purrr                  0.3.4    2020-04-17 [1]
   R.methodsS3            1.8.1    2020-08-26 [1]
   R.oo                   1.24.0   2020-08-26 [1]
   R.utils                2.10.1   2020-08-26 [1]
   R6                     2.5.0    2020-10-28 [1]
   ragg                   0.4.1    2021-01-11 [1]
   rappdirs               0.3.1    2016-03-28 [1]
   RBGL                   1.62.1   2019-10-30 [1]
   rbibutils              2.0      2020-11-18 [1]
   RCircos                1.2.1    2019-03-12 [1]
   RColorBrewer           1.1-2    2014-12-07 [1]
   Rcpp                   1.0.6    2021-01-15 [1]
   RcppParallel           5.0.2    2020-06-24 [1]
   RCurl                  1.98-1.2 2020-04-18 [1]
   Rdpack                 2.1      2020-11-09 [1]
   readr                  1.4.0    2020-10-05 [1]
   readxl                 1.3.1    2019-03-13 [1]
   rematch2               2.1.2    2020-05-01 [1]
   remotes                2.2.0    2020-07-21 [1]
   reprex                 0.3.0    2019-05-16 [1]
   reshape                0.8.8    2018-10-23 [1]
   reshape2               1.4.4    2020-04-09 [1]
   reticulate             1.18     2020-10-25 [1]
   rGADEM                 2.34.1   2019-12-16 [1]
   Rgraphviz              2.30.0   2019-10-29 [1]
   rio                    0.5.16   2018-11-26 [1]
   rlang                  0.4.10   2020-12-30 [1]
   rmarkdown              2.6      2020-12-14 [1]
   robustbase             0.93-7   2021-01-04 [1]
   rootSolve              1.8.2.1  2020-04-27 [1]
   roxygen2               7.1.1    2020-06-27 [1]
   rpart                  4.1-15   2019-04-12 [1]
   rprojroot              2.0.2    2020-11-15 [1]
   rrcov                  1.5-5    2020-08-03 [1]
   Rsamtools              2.2.3    2020-02-23 [1]
   RSQLite                2.2.2    2021-01-08 [1]
   rstatix                0.6.0    2020-06-18 [1]
   rstudioapi             0.13     2020-11-12 [1]
   rtracklayer            1.46.0   2019-10-29 [1]
   rvest                  0.3.6    2020-07-25 [1]
   S4Vectors              0.24.4   2020-04-09 [1]
   sandwich               3.0-0    2020-10-02 [1]
   scales                 1.1.1    2020-05-11 [1]
   seqLogo                1.52.0   2019-10-29 [1]
   sessioninfo            1.1.1    2018-11-05 [1]
   snpStats               1.36.0   2020-11-23 [1]
   stringi                1.5.3    2020-09-09 [1]
   stringr                1.4.0    2019-02-10 [1]
   SummarizedExperiment   1.16.1   2019-12-19 [1]
   supraHex               1.24.0   2019-10-29 [1]
   survival               3.2-7    2020-09-28 [1]
   susieR                 0.9.0    2021-01-12 [1]
   systemfonts            0.3.2    2020-09-29 [1]
   testthat               3.0.1    2020-12-17 [1]
   textshaping            0.2.1    2020-11-13 [1]
   TFMPvalue              0.0.8    2018-05-16 [1]
   TH.data                1.0-10   2019-01-21 [1]
   tibble                 3.0.5    2021-01-15 [1]
   tidyr                  1.1.2    2020-08-27 [1]
   tidyselect             1.1.0    2020-05-11 [1]
   tidyverse              1.3.0    2019-11-21 [1]
   tinytex                0.28     2020-12-14 [1]
   usethis                2.0.0    2020-12-10 [1]
   VariantAnnotation      1.32.0   2019-10-29 [1]
   vctrs                  0.3.6    2020-12-17 [1]
   whisker                0.4      2019-08-28 [1]
   withr                  2.4.0    2021-01-16 [1]
   xfun                   0.20     2021-01-06 [1]
   XGR                    1.1.7    2020-01-08 [1]
   XML                    3.99-0.3 2020-01-20 [1]
   xml2                   1.3.2    2020-04-23 [1]
   XVector                0.26.0   2019-10-29 [1]
   yaml                   2.2.1    2020-02-01 [1]
   zip                    2.1.1    2020-08-27 [1]
   zlibbioc               1.32.0   2019-10-29 [1]
   zoo                    1.8-8    2020-05-02 [1]
 source                                    
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 Bioconductor                              
 Bioconductor                              
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 Bioconductor                              
 Bioconductor                              
 Bioconductor                              
 CRAN (R 3.6.0)                            
 Bioconductor                              
 Bioconductor                              
 Bioconductor                              
 Bioconductor                              
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 Bioconductor                              
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.3)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 Bioconductor                              
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 local                                     
 CRAN (R 3.6.2)                            
 Bioconductor                              
 Bioconductor                              
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.3)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 Bioconductor                              
 Bioconductor                              
 Bioconductor                              
 Bioconductor                              
 Bioconductor                              
 CRAN (R 3.6.2)                            
 bioc_git2r (@15346db)                     
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 Bioconductor                              
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.0)                            
 Bioconductor                              
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.3)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.3)                            
 Bioconductor                              
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 Github (Simon-Coetzee/motifBreakR@b2c5c30)
 Bioconductor                              
 Bioconductor                              
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 Bioconductor                              
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 Bioconductor                              
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 Bioconductor                              
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 Bioconductor                              
 Bioconductor                              
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.3)                            
 CRAN (R 3.6.3)                            
 CRAN (R 3.6.2)                            
 Bioconductor                              
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 Bioconductor                              
 CRAN (R 3.6.2)                            
 Bioconductor                              
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 Bioconductor                              
 CRAN (R 3.6.0)                            
 bioc_git2r (@6838a7c)                     
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 Bioconductor                              
 Bioconductor                              
 CRAN (R 3.6.2)                            
 Github (stephenslab/susieR@34021ad)       
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 Bioconductor                              
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 CRAN (R 3.6.2)                            
 url                                       
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 Bioconductor                              
 CRAN (R 3.6.0)                            
 CRAN (R 3.6.2)                            
 Bioconductor                              
 CRAN (R 3.6.2)                            

[1] /Library/Frameworks/R.framework/Versions/3.6/Resources/library

 P ── Loaded and on-disk path mismatch.

Issue when creating conda environment

After downloading echoR.yml file and running
conda env create -f echoR.yml

the following is displayed:
Collecting package metadata (repodata.json): done
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.

after several hours, creating the environment eventually fails with a warning about package conflicts.
There are many package conflicts and the output may be too lengthy to put here.

commit 7bfdbce works for me to build the environment but then I am unable to use MungeSumStats because this R package requires R >=4.1. This commit's .yml file specifies R 4.0.

I have tried building the environment while running Linux Mint and using Miniconda3 version 4.11.0, using Windows 8 and Miniconda3 version 4.11.0, and on Linux CentOS-7 with Miniconda3 version 4.7.10 and 4.10.3. I have also tried Linux CentOS-7 with Miniconda2 version 4.7.10. All with the similar long output of conflicts.

echolocatoR_conflicts.txt

`get_UKB_MAF()` not working with manually downloaded reference file

Issue

After downloading locally the file from biobank.ctsu.ox.ac.uk, user tried running the finemap_loci() wrapper, user gets another error in the get_UKB_MAF() function:

[1] "UKB MAF:: Extracting MAF from UKB reference."
Error in `[.data.table`(y, x, nomatch = if (all.x) NA else NULL, on = by,  : 
  logical error. i is not a data.table, but 'on' argument is provided.

Solution

Likely stems from get_UKB_MAF() expecting the file to be a certain location, or the file being empty (due to an incomplete initial download attempt).
The former potential reason should be resolved by fixes described here #5.
The latter potential reason is now guarded against with check for file.size==0 (in which case, the file is deleted).

`echoverse`: Break up echolocatoR into sub-packages

This will make it more modular and easier to debug.

Proposed modules:

  • echolocatoR (echoverse branch): Core functions such as workflow and utilities.
  • echofinemap: Fine-mapping functions.
  • echoLD: LD downloading and processing (UKB, 1KG).
  • echoAI: API access to variant-level AI predictions (IMPACT, DeepSEA, SpliceAI).
  • echoannot: API access to variant-level epigenomic/genomic annotations (XGR, Roadmap, ENCODE).
  • echotabix: Tabix-indexing of tabular and vcf files.
  • echopeaks: Peak calling (MACS2). Now integrated into echoannot, with additional functionality available via PeakyFinders
  • echovalidate: Validation functions such as annotation enrichment with bootstrapping.
  • echoconda: Conda env utility functions.
  • catalogueR: eQTL Catalogue API and colocalization.
  • downloadR: Single- or multi-threaded downloading functions.
  • ggLocusZoom: Locus plotting. Replaced by echoplot.
  • echoplot: Locus plotting (replacement for ggLocusZoom).
  • echodata: Fine-mapping results, echolocatoR Fine-mapping Portal API, and related datasets.
  • echogithub: Extract data and metadata from GitHub

Extra modules

Share compressed binary distribution echolocatoR

The long-term goal is to get echolocatoR onto CRAN and/or Bioconductor, but this will take some work to meet their formatting requirements.

In the meantime, I'll be sharing a compressed binary distribution of echolocatoR via Google Drive (to be posted in the README soon).

Error in Locus %in% loci : object 'Locus' not found

I just set up echolocatoR according to the robust installation guideline.

When I call the finemap_loci function to check if echolocatoR can use all the packages properly:

r$> finemap_loci("echoR")
[1] "+ CONDA:: Activating conda env 'echoR'"
[1] "Checking for tabix installation..."
[1] "Checking for bcftools installation..."
Error in Locus %in% loci : object 'Locus' not found

Unable to reproduce "Full pipeline vignette"

Due to I have been unable to generate results from ABF, I tried to reproduce the full pipeline vignette (https://rajlabmssm.github.io/echolocatoR/articles/full_pipeline_vignette.html) as a first step and I cannot do so.

Apparently, there is an issue when generating the LD file given a locus. I checked that the vcf.gz file generate is actually empty, so then plink fails to read an empty file.

I checked this as you can see below:

acarrasco@kronos:/data/kronos/kronos/acarrasco/FOR_MARYAM/results/GWAS/Nalls23andMe_2019/BST1/LD$ gunzip BST1.1KGphase1.vcf.gz
acarrasco@kronos:/data/kronos/kronos/acarrasco/FOR_MARYAM/results/GWAS/Nalls23andMe_2019/BST1/LD$ cat BST1.1KGphase1.vcf
acarrasco@kronos:/data/kronos/kronos/acarrasco/FOR_MARYAM/results/GWAS/Nalls23andMe_2019/BST1/LD$

Please, see the code below - Of note, the top_SNPs were generated according to the tutorial as well.

Nalls23andMe_2019.results <- finemap_loci(# GENERAL ARGUMENTS
top_SNPs = top_SNPs,
# It's best to give absolute paths
results_dir = "~//data/kronos/kronos/acarrasco/FOR_MARYAM/results",
loci = c("BST1","MEX3C"),# top_SNPs$Locus,
dataset_name = "Nalls23andMe_2019",
dataset_type = "GWAS",
force_new_subset = F,
force_new_LD = F,
force_new_finemap = T,
remove_tmps = F,

             # SUMMARY STATS ARGUMENTS
             fullSS_path = /data/kronos/kronos/acarrasco/FOR_MARYAM/Nalls23andMe_2019.fullSS_subset.tsv
             query_by ="tabix",
             chrom_col = "CHR", position_col = "POS", snp_col = "RSID",
             pval_col = "p", effect_col = "beta", stderr_col = "se",
             freq_col = "freq", MAF_col = "calculate",
             A1_col = "A1",
             A2_col = "A2",
             
             # FILTERING ARGUMENTS
             ## It's often desirable to use a larger window size 
             ## (e.g. 2Mb which is bp_distance=500000*2), 
             ## but we use a small window here to speed up the process. 
             bp_distance = 10000,#500000*2,
             min_MAF = 0.001,  
             trim_gene_limits = F,
             
             # FINE-MAPPING ARGUMENTS
             ## General
             finemap_methods = c("ABF","FINEMAP","SUSIE","POLYFUN_SUSIE"), 
             n_causal = 5,
             PP_threshold = .95, 
             
             # LD ARGUMENTS 
             LD_reference = "1KGphase1",#"UKB",
             superpopulation = "EUR",
             download_method = "axel",
             
             # PLOT ARGUMENTS 
             ## general   
             plot.types=c("fancy"),
             ## Generate multiple plots of different window sizes; 
             ### all SNPs, 4x zoomed-in, and a 50000bp window
             plot.zoom = c("all","4x","10x"),
             ## XGR
             # plot.XGR_libnames=c("ENCODE_TFBS_ClusteredV3_CellTypes"), 
             ## Roadmap
             plot.Roadmap = F,
             plot.Roadmap_query = NULL,
             # Nott et al. (2019)
             plot.Nott_epigenome = T, 
             plot.Nott_show_placseq = T, 
             
             verbose = F
             )

###########
This is the output
###########

[1] "+ CONDA:: Activating conda env 'echoR'"
[1] "Checking for tabix installation..."
[1] "Checking for bcftools installation..."

) ) ) ))))))}}}}}}}} {{{{{{{{{(((((( ( ( (
BST1 (1 / 2)
) ) ) ))))))}}}}}}}} {{{{{{{{{(((((( ( ( (
[1] "+ Subset file looks good."
[1] "LD:: Using 1000Genomes as LD reference panel."
[1] "LD Reference Panel = 1KGphase1"
[1] "+ LD:: Querying 1KG remote server."
[1] "+ CONDA:: Identified tabix executable in echoR env."
[1] "LD:: Querying VCF subset"
[1] "/home/acarrasco/.conda/envs/echoR/bin/tabix -fh -p vcf ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/release/20110521//ALL.chr4.phase1_release_v3.20101123.snps_indels_svs.genotypes.vcf.gz 4:15727389-15747197 > /data/kronos/kronos/acarrasco/FOR_MARYAM/results/GWAS/Nalls23andMe_2019/BST1/LD/BST1.1KGphase1.vcf"
Segmentation fault (core dumped)
[1] "LD:TABIX:: Re-indexing vcf.gz..."
[1] "LD:BCFTOOLS:: Subsetting vcf to only include EUR individuals ( 378 / 1091 )."
Failed to read from /data/kronos/kronos/acarrasco/FOR_MARYAM/results/GWAS/Nalls23andMe_2019/BST1/LD/BST1.1KGphase1.vcf.gz: unknown file type
[1] "LD:PLINK:: Converting vcf.gz to .bed/.bim/.fam"
PLINK v1.90b6.9 64-bit (4 Mar 2019) www.cog-genomics.org/plink/1.9/
(C) 2005-2019 Shaun Purcell, Christopher Chang GNU General Public License v3
Logging to /data/kronos/kronos/acarrasco/FOR_MARYAM/results/GWAS/Nalls23andMe_2019/BST1/LD/plink.log.
Options in effect:
--out /data/kronos/kronos/acarrasco/FOR_MARYAM/results/GWAS/Nalls23andMe_2019/BST1/LD/plink
--vcf /data/kronos/kronos/acarrasco/FOR_MARYAM/results/GWAS/Nalls23andMe_2019/BST1/LD/BST1.1KGphase1.vcf.gz

257891 MB RAM detected; reserving 128945 MB for main workspace.

Error: File read failure.
[1] "LD:snpStats:: Computing LD (stats = R)"
Error in data.table::fread(bim_path, col.names = c("CHR", "SNP", "V3", :
File '/data/kronos/kronos/acarrasco/FOR_MARYAM/results/GWAS/Nalls23andMe_2019/BST1/LD/plink.bim' does not exist or is non-readable. getwd()=='/data/kronos/kronos/acarrasco/FOR_MARYAM'
Fine-mapping complete in:
Time difference of 2.7 secs

) ) ) ))))))}}}}}}}} {{{{{{{{{(((((( ( ( (
MEX3C (2 / 2)
) ) ) ))))))}}}}}}}} {{{{{{{{{(((((( ( ( (
[1] "+ Subset file looks good."
[1] "LD:: Using 1000Genomes as LD reference panel."
[1] "LD Reference Panel = 1KGphase1"
[1] "+ LD:: Querying 1KG remote server."
[1] "+ CONDA:: Identified tabix executable in echoR env."
[1] "LD:: Querying VCF subset"
[1] "/home/acarrasco/.conda/envs/echoR/bin/tabix -fh -p vcf ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/release/20110521//ALL.chr18.phase1_release_v3.20101123.snps_indels_svs.genotypes.vcf.gz 18:48673708-48692728 > /data/kronos/kronos/acarrasco/FOR_MARYAM/results/GWAS/Nalls23andMe_2019/MEX3C/LD/MEX3C.1KGphase1.vcf"
Segmentation fault (core dumped)
[1] "LD:TABIX:: Re-indexing vcf.gz..."
[1] "LD:BCFTOOLS:: Subsetting vcf to only include EUR individuals ( 378 / 1091 )."
Failed to read from /data/kronos/kronos/acarrasco/FOR_MARYAM/results/GWAS/Nalls23andMe_2019/MEX3C/LD/MEX3C.1KGphase1.vcf.gz: unknown file type
[1] "LD:PLINK:: Converting vcf.gz to .bed/.bim/.fam"
PLINK v1.90b6.9 64-bit (4 Mar 2019) www.cog-genomics.org/plink/1.9/
(C) 2005-2019 Shaun Purcell, Christopher Chang GNU General Public License v3
Logging to /data/kronos/kronos/acarrasco/FOR_MARYAM/results/GWAS/Nalls23andMe_2019/MEX3C/LD/plink.log.
Options in effect:
--out /data/kronos/kronos/acarrasco/FOR_MARYAM/results/GWAS/Nalls23andMe_2019/MEX3C/LD/plink
--vcf /data/kronos/kronos/acarrasco/FOR_MARYAM/results/GWAS/Nalls23andMe_2019/MEX3C/LD/MEX3C.1KGphase1.vcf.gz

257891 MB RAM detected; reserving 128945 MB for main workspace.

Error: File read failure.
[1] "LD:snpStats:: Computing LD (stats = R)"
Error in data.table::fread(bim_path, col.names = c("CHR", "SNP", "V3", :
File '/data/kronos/kronos/acarrasco/FOR_MARYAM/results/GWAS/Nalls23andMe_2019/MEX3C/LD/plink.bim' does not exist or is non-readable. getwd()=='/data/kronos/kronos/acarrasco/FOR_MARYAM'
Fine-mapping complete in:
Time difference of 2.5 secs
Error in [.data.table(x, r, vars, with = FALSE) :
column(s) not found: SNP

Many thanks!

conda: Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/opt/anaconda3/envs/echoR/lib/R/library/expm/libs/expm.dylib':

Problem

After setting up the echoR conda env, opening R via radian, and then remotes::install_github("RajLabMSSM/echolocatoR"), the installation makes it alllll the way to the end and then fails with:

...
...
...
* installing *source* package ‘echolocatoR’ ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/opt/anaconda3/envs/echoR/lib/R/library/expm/libs/expm.dylib':
  dlopen(/opt/anaconda3/envs/echoR/lib/R/library/expm/libs/expm.dylib, 6): Library not loaded: @rpath/R/lib/libRlapack.dylib
  Referenced from: /opt/anaconda3/envs/echoR/lib/R/library/expm/libs/expm.dylib
  Reason: image not found
Calls: <Anonymous> ... asNamespace -> loadNamespace -> library.dynam -> dyn.load
Execution halted
ERROR: lazy loading failed for package ‘echolocatoR’
* removing ‘/opt/anaconda3/envs/echoR/lib/R/library/echolocatoR’
Error: Failed to install 'echolocatoR' from GitHub:
  (converted from warning) installation of package ‘/var/folders/zq/h7mtybc533b1qzkys_ttgpth0000gn/T//RtmpZbOuiT/file162202b0cfacc/echolocatoR_0.1.2.tar.gz’ had non-zero exit status

Solution attempts

  1. Make sure r-rcpp is up to date (it is).

  2. Add openblas to the conda env per the suggestion here:
    conda install -c conda-forge openblas

  3. Upgrade R: conda upgrade r-base==4.0.3. Taking a looooong time to solve.

[1] ".cred not detected. Using .snp instead."

I was running FINEMAP and I believe that FINEMAP.check_files() fails to find an existing .cred file

First, I am copying the output of my FINEMAP run:

)   )  ) ))))))}}}}}}}} {{{{{{{{{(((((( (  (   (
AC108211.1 (1 / 10)
)   )  ) ))))))}}}}}}}} {{{{{{{{{(((((( (  (   (
[1] "+ CONDA:: Identified bgzip executable in echoR env."
[1] "Determining chrom type from file header"
[1] "LD:: Standardizing summary statistics subset."
[1] "++ Preparing Gene col"
[1] "++ Preparing A1,A1 cols"
[1] "++ Preparing MAF,Freq cols"
[1] "++ Inferring MAF from frequency column..."
[1] "++ Preparing N_cases,N_controls cols"
[1] "++ Preparing `proportion_cases` col"
[1] "++ 'proportion_cases' not included in data subset."
[1] "++ Preparing N col"
[1] "+ Preparing sample_size (N) column"
[1] "++ Using `sample_size = 3572` TRUE"
[1] "++ Preparing t-stat col"
[1] "+ Calculating t-statistic from Effect and StdErr..."
[1] "++ Assigning lead SNP"
[1] "++ Ensuring Effect, StdErr, P are numeric"
[1] "++ Ensuring 1 SNP per row"
[1] "++ Removing extra whitespace"
[1] "++ Saving subset ==> /mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS_2//mixedmodels_GWAS/earlymotorPD_axial/AC108211.1/AC108211.1_earlymotorPD_axial_subset.tsv.gz"
[1] "LD:: Using UK Biobank LD reference panel."
[1] "+ UKB LD file name: chr4_156000001_159000001"
[1] "+ LD:: Downloading full .gz/.npz UKB files and saving to disk."
[1] "+ Overwriting pre-existing file."
[1] "+ CONDA:: Identified axel executable in echoR env."
[1] "+ Overwriting pre-existing file."
[1] "+ CONDA:: Identified axel executable in echoR env."
[1] "+ LD:: load_ld() python function input: /mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS_2//mixedmodels_GWAS/earlymotorPD_axial/AC108211.1/LD/chr4_156000001_159000001"
[1] "+ LD:: Reading LD matrix into memory. This could take some time..."
/mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS_2//mixedmodels_GWAS/earlymotorPD_axial/AC108211.1/LD/chr4_156000001_159000001.gz
/mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS_2//mixedmodels_GWAS/earlymotorPD_axial/AC108211.1/LD/chr4_156000001_159000001.npz
Processed URL: /mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS_2//mixedmodels_GWAS/earlymotorPD_axial/AC108211.1/LD/chr4_156000001_159000001
Some other message at the end
[1] "+ Full UKB LD matrix: 21897 x 21897"
[1] "+ Full UKB LD SNP data.table: 21897 x 5"
[1] "+ LD:: Saving LD matrix ==> /mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS_2//mixedmodels_GWAS/earlymotorPD_axial/AC108211.1/LD/AC108211.1.UKB_LD.RDS"
[1] "5340 x 5340 LD_matrix (sparse)"
vvvvv-- ABF --vvvvv
✅ All required columns present.
✅ All suggested columns present.
vvvvv-- FINEMAP --vvvvv
✅ All required columns present.
✅ All suggested columns present.
vvvvv-- SUSIE --vvvvv
✅ All required columns present.
✅ All suggested columns present.
vvvvv-- POLYFUN_SUSIE --vvvvv
✅ All required columns present.
✅ All suggested columns present.

+++ Multi-finemap:: ABF +++

+++ Multi-finemap:: FINEMAP +++
[1] "++ FINEMAP:: Constructing master file."
[1] "++ FINEMAP:: Constructing data.z file."
[1] "++ FINEMAP:: Constructing data.ld file."
                                                                                                     [1] "+ Using FINEMAP v1.4"      

|--------------------------------------|
| Welcome to FINEMAP v1.4              |
|                                      |
| (c) 2015-2020 University of Helsinki |
|                                      |
| Help :                               |
| - ./finemap --help                   |
| - www.finemap.me                     |
| - www.christianbenner.com            |
|                                      |
| Contact :                            |
| - [email protected]       |
| - [email protected]          |
|--------------------------------------|

--------
SETTINGS
--------
- dataset            : all
- corr-config        : 0.95
- n-causal-snps      : 5
- n-configs-top      : 50000
- n-conv-sss         : 100
- n-iter             : 100000
- n-threads          : 1
- prior-k0           : 0
- prior-std          : 0.05 
- prob-conv-sss-tol  : 0.001
- prob-cred-set      : 0.95

------------
FINE-MAPPING (1/1)
------------
- GWAS summary stats               : FINEMAP/data.z
- SNP correlations                 : FINEMAP/data.ld
- Causal SNP stats                 : FINEMAP/data.snp
- Causal configurations            : FINEMAP/data.config
- Credible sets                    : FINEMAP/data.cred
- Log file                         : FINEMAP/data.log_sss
- Reading input                    : done!   

- Number of GWAS samples           : 3572
- Number of SNPs                   : 5338
- Prior-Pr(# of causal SNPs is k)  : 
  (0 -> 0)
   1 -> 0.583
   2 -> 0.291
   3 -> 0.0971
   4 -> 0.0243
   5 -> 0.00485
- 367552 configurations evaluated (0.654/100%) : converged after 654 iterations
- Computing causal SNP statistics  : done!   
- Regional SNP heritability        : -2.08e-05 (SD: 0.00215 ; 95% CI: [0.00461,0.0124])
- Log10-BF of >= one causal SNP    : 36.6
- Post-expected # of causal SNPs   : 5
- Post-Pr(# of causal SNPs is k)   : 
  (0 -> 0)
   1 -> 0
   2 -> 0
   3 -> 0
   4 -> 9.65e-08
   5 -> 1
- Computing credible sets          : done!
- Writing output                   : done!   
- Run time                         : 0 hours, 0 minutes, 54 seconds
[1] ".cred not detected. Using .snp instead."
[1] "+ FINEMAP:: Importing prob (.snp)..."
Error in `[[<-.data.frame`(`*tmp*`, col, value = 1) : 
  replacement has 1 row, data has 0
In addition: Warning messages:
1: Python '/home/acarrasco/.conda/envs/echoR/bin/python' was requested but '/tools/anaconda3/bin/python' was loaded instead (see reticulate::py_config() for more information) 
2: In sdY.est(d$varbeta, d$MAF, d$N) :
  estimating sdY from maf and varbeta, please directly supply sdY if known

I then checked the FINEMAP.check_files() function

FINEMAP.check_files <- function(locus_dir,
results_file){
# locus_dir="/Users/schilder/Desktop/echolocatoR/results/GWAS/Nalls23andMe_2019/BST1"
### In FINEMAP v1.3, only one .cred file are produced.
### In FINEMAP v1.4, multiple FINEMAP files with # suffixes are produced.
.cred_files <- list.files(file.path(locus_dir,"FINEMAP"), "data.cred", full.names = T)
.cred_exists <- length(.cred_files)>0
.snp_exists <- file.exists(file.path(locus_dir,"FINEMAP/data.snp"))
.config_exists <- file.exists(file.path(locus_dir,"FINEMAP/data.config"))
file_options <- c(".cred",".snp",".config")[c(.cred_exists,.snp_exists,.config_exists)]
if(!results_file %in% file_options){
printer(results_file,"not detected.",
"Using",file_options[1],"instead.")
return(file_options[1])
}else { return(results_file)}
}
results_file <- FINEMAP.check_files(locus_dir, results_file)

Looking at the output of my run, it says that [1] ".cred not detected. Using .snp instead.", although this file certainly is on my locus dir

acarrasco@kronos:/mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS_2/mixedmodels_GWAS/earlymotorPD_axial/AC108211.1/FINEMAP$ ls
data.config  data.cred5  data.ld  data.log_sss  data.snp  data.z  master
acarrasco@kronos:/mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS_2/mixedmodels_GWAS/earlymotorPD_axial/AC108211.1/FINEMAP$ cat data.cred5 
# Post-Pr(# of causal SNPs is 5) = 1
#log10bf 34.7481 NA 30.4904 NA 18.9337 NA 18.876 NA 10.8375 NA
#min(|ld|) 0.997835 NA 0.998004 NA 1 NA 0.998703 NA 0.997919 NA
#mean(|ld|) 0.99946 NA 0.998079 NA 1 NA 0.998703 NA 0.999003 NA
#median(|ld|) 1 NA 0.998069 NA 1 NA 0.998703 NA 0.999031 NA
index cred1 prob1 cred2 prob2 cred3 prob3 cred4 prob4 cred5 prob5
1 rs7671031 0.18038 rs6813360 0.386687 rs7689588 0.435622 rs6837253 0.511966 rs72617489 0.35104
2 rs7671539 0.178679 rs56303163 0.231338 rs7664568 0.379368 rs11100000 0.481225 rs12500250 0.214129
3 rs3733392 0.177317 rs1058992 0.200773 rs7663482 0.137654 NA NA rs17032893 0.212246
4 rs6810747 0.156615 rs6846496 0.181201 NA NA NA NA rs17032928 0.209109
5 rs6830576 0.156399 NA NA NA NA NA NA NA NA
6 rs986416 0.0727053 NA NA NA NA NA NA NA NA
7 rs6817266 0.0463756 NA NA NA NA NA NA NA NA

And if we manually run FINEMAP.check_files():

locus_dir = "/mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS/mixedmodels_GWAS/earlymotorPD_axial/AC108211.1/" 
.cred_files <- list.files(file.path(locus_dir, "AC108211.1"), "data.cred", full.names = T)
.cred_exists <- length(.cred_files)>0
.snp_exists <- file.exists(file.path(locus_dir,"FINEMAP/data.snp")) 
.config_exists <- file.exists(file.path(locus_dir,"FINEMAP/data.config"))

file_options <- c(".cred",".snp",".config")[c(.cred_exists,.snp_exists,.config_exists)]

if(results_file %in% file_options){print(".cred is present")}                                   
[1] ".cred is present"

Even though the tool does not get to use .cred file, we still could use the .snp file present as well but then the error message arises

[1] "+ FINEMAP:: Importing prob (.snp)..."
Error in `[[<-.data.frame`(`*tmp*`, col, value = 1) : 
  replacement has 1 row, data has 0
In addition: Warning messages:
1: Python '/home/acarrasco/.conda/envs/echoR/bin/python' was requested but '/tools/anaconda3/bin/python' was loaded instead (see reticulate::py_config() for more information) 
2: In sdY.est(d$varbeta, d$MAF, d$N) :
  estimating sdY from maf and varbeta, please directly supply sdY if known
acarrasco@kronos:/mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS_2/mixedmodels_GWAS/earlymotorPD_axial/AC108211.1/FINEMAP$ head data.snp 
index rsid chromosome position allele1 allele2 maf beta se z prob log10bf mean sd mean_incl sd_incl
189 rs6837253 4 156322896 A T 0.02075 -0.3057 0.1058 -2.88941 0.521352 3.56637 -0.233238 0.758019 -0.447371 1.00316
190 rs11100000 4 156322989 T C 0.0197 -0.3054 0.1057 -2.88931 0.47397 3.48399 -0.255481 0.558101 -0.539025 0.710162
174 rs7689588 4 156312305 T C 0.01615 0.2786 0.1047 2.66094 0.434588 3.41497 -0.210852 0.639425 -0.485177 0.898729
92 rs6813360 4 156280474 A C 0.02165 0.3478 0.1227 2.83456 0.39096 3.33674 -0.137362 0.586056 -0.351346 0.896285
173 rs7664568 4 156312207 A G 0.01615 0.2777 0.1048 2.64981 0.379836 3.31634 -0.181721 0.607305 -0.47842 0.910522
145 rs72617489 4 156301492 A T 0.00485 -0.1804 0.4355 -0.414237 0.373007 3.30371 -0.254638 0.732986 -0.682663 1.07153
53 rs56303163 4 156269874 T C 0.02165 0.3464 0.1227 2.82315 0.233002 3.01182 -0.130036 0.502011 -0.558091 0.91799
121 rs12500250 4 156291125 T C 0.00485 -0.1248 0.4329 -0.288288 0.207427 2.94708 -0.0772504 0.361459 -0.372423 0.721071
94 rs17032893 4 156281371 T C 0.00485 -0.1248 0.4329 -0.288288 0.204728 2.93992 -0.0783408 0.349633 -0.382658 0.69329

I understand the error is becuase there is no row with a prob value higher than the credset_threshold. Maybe worth adding a message

data.snp[data.snp[[prob_col]] > credset_thresh,] %>% plyr::mutate(CS=1) %>% dplyr::rename(PP=dply
    r::all_of(prob_col))                                                                             
Error in `[[<-.data.frame`(`*tmp*`, col, value = 1) : 
  replacement has 1 row, data has 0

I understand there is no causal SNP on this specific locus by looking at the PIP. Maybe worth adding a message when that happens.

However, there is an issue getting to use cred and snp files that I could not figure out

Downloading MAF from UKB failing

Issue

When neither MAF nor Frequency columns are available in the user-supplied summary stats file, echolocatoR will try to gather MAF from a remote source (UKB).

However, this now fails with the following error:

[1] "UKB MAF:: Extracting MAF from UKB reference."
Error in data.table::fread(out_file, nThread = nThread, select = c(3,  : 
  File './Data/Reference/UKB_MAF/ukb_mfi_chr4_v3.txt' does not exist or is non-readable. 

It appears that the issue is in fact with an invalid certificate on the biobank.ctsu.ox.ac.uk side.

Solution

Add check_certificates=F flag to echolocatoR::downloader() function, which in turn supplies --no-check-certificate to wget, or --insecure to axel (respectively).

Add to conda enviornment

You may be revamping the entire environment but if not, it would be worthwhile including MungeSusmtats in the installed packages since it's now used by default in echolocatoR's functions (Just to save people installing it before running).

conversion to tabix file sometimes failing

Issue:

Original summary stats file ( /project/farber_lab/will/echolocatoR/echo_bmd_FINAL.tsv.gz) gets overwritten with an empty file when running on HPC.

Potential source

Not being able to find bgzip and/or zcat executables during:
"( zgrep 'CHR' /project/farber_lab/will/echolocatoR/echo_bmd_FINAL.tsv.gz; zgrep -v ^'CHR' /project/farber_lab/will/echolocatoR/echo_bmd_FINAL.tsv.gz | sort -k1,1 -k2,2n ) | bgzip > /project/farber_lab/will/echolocatoR/echo_bmd_FINAL.tsv.gz"

Potential solution:

Explicitly call bgzip/zcat using full path to conda env executable.

Slurm error message:

Registered S3 method overwritten by 'GGally':
  method from   
  +.gg   ggplot2
[1] "+ Assigning gene_col and locus_col independently"
       Locus      Gene CHR       POS         SNP           P       Effect
1:   5S_rRNA   5S_rRNA  23 150229408   rs5925496 0.036154500 -0.003934910
2:    61E3.4    61E3.4  16  21841448 rs181722413 0.100000000 -0.064257900
3:       7SK       7SK  23 137222166   rs1594214 0.000473012  0.008040440
4: A-575C2.4 A-575C2.4  16  28647605 rs574951226 0.100000000  0.038680500
5:      A1BG      A1BG  19  58863449   rs4801579 1.000000000  0.000358687
6:      A1CF      A1CF  10  52617099 rs531994296 0.100000000  0.024644900

)   )  ) ))))))}}}}}}}} {{{{{{{{{(((((( (  (   (
A1BG (1 / 2)
)   )  ) ))))))}}}}}}}} {{{{{{{{{(((((( (  (   (
[1] "+ Extracting relevant variants from fullSS..."
[1] "+ Query Method: tabix"
[1] "+ QUERY: Chromosome = 19 ; Min position = 57863449 ; Max position = 59863449"
[1] "TABIX:: Converting full summary stats file to tabix format for fast querying..."
[1] "( zgrep 'CHR' /project/farber_lab/will/echolocatoR/echo_bmd_FINAL.tsv.gz; zgrep -v ^'CHR' /project/farber_lab/will/echolocatoR/echo_bmd_FINAL.tsv.gz | sort -k1,1 -k2,2n ) | bgzip > /project/farber_lab/will/echolocatoR/echo_bmd_FINAL.tsv.gz"
[1] "+ CONDA:: Identified tabix executable in echoR env."
[1] "TABIX:: Indexing"
[1] "/sfs/qumulo/qhome/wr8yp/.conda/envs/echoR/bin/tabix -f -S 1 -s 1 -b 2 -e 2 /project/farber_lab/will/echolocatoR/echo_bmd_FINAL.tsv.gz"
Error in data.table::fread(file_path, nrows = 0, header = T) : 
  File is empty: /tmp/Rtmp25KA9t/file6c8a19dc4c5b
Fine-mapping complete in:
Time difference of 14.3 secs

)   )  ) ))))))}}}}}}}} {{{{{{{{{(((((( (  (   (
A1CF (2 / 2)
)   )  ) ))))))}}}}}}}} {{{{{{{{{(((((( (  (   (
[1] "+ Extracting relevant variants from fullSS..."
[1] "+ Query Method: tabix"
[1] "+ QUERY: Chromosome = 10 ; Min position = 51617099 ; Max position = 53617099"
[1] "TABIX:: Existing indexed tabix file detected"
Error in data.table::fread(file_path, nrows = 0, header = T) : 
  File is empty: /tmp/Rtmp25KA9t/file6c8a533e796c
Fine-mapping complete in:
Time difference of 0.1 secs
[1] "+ Identifying Consensus SNPs..."
[1] "++ support_thresh = 2"
[1] "++ top_CS_only=FALSE"
[1] "+ Calculating mean Posterior Probability (mean.PP)..."
Error in `[.data.table`(x, r, vars, with = FALSE) : 
  column(s) not found: SNP
Calls: finemap_loci ... eval -> subset -> subset.data.table -> [ -> [.data.table
Execution halted

Rgraphviz

Hi, Many thanks for making this amazing package together. We are trying to adopt it in all our GWAS workflows. Rgraphviz cannot be installed on our cluster environment (Centos), I have tried everything I can think of to get it to install, but no joy. Can this package work without out? It appears to be a dependency of XGR, so currently I have modified the DESCRIPTION file to remove XGR so echolocator can be installed.

I am also getting loads of error messages with the vignette workflow e.g. :

Error in calculate.tstat(finemap_dat = finemap_dat) : 
  could not find function "calculate.tstat"

[1] "+ FINEMAP:: Importing conditional probabilties (.cred)..."
Error in t(rsids)[, 1] : subscript out of bounds

Kind regards,

Sam Kleeman
PhD Student, Cold Spring Harbor Laboratory, NY

Improve synonymous RSID detection

echolocatoR matches the GWAS sum stats with the LD ref panel based on SNP RSIDs. However, some SNPs have multiple synonymous RSIDs (e.g. from different version of dbSNP).

To improve overlap, I'd like to add a function that looks for overlap not just between the given RSIDS, but all their synonyms too.

Error doing ABF

Hi,

I am getting the following error that I am not able to understand when using the finemal_loci() function to do ABF

[1] "+ Full UKB LD matrix: 22590 x 22590"
[1] "+ Full UKB LD SNP data.table: 22590 x 5"
[1] "UKB MAF:: Extracting MAF from UKB reference."
[1] "+ CONDA:: Identified axel executable in echoR env."
Error in `[.data.table`(y, x, nomatch = if (all.x) NA else NULL, on = by,  : 
  logical error. i is not a data.table, but 'on' argument is provided.
Fine-mapping complete in:
Time difference of 2 mins
Error in `[.data.table`(x, r, vars, with = FALSE) : 
  column(s) not found: SNP

This is the function calling:

r$> Maryam_colocFIneMap_Results <- finemap_loci(top_SNPs = top_SNPs,      
                                                      results_dir = "/data/kronos/kronos/acarrasco/FOR_MARYAM/results",   
                                                      loci = c("locus1"),    
                                                      dataset_name = "GWAS_coloc",    
                                                      dataset_type = "GWAS",      
                                                      force_new_subset = F,    
                                                      force_new_LD = T,    
                                                      force_new_finemap = T,    
                                                      remove_tmps = F,    
                                                      fullSS_path = "/data/kronos/kronos/acarrasco/FOR_MARYAM/DLB-vs-Nalls-all_se.txt",  
                                                      query_by = "tabix",    
                          chrom_col = "CHR", position_col = "POS", snp_col = "SNP", pval_col = "woolf_p",  
                          effect_col = "log_woolf_OR", stderr_col = "se", N_cases_col = "NPD", N_controls_col = "NCO",  
                          proportion_cases = "prportion_cases",  
                            
                          bp_distance = 500000*2,   
                          trim_gene_limits = F,   
                            
                          finemap_methods = c("ABF"),                     
                         LD_reference = "UKB",   
                             superpopulation = "EUR",   
                             download_method = "axel",   
                               plot.types=c("fancy"),   
                             ## Generate multiple plots of different window sizes;    
                             ### all SNPs, 4x zoomed-in, and a 50000bp window   
                             plot.zoom = c("all","4x","10x"),   
                             ## XGR   
                             # plot.XGR_libnames=c("ENCODE_TFBS_ClusteredV3_CellTypes"),    
                             ## Roadmap   
                             plot.Roadmap = F,   
                             plot.Roadmap_query = NULL,   
                             # Nott et al. (2019)   
                             plot.Nott_epigenome = T,    
                             plot.Nott_show_placseq = T,  
                             verbose = F )    

Also, this is the header of my GWAS

CHR	POS	SNP	A1	A2	NPD	NCO	woolf_p	log_woolf_OR	log_OR1	log_OR2	woolf_p_adjusted	tval	se	prportion_cases
1	798400	chr1:798400	G	A	26035	441778	0.054355312527485	-0.0129364098436779	-0.0937025329495809	-0.0077974327837792	0.149450021680241	1.92408105275612	-0.00672342250091146	0.058932314420365
1	798959	chr1:798959	A	G	26035	441778	0.0624429326097045	-0.0166813371949653	-0.0949059766764264	-0.0116961408205252	0.162749942120059	1.86321743251793	-0.00895297398136848	0.058932314420365
1	1037303	chr1:1037303	C	T	33674	449056	0.413943979264559	-0.0415678483019056	-0.0022959606094905	-0.0436749490486619	0.540481742929293	0.816982901531581	-0.0508797041210767	0.0749884201524977

Of note, the top_SNPs were got by using the import_topSNPs() function after doing a grouping by CHR, and when calling the finemap_loci() function I specify the locus I am interested in through the "loci" flag from the generated top_SNPs datafrmae.

The sessionInfo:

r$> utils::sessionInfo()                                                                                                                                                                                   
R version 4.0.3 (2020-10-10)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Ubuntu 20.04.2 LTS

Matrix products: default
BLAS/LAPACK: /home/acarrasco/.conda/envs/echoR/lib/libopenblasp-r0.3.12.so

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8     LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8    LC_PAPER=en_GB.UTF-8      
 [8] LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] echolocatoR_0.1.2 data.table_1.14.0 forcats_0.5.1     stringr_1.4.0     dplyr_1.0.5       purrr_0.3.4       readr_1.4.0       tidyr_1.1.3       tibble_3.1.1      ggplot2_3.3.3     tidyverse_1.3.1  

loaded via a namespace (and not attached):
  [1] readxl_1.3.1                backports_1.2.1             Hmisc_4.5-0                 BiocFileCache_1.14.0        plyr_1.8.6                  lazyeval_0.2.2              splines_4.0.3              
  [8] crosstalk_1.1.1             BiocParallel_1.24.1         GenomeInfoDb_1.26.7         digest_0.6.27               ensembldb_2.14.1            htmltools_0.5.1.1           fansi_0.4.2                
 [15] magrittr_2.0.1              checkmate_2.0.0             memoise_2.0.0               BSgenome_1.58.0             cluster_2.1.1               Biostrings_2.58.0           modelr_0.1.8               
 [22] matrixStats_0.58.0          R.utils_2.10.1              ggbio_1.38.0                askpass_1.1                 prettyunits_1.1.1           jpeg_0.1-8.1                colorspace_2.0-0           
 [29] rappdirs_0.3.3              blob_1.2.1                  rvest_1.0.0                 haven_2.4.1                 xfun_0.22                   crayon_1.4.1                RCurl_1.98-1.3             
 [36] jsonlite_1.7.2              graph_1.68.0                Exact_2.1                   VariantAnnotation_1.36.0    survival_3.2-11             glue_1.4.2                  gtable_0.3.0               
 [43] zlibbioc_1.36.0             XVector_0.30.0              DelayedArray_0.16.3         BiocGenerics_0.36.1         scales_1.1.1                mvtnorm_1.1-1               DBI_1.1.1                  
 [50] GGally_2.1.1                Rcpp_1.0.6                  progress_1.2.2              htmlTable_2.1.0             reticulate_1.19             foreign_0.8-81              bit_4.0.4                  
 [57] proxy_0.4-25                OrganismDbi_1.32.0          Formula_1.2-4               DT_0.18                     stats4_4.0.3                htmlwidgets_1.5.3           httr_1.4.2                 
 [64] RColorBrewer_1.1-2          ellipsis_0.3.1              R.methodsS3_1.8.1           pkgconfig_2.0.3             reshape_0.8.8               XML_3.99-0.6                nnet_7.3-15                
 [71] dbplyr_2.1.1                utf8_1.2.1                  tidyselect_1.1.0            rlang_0.4.10                reshape2_1.4.4              AnnotationDbi_1.52.0        munsell_0.5.0              
 [78] cellranger_1.1.0            tools_4.0.3                 cachem_1.0.4                cli_2.5.0                   generics_0.1.0              RSQLite_2.2.5               broom_0.7.6                
 [85] fastmap_1.1.0               knitr_1.33                  bit64_4.0.5                 fs_1.5.0                    AnnotationFilter_1.14.0     rootSolve_1.8.2.1           RBGL_1.66.0                
 [92] R.oo_1.24.0                 xml2_1.3.2                  biomaRt_2.46.3              compiler_4.0.3              rstudioapi_0.13             curl_4.3                    png_0.1-7                  
 [99] e1071_1.7-6                 reprex_2.0.0                DescTools_0.99.41           stringi_1.5.3               ps_1.6.0                    GenomicFeatures_1.42.3      lattice_0.20-41            
[106] ProtGenerics_1.22.0         Matrix_1.3-2                vctrs_0.3.7                 pillar_1.6.0                lifecycle_1.0.0             BiocManager_1.30.12         bitops_1.0-7               
[113] lmom_2.8                    rtracklayer_1.50.0          GenomicRanges_1.42.0        R6_2.5.0                    latticeExtra_0.6-29         gridExtra_2.3               IRanges_2.24.1             
[120] gld_2.6.2                   dichromat_2.0-0             boot_1.3-27                 MASS_7.3-53.1               assertthat_0.2.1            SummarizedExperiment_1.20.0 openssl_1.4.3              
[127] withr_2.4.2                 GenomicAlignments_1.26.0    Rsamtools_2.6.0             S4Vectors_0.28.1            GenomeInfoDbData_1.2.4      expm_0.999-6                parallel_4.0.3             
[134] hms_1.0.0                   grid_4.0.3                  rpart_4.1-15                class_7.3-18                MatrixGenerics_1.2.1        biovizBase_1.38.0           Biobase_2.50.0             
[141] lubridate_1.7.10            base64enc_0.1-3            

Many thanks!,
Alejandro.

Error in cDict[[chrom_col]] : subscript out of bounds

## 1. Bug description

Upon running the finemap_loci() function, the above mentioned error message occurs.
(this is somehow a continuation from a thread in issue #74.)

### Console output

Full error message from console:
+ Extracting relevant variants from fullSS...
+ Query Method: tabix
+ QUERY: Chromosome = 22 ; Min position = 41143879 ; Max position = 41163879
echotabix:: Converting full summary stats file to tabix format for fast querying...
echotabix:: Ensuring file is bgzipped.
echotabix:: Tabix-indexing file.
Error in cDict[[chrom_col]] : subscript out of bounds
In addition: Warning messages:
1: In readLines(con = large_file, n = n) :
  line 1 appears to contain an embedded nul
2: In readLines(con = large_file, n = n) :
  line 2 appears to contain an embedded nul
Fine-mapping complete in:
Time difference of 5.5 secs
Returning results as nested list.

Expected behaviour

I'd expect the finemap_loci() function to run efficiently.
To note also, that upon running the script below, the munged sumstats (.parquet) are further zipped (i.e., .parquet.bgz), which I am not sure if it is somehow related to the error message.

##update: same error message produced when using .tsv files with MungeSumStats package.

## 2. Reproducible example
##Code

##all echoverse sub packages are loaded 

##import top SNPs (to be fine-mapped)
top_SNPs <- import_topSNPs(topSS = file.path("/path/to/my/top-snps"),
show_table = T, 
chrom_col = "CHR",
position_col = "BP", 
snp_col= "SNP",
pval_col= "P",
effect_col= "OR",
locus_col = "SNP",
grouping_vars = c("SNP"))
      
##path to GWAS summary stats
fullSS_path <- file.path("/path/to/my/parquet/file")

##run the fine-mapping function
my.results<- finemap_loci(top_SNPs = top_SNPs, 
                                          results_dir = file.path("path/to/results/folder"),
                                          loci = c("rs13044225","rs5758064"),#top_SNPs$Locus,
                                          dataset_name = "mydataset",
                                          dataset_type = "GWAS",  
                                          force_new_subset = TRUE,
                                          force_new_LD = FALSE,
                                          force_new_finemap = TRUE,
                                          remove_tmps = FALSE,
                                          
                                          # Munge full sumstats first
                                          munged = FALSE,
                                          
                                          # SUMMARY STATS ARGUMENTS
                                          fullSS_path = fullSS_path,
                                          fullSS_genome_build = "hg19",
                                          query_by = "tabix",  
                                          MAF_col = "calculate",   
                                         
                                          # FILTERING ARGUMENTS
                                          bp_distance = 10000,
                                          min_MAF = 0.001,  
                                          trim_gene_limits = FALSE,
                                         
                                          # FINE-MAPPING ARGUMENTS
                                          ## General
                                          finemap_methods = c("ABF","FINEMAP","SUSIE","POLYFUN_SUSIE"), 
                                          n_causal = 5,
                                          PP_threshold = .95, 
                                         
                                          # LD ARGUMENTS 
                                          LD_reference = "1KGphase1",#"UKB",
                                          superpopulation = "EUR",
                                          download_method = "axel",
                                          verbose = TRUE)

### Data
Unfortunately, I cannot upload the data, but here is a short description:
-My loci to be fine mapped are saved in a standard excel format with the following header:
SNP | CHR | BP | P | OR | SE.

-My GWAS sumstats have been munged with the munge_polyfun_sumstats.py and they are saved in a .parquet format.

## 3. Session info

R version 4.1.2 (2021-11-01)

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] echotabix_0.99.2 echoplot_0.99.1 echoLD_0.99.1 echofinemap_0.99.0 echoconda_0.99.4 echodata_0.99.6 echoannot_0.99.3 echolocatoR_2.0.0

loaded via a namespace (and not attached):
[1] utf8_1.2.2 reticulate_1.24 R.utils_2.11.0 tidyselect_1.1.2 RSQLite_2.2.10
[6] AnnotationDbi_1.56.2 htmlwidgets_1.5.4 grid_4.1.2 BiocParallel_1.28.3 XGR_1.1.7
[11] munsell_0.5.0 DT_0.21 colorspace_2.0-3 Biobase_2.54.0 filelock_1.0.2
[16] OrganismDbi_1.36.0 knitr_1.37 supraHex_1.32.0 rstudioapi_0.13 stats4_4.1.2
[21] DescTools_0.99.44 MatrixGenerics_1.6.0 GenomeInfoDbData_1.2.7 mixsqp_0.3-43 bit64_4.0.5
[26] rprojroot_2.0.2 vctrs_0.3.8 generics_0.1.2 xfun_0.30 biovizBase_1.42.0
[31] BiocFileCache_2.2.1 R6_2.5.1 GenomeInfoDb_1.30.1 AnnotationFilter_1.18.0 bitops_1.0-7
[36] cachem_1.0.6 reshape_0.8.8 DelayedArray_0.20.0 assertthat_0.2.1 BiocIO_1.4.0
[41] scales_1.1.1 nnet_7.3-17 rootSolve_1.8.2.3 gtable_0.3.0 lmom_2.8
[46] ggbio_1.42.0 ensembldb_2.18.3 rlang_1.0.2 clisymbols_1.2.0 splines_4.1.2
[51] rtracklayer_1.54.0 lazyeval_0.2.2 dichromat_2.0-0 hexbin_1.28.2 checkmate_2.0.0
[56] BiocManager_1.30.16 yaml_2.3.5 reshape2_1.4.4 crosstalk_1.2.0 snpStats_1.44.0
[61] GenomicFeatures_1.46.5 ggnetwork_0.5.10 backports_1.4.1 Hmisc_4.6-0 RBGL_1.70.0
[66] tools_4.1.2 ggplot2_3.3.5 ellipsis_0.3.2 jquerylib_0.1.4 RColorBrewer_1.1-2
[71] proxy_0.4-26 BiocGenerics_0.40.0 coloc_5.1.1 Rcpp_1.0.8 plyr_1.8.6
[76] base64enc_0.1-3 progress_1.2.2 zlibbioc_1.40.0 purrr_0.3.4 RCurl_1.98-1.6
[81] prettyunits_1.1.1 rpart_4.1.16 viridis_0.6.2 S4Vectors_0.32.3 SummarizedExperiment_1.24.0
[86] ggrepel_0.9.1 cluster_2.1.2 here_1.0.1 fs_1.5.2 magrittr_2.0.2
[91] data.table_1.14.2 dnet_1.1.7 openxlsx_4.2.5 gh_1.3.0 mvtnorm_1.1-3
[96] ProtGenerics_1.26.0 matrixStats_0.61.0 hms_1.1.1 patchwork_1.1.1 XML_3.99-0.9
[101] jpeg_0.1-9 IRanges_2.28.0 gridExtra_2.3 compiler_4.1.2 biomaRt_2.50.3
[106] tibble_3.1.6 crayon_1.5.0 R.oo_1.24.0 htmltools_0.5.2 tzdb_0.2.0
[111] Formula_1.2-4 tidyr_1.2.0 expm_0.999-6 Exact_3.1 lubridate_1.8.0
[116] DBI_1.1.2 dbplyr_2.1.1 MASS_7.3-55 rappdirs_0.3.3 boot_1.3-28
[121] Matrix_1.4-0 readr_2.1.2 piggyback_0.1.1 cli_3.2.0 R.methodsS3_1.8.1
[126] parallel_4.1.2 igraph_1.2.11 GenomicRanges_1.46.1 pkgconfig_2.0.3 GenomicAlignments_1.30.0
[131] RCircos_1.2.2 foreign_0.8-82 xml2_1.3.3 bslib_0.3.1 XVector_0.34.0
[136] stringr_1.4.0 VariantAnnotation_1.40.0 digest_0.6.29 graph_1.72.0 Biostrings_2.62.0
[141] htmlTable_2.4.0 gld_2.6.4 restfulr_0.0.13 curl_4.3.2 Rsamtools_2.10.0
[146] rjson_0.2.21 seqminer_8.4 lifecycle_1.0.1 nlme_3.1-155 jsonlite_1.8.0
[151] viridisLite_0.4.0 BSgenome_1.62.0 fansi_1.0.2 susieR_0.11.92 pillar_1.7.0
[156] lattice_0.20-45 GGally_2.1.2 KEGGREST_1.34.0 fastmap_1.1.0 httr_1.4.2
[161] survival_3.3-1 glue_1.6.2 zip_2.2.0 png_0.1-7 bit_4.0.4
[166] Rgraphviz_2.38.0 sass_0.4.0 class_7.3-20 stringi_1.7.6 blob_1.2.2
[171] latticeExtra_0.6-29 memoise_2.0.1 dplyr_1.0.8 irlba_2.3.5 e1071_1.7-9
[176] ape_5.6-2

Error in py_run_file_impl(file, local, convert) : ImportError:

Hey Brian, it looks like right after the LD file download the software is looking to use numpy for something and then having a package issue and crashing. Still just using the demo files.

Conda environment successfully generated using most up-to-date .yml file (https://github.com/RajLabMSSM/echolocatoR/raw/master/inst/conda/echoR.yml)

Log of input/output attached.


echolocatoR_log_03072022.txt


utils::sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /apps/eb/OpenBLAS/0.3.7-GCC-8.3.0/lib/libopenblas_zenp-r0.3.7.so

locale:
[1] C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] MungeSumstats_1.2.0 echolocatoR_0.2.1

loaded via a namespace (and not attached):
[1] backports_1.4.0 Hmisc_4.6-0
[3] BiocFileCache_2.2.0 plyr_1.8.6
[5] googleAuthR_1.4.0 lazyeval_0.2.2
[7] splines_4.1.0 crosstalk_1.2.0
[9] BiocParallel_1.28.2 GenomeInfoDb_1.30.1
[11] ggplot2_3.3.5 digest_0.6.29
[13] ensembldb_2.16.4 htmltools_0.5.2
[15] fansi_1.0.0 magrittr_2.0.1
[17] checkmate_2.0.0 memoise_2.0.1
[19] BSgenome_1.60.0 cluster_2.1.2
[21] Biostrings_2.62.0 matrixStats_0.61.0
[23] R.utils_2.11.0 ggbio_1.40.0
[25] prettyunits_1.1.1 jpeg_0.1-9
[27] colorspace_2.0-2 blob_1.2.2
[29] rappdirs_0.3.3 xfun_0.28
[31] dplyr_1.0.7 crayon_1.4.2
[33] RCurl_1.98-1.6 jsonlite_1.8.0
[35] graph_1.72.0 Exact_3.1
[37] survival_3.2-13 VariantAnnotation_1.38.0
[39] glue_1.5.0 gtable_0.3.0
[41] gargle_1.2.0 zlibbioc_1.40.0
[43] XVector_0.34.0 DelayedArray_0.18.0
[45] BiocGenerics_0.40.0 scales_1.1.1
[47] mvtnorm_1.1-3 DBI_1.1.1
[49] GGally_2.1.2 Rcpp_1.0.8
[51] progress_1.2.2 htmlTable_2.3.0
[53] reticulate_1.24 foreign_0.8-81
[55] bit_4.0.4 proxy_0.4-26
[57] OrganismDbi_1.34.0 Formula_1.2-4
[59] stats4_4.1.0 DT_0.20
[61] htmlwidgets_1.5.4 httr_1.4.2
[63] RColorBrewer_1.1-2 ellipsis_0.3.2
[65] pkgconfig_2.0.3 reshape_0.8.8
[67] XML_3.99-0.8 R.methodsS3_1.8.1
[69] seqminer_8.2 sass_0.4.0
[71] nnet_7.3-16 dbplyr_2.1.1
[73] here_1.0.1 utf8_1.2.2
[75] tidyselect_1.1.1 rlang_0.4.12
[77] reshape2_1.4.4 AnnotationDbi_1.54.1
[79] munsell_0.5.0 tools_4.1.0
[81] cachem_1.0.6 cli_3.1.0
[83] generics_0.1.1 RSQLite_2.2.9
[85] stringr_1.4.0 fastmap_1.1.0
[87] yaml_2.2.1 knitr_1.36
[89] bit64_4.0.5 fs_1.5.2
[91] purrr_0.3.4 KEGGREST_1.32.0
[93] AnnotationFilter_1.16.0 rootSolve_1.8.2.3
[95] RBGL_1.70.0 R.oo_1.24.0
[97] xml2_1.3.3 biomaRt_2.48.3
[99] compiler_4.1.0 rstudioapi_0.13
[101] filelock_1.0.2 curl_4.3.2
[103] png_0.1-7 e1071_1.7-9
[105] tibble_3.1.6 bslib_0.3.1
[107] DescTools_0.99.44 stringi_1.7.6
[109] GenomicFeatures_1.44.2 lattice_0.20-45
[111] ProtGenerics_1.26.0 Matrix_1.4-0
[113] vctrs_0.3.8 pillar_1.6.4
[115] lifecycle_1.0.1 BiocManager_1.30.16
[117] jquerylib_0.1.4 data.table_1.14.2
[119] bitops_1.0-7 lmom_2.8
[121] rtracklayer_1.52.1 GenomicRanges_1.46.1
[123] R6_2.5.1 BiocIO_1.4.0
[125] latticeExtra_0.6-29 gridExtra_2.3
[127] IRanges_2.28.0 gld_2.6.3
[129] dichromat_2.0-0 boot_1.3-28
[131] MASS_7.3-54 assertthat_0.2.1
[133] SummarizedExperiment_1.22.0 rprojroot_2.0.2
[135] rjson_0.2.20 GenomicAlignments_1.28.0
[137] Rsamtools_2.8.0 S4Vectors_0.32.3
[139] GenomeInfoDbData_1.2.7 expm_0.999-6
[141] parallel_4.1.0 hms_1.1.1
[143] grid_4.1.0 rpart_4.1-15
[145] class_7.3-19 MatrixGenerics_1.6.0
[147] biovizBase_1.40.0 Biobase_2.54.0
[149] base64enc_0.1-3 restfulr_0.0.13

Hanging at: "+ CONDA:: Identified axel executable in echoR env."

As the title says, it is getting to this line of output and then hanging indefinitely. I was having some issues with axel for the LD downloading part which is why I switched to wget. I don't see a way to bypass axel for this part.

Log of input/output attached.
echolocatoR_log_MF_03122022.txt

R SESSION INFO

R: sessionInfo()
R version 4.0.5 (2021-03-31)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /home/mf91122/.conda/envs/echoR/lib/libopenblasp-r0.3.18.so

locale:
[1] C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] echolocatoR_0.2.2

loaded via a namespace (and not attached):
[1] Rcpp_1.0.8 XVector_0.34.0 GenomeInfoDb_1.30.1
[4] pillar_1.7.0 compiler_4.0.5 R.methodsS3_1.8.1
[7] R.utils_2.11.0 tools_4.0.5 bitops_1.0-7
[10] zlibbioc_1.40.0 jsonlite_1.8.0 lifecycle_1.0.1
[13] tibble_3.1.6 gtable_0.3.0 lattice_0.20-45
[16] pkgconfig_2.0.3 png_0.1-7 rlang_0.4.12
[19] Matrix_1.4-0 DBI_1.1.2 parallel_4.0.5
[22] GenomeInfoDbData_1.2.7 dplyr_1.0.7 Biostrings_2.62.0
[25] IRanges_2.28.0 S4Vectors_0.32.3 generics_0.1.2
[28] vctrs_0.3.8 rappdirs_0.3.3 rprojroot_2.0.2
[31] stats4_4.0.5 grid_4.0.5 tidyselect_1.1.1
[34] here_1.0.1 reticulate_1.24 glue_1.5.0
[37] data.table_1.14.2 R6_2.5.1 fansi_1.0.0
[40] BiocParallel_1.28.3 seqminer_8.4 ggplot2_3.3.5
[43] purrr_0.3.4 magrittr_2.0.2 GenomicRanges_1.46.1
[46] scales_1.1.1 Rsamtools_2.6.0 ellipsis_0.3.2
[49] BiocGenerics_0.40.0 assertthat_0.2.1 colorspace_2.0-3
[52] utf8_1.2.2 RCurl_1.98-1.6 munsell_0.5.0
[55] crayon_1.5.0 R.oo_1.24.0

Wrong merged_DT from merge_finemapping_results()

Hi,
I have couple of GWAS summary statisitics. I have completed running finemap_loci(). It has generated locus specific results. That is fine. Now I wanted to run codes given in Summarise vignette (https://rajlabmssm.github.io/echolocatoR/articles/summarise_vignette.html). I set the "dataset " argument of merge_finemapping_results() to the parent folder where all the locus specific sub-folder are present.
I ran the following code:
merged_DT <- merge_finemapping_results(dataset=dataset_dir, minimum_support=1, include_leadSNPs=T)

I notice the following things:
(1) it gives me the following error: Error in merge_finemapping_results(dataset = dataset_dir, minimum_support = 1, include_leadSNPs = T): + No multi-finemap files found., though printing
(2) when I print merged_DT , the "Dataset" column is Nalls23andMe_2019!!!. Though I have not that result stored in my machine.

I tried with "dataset" argument set to different dataset_dir, but merged_DT is EXACTLY the same.

Could you please help? Thank You.
dataset set to one finemap_loci() dir:
Capture1

dataset set to ANOTHER finemap_loci() dir:
Capture2
:

Error in `[.data.table`(x, r, vars, with = FALSE) : column(s) not found: prob

This issue is a continuation somehow #72
I am showing an example in which we have snps with a prob_col value higher than the threshold but echolocatoR fails in assigning CS and PP to SNPs

acarrasco@kronos:/mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS/mixedmodels_GWAS/earlymotorPD_axial/MAD1L1/FINEMAP$ cat ../../../../../nohup.out 
Registered S3 method overwritten by 'GGally':
  method from   
  +.gg   ggplot2
Bioconductor version '3.12' is out-of-date; the current release version '3.14'
  is available with R version '4.1'; see https://bioconductor.org/install
── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
✔ ggplot2 3.3.5     ✔ purrr   0.3.4
✔ tibble  3.1.6     ✔ dplyr   1.0.5
✔ tidyr   1.1.3     ✔ stringr 1.4.0
✔ readr   1.4.0     ✔ forcats 0.5.1
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()

Attaching package: 'data.table'

The following objects are masked from 'package:dplyr':

    between, first, last

The following object is masked from 'package:purrr':

    transpose

    Locus   Gene CHR     POS       SNP         P Effect
1: MAD1L1 MAD1L1   7 2153071 rs4721411 1.657e-07 0.5318
[1] "+ CONDA:: Activating conda env 'echoR'"
[1] "Checking for tabix installation..."
[1] "Checking for bcftools installation..."

)   )  ) ))))))}}}}}}}} {{{{{{{{{(((((( (  (   (
MAD1L1 (1 / 1)
)   )  ) ))))))}}}}}}}} {{{{{{{{{(((((( (  (   (
[1] "Determining chrom type from file header"
[1] "LD:: Standardizing summary statistics subset."
[1] "++ Preparing Gene col"
[1] "++ Preparing A1,A1 cols"
[1] "++ Preparing MAF,Freq cols"
[1] "++ Inferring MAF from frequency column..."
[1] "++ Preparing N_cases,N_controls cols"
[1] "++ Preparing `proportion_cases` col"
[1] "++ 'proportion_cases' not included in data subset."
[1] "++ Preparing N col"
[1] "+ Preparing sample_size (N) column"
[1] "++ Using `sample_size = 3572` TRUE"
[1] "++ Preparing t-stat col"
[1] "+ Calculating t-statistic from Effect and StdErr..."
[1] "++ Assigning lead SNP"
[1] "++ Ensuring Effect, StdErr, P are numeric"
[1] "++ Ensuring 1 SNP per row"
[1] "++ Removing extra whitespace"
[1] "++ Saving subset ==> /mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS/mixedmodels_GWAS/earlymotorPD_axial/MAD1L1/MAD1L1_earlymotorPD_axial_subset.tsv.gz"
[1] "LD:: Using UK Biobank LD reference panel."
[1] "+ UKB LD file name: chr7_1000001_4000001"
[1] "+ LD:: Downloading full .gz/.npz UKB files and saving to disk."
[1] "+ Overwriting pre-existing file."
[1] "+ CONDA:: Identified axel executable in echoR env."
[1] "+ Overwriting pre-existing file."
[1] "+ CONDA:: Identified axel executable in echoR env."
[1] "+ LD:: load_ld() python function input: /mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS/mixedmodels_GWAS/earlymotorPD_axial/MAD1L1/LD/chr7_1000001_4000001"
[1] "+ LD:: Reading LD matrix into memory. This could take some time..."
Processed URL: /mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS/mixedmodels_GWAS/earlymotorPD_axial/MAD1L1/LD/chr7_1000001_4000001
Some other message at the end
[1] "+ Full UKB LD matrix: 30690 x 30690"
[1] "+ Full UKB LD SNP data.table: 30690 x 5"
[1] "+ LD:: Saving LD matrix ==> /mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS/mixedmodels_GWAS/earlymotorPD_axial/MAD1L1/LD/MAD1L1.UKB_LD.RDS"
[1] "5872 x 5872 LD_matrix (sparse)"
vvvvv-- ABF --vvvvv
✅ All required columns present.
✅ All suggested columns present.
vvvvv-- FINEMAP --vvvvv
✅ All required columns present.
✅ All suggested columns present.
vvvvv-- SUSIE --vvvvv
✅ All required columns present.
✅ All suggested columns present.
vvvvv-- POLYFUN_SUSIE --vvvvv
✅ All required columns present.
✅ All suggested columns present.

+++ Multi-finemap:: ABF +++

+++ Multi-finemap:: FINEMAP +++
[1] "++ FINEMAP:: Constructing master file."
[1] "++ FINEMAP:: Constructing data.z file."
[1] "++ FINEMAP:: Constructing data.ld file."
[1] "+ Using FINEMAP v1.4"

|--------------------------------------|
| Welcome to FINEMAP v1.4              |
|                                      |
| (c) 2015-2020 University of Helsinki |
|                                      |
| Help :                               |
| - ./finemap --help                   |
| - www.finemap.me                     |
| - www.christianbenner.com            |
|                                      |
| Contact :                            |
| - [email protected]       |
| - [email protected]          |
|--------------------------------------|

--------
SETTINGS
--------
- dataset            : all
- corr-config        : 0.95
- n-causal-snps      : 5
- n-configs-top      : 50000
- n-conv-sss         : 100
- n-iter             : 100000
- n-threads          : 1
- prior-k0           : 0
- prior-std          : 0.05 
- prob-conv-sss-tol  : 0.001
- prob-cred-set      : 0.95

------------
FINE-MAPPING (1/1)
------------
- GWAS summary stats               : FINEMAP/data.z
- SNP correlations                 : FINEMAP/data.ld
- Causal SNP stats                 : FINEMAP/data.snp
- Causal configurations            : FINEMAP/data.config
- Credible sets                    : FINEMAP/data.cred
- Log file                         : FINEMAP/data.log_sss
- Reading input                    : done!   

- Number of GWAS samples           : 3572
- Number of SNPs                   : 5868
- Prior-Pr(# of causal SNPs is k)  : 
  (0 -> 0)
   1 -> 0.583
   2 -> 0.291
   3 -> 0.0971
   4 -> 0.0243
   5 -> 0.00485
- 154411 configurations evaluated (0.113/100%) : converged after 113 iterations
- Computing causal SNP statistics  : done!   
- Regional SNP heritability        : 0.124 (SD: 0.0667 ; 95% CI: [0.0383,0.293])
- Log10-BF of >= one causal SNP    : 169
- Post-expected # of causal SNPs   : 5
- Post-Pr(# of causal SNPs is k)   : 
  (0 -> 0)
   1 -> 0
   2 -> 0
   3 -> 0
   4 -> 4.67e-19
   5 -> 1
- Computing credible sets          : done!
- Writing output                   : done!   
- Run time                         : 0 hours, 1 minutes, 2 seconds
[1] ".cred not detected. Using .snp instead."
[1] "+ FINEMAP:: Importing prob (.snp)..."
Error in `[.data.table`(x, r, vars, with = FALSE) : 
  column(s) not found: prob
In addition: Warning message:
In sdY.est(d$varbeta, d$MAF, d$N) :
  estimating sdY from maf and varbeta, please directly supply sdY if known

+++ Multi-finemap:: SUSIE +++
For large R or large XtX, consider installing the  Rfast package for better performance.

+++ Multi-finemap:: POLYFUN_SUSIE +++
[1] "PolyFun:: Preparing SNP input file..."
[1] "+ PolyFun:: 5868 SNPs identified."
[1] "+ PolyFun:: Writing SNP file ==> /mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS/mixedmodels_GWAS/earlymotorPD_axial/MAD1L1/PolyFun/snps_to_finemap.txt.gz"
[1] "/home/acarrasco/.conda/envs/echoR/bin/python /home/acarrasco/.conda/envs/echoR/lib/R/library/echolocatoR/tools/polyfun//extract_snpvar.py --snps /mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS/mixedmodels_GWAS/earlymotorPD_axial/MAD1L1/PolyFun/snps_to_finemap.txt.gz --out /mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS/mixedmodels_GWAS/earlymotorPD_axial/MAD1L1/PolyFun/snps_with_priors.snpvar.tsv.gz"
[INFO]  Writing output file to /mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS/mixedmodels_GWAS/earlymotorPD_axial/MAD1L1/PolyFun/snps_with_priors.snpvar.tsv.gz
[1] "++ Remove tmp file."
[1] "+ SUSIE:: sample_size= 3572"
[1] "+ SUSIE:: max_causal = 5"
[1] "+ SUSIE:: Utilizing prior_weights for 5868 SNPs."
[1] "+ SUSIE:: Rescaling priors"
[1] "+ Subsetting LD matrix and finemap_dat to common SNPs..."
[1] "+ LD:: Removing unnamed rows/cols"
[1] "+ LD:: Replacing NAs with 0"
[1] "+ LD_matrix = 5868 SNPs."
[1] "+ finemap_dat = 5868 SNPs."
[1] "+ 5868 SNPs in common."
[1] "+ SUSIE:: Using `susie_suff_stat()` from susieR v0.11.92"
For large R or large XtX, consider installing the  Rfast package for better performance.
[1] "+ SUSIE:: Extracting Credible Sets..."
Time difference of 8.18 mins
+-------- Locus Plot: MAD1L1--------+
[1] "+ Filling NAs in CS cols with 0"
[1] "+ Filling NAs in PP cols with 0"
[1] "+ LD:: LD_matrix detected. Coloring SNPs by LD with lead SNP."
max_transcripts=1. 
37 transcripts from 37 genes returned.
Fetching data...OK
Parsing exons...OK
Defining introns...OK
Defining UTRs...OK
Defining CDS...OK
aggregating...
Done
Constructing graphics...
[1] "+ NOTT_2019:: Importing... [1] exvivo_H3K27ac_tbp"
[1] "+ NOTT_2019:: Importing... [2] microglia_H3K27ac"
[1] "+ NOTT_2019:: Importing... [3] neurons_H3K27ac"
[1] "+ NOTT_2019:: Importing... [4] oligodendrocytes_H3K27ac"
[1] "+ NOTT_2019:: Importing... [5] astrocytes_H3K27ac"
[1] "+ NOTT_2019:: Importing... [6] exvivo_atac_tbp"
[1] "+ NOTT_2019:: Importing... [7] microglia_atac"
[1] "+ NOTT_2019:: Importing... [8] neurons_atac"
[1] "+ NOTT_2019:: Importing... [9] oligodendrocytes_atac"
[1] "+ NOTT_2019:: Importing... [10] astrocytes_atac"
[1] "+ NOTT_2019:: Importing... [11] microglia_H3K4me3"
[1] "+ NOTT_2019:: Importing... [12] neurons_H3K4me3"
[1] "+ NOTT_2019:: Importing... [13] oligodendrocytes_H3K4me3"
[1] "+ NOTT_2019:: Importing... [14] astrocytes_H3K4me3"
[1] "+ Inferring genomic limits for window: 1x"
3164573 query SNP(s) detected with reference overlap.
[1] "+ PLOT:: Calculating max histogram height"
[1] "+ NOTT_2019:: Getting interactome data."
[1] "Importing Astrocyte enhancers ..."
[1] "Importing Astrocyte promoters ..."
[1] "Importing Neuronal enhancers ..."
[1] "Importing Neuronal promoters ..."
[1] "Importing Oligo enhancers ..."
[1] "Importing Oligo promoters ..."
[1] "Importing Microglia enhancers ..."
[1] "Importing Microglia promoters ..."
[1] "Importing Microglia interactome ..."
[1] "Importing Neuronal interactome ..."
[1] "Importing Oligo interactome ..."
2755 query SNP(s) detected with reference overlap.
2959 query SNP(s) detected with reference overlap.
[1] "++ NOTT_2019:: Returning PLAC-seq track."
+>+>+>+>+ plot.zoom = all +<+<+<+<+
[1] "+ PLOT:: Get window suffix..."
[1] "+ Ensuring last track shows genomic units..."
[1] "+ PLOT:: Saving plot ==> /mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS/mixedmodels_GWAS/earlymotorPD_axial/MAD1L1/multiview.MAD1L1.UKB.1x.jpg"
+>+>+>+>+ plot.zoom = 4x +<+<+<+<+
[1] "+ PLOT:: Get window suffix..."
[1] "+ Constructing zoom polygon..."
[1] "+ Highlighting zoom origin..."
[1] "+ Ensuring last track shows genomic units..."
[1] "+ PLOT:: Saving plot ==> /mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS/mixedmodels_GWAS/earlymotorPD_axial/MAD1L1/multiview.MAD1L1.UKB.4x.jpg"
+>+>+>+>+ plot.zoom = 10x +<+<+<+<+
[1] "+ PLOT:: Get window suffix..."
[1] "+ Constructing zoom polygon..."
[1] "+ Highlighting zoom origin..."
[1] "+ Ensuring last track shows genomic units..."
[1] "+ PLOT:: Saving plot ==> /mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS/mixedmodels_GWAS/earlymotorPD_axial/MAD1L1/multiview.MAD1L1.UKB.10x.jpg"
  
Fine-mapping complete in:
Time difference of 1.4 hours
There were 50 or more warnings (use warnings() to see the first 50)
/mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS/mixedmodels_GWAS/earlymotorPD_axial/MAD1L1/LD/chr7_1000001_4000001.gz
/mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS/mixedmodels_GWAS/earlymotorPD_axial/MAD1L1/LD/chr7_1000001_4000001.npz

We see on the error message how "prob" column cannot fe found

Even though the cred5 file is present, and the tool should have used FINEMAP.import_data.cred(),
I am going through

  FINEMAP.import_data.snp <- function(locus_dir,
                                      credset_thresh=.95,
                                      prob_col="prob",
                                      verbose=T){
    # NOTES:
    ## .snp files: Posterior probabilities in this file are the marginal posterior probability
    ## that a given variant is causal.

    # Prob column descriptions:
    ## prob: column the marginal Posterior Inclusion Probabilities (PIP). The PIP for the l-th SNP is the posterior probability that this SNP is causal.
    ## prob_group: the posterior probability that there is at least one causal signal among SNPs in the same group with this SNP.
    ##
    printer("+ FINEMAP:: Importing",prob_col,"(.snp)...", v=verbose)
    data.snp <- data.table::fread(file.path(locus_dir,"FINEMAP/data.snp"), nThread = 1)
    data.snp <- data.snp[data.snp[[prob_col]] > credset_thresh,] %>%
      plyr::mutate(CS=1)%>%
      dplyr::rename(PP=dplyr::all_of(prob_col))
    return(data.snp)
  }

When I run this manually, we see how the prob column is present, and how the code works

r$> locus_dir                                                                                      
[1] "/mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/RESULTS/mixedmodels_GWAS/earlymotorPD_axial/MAD1L1/"
r$> data.table::fread(file.path(locus_dir,"FINEMAP/data.snp"), nThread = 1)                        
      index       rsid chromosome position allele1 allele2     maf    beta     se        z
   1:  2535 rs10479762          7  2045351       T       C 0.02180  0.4526 0.1002  4.51697
   2:  3022  rs3800908          7  2159437       T       C 0.02300  0.4925 0.1005  4.90050
   3:  2597 rs11764212          7  2067593       A       C 0.02380  0.5244 0.1022  5.13112
   4:  3027  rs3778978          7  2159817       A       G 0.02760 -0.5088 0.1019 -4.99313
   5:  2495 rs11765549          7  2027311       T       G 0.02270  0.5291 0.1037  5.10222
  ---                                                                                     
5864:  2941  rs4719432          7  2140330       A       G 0.02550 -0.5066 0.1004 -5.04582
5865:  2925  rs3778965          7  2138296       A       G 0.02545  0.4901 0.1019  4.80962
5866:  2947  rs4719436          7  2141239       A       G 0.02495  0.4780 0.1016  4.70472
5867:  2547 rs13227554          7  2048220       C       G 0.02210 -0.4523 0.1002 -4.51397
5868:  2923  rs3778964          7  2138109       T       C 0.02560  0.4868 0.1020  4.77255
          prob  log10bf      mean       sd mean_incl  sd_incl
   1: 1.000000 13.43200 -0.310494 0.534601 -0.310494 0.534601
   2: 0.999531  6.89911 -0.301709 0.260602 -0.301850 0.260582
   3: 0.997378  6.15053 -0.307319 0.532777 -0.308127 0.533244
   4: 0.815520  4.21586 -0.232915 0.444014 -0.285603 0.476128
   5: 0.747752  4.04231 -0.262132 0.497410 -0.350560 0.547614
  ---                                                        
5864: 0.000000     -Inf  0.000000 0.000000  0.000000 0.000000
5865: 0.000000     -Inf  0.000000 0.000000  0.000000 0.000000
5866: 0.000000     -Inf  0.000000 0.000000  0.000000 0.000000
5867: 0.000000     -Inf  0.000000 0.000000  0.000000 0.000000
5868: 0.000000     -Inf  0.000000 0.000000  0.000000 0.000000
r$> data.snp[data.snp[[prob_col]] > credset_thresh, ] %>% 
          plyr::mutate(CS=1) %>% 
          dplyr::rename(PP=dplyr::all_of(prob_col)) -> data.snp                                    

r$> data.snp                                                                                       
   index       rsid chromosome position allele1 allele2    maf   beta     se       z       PP
1:  2535 rs10479762          7  2045351       T       C 0.0218 0.4526 0.1002 4.51697 1.000000
2:  3022  rs3800908          7  2159437       T       C 0.0230 0.4925 0.1005 4.90050 0.999531
3:  2597 rs11764212          7  2067593       A       C 0.0238 0.5244 0.1022 5.13112 0.997378
    log10bf      mean       sd mean_incl  sd_incl CS
1: 13.43200 -0.310494 0.534601 -0.310494 0.534601  1
2:  6.89911 -0.301709 0.260602 -0.301850 0.260582  1
3:  6.15053 -0.307319 0.532777 -0.308127 0.533244  1

Minimum version of susieR?

In the past I was able to use susieR 0.8.0 with the vignette example, but now I no longer can. I started trying to fix this, but realized this may not be worth the effort since 0.9.0 has already been released and the latest development version is 0.10.1.

There is currently code to choose between susie_bhat() and susie_suff_stat():

echolocatoR/R/SUSIE.R

Lines 134 to 143 in b055ac0

# library(susieR)
# SUSIE's authors "merge[d] susie_ss and susie_bhat to susie_suff_stat" in 11/2019.
susie_version <- utils::packageVersion("susieR")
if(length(find("susie_bhat"))==0){
printer("+ SUSIE:: Using `susie_suff_stat()` from susieR",paste0("v",susie_version),v=verbose)
susie_func <- get("susie_suff_stat", asNamespace("susieR"))
} else {
printer("+ SUSIE:: Using `susie_bhat()` from susieR",paste0("v",susie_version),v=verbose)
susie_func <- get("susie_bhat", asNamespace("susieR"))
}

This didn't work for me. find("susie_bhat") fails to find the function in susieR 0.8.0, and then the function fails when it tries to get() the non-existent susie_suff_stat(). I fixed this issue in this commit on my fork, but then I got another error:

[1] "+ SUSIE:: Using `susie_bhat()` from susieR v0.8.0"
Error in susie_ss(XtX = XtX, Xty = Xty, yty = var_y * (n - 1), n = n,  :
  unused argument (maf = c(0.0263, 0.2447, 0.0326, 0.0326, 0.0111, 0.0327, 0.0308, 0.1286, 0.0327, 0.0326, 0.0322, 0.0322, 0.2005, 0.0324, 0.0322, 0.1284, 0.0322, 0.0316, 0.1563, 0.0323, 0.0316, 0.0114, 0.0301, 0.4474, 0.0308, 0.0321, 0.0321, 0.1286, 0.4443, 0.0321, 0.0321, 0.0321, 0.0321, 0.0321, 0.0321, 0.0854, 0.0852, 0.0321, 0.0321, 0.0321, 0.0316, 0.0321, 0.0321, 0.0857, 0.0835, 0.0321, 0.0321, 0.0311, 0.0264, 0.0321, 0.0264, 0.0317, 0.0233, 0.0135999999999999, 0.0321, 0.0552, 0.2245, 0.0322, 0.026, 0.202,
0.0148, 0.131, 0.0329, 0.0774, 0.447, 0.2376, 0.2376, 0.4471, 0.1325, 0.0837, 0.083, 0.1634, 0.4455, 0.2463, 0.1633, 0.1308, 0.1364, 0.033, 0.2089, 0.308, 0.1979, 0.0301, 0.0807, 0.2432, 0.1303, 0.1366, 0.0583, 0.2108, 0.0372, 0.1219, 0.0714, 0.2422, 0.2267, 0.2271, 0.0284, 0.2269, 0.1996, 0.0288, 0.259, 0.4359, 0.0282, 0.436, 0.0368000000000001, 0.2086, 0.1985, 0.0145, 0.1991, 0.1995, 0.1993, 0.2274, 0.1909, 0.2105, 0.0266999999999999, 0.0123, 0.0278))

susie_suff_stat() has the argument maf, but susie_bhat() and susie_ss() don't:

args(susieR::susie_ss)
function (XtX, Xty, yty, n, L = 10, scaled_prior_variance = 0.2,
    residual_variance = NULL, estimate_residual_variance = TRUE,
    estimate_prior_variance = TRUE, estimate_prior_method = c("optim",
        "EM"), r_tol = 1e-08, prior_weights = NULL, null_weight = NULL,
    standardize = TRUE, max_iter = 100, s_init = NULL, intercept_value = 0,
    coverage = 0.95, min_abs_corr = 0.5, tol = 0.001, verbose = FALSE,
    track_fit = FALSE, check_input = FALSE)
NULL

args(susieR::susie_bhat)
function (bhat, shat, R, n, var_y = 1, ...)
NULL

What are your thoughts? Do you want to try to fix this to support susieR 0.8.0, or require a minimum of 0.9.0?

Check genome build

Now implemented in dev branch:

check_genome() standardizes genome build name to "GRCH37" or "GRCH38".
If a case-insensitive synonym of either build is not provided in finemap_loci(fullSS_genome_build=...), then genome build is inferred using MungeSumstats:::get_genome_build().

echolocatoR for quantitative GWAS.

I am interested in applying echolocatorR for quantitative train GWAS. But finemap_loci function requires "N_controls", "N_cases" to be specified, which I believe to be available for binary triat GWAS.
Could you kindly please suggest me whether echolocatoR can be applied for quantitative GWAS ? and if so, what will be the suitable values for "N_controls", "N_cases" ?
Thank you very much.

Add documentation for installing *axel*

axel is a little tricky to install since it's not available for installation via a conda env (to my knowledge).

I added some documentation to the README on how to install axel on different kinds of OS (under Dependencies).

`extract_snpvar.py: error: the following arguments are required: --sumstats`

In PolyFun's extract_snpvar.py function, it looks like the arg --snp was changed to --sumstats at some point @omerwe could you confirm that these are equivalent, and that the input file should be the same format as before?

[1] "+ PolyFun:: Writing SNP file ==> /var/folders/zq/h7mtybc533b1qzkys_ttgpth0000gn/T//RtmpU0JuyY/results/GWAS/Nalls23andMe_2019/MEX3C/PolyFun/snps_to_finemap.txt.gz"
[1] "/opt/anaconda3/envs/echoR/bin/python /Library/Frameworks/R.framework/Versions/4.1/Resources/library/echolocatoR/tools/polyfun//extract_snpvar.py --snps /var/folders/zq/h7mtybc533b1qzkys_ttgpth0000gn/T//RtmpU0JuyY/results/GWAS/Nalls23andMe_2019/MEX3C/PolyFun/snps_to_finemap.txt.gz --out /var/folders/zq/h7mtybc533b1qzkys_ttgpth0000gn/T//RtmpU0JuyY/results/GWAS/Nalls23andMe_2019/MEX3C/PolyFun/snps_with_priors.snpvar.tsv.gz"
usage: extract_snpvar.py [-h] --sumstats SUMSTATS --out OUT [--allow-missing]
                         [--q Q]
extract_snpvar.py: error: the following arguments are required: --sumstats

Replace tabix/bgzip dependencies with `seqminer`

Having separate command-line installation steps outside of R is a pain for users (e.g. htslib).
Instead, I've rewritten all the tabix-related functioned to be entirely R-based, using seqminer and Rsamtools for bgzip.

Rgraphviz installation slow

Issue

Rgraphviz (one of echoR's dependencies) takes a veeeeery long time to install.
Seems to get stuck on this step:
checking for lrand48... yes

Update: Even though it seemed to get stuck on this step (using Imperial's Rstudio server) when I forced the server session to restart, echolocatoR was fully installed and functional. Still, would be best to prevent this issue.

Potential solution

echoR's DESCRIPTION file doesn't explicitly call for the installation of Rgraphviz, which appears to be a dependency of RCircos. But in the current version of echoR, I don't actually use RCircos (listed in Suggest).

Full installation messages

``` * installing *source* package ‘Rgraphviz’ ... ** using staged installation configure: Using bundled Graphviz. configure: Searching for the compilers specified by R. checking for gcc... gcc -m64 -std=gnu99 checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc -m64 -std=gnu99 accepts -g... yes checking for gcc -m64 -std=gnu99 option to accept ISO C89... none needed checking how to run the C preprocessor... gcc -m64 -std=gnu99 -E checking whether we are using the GNU C++ compiler... yes checking whether g++ -m64 -std=gnu++11 accepts -g... yes configure: Preparing to compile Graphviz. configure: Configuring bundled Graphviz. checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for style of include used by make... GNU checking for gcc... gcc -m64 -std=gnu99 checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc -m64 -std=gnu99 accepts -g... yes checking for gcc -m64 -std=gnu99 option to accept ISO C89... none needed checking dependency style of gcc -m64 -std=gnu99... gcc3 checking for library containing strerror... none required checking for flex... no checking for lex... no checking for bison... bison -y checking for gawk... (cached) gawk checking whether ln -s works... yes checking for sed... /usr/bin/sed checking for grep... grep checking for sort... sort checking for groff... groff checking for ps2pdf... ps2pdf checking for pstopdf... (cached) ps2pdf checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for tclsh8.6... no checking for tclsh8.5... /usr/bin/tclsh8.5 checking whether gcc -m64 -std=gnu99 and cc understand -c and -o together... yes checking whether we are using the GNU C++ compiler... yes checking whether g++ -m64 -std=gnu++11 accepts -g... yes checking dependency style of g++ -m64 -std=gnu++11... gcc3 checking for gcc... gcc checking whether we are using the GNU Objective C compiler... yes checking whether gcc accepts -g... yes checking dependency style of gcc... gcc3 checking for inline... inline checking for windres... no checking for an ANSI C-conforming const... yes checking how to run the C preprocessor... gcc -m64 -std=gnu99 -E checking for grep that handles long lines and -e... grep checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for mode_t... yes checking for pid_t... yes checking for size_t... yes checking for ssize_t... yes checking for uid_t in sys/types.h... yes checking stdarg.h usability... yes checking stdarg.h presence... yes checking for stdarg.h... yes checking stddef.h usability... yes checking stddef.h presence... yes checking for stddef.h... yes checking for stddef.h... (cached) yes checking for stdlib.h... (cached) yes checking for stdint.h... (cached) yes checking malloc.h usability... yes checking malloc.h presence... yes checking for malloc.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking search.h usability... yes checking search.h presence... yes checking for search.h... yes checking getopt.h usability... yes checking getopt.h presence... yes checking for getopt.h... yes checking pthread.h usability... yes checking pthread.h presence... yes checking for pthread.h... yes checking values.h usability... yes checking values.h presence... yes checking for values.h... yes checking float.h usability... yes checking float.h presence... yes checking for float.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking errno.h usability... yes checking errno.h presence... yes checking for errno.h... yes checking time.h usability... yes checking time.h presence... yes checking for time.h... yes checking for unistd.h... (cached) yes checking fenv.h usability... yes checking fenv.h presence... yes checking for fenv.h... yes checking for string.h... (cached) yes checking for strings.h... (cached) yes checking for inttypes.h... (cached) yes checking setjmp.h usability... yes checking setjmp.h presence... yes checking for setjmp.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/times.h usability... yes checking sys/times.h presence... yes checking for sys/times.h... yes checking for sys/types.h... (cached) yes checking sys/select.h usability... yes checking sys/select.h presence... yes checking for sys/select.h... yes checking fpu_control.h usability... yes checking fpu_control.h presence... yes checking for fpu_control.h... yes checking sys/fpu.h usability... no checking sys/fpu.h presence... no checking for sys/fpu.h... no checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking for sys/stat.h... (cached) yes checking sys/mman.h usability... yes checking sys/mman.h presence... yes checking for sys/mman.h... yes checking sys/ioctl.h usability... yes checking sys/ioctl.h presence... yes checking for sys/ioctl.h... yes checking sys/inotify.h usability... yes checking sys/inotify.h presence... yes checking for sys/inotify.h... yes checking langinfo.h usability... yes checking langinfo.h presence... yes checking for langinfo.h... yes checking libintl.h usability... yes checking libintl.h presence... yes checking for libintl.h... yes checking crt_externs.h usability... no checking crt_externs.h presence... no checking for crt_externs.h... no checking whether time.h and sys/time.h may both be included... yes checking for dirent.h that defines DIR... yes checking for library containing opendir... none required checking for stdbool.h that conforms to C99... yes checking for _Bool... yes checking for socklen_t... yes checking for bool... yes checking for struct dioattr... no checking for main in -lm... yes checking for feenableexcept... yes checking for fesetenv... yes checking libgen.h usability... yes checking libgen.h presence... yes checking for libgen.h... yes checking for basename in -lgen... no checking for working alloca.h... yes checking for alloca... yes checking for lrand48... yes ```

Rstudio crashing during PLOT.locus step

Very odd, when running the full_pipeline_vignette Rstudio will consistently crash when trying to plot the MEX3C locus (but not the BST1 locus before it).

Screenshot 2021-03-13 at 22 48 07

It turns out that updating GenomicFeatures was the key. Perhaps also related, I upgraded from R v4.0.3 to R v4.0.4 just beforehand.

GenomicFe... (1.42.1 -> 1.42.2) [CRAN]
Installing 1 packages: GenomicFeatures
trying URL 'https://bioconductor.org/packages/3.12/bioc/bin/macosx/contrib/4.0/GenomicFeatures_1.42.2.tgz'
Content type 'application/x-gzip' length 2416203 bytes (2.3 MB)
==================================================
downloaded 2.3 MB

PolyFun: `x Column `SNP_x` doesn't exist.`

After updating PolyFun, ran into this error. Will check internal code.

+++ Multi-finemap:: POLYFUN_SUSIE +++
[1] "PolyFun:: Preparing SNP input file..."
[1] "+ PolyFun:: 113 SNPs identified."
[1] "+ PolyFun:: Writing SNP file ==> /var/folders/zq/h7mtybc533b1qzkys_ttgpth0000gn/T//RtmpQKRSVA/results/GWAS/Nalls23andMe_2019/BST1/PolyFun/snps_to_finemap.txt.gz"
[1] "/opt/anaconda3/envs/echoR/bin/python /Library/Frameworks/R.framework/Versions/4.1/Resources/library/echolocatoR/tools/polyfun//extract_snpvar.py --sumstats /var/folders/zq/h7mtybc533b1qzkys_ttgpth0000gn/T//RtmpQKRSVA/results/GWAS/Nalls23andMe_2019/BST1/PolyFun/snps_to_finemap.txt.gz --out /var/folders/zq/h7mtybc533b1qzkys_ttgpth0000gn/T//RtmpQKRSVA/results/GWAS/Nalls23andMe_2019/BST1/PolyFun/snps_with_priors.snpvar.tsv.gz"
[INFO]  Loading sumstats files...
[INFO]  Done in 0.67 seconds
[INFO]  Loading meta-analyzed per-SNP-h2 files...
[INFO]  Done in 77.59 seconds
[INFO]  Merging sumstats with per-SNP h2 data...
[INFO]  Done in 1.85 seconds
[INFO]  Writing output file to /var/folders/zq/h7mtybc533b1qzkys_ttgpth0000gn/T//RtmpQKRSVA/results/GWAS/Nalls23andMe_2019/BST1/PolyFun/snps_with_priors.snpvar.tsv.gz
[1] "++ Remove tmp file."
Error in stop_subscript(class = "vctrs_error_subscript_oob", i = i, subscript_type = subscript_type,  : 
  Can't rename columns that don't exist.
x Column `SNP_x` doesn't exist.

extra_installs() fails at the installation of refGenome

Hi,

I've installed echolocatoR using conda and subsequently tried to install the additional dependencies using extra_installs(). This worked well for the non-archived packages but failed for refGenome in R 4.04 under macOS 11.2.3:

In file included from ./refGenome.h:29:
./extptr.h:112:37: error: no matching function for call to 'Rf_unprotect'
        virtual ~atmptr() { if(protected_) UNPROTECT(pRob); }
/Library/Frameworks/R.framework/Resources/include/Rinternals.h:985:22: note: expanded from macro 'UNPROTECT'
#define UNPROTECT(n)    Rf_unprotect(n)
/Library/Frameworks/R.framework/Resources/include/Rinternals.h:1765:6: note: candidate function not viable: cannot convert
      argument of incomplete type 'SEXP' (aka 'SEXPREC *') to 'int' for 1st argument
void Rf_unprotect(int);

Is there a solution for getting the archived refGenome to compile and if not, which part of echolocatoR might not work correctly?

Thanks,
Till

Bad dependency spec "r-susier -> r-susieR"

r-susieR instead.

The echoR environment did not solve for me. I managed to do it but susieR was missing.

I then did conda install --name echoR r-susieR

(echoR) acarrasco@kronos:/mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/SOFTWARE_CONDAENV$ conda list
# packages in environment at /home/acarrasco/.conda/envs/echoR:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
_openmp_mutex             4.5                       1_gnu  
_r-mutex                  1.0.1               anacondar_1    conda-forge
abseil-cpp                20210324.0           h9c3ff4c_0    conda-forge
arrow-cpp                 4.0.0           py39h817929d_0_cpu    conda-forge
aws-c-cal                 0.4.5                h76129ab_8    conda-forge
aws-c-common              0.5.2                h27cfd23_0  
aws-c-event-stream        0.2.7                h6bac3ce_1    conda-forge
aws-c-io                  0.9.1                ha5b09cb_1    conda-forge
aws-checksums             0.1.11               h99e32c3_3    conda-forge
aws-sdk-cpp               1.8.151              hceb1b1e_1    conda-forge
axel                      2.17.10              h9b69904_0    conda-forge
bcftools                  1.12                 h45bccc9_1    bioconda
binutils_impl_linux-64    2.35.1               h27ae35d_9  
binutils_linux-64         2.35.1              h454624a_30  
bioconductor-annotationdbi 1.52.0            r40hdfd78af_1    bioconda
bioconductor-annotationfilter 1.14.0            r40hdfd78af_1    bioconda
bioconductor-biobase      2.50.0            r40hd029910_1    bioconda
bioconductor-biocfilecache 1.14.0            r40hdfd78af_1    bioconda
bioconductor-biocgenerics 0.36.0            r40hdfd78af_1    bioconda
bioconductor-biocparallel 1.24.1            r40h399db7b_0    bioconda
bioconductor-biomart      2.46.3            r40hdfd78af_0    bioconda
bioconductor-biostrings   2.58.0            r40hd029910_1    bioconda
bioconductor-biovizbase   1.38.0            r40hd029910_1    bioconda
bioconductor-bsgenome     1.58.0            r40hdfd78af_1    bioconda
bioconductor-delayedarray 0.16.3            r40hd029910_0    bioconda
bioconductor-ensdb.hsapiens.v75 2.99.0            r40hdfd78af_9    bioconda
bioconductor-ensembldb    2.14.0            r40hdfd78af_1    bioconda
bioconductor-genomeinfodb 1.26.4            r40hdfd78af_0    bioconda
bioconductor-genomeinfodbdata 1.2.4             r40hdfd78af_2    bioconda
bioconductor-genomicalignments 1.26.0            r40hd029910_1    bioconda
bioconductor-genomicfeatures 1.42.2            r40hdfd78af_0    bioconda
bioconductor-genomicranges 1.42.0            r40hd029910_1    bioconda
bioconductor-ggbio        1.38.0            r40hdfd78af_1    bioconda
bioconductor-graph        1.68.0            r40hd029910_1    bioconda
bioconductor-iranges      2.24.1            r40hd029910_0    bioconda
bioconductor-matrixgenerics 1.2.1             r40hdfd78af_0    bioconda
bioconductor-organismdbi  1.32.0            r40hdfd78af_1    bioconda
bioconductor-protgenerics 1.22.0            r40hdfd78af_1    bioconda
bioconductor-rbgl         1.66.0            r40h399db7b_1    bioconda
bioconductor-rgraphviz    2.34.0            r40h399db7b_1    bioconda
bioconductor-rhtslib      1.22.0            r40hd029910_1    bioconda
bioconductor-rsamtools    2.6.0             r40h399db7b_1    bioconda
bioconductor-rtracklayer  1.50.0            r40h7f5ccec_2    bioconda
bioconductor-s4vectors    0.28.1            r40hd029910_0    bioconda
bioconductor-snpstats     1.40.0            r40hd029910_1    bioconda
bioconductor-summarizedexperiment 1.20.0            r40hdfd78af_1    bioconda
bioconductor-suprahex     1.28.1            r40hdfd78af_0    bioconda
bioconductor-variantannotation 1.36.0            r40hd029910_1    bioconda
bioconductor-xvector      0.30.0            r40hd029910_1    bioconda
bioconductor-zlibbioc     1.36.0            r40hd029910_1    bioconda
bitarray                  2.0.1            py39h3811e60_0    conda-forge
brotli                    1.0.9                he6710b0_2  
brotlipy                  0.7.0           py39h27cfd23_1003  
bwidget                   1.9.14               ha770c72_0    conda-forge
bzip2                     1.0.8                h7b6447c_0  
c-ares                    1.18.1               h7f8727e_0  
ca-certificates           2021.10.26           h06a4308_2  
cairo                     1.16.0            h6cf1ce9_1008    conda-forge
certifi                   2021.10.8        py39hf3d152e_1    conda-forge
cffi                      1.15.0           py39hd667e15_1  
chardet                   4.0.0           py39h06a4308_1003  
cryptography              36.0.0           py39h9ce1e76_0  
curl                      7.76.1               h979ede3_1    conda-forge
decorator                 4.4.2              pyhd3eb1b0_0  
fastparquet               0.5.0            py39hce5d2b2_1    conda-forge
fontconfig                2.13.1            hba837de_1005    conda-forge
freetype                  2.11.0               h70c0345_0  
fribidi                   1.0.10               h7b6447c_0  
gcc_impl_linux-64         9.3.0               h6df7d76_17  
gcc_linux-64              9.3.0               h1ee779e_30  
gettext                   0.21.0               hf68c758_0  
gflags                    2.2.2                he6710b0_0  
gfortran_impl_linux-64    9.3.0               h5abd6ed_17  
gfortran_linux-64         9.3.0               hf47db2c_30  
glog                      0.4.0                he6710b0_0  
gmp                       6.2.1                h2531618_2  
graphite2                 1.3.14               h23475e2_0  
grpc-cpp                  1.37.0               h36de60a_1    conda-forge
gsl                       2.6                  he838d99_2    conda-forge
gxx_impl_linux-64         9.3.0               hbdd7822_17  
gxx_linux-64              9.3.0               h7e70986_30  
harfbuzz                  2.8.0                h83ec7ef_1    conda-forge
htslib                    1.12                 h9093b5e_1    bioconda
icu                       68.1                 h2531618_0  
idna                      2.10               pyhd3eb1b0_0  
jinja2                    3.0.2              pyhd3eb1b0_0  
joblib                    1.1.0              pyhd3eb1b0_0  
jpeg                      9d                   h7f8727e_0  
kernel-headers_linux-64   2.6.32              h77966d4_13    conda-forge
krb5                      1.17.2               h926e7f8_0    conda-forge
ld_impl_linux-64          2.35.1               h7274673_9  
libblas                   3.9.0                8_openblas    conda-forge
libcblas                  3.9.0                8_openblas    conda-forge
libcurl                   7.76.1               hc4aaa36_1    conda-forge
libdeflate                1.7                  h27cfd23_5  
libedit                   3.1.20210714         h7f8727e_0  
libev                     4.33                 h7f8727e_1  
libevent                  2.1.10               hcdb4288_3    conda-forge
libffi                    3.3                  he6710b0_2  
libgcc-devel_linux-64     9.3.0               hb95220a_17  
libgcc-ng                 9.3.0               h5101ec6_17  
libgfortran-ng            9.3.0               ha5ec8a7_17  
libgfortran5              9.3.0               ha5ec8a7_17  
libgit2                   1.1.0                h3974521_1    conda-forge
libglib                   2.68.1               h3e27bee_0    conda-forge
libgomp                   9.3.0               h5101ec6_17  
libiconv                  1.16                 h516909a_0    conda-forge
libidn2                   2.3.2                h7f8727e_0  
liblapack                 3.9.0                8_openblas    conda-forge
libllvm11                 11.1.0               h3826bc1_0  
libnghttp2                1.46.0               hce63b2e_0  
libopenblas               0.3.12          pthreads_h4812303_1    conda-forge
libpng                    1.6.37               hbc83047_0  
libprotobuf               3.15.8               h780b84a_0    conda-forge
libssh2                   1.9.0                h1ba5d50_1  
libstdcxx-devel_linux-64  9.3.0               hf0c5c8d_17  
libstdcxx-ng              9.3.0               hd4cf53a_17  
libthrift                 0.14.1               he6d91bd_2    conda-forge
libtiff                   4.2.0                h85742a9_0  
libunistring              0.9.10               h27cfd23_0  
libutf8proc               2.6.1                h27cfd23_0  
libuuid                   2.32.1            h7f98852_1000    conda-forge
libwebp-base              1.2.0                h27cfd23_0  
libxcb                    1.14                 h7b6447c_0  
libxml2                   2.9.10               h72842e0_4    conda-forge
lineedit                  0.1.6              pyhd8ed1ab_0    conda-forge
llvmlite                  0.37.0           py39h295c915_1  
lz4-c                     1.9.3                h295c915_1  
make                      4.3                  hd18ef5c_1    conda-forge
markupsafe                2.0.1            py39h27cfd23_0  
ncurses                   6.2                  he6710b0_1  
networkx                  2.5.1              pyhd8ed1ab_0    conda-forge
numba                     0.54.1           py39h51133e4_0  
numpy                     1.20.2           py39hdbf815f_0    conda-forge
openssl                   1.1.1m               h7f8727e_0  
orc                       1.6.7                heec2584_1    conda-forge
packaging                 21.3               pyhd3eb1b0_0  
pandas                    1.2.4            py39hde0f152_0    conda-forge
pandoc                    2.12                 h06a4308_0  
pango                     1.48.4               hb8ff022_0    conda-forge
parquet-cpp               1.5.1                h34088ae_4  
pcre                      8.45                 h295c915_0  
pcre2                     10.36                h032f7d1_1    conda-forge
perl                      5.32.0               h36c2ea0_0    conda-forge
pip                       21.1               pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               h7f8727e_1  
plink                     1.90b6.21            h779adbc_1    bioconda
pyarrow                   4.0.0           py39h3ebc44c_0_cpu    conda-forge
pycparser                 2.21               pyhd3eb1b0_0  
pygments                  2.10.0             pyhd3eb1b0_0  
pyopenssl                 21.0.0             pyhd3eb1b0_1  
pyparsing                 3.0.4              pyhd3eb1b0_0  
pysocks                   1.7.1            py39h06a4308_0  
python                    3.9.2           hffdb5ce_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd3eb1b0_0  
python_abi                3.9                      1_cp39    conda-forge
pytz                      2021.3             pyhd3eb1b0_0  
r                         4.0                    r40_1004    conda-forge
r-acepack                 1.4.1           r40h580db52_1006    conda-forge
r-ape                     5.5               r40h306847c_0    conda-forge
r-askpass                 1.1               r40hcdcec82_2    conda-forge
r-assertthat              0.2.1             r40h6115d3f_2    conda-forge
r-backports               1.2.1             r40hcfec24a_0    conda-forge
r-base                    4.0.3                h349a78a_8    conda-forge
r-base64enc               0.1_3           r40hcdcec82_1004    conda-forge
r-bh                      1.75.0_0          r40hc72bb7e_0    conda-forge
r-biocmanager             1.30.12           r40hc72bb7e_0    conda-forge
r-bit                     4.0.4             r40hcdcec82_0    conda-forge
r-bit64                   4.0.5             r40hcdcec82_0    conda-forge
r-bitops                  1.0_7             r40hcfec24a_0    conda-forge
r-blob                    1.2.1             r40h6115d3f_1    conda-forge
r-bma                     3.18.14           r40h859d828_0    conda-forge
r-boot                    1.3_27            r40hc72bb7e_0    conda-forge
r-brew                    1.0_6           r40h6115d3f_1003    conda-forge
r-brio                    1.1.2             r40hcfec24a_0    conda-forge
r-broom                   0.7.6             r40hc72bb7e_0    conda-forge
r-cachem                  1.0.4             r40hcfec24a_0    conda-forge
r-callr                   3.7.0             r40hc72bb7e_0    conda-forge
r-cellranger              1.1.0           r40h6115d3f_1003    conda-forge
r-checkmate               2.0.0             r40hcdcec82_1    conda-forge
r-ckmeans.1d.dp           4.3.3             r40h0357c0b_0    conda-forge
r-class                   7.3_18            r40hcfec24a_0    conda-forge
r-cli                     2.5.0             r40hc72bb7e_0    conda-forge
r-clipr                   0.7.1             r40h142f84f_0    conda-forge
r-cluster                 2.1.1             r40h859d828_0    conda-forge
r-coda                    0.19_4            r40h142f84f_0    conda-forge
r-codetools               0.2_18            r40hc72bb7e_0    conda-forge
r-coloc                   3.1               r40h3121a25_4    bioconda
r-colorspace              2.0_0             r40h9e2df91_0    conda-forge
r-commonmark              1.7             r40hcdcec82_1002    conda-forge
r-covr                    3.5.1             r40h0357c0b_0    conda-forge
r-cpp11                   0.2.7             r40hc72bb7e_0    conda-forge
r-crayon                  1.4.1             r40hc72bb7e_0    conda-forge
r-credentials             1.3.0             r40h6115d3f_0    conda-forge
r-crosstalk               1.1.1             r40hc72bb7e_0    conda-forge
r-curl                    4.3               r40hcfec24a_1    conda-forge
r-data.table              1.14.0            r40hcfec24a_0    conda-forge
r-dbi                     1.1.1             r40hc72bb7e_0    conda-forge
r-dbplyr                  2.1.1             r40hc72bb7e_0    conda-forge
r-deoptimr                1.0_8           r40h6115d3f_1003    conda-forge
r-deriv                   4.1.3             r40hc72bb7e_0    conda-forge
r-desc                    1.3.0             r40hc72bb7e_0    conda-forge
r-desctools               0.99.41           r40h5ee154c_0    conda-forge
r-devtools                2.4.0             r40hc72bb7e_0    conda-forge
r-dichromat               2.0_0                  r40_2002    conda-forge
r-diffobj                 0.3.3             r40hcfec24a_0    conda-forge
r-digest                  0.6.27            r40h1b71b39_0    conda-forge
r-dnet                    1.1.7             r40h3342da4_2    bioconda
r-doby                    4.6.9             r40hc72bb7e_0    conda-forge
r-dplyr                   1.0.5             r40h03ef668_0    conda-forge
r-dt                      0.18              r40hc72bb7e_0    conda-forge
r-dtplyr                  1.1.0             r40hc72bb7e_0    conda-forge
r-e1071                   1.7_6             r40h03ef668_0    conda-forge
r-ellipsis                0.3.1             r40hcdcec82_0    conda-forge
r-evaluate                0.14              r40h6115d3f_2    conda-forge
r-exact                   2.1               r40h142f84f_0    conda-forge
r-expm                    0.999_6           r40h52d45c5_0    conda-forge
r-fansi                   0.4.2             r40hcfec24a_0    conda-forge
r-farver                  2.1.0             r40h03ef668_0    conda-forge
r-fastmap                 1.1.0             r40h03ef668_0    conda-forge
r-flashclust              1.01_2          r40h580db52_1006    conda-forge
r-forcats                 0.5.1             r40hc72bb7e_0    conda-forge
r-foreign                 0.8_81            r40hcfec24a_0    conda-forge
r-formatr                 1.9               r40hc72bb7e_0    conda-forge
r-formula                 1.2_4             r40h142f84f_0    conda-forge
r-fs                      1.5.0             r40h0357c0b_0    conda-forge
r-futile.logger           1.4.3           r40h6115d3f_1003    conda-forge
r-futile.options          1.0.1           r40h6115d3f_1002    conda-forge
r-gargle                  1.1.0             r40hc72bb7e_0    conda-forge
r-gbrd                    0.4_11          r40h6115d3f_1002    conda-forge
r-generics                0.1.0             r40hc72bb7e_0    conda-forge
r-gert                    1.3.0             r40hbd84cd2_0    conda-forge
r-ggally                  2.1.1             r40hc72bb7e_0    conda-forge
r-ggnetwork               0.5.8             r40h6115d3f_1    conda-forge
r-ggplot2                 3.3.3             r40hc72bb7e_0    conda-forge
r-ggrepel                 0.9.1             r40h03ef668_0    conda-forge
r-gh                      1.2.1             r40hc72bb7e_0    conda-forge
r-git2r                   0.28.0            r40hf628c3e_0    conda-forge
r-gitcreds                0.1.1             r40hc72bb7e_0    conda-forge
r-gld                     2.6.2             r40hcdcec82_1    conda-forge
r-glue                    1.4.2             r40hcfec24a_0    conda-forge
r-googledrive             1.0.1             r40h6115d3f_1    conda-forge
r-googlesheets4           0.3.0             r40hc72bb7e_0    conda-forge
r-gridextra               2.3             r40h6115d3f_1003    conda-forge
r-gtable                  0.3.0             r40h6115d3f_3    conda-forge
r-haven                   2.4.1             r40h2713e49_0    conda-forge
r-hexbin                  1.28.2            r40h859d828_0    conda-forge
r-highr                   0.9               r40hc72bb7e_0    conda-forge
r-hmisc                   4.5_0             r40h859d828_0    conda-forge
r-hms                     1.0.0             r40hc72bb7e_0    conda-forge
r-htmltable               2.1.0             r40h6115d3f_0    conda-forge
r-htmltools               0.5.1.1           r40h03ef668_0    conda-forge
r-htmlwidgets             1.5.3             r40hc72bb7e_0    conda-forge
r-httr                    1.4.2             r40h6115d3f_0    conda-forge
r-ids                     1.0.1             r40h6115d3f_1    conda-forge
r-igraph                  1.2.6             r40hfbf21e4_1    conda-forge
r-ini                     0.3.1           r40h6115d3f_1003    conda-forge
r-inline                  0.3.17            r40hc72bb7e_0    conda-forge
r-irlba                   2.3.3             r40he454529_3    conda-forge
r-isoband                 0.2.4             r40h03ef668_0    conda-forge
r-jpeg                    0.1_8.1           r40hcdcec82_1    conda-forge
r-jsonlite                1.7.2             r40hcfec24a_0    conda-forge
r-kernsmooth              2.23_18           r40h742201e_0    conda-forge
r-knitr                   1.31              r40hc72bb7e_0    conda-forge
r-labeling                0.4.2             r40h142f84f_0    conda-forge
r-lambda.r                1.2.4             r40h6115d3f_1    conda-forge
r-later                   1.2.0             r40h03ef668_0    conda-forge
r-lattice                 0.20_41           r40hcfec24a_3    conda-forge
r-latticeextra            0.6_29            r40h6115d3f_1    conda-forge
r-lazyeval                0.2.2             r40hcdcec82_2    conda-forge
r-leaps                   3.1               r40h580db52_2    conda-forge
r-lifecycle               1.0.0             r40hc72bb7e_0    conda-forge
r-lme4                    1.1_26            r40h03ef668_0    conda-forge
r-lmom                    2.8               r40h580db52_2    conda-forge
r-lubridate               1.7.10            r40h03ef668_0    conda-forge
r-magrittr                2.0.1             r40hcfec24a_1    conda-forge
r-markdown                1.1               r40hcfec24a_1    conda-forge
r-mass                    7.3_53.1          r40hcfec24a_0    conda-forge
r-matrix                  1.3_2             r40he454529_0    conda-forge
r-matrixstats             0.58.0            r40hcfec24a_0    conda-forge
r-memoise                 2.0.0             r40hc72bb7e_0    conda-forge
r-mgcv                    1.8_34            r40he454529_0    conda-forge
r-mime                    0.10              r40hcfec24a_0    conda-forge
r-minqa                   1.2.4           r40h228a9c8_1006    conda-forge
r-mixsqp                  0.3_43            r40h306847c_1    conda-forge
r-modelr                  0.1.8             r40h6115d3f_0    conda-forge
r-munsell                 0.5.0           r40h6115d3f_1003    conda-forge
r-mvtnorm                 1.1_1             r40h580db52_1    conda-forge
r-network                 1.16.0            r40hcdcec82_1    conda-forge
r-nlme                    3.1_152           r40h859d828_0    conda-forge
r-nloptr                  1.2.2.2           r40h0357c0b_0    conda-forge
r-nnet                    7.3_15            r40hcfec24a_0    conda-forge
r-numderiv                2016.8_1.1        r40h6115d3f_3    conda-forge
r-openssl                 1.4.3             r40he5c4762_0    conda-forge
r-openxlsx                4.2.3             r40h1b71b39_0    conda-forge
r-patchwork               1.1.1             r40hc72bb7e_0    conda-forge
r-pbkrtest                0.5.1             r40hc72bb7e_0    conda-forge
r-pcapp                   1.9_74            r40h306847c_0    conda-forge
r-pillar                  1.6.0             r40hc72bb7e_0    conda-forge
r-pkgbuild                1.2.0             r40hc72bb7e_0    conda-forge
r-pkgconfig               2.0.3             r40h6115d3f_1    conda-forge
r-pkgload                 1.2.1             r40h03ef668_0    conda-forge
r-plogr                   0.2.0           r40h6115d3f_1003    conda-forge
r-plyr                    1.8.6             r40h0357c0b_1    conda-forge
r-png                     0.1_7           r40hcdcec82_1004    conda-forge
r-praise                  1.0.0           r40h6115d3f_1004    conda-forge
r-prettyunits             1.1.1             r40h6115d3f_1    conda-forge
r-processx                3.5.1             r40hcfec24a_0    conda-forge
r-progress                1.2.2             r40h6115d3f_2    conda-forge
r-promises                1.2.0.1           r40h03ef668_0    conda-forge
r-proxy                   0.4_25            r40hcfec24a_0    conda-forge
r-ps                      1.6.0             r40hcfec24a_0    conda-forge
r-purrr                   0.3.4             r40hcdcec82_1    conda-forge
r-r.methodss3             1.8.1             r40h6115d3f_0    conda-forge
r-r.oo                    1.24.0            r40h6115d3f_0    conda-forge
r-r.utils                 2.10.1            r40h6115d3f_0    conda-forge
r-r6                      2.5.0             r40hc72bb7e_0    conda-forge
r-rappdirs                0.3.3             r40hcfec24a_0    conda-forge
r-rbibutils               2.1               r40hcfec24a_0    conda-forge
r-rcircos                 1.2.1             r40h6115d3f_2    conda-forge
r-rcmdcheck               1.3.3             r40h6115d3f_3    conda-forge
r-rcolorbrewer            1.1_2           r40h6115d3f_1003    conda-forge
r-rcpp                    1.0.6             r40h03ef668_0    conda-forge
r-rcpparmadillo           0.10.6.0.0        r40h306847c_0    conda-forge
r-rcppeigen               0.3.3.9.1         r40h306847c_0    conda-forge
r-rcurl                   1.98_1.3          r40hcfec24a_0    conda-forge
r-rdpack                  2.1.1             r40hc72bb7e_0    conda-forge
r-readr                   1.4.0             r40h1b71b39_0    conda-forge
r-readxl                  1.3.1             r40hde08347_4    conda-forge
r-recommended             4.0                    r40_1004    conda-forge
r-refgenome               1.7.7             r40h0357c0b_2    conda-forge
r-rematch                 1.0.1           r40h6115d3f_1003    conda-forge
r-rematch2                2.1.2             r40h6115d3f_1    conda-forge
r-remotes                 2.3.0             r40hc72bb7e_0    conda-forge
r-reprex                  2.0.0             r40hc72bb7e_0    conda-forge
r-reshape                 0.8.8             r40hcdcec82_2    conda-forge
r-reshape2                1.4.4             r40h0357c0b_1    conda-forge
r-reticulate              1.18              r40h03ef668_0    conda-forge
r-rex                     1.2.0             r40h6115d3f_1    conda-forge
r-rlang                   0.4.10            r40hcfec24a_0    conda-forge
r-rle                     0.9.2             r40h0eb13af_0    conda-forge
r-rmarkdown               2.7               r40hc72bb7e_0    conda-forge
r-robustbase              0.93_7            r40h52d45c5_0    conda-forge
r-rootsolve               1.8.2.1           r40h580db52_2    conda-forge
r-roxygen2                7.1.1             r40h0357c0b_0    conda-forge
r-rpart                   4.1_15            r40hcfec24a_2    conda-forge
r-rprojroot               2.0.2             r40hc72bb7e_0    conda-forge
r-rrcov                   1.5_5             r40haae7e3a_1    conda-forge
r-rsqlite                 2.2.5             r40h03ef668_0    conda-forge
r-rstudioapi              0.13              r40hc72bb7e_0    conda-forge
r-rversions               2.0.2             r40h6115d3f_0    conda-forge
r-rvest                   1.0.0             r40hc72bb7e_0    conda-forge
r-scales                  1.1.1             r40h6115d3f_0    conda-forge
r-selectr                 0.4_2             r40h6115d3f_1    conda-forge
r-sessioninfo             1.1.1           r40h6115d3f_1002    conda-forge
r-sna                     2.5               r40hcdcec82_1    conda-forge
r-snow                    0.4_3           r40h6115d3f_1002    conda-forge
r-spatial                 7.3_13            r40hcfec24a_0    conda-forge
r-speedglm                0.3_3             r40ha770c72_0    conda-forge
r-statmod                 1.4.35            r40h86c2bf4_1    conda-forge
r-statnet.common          4.4.1             r40h0eb13af_0    conda-forge
r-stringi                 1.5.3             r40hcabe038_1    conda-forge
r-stringr                 1.4.0             r40h6115d3f_2    conda-forge
r-survival                3.2_11            r40hcfec24a_0    conda-forge
r-susier                  0.11.92           r40hc72bb7e_0    conda-forge
r-sys                     3.4               r40hcdcec82_0    conda-forge
r-testthat                3.0.2             r40h03ef668_0    conda-forge
r-tibble                  3.1.1             r40hcfec24a_0    conda-forge
r-tidyr                   1.1.3             r40h03ef668_0    conda-forge
r-tidyselect              1.1.0             r40h6115d3f_0    conda-forge
r-tidyverse               1.3.1             r40hc72bb7e_0    conda-forge
r-tinytex                 0.31              r40hc72bb7e_0    conda-forge
r-usethis                 2.0.1             r40hc72bb7e_0    conda-forge
r-utf8                    1.2.1             r40hcfec24a_0    conda-forge
r-uuid                    0.1_4             r40hcdcec82_1    conda-forge
r-vctrs                   0.3.7             r40hcfec24a_0    conda-forge
r-viridis                 0.6.0             r40hc72bb7e_0    conda-forge
r-viridislite             0.4.0             r40hc72bb7e_0    conda-forge
r-waldo                   0.2.5             r40hc72bb7e_0    conda-forge
r-whisker                 0.4               r40h6115d3f_1    conda-forge
r-withr                   2.4.2             r40hc72bb7e_0    conda-forge
r-xfun                    0.20              r40hcfec24a_0    conda-forge
r-xgr                     1.1.7             r40h3342da4_2    bioconda
r-xml                     3.99_0.6          r40hcfec24a_0    conda-forge
r-xml2                    1.3.2             r40h0357c0b_1    conda-forge
r-xopen                   1.0.0           r40h6115d3f_1003    conda-forge
r-yaml                    2.2.1             r40hcfec24a_1    conda-forge
r-zeallot                 0.1.0           r40h6115d3f_1002    conda-forge
r-zip                     2.1.1             r40hcdcec82_0    conda-forge
radian                    0.5.10             pyhd8ed1ab_0    conda-forge
rchitect                  0.3.30           py39h3811e60_1    conda-forge
re2                       2021.04.01           h9c3ff4c_0    conda-forge
readline                  8.1                  h27cfd23_0  
requests                  2.25.1             pyhd3deb0d_0    conda-forge
rpy2                      3.4.4           py39r40hce5d2b2_0    conda-forge
s2n                       1.0.0                h9b69904_0    conda-forge
scikit-learn              0.24.1           py39h4dfa638_0    conda-forge
scipy                     1.6.3            py39hee8e79c_0    conda-forge
sed                       4.8                  h7b6447c_0  
setuptools                58.0.4           py39h06a4308_0  
simplegeneric             0.8.1            py39h06a4308_2  
six                       1.16.0             pyhd3eb1b0_0  
snappy                    1.1.8                he6710b0_0  
sqlite                    3.37.0               hc218d9a_0  
sysroot_linux-64          2.12                h77966d4_13    conda-forge
tbb                       2021.5.0             hd09550d_0  
threadpoolctl             2.2.0              pyh0d69192_0  
thrift                    0.13.0           py39h2531618_0  
tk                        8.6.11               h1ccaba5_0  
tktable                   2.10                 h14c3975_0  
tqdm                      4.60.0             pyhd8ed1ab_0    conda-forge
tzdata                    2021e                hda174b7_0  
tzlocal                   2.1              py39h06a4308_0  
unknown                   0.0.0                    pypi_0    pypi
urllib3                   1.26.8             pyhd3eb1b0_0  
wcwidth                   0.2.5              pyhd3eb1b0_0  
wget                      1.20.1               h22169c7_0    conda-forge
wheel                     0.37.1             pyhd3eb1b0_0  
xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
xorg-libice               1.0.10               h7f98852_0    conda-forge
xorg-libsm                1.2.3             hd9c2040_1000    conda-forge
xorg-libx11               1.7.0                h7f98852_0    conda-forge
xorg-libxext              1.3.4                h7f98852_1    conda-forge
xorg-libxrender           0.9.10            h7f98852_1003    conda-forge
xorg-libxt                1.2.1                h7f98852_2    conda-forge
xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
xorg-xextproto            7.3.0             h7f98852_1002    conda-forge
xorg-xproto               7.0.31            h27cfd23_1007  
xz                        5.2.5                h7b6447c_0  
zlib                      1.2.11               h7f8727e_4  
zstd                      1.4.9                haebb681_0  

Moreover, using the conda channel aksarkar to get susieR installed did not work for me.
When trying this: https://anaconda.org/aksarkar/r-susier

(echoR) acarrasco@kronos:/mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/SOFTWARE_CONDAENV$ conda config --show channels
channels:
  - conda-forge
  - bioconda
  - defaults
(echoR) acarrasco@kronos:/mnt/rreal/RDS/acarrasco/ANALYSES_WORKSPACE/EARLY_PD/POST_GWAS/ECHOLOCATOR/SOFTWARE_CONDAENV$ conda install --name echoR -c aksarkar r-susier
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: / failed

Update @examples

Update all @examples in each function's documentation to work with current versions. This will ensure examples shown in Reference won't throw any errors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.