RajLabMSSM / echolocatoR

Automated statistical and functional fine-mapping pipeline with extensive API access to datasets.
https://rajlabmssm.github.io/echolocatoR
MIT License
34 stars 11 forks source link

finemap_loci() fails after querying VCF tabix file #103

Closed AMCalejandro closed 2 years ago

AMCalejandro commented 2 years ago

1. Bug description

The simple pipeline does not work. I fall in the following error:

Error in message(e) : object 'e' not found

Also, just a note I found easier to track bugs in the previous version, as the messager told you the exact script the workflow was falling in. Now, I find challenging knowing where the issue is as there are many scripts and I do not know the exact workflow So, based on the output I paste below, I tracked the workflow until query_vcf.R. Then, I get lost. If you have any suggestion to make debugging easier or any draft showing the workflow within each echoverse package, that would be great.

2. Reproducible example

Code

> topSNPs <- echodata::topSNPs_Nalls2019
> fullSS_path <- echodata::example_fullSS(dataset = "Nalls2019")
Writing file to ==> /tmp/Rtmp1cGXTX/nalls2019.fullSS_subset.tsv
> 
> res <- echolocatoR::finemap_loci(
+     fullSS_path = fullSS_path,
+     topSNPs = topSNPs,
+     loci = c("BST1","MEX3C"),
+     finemap_methods = c("ABF","FINEMAP","SUSIE", "POLYFUN_SUSIE"),
+     dataset_name = "Nalls23andMe_2019",
+     fullSS_genome_build = "hg19",
+     bp_distance = 10000,
+     munged = TRUE)

Console output

olyFun submodule already installed.
┌────────────────────────────────────────┐
│                                        │
│   )))> 🦇 BST1 [locus 1 / 2] 🦇 <(((   │
│                                        │
└────────────────────────────────────────┘

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

── Step 1 ▶▶▶ Query 🔎 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+ Query Method: tabix
Constructing GRanges query using min/max ranges within a single chromosome.
query_dat is already a GRanges object. Returning directly.
========= echotabix::convert =========
Converting full summary stats file to tabix format for fast querying.
Inferred format: 'table'
Explicit format: 'table'
Inferring comment_char from tabular header: 'SNP'
Determining chrom type from file header.
Assuming fullSS_path summary stats have already been processed with MungeSumstats.
Chromosome format: 1
Detecting column delimiter.
Identified column separator: \t
Sorting rows by coordinates via bash.
Searching for header row with grep.
( grep ^'SNP' .../nalls2019.fullSS_subset.tsv; grep
    -v ^'SNP' .../nalls2019.fullSS_subset.tsv | sort
    -k2,2n
    -k3,3n ) > .../file8ed6728213b_sorted.tsv
Constructing outputs
bgzipping file with Rsamtools.
Reading bgzipped file using: data.table
Header preview:
          SNP CHR       BP A1 A2   FREQ    BETA     SE      P N_CAS   N_CON
1:   rs741214   4 13737637  C  A 0.2341  0.0091 0.0119 0.4460 49053 1411006
2: rs79385021   4 13737659  T  C 0.9109  0.0009 0.0198 0.9642 30435  974587
3:   rs741215   4 13737767  C  T 0.0733  0.0190 0.0194 0.3284 49053 1411006
4:   rs759261   4 13737915  G  A 0.4511  0.0075 0.0100 0.4543 49053 1411006
5: rs35006360   4 13738014  G  A 0.1148 -0.0195 0.0160 0.2208 49053 1411006
Tabix-indexing file using: Rsamtools
Data successfully converted to bgzip-compressed, tabix-indexed format.
========= echotabix::query =========
query_dat is already a GRanges object. Returning directly.
Inferred format: 'table'
Querying tabular tabix file using: Rsamtools.
Checking query chromosome style is correct.
Chromosome format: 1
Retrieving data.
Converting query results to data.table.
Processing query: 4:15727348-15747348
Adding 'query' column to results.
Retrieved data with 113 rows
Saving query ==> /tmp/Rtmp1cGXTX/results/GWAS/Nalls23andMe_2019/BST1/BST1_Nalls23andMe_2019_subset.tsv.gz
+ Query: 113 SNPs x 11 columns.
Standardizing summary statistics subset.
Standardizing main column names.
++ Preparing A1,A1 cols
++ Preparing MAF,Freq cols.
++ Could not infer MAF.
++ Preparing N_cases,N_controls cols.
++ Preparing proportion_cases col.
++ Calculating proportion_cases from N_cases and N_controls.
Loading required namespace: MungeSumstats
Preparing sample size column (N).
Computing effective sample size using the LDSC method:
 Neff = (N_CAS+N_CON) * (N_CAS/(N_CAS+N_CON)) / mean((N_CAS/(N_CAS+N_CON))[(N_CAS+N_CON)==max(N_CAS+N_CON)]))
+ Mapping colnames from MungeSumstats ==> echolocatoR
+ Imputing t-statistic from Effect and StdErr.
+ leadSNP missing. Assigning new one by min p-value.
++ Ensuring Effect,StdErr,P are numeric.
++ Ensuring 1 SNP per row and per genomic coordinate.
++ Removing extra whitespace
+ Standardized query: 113 SNPs x 15 columns.
++ Saving standardized query ==> /tmp/Rtmp1cGXTX/results/GWAS/Nalls23andMe_2019/BST1/BST1_Nalls23andMe_2019_subset.tsv.gz

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

── Step 2 ▶▶▶ Extract Linkage Disequilibrium 🔗 ──────────────────────────────────────────────────────────────────────────────────────────────────────────

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Using 1000Genomes as LD reference panel.
Constructing GRanges query using min/max ranges across one or more chromosomes.
+ as_blocks=TRUE: Will query a single range per chromosome that covers all regions requested (plus anything in between).
LD Reference Panel = 1KGphase3
Querying 1KG remote server.
Selecting 503 EUR individuals from 1kgphase3.
========= echotabix::query =========
query_dat is already a GRanges object. Returning directly.
Explicit format: 'vcf'
Querying VCF tabix file.
Error in message(e) : object 'e' not found

Data

> ls ()
[1] "fullSS_path" "topSNPs"    
> fullSS_path
[1] "/tmp/Rtmp1cGXTX/nalls2019.fullSS_subset.tsv"
> head(topSNPs)
     Locus    Gene CHR       POS        SNP        P  Effect
1:   ASXL3   ASXL3  18  31304318  rs1941685 1.69e-08  0.0531
2:    BAG3    BAG3  10 121415685 rs72840788 1.57e-11  0.0763
3:    BIN3    BIN3   8  22525980  rs2280104 1.16e-08  0.0556
4:   BRIP1   BRIP1  17  59917366 rs61169879 9.28e-10  0.0820
5:    BST1    BST1   4  15737348  rs4698412 2.06e-28  0.1035
6: C5orf24 C5orf24   5 134199105 rs11950533 7.16e-09 -0.0916

3. Session info

─ Session info ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.2.0 (2022-04-22)
 os       Ubuntu 20.04.4 LTS
 system   x86_64, linux-gnu
 ui       RStudio
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       Etc/UTC
 date     2022-09-06
 rstudio  2022.02.3+492 Prairie Trillium (server)
 pandoc   2.17.1.1 @ /usr/local/bin/pandoc

─ Packages ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 package              * version   date (UTC) lib source
 AnnotationDbi          1.59.1    2022-05-19 [1] Bioconductor
 AnnotationFilter       1.20.0    2022-04-26 [1] Bioconductor
 ape                    5.6-2     2022-03-02 [1] RSPM (R 4.2.0)
 assertthat             0.2.1     2019-03-21 [1] RSPM (R 4.2.0)
 backports              1.4.1     2021-12-13 [1] RSPM (R 4.2.0)
 base64enc              0.1-3     2015-07-28 [1] RSPM (R 4.2.0)
 basilisk               1.8.1     2022-08-25 [1] Bioconductor
 basilisk.utils         1.8.0     2022-04-26 [1] Bioconductor
 Biobase                2.57.1    2022-05-19 [1] Bioconductor
 BiocFileCache          2.5.0     2022-04-26 [1] Bioconductor
 BiocGenerics           0.43.1    2022-07-26 [1] Bioconductor
 BiocIO                 1.7.1     2022-05-06 [1] Bioconductor
 BiocManager            1.30.18   2022-05-18 [1] CRAN (R 4.2.0)
 BiocParallel           1.31.12   2022-08-02 [1] Bioconductor
 biomaRt                2.53.2    2022-05-17 [1] Bioconductor
 Biostrings             2.65.1    2022-06-09 [1] Bioconductor
 biovizBase             1.44.0    2022-04-26 [1] Bioconductor
 bit                    4.0.4     2020-08-04 [1] RSPM (R 4.2.0)
 bit64                  4.0.5     2020-08-30 [1] RSPM (R 4.2.0)
 bitops                 1.0-7     2021-04-24 [1] RSPM (R 4.2.0)
 blob                   1.2.3     2022-04-10 [1] RSPM (R 4.2.0)
 boot                   1.3-28    2021-05-03 [2] CRAN (R 4.2.0)
 BSgenome               1.65.2    2022-07-14 [1] Bioconductor
 cachem                 1.0.6     2021-08-19 [1] RSPM (R 4.2.0)
 callr                  3.7.0     2021-04-20 [1] RSPM (R 4.2.0)
 cellranger             1.1.0     2016-07-27 [1] RSPM (R 4.2.0)
 checkmate              2.1.0     2022-04-21 [1] RSPM (R 4.2.0)
 class                  7.3-20    2022-01-16 [2] CRAN (R 4.2.0)
 cli                    3.3.0     2022-04-25 [1] RSPM (R 4.2.0)
 cluster                2.1.3     2022-03-28 [2] CRAN (R 4.2.0)
 codetools              0.2-18    2020-11-04 [2] CRAN (R 4.2.0)
 coloc                  5.1.0     2021-06-14 [1] RSPM (R 4.2.0)
 colorspace             2.0-3     2022-02-21 [1] RSPM (R 4.2.0)
 crayon                 1.5.1     2022-03-26 [1] RSPM (R 4.2.0)
 curl                   4.3.2     2021-06-23 [1] RSPM (R 4.2.0)
 data.table             1.14.2    2021-09-27 [1] RSPM (R 4.2.0)
 DBI                    1.1.3     2022-06-18 [1] RSPM (R 4.2.0)
 dbplyr                 2.2.1     2022-06-27 [1] RSPM (R 4.2.0)
 DelayedArray           0.23.1    2022-07-28 [1] Bioconductor
 DescTools              0.99.45   2022-05-09 [1] RSPM (R 4.2.0)
 devtools             * 2.4.3     2021-11-30 [1] RSPM (R 4.2.0)
 dichromat              2.0-0.1   2022-05-02 [1] RSPM (R 4.2.0)
 digest                 0.6.29    2021-12-01 [1] RSPM (R 4.2.0)
 dir.expiry             1.4.0     2022-04-26 [1] Bioconductor
 dnet                   1.1.7     2020-02-20 [1] RSPM (R 4.2.0)
 downloadR              0.99.4    2022-09-05 [1] Github (RajLabMSSM/downloadR@a9bc842)
 dplyr                  1.0.9     2022-04-28 [1] RSPM (R 4.2.0)
 DT                     0.23      2022-05-10 [1] RSPM (R 4.2.0)
 e1071                  1.7-11    2022-06-07 [1] RSPM (R 4.2.0)
 echoannot              0.99.7    2022-09-05 [1] Github (RajLabMSSM/echoannot@c9bcc52)
 echoconda              0.99.7    2022-09-05 [1] Github (RajLabMSSM/echoconda@5fa8c0e)
 echodata               0.99.12   2022-09-05 [1] Github (RajLabMSSM/echodata@e779725)
 echofinemap            0.99.3    2022-09-06 [1] Bioconductor
 echoLD                 0.99.7    2022-09-05 [1] Github (RajLabMSSM/echoLD@9904bcd)
 echolocatoR          * 2.0.0     2022-09-05 [1] Github (RajLabMSSM/echolocatoR@5585f1a)
 echoplot               0.99.3    2022-09-05 [1] Github (RajLabMSSM/echoplot@58f7f50)
 echotabix              0.99.7    2022-09-05 [1] Github (RajLabMSSM/echotabix@408b176)
 ellipsis               0.3.2     2021-04-29 [1] RSPM (R 4.2.0)
 ensembldb              2.20.2    2022-06-16 [1] Bioconductor
 Exact                  3.1       2021-11-26 [1] RSPM (R 4.2.0)
 expm                   0.999-6   2021-01-13 [1] RSPM (R 4.2.0)
 fansi                  1.0.3     2022-03-24 [1] RSPM (R 4.2.0)
 fastmap                1.1.0     2021-01-25 [1] RSPM (R 4.2.0)
 filelock               1.0.2     2018-10-05 [1] RSPM (R 4.2.0)
 foreign                0.8-82    2022-01-16 [2] CRAN (R 4.2.0)
 Formula                1.2-4     2020-10-16 [1] RSPM (R 4.2.0)
 fs                     1.5.2     2021-12-08 [1] RSPM (R 4.2.0)
 gargle                 1.2.0     2021-07-02 [1] RSPM (R 4.2.0)
 generics               0.1.2     2022-01-31 [1] RSPM (R 4.2.0)
 GenomeInfoDb           1.33.4    2022-08-09 [1] Bioconductor
 GenomeInfoDbData       1.2.8     2022-05-03 [1] Bioconductor
 GenomicAlignments      1.33.1    2022-07-22 [1] Bioconductor
 GenomicFeatures        1.49.5    2022-05-31 [1] Bioconductor
 GenomicRanges          1.49.0    2022-04-26 [1] Bioconductor
 GGally                 2.1.2     2021-06-21 [1] RSPM (R 4.2.0)
 ggbio                  1.44.1    2022-06-23 [1] Bioconductor
 ggnetwork              0.5.10    2021-07-06 [1] RSPM (R 4.2.0)
 ggplot2                3.3.6     2022-05-03 [1] RSPM (R 4.2.0)
 ggrepel                0.9.1     2021-01-15 [1] RSPM (R 4.2.0)
 gld                    2.6.4     2021-12-16 [1] RSPM (R 4.2.0)
 glue                   1.6.2     2022-02-24 [1] RSPM (R 4.2.0)
 googleAuthR            2.0.0     2022-01-28 [1] RSPM (R 4.2.0)
 graph                  1.74.0    2022-04-26 [1] Bioconductor
 gridExtra              2.3       2017-09-09 [1] RSPM (R 4.2.0)
 gtable                 0.3.0     2019-03-25 [1] RSPM (R 4.2.0)
 hexbin                 1.28.2    2021-01-08 [1] RSPM (R 4.2.0)
 Hmisc                  4.7-0     2022-04-19 [1] RSPM (R 4.2.0)
 hms                    1.1.1     2021-09-26 [1] RSPM (R 4.2.0)
 htmlTable              2.4.0     2022-01-04 [1] RSPM (R 4.2.0)
 htmltools              0.5.2     2021-08-25 [1] RSPM (R 4.2.0)
 htmlwidgets            1.5.4     2021-09-08 [1] RSPM (R 4.2.0)
 httr                   1.4.3     2022-05-04 [1] RSPM (R 4.2.0)
 igraph                 1.3.2     2022-06-13 [1] RSPM (R 4.2.0)
 IRanges                2.31.0    2022-04-26 [1] Bioconductor
 irlba                  2.3.5     2021-12-06 [1] RSPM (R 4.2.0)
 jpeg                   0.1-9     2021-07-24 [1] RSPM (R 4.2.0)
 jsonlite               1.8.0     2022-02-22 [1] RSPM (R 4.2.0)
 KEGGREST               1.37.3    2022-07-08 [1] Bioconductor
 knitr                  1.39      2022-04-26 [1] RSPM (R 4.2.0)
 lattice                0.20-45   2021-09-22 [2] CRAN (R 4.2.0)
 latticeExtra           0.6-29    2019-12-19 [1] RSPM (R 4.2.0)
 lazyeval               0.2.2     2019-03-15 [1] RSPM (R 4.2.0)
 lifecycle              1.0.1     2021-09-24 [1] RSPM (R 4.2.0)
 lmom                   2.9       2022-05-29 [1] RSPM (R 4.2.0)
 magrittr               2.0.3     2022-03-30 [1] RSPM (R 4.2.0)
 MASS                   7.3-57    2022-04-22 [1] RSPM (R 4.2.0)
 Matrix                 1.4-1     2022-03-23 [2] CRAN (R 4.2.0)
 MatrixGenerics         1.9.1     2022-06-24 [1] Bioconductor
 matrixStats            0.62.0    2022-04-19 [1] RSPM (R 4.2.0)
 memoise                2.0.1     2021-11-26 [1] RSPM (R 4.2.0)
 mixsqp                 0.3-43    2020-05-14 [1] RSPM (R 4.2.0)
 MungeSumstats          1.4.5     2022-09-05 [1] Github (neurogenomics/MungeSumstats@0da13c2)
 munsell                0.5.0     2018-06-12 [1] RSPM (R 4.2.0)
 mvtnorm                1.1-3     2021-10-08 [1] RSPM (R 4.2.0)
 nlme                   3.1-158   2022-06-15 [1] RSPM (R 4.2.0)
 nnet                   7.3-17    2022-01-16 [2] CRAN (R 4.2.0)
 openxlsx               4.2.5     2021-12-14 [1] RSPM (R 4.2.0)
 OrganismDbi            1.38.1    2022-06-16 [1] Bioconductor
 patchwork              1.1.1     2020-12-17 [1] RSPM (R 4.2.0)
 piggyback              0.1.3     2022-05-19 [1] RSPM (R 4.2.0)
 pillar                 1.7.0     2022-02-01 [1] RSPM (R 4.2.0)
 pkgbuild               1.3.1     2021-12-20 [1] RSPM (R 4.2.0)
 pkgconfig              2.0.3     2019-09-22 [1] RSPM (R 4.2.0)
 pkgload                1.3.0     2022-06-27 [1] RSPM (R 4.2.0)
 plyr                   1.8.7     2022-03-24 [1] RSPM (R 4.2.0)
 png                    0.1-7     2013-12-03 [1] RSPM (R 4.2.0)
 prettyunits            1.1.1     2020-01-24 [1] RSPM (R 4.2.0)
 processx               3.6.1     2022-06-17 [1] RSPM (R 4.2.0)
 progress               1.2.2     2019-05-16 [1] RSPM (R 4.2.0)
 ProtGenerics           1.28.0    2022-04-26 [1] Bioconductor
 proxy                  0.4-27    2022-06-09 [1] RSPM (R 4.2.0)
 ps                     1.7.1     2022-06-18 [1] RSPM (R 4.2.0)
 purrr                  0.3.4     2020-04-17 [1] RSPM (R 4.2.0)
 R.methodsS3            1.8.2     2022-06-13 [1] RSPM (R 4.2.0)
 R.oo                   1.25.0    2022-06-12 [1] RSPM (R 4.2.0)
 R.utils                2.12.0    2022-06-28 [1] RSPM (R 4.2.0)
 R6                     2.5.1     2021-08-19 [1] RSPM (R 4.2.0)
 rappdirs               0.3.3     2021-01-31 [1] RSPM (R 4.2.0)
 RBGL                   1.72.0    2022-04-26 [1] Bioconductor
 RCircos                1.2.2     2021-12-19 [1] RSPM (R 4.2.0)
 RColorBrewer           1.1-3     2022-04-03 [1] RSPM (R 4.2.0)
 Rcpp                   1.0.8.3   2022-03-17 [1] RSPM (R 4.2.0)
 RCurl                  1.98-1.7  2022-06-09 [1] RSPM (R 4.2.0)
 readr                  2.1.2     2022-01-30 [1] RSPM (R 4.2.0)
 readxl                 1.4.0     2022-03-28 [1] RSPM (R 4.2.0)
 remotes                2.4.2     2021-11-30 [1] RSPM (R 4.2.0)
 reshape                0.8.9     2022-04-12 [1] RSPM (R 4.2.0)
 reshape2               1.4.4     2020-04-09 [1] RSPM (R 4.2.0)
 restfulr               0.0.15    2022-06-16 [1] RSPM (R 4.2.0)
 reticulate             1.25      2022-05-11 [1] RSPM (R 4.2.0)
 Rgraphviz              2.40.0    2022-04-26 [1] Bioconductor
 rjson                  0.2.21    2022-01-09 [1] RSPM (R 4.2.0)
 rlang                  1.0.3     2022-06-27 [1] RSPM (R 4.2.0)
 rootSolve              1.8.2.3   2021-09-29 [1] RSPM (R 4.2.0)
 rpart                  4.1.16    2022-01-24 [2] CRAN (R 4.2.0)
 Rsamtools              2.13.3    2022-05-25 [1] Bioconductor
 RSQLite                2.2.14    2022-05-07 [1] RSPM (R 4.2.0)
 rstudioapi             0.13      2020-11-12 [1] RSPM (R 4.2.0)
 rtracklayer            1.57.0    2022-04-26 [1] Bioconductor
 S4Vectors              0.35.1    2022-06-08 [1] Bioconductor
 scales                 1.2.0     2022-04-13 [1] RSPM (R 4.2.0)
 sessioninfo            1.2.2     2021-12-06 [1] RSPM (R 4.2.0)
 snpStats               1.46.0    2022-04-26 [1] Bioconductor
 stringi                1.7.6     2021-11-29 [1] RSPM (R 4.2.0)
 stringr                1.4.0     2019-02-10 [1] RSPM (R 4.2.0)
 SummarizedExperiment   1.27.1    2022-04-29 [1] Bioconductor
 supraHex               1.34.0    2022-04-26 [1] Bioconductor
 survival               3.3-1     2022-03-03 [2] CRAN (R 4.2.0)
 susieR                 0.12.19   2022-09-05 [1] Github (stephenslab/susieR@dcd0d09)
 tibble                 3.1.7     2022-05-03 [1] RSPM (R 4.2.0)
 tidyr                  1.2.0     2022-02-01 [1] RSPM (R 4.2.0)
 tidyselect             1.1.2     2022-02-21 [1] RSPM (R 4.2.0)
 tzdb                   0.3.0     2022-03-28 [1] RSPM (R 4.2.0)
 usethis              * 2.1.6     2022-05-25 [1] RSPM (R 4.2.0)
 utf8                   1.2.2     2021-07-24 [1] RSPM (R 4.2.0)
 VariantAnnotation      1.43.2    2022-05-13 [1] Bioconductor
 vctrs                  0.4.1     2022-04-13 [1] RSPM (R 4.2.0)
 viridis                0.6.2     2021-10-13 [1] RSPM (R 4.2.0)
 viridisLite            0.4.0     2021-04-13 [1] RSPM (R 4.2.0)
 xfun                   0.31      2022-05-10 [1] RSPM (R 4.2.0)
 XGR                    1.1.7     2020-01-08 [1] url (https://cran.r-project.org/src/contrib/Archive/XGR/XGR_1.1.7.tar.gz)
 XML                    3.99-0.10 2022-06-09 [1] RSPM (R 4.2.0)
 xml2                   1.3.3     2021-11-30 [1] RSPM (R 4.2.0)
 XVector                0.37.0    2022-04-26 [1] Bioconductor
 yaml                   2.3.5     2022-02-21 [1] RSPM (R 4.2.0)
 zip                    2.2.0     2021-05-31 [1] RSPM (R 4.2.0)
 zlibbioc               1.43.0    2022-04-26 [1] Bioconductor

 [1] /usr/local/lib/R/site-library
 [2] /usr/local/lib/R/library

Thanks Brian!

bschilder commented 2 years ago

Ah, sorry about that, that was a single-letter typo in my tryCatch wrapper. Just pushed a fix.

bschilder commented 2 years ago

Also, just a note I found easier to track bugs in the previous version, as the messager told you the exact script the workflow was falling in. Now, I find challenging knowing where the issue is as there are many scripts and I do not know the exact workflow So, based on the output I paste below, I tracked the workflow until query_vcf.R. Then, I get lost. If you have any suggestion to make debugging easier or any draft showing the workflow within each echoverse package, that would be great.

This is a good point, there's so many steps that debugging does become very tricky. trackBack is normally helpful but because I have the tryCatch wrapper for locus (finemap_locus) traceback is not enabled. It might be time to remove the tryCatch (or at least make it an option) to enable better bug tracing.

Regarding the scripts, you mean output like this?

( grep ^'SNP' .../nalls2019.fullSS_subset.tsv; grep
    -v ^'SNP' .../nalls2019.fullSS_subset.tsv | sort
    -k2,2n
    -k3,3n ) > .../file8ed6728213b_sorted.tsv

This abbreviated printing is done by echoconda::cmd_print, which I made to try and declutter the output messages. But if you think it does not harm than good I can change the default back to using full paths. Might do this by making verbose have more options than just T/F (0,1,2) to control the verbosity level.

AMCalejandro commented 2 years ago

Not sure we are talking about the same thinf, but yeah, that could be useful as well.

I was just referring to this previous kind of printing (Example)

[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."

This way, I always found easy to find where something was going wrong in less than 10-15 minutes without being familiar how echolocatoR works

bschilder commented 2 years ago

Ok I'll keep that in mind as well. Opened a separate Issue to improve the messages: #105