RajLabMSSM / echolocatoR

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

MAF cannot be inferred #117

Open AMCalejandro opened 2 years ago

AMCalejandro commented 2 years ago

I just got this running

Note that: MAF is not inferred even though I am passing Freq col, and I am seeting maf to calculate

Code

columnsnames = echodata::construct_colmap(munged= FALSE,
                                          CHR = "CHR", POS = "POS",
                                          SNP = "SNP", P = "P",
                                          Effect = "BETA", StdErr = "SE", 
                                          A1 = "A1", A2 = "A2", Freq = "FREQ",
                                          N = "N", MAF = "calculate",)

# Pass the sample size as "N" column
# compute_n will do all what is in the docu f N does not exist

finemap_loci(# GENERAL ARGUMENTS 
                                          topSNPs = topSNPs,
                                          results_dir = fullRS_path,
                                          loci = topSNPs$Locus,
                                          dataset_name = "LID_COX",
                                          dataset_type = "GWAS",  
                                          force_new_subset = TRUE,
                                          force_new_LD = FALSE,
                                          force_new_finemap = TRUE,
                                          remove_tmps = FALSE,

                                          finemap_methods = c("ABF","FINEMAP","SUSIE", "POLYFUN_SUSIE"),

                                          # Munge full sumstats first
                                          munged = FALSE,
                                          colmap = columnsnames,
                                          # SUMMARY STATS ARGUMENTS
                                          fullSS_path = newSS_name_colmap,
                                          fullSS_genome_build = "hg19",
                                          query_by ="tabix",

                                          #compute_n = 3500,

                                          bp_distance = 10000,#500000*2,
                                          min_MAF = 0.001, 
                                          trim_gene_limits = FALSE,

                                          case_control = FALSE,

                                          # FINE-MAPPING ARGUMENTS
                                          ## General
                                          n_causal = 5,
                                          credset_thresh = .95,
                                          consensus_thresh = 2,

                                          # LD ARGUMENTS 
                                          LD_reference = "1KGphase3",#"UKB",
                                          superpopulation = "EUR",
                                          download_method = "axel",
                                          LD_genome_build = "hg19",
                                          leadSNP_LD_block = FALSE,

                                          #### PLotting args ####
                                          plot_types = c("simple"),
                                          show_plot = TRUE,
                                          zoom = "1x",
                                          tx_biotypes = NULL,
                                          nott_epigenome = FALSE,
                                          nott_show_placseq = FALSE,
                                          nott_binwidth = 200,
                                          nott_bigwig_dir = NULL,
                                          xgr_libnames = NULL,
                                          roadmap = FALSE,
                                          roadmap_query = NULL,

                                          #### General args ####
                                          seed = 2022,
                                          nThread = 20,
                                          verbose = TRUE
                                          )

Output

PolyFun submodule already installed.
┌─────────────────────────────────────────────────┐
│                                                 │
│   )))> 🦇 RP11-240A16.1 [locus 1 / 3] 🦇 <(((   │
│                                                 │
└─────────────────────────────────────────────────┘

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

── 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.
Chromosome format: 1
Detecting column delimiter.
Identified column separator: \t
Sorting rows by coordinates via bash.
Searching for header row with grep.
( grep ^'SNP' .../QC_SNPs_COLMAP.txt; grep
    -v ^'SNP' .../QC_SNPs_COLMAP.txt | sort
    -k2,2n
    -k3,3n ) > .../file2fb2fcecd3b_sorted.tsv
Constructing outputs
Using existing bgzipped file: /home/rstudio/echolocatoR/echolocatoR_LID/QC_SNPs_COLMAP.txt.bgz 
Set force_new=TRUE to override this.
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:32425284-32445284
Adding 'query' column to results.
Retrieved data with 76 rows
Saving query ==> /home/rstudio/echolocatoR/echolocatoR_LID/RESULTS/GWAS/LID_COX/RP11-240A16.1/RP11-240A16.1_LID_COX_subset.tsv.gz
+ Query: 76 SNPs x 10 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.
++ proportion_cases not included in data subset.
Preparing sample size column (N).
Using existing 'N' column.
+ 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: 76 SNPs x 12 columns.
++ Saving standardized query ==> /home/rstudio/echolocatoR/echolocatoR_LID/RESULTS/GWAS/LID_COX/RP11-240A16.1/RP11-240A16.1_LID_COX_subset.tsv.gz

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

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

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
LD_reference identified as: 1kg.
Previously computed LD_matrix detected. Importing: /home/rstudio/echolocatoR/echolocatoR_LID/RESULTS/GWAS/LID_COX/RP11-240A16.1/LD/RP11-240A16.1.1KGphase3_LD.RDS
LD_reference identified as: r.
Converting obj to sparseMatrix.
+ FILTER:: Filtering by LD features.

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

── Step 3 ▶▶▶ Filter SNPs 🚰 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
FILTER:: Filtering by SNP features.
+ FILTER:: Post-filtered data: 76 x 12
+ Subsetting LD matrix and dat to common SNPs...
Removing unnamed rows/cols
Replacing NAs with 0
+ LD_matrix = 76 SNPs.
+ dat = 76 SNPs.
+ 76 SNPs in common.
Converting obj to sparseMatrix.

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

── Step 4 ▶▶▶ Fine-map 🔊 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Gathering method sources.
Gathering method citations.
Preparing sample size column (N).
Using existing 'N' column.
Gathering method sources.
Gathering method citations.
Gathering method sources.
Gathering method citations.
ABF
🚫 Missing required column(s) for ABF [skipping]: MAF, proportion_cases
FINEMAP
✅ All required columns present.
⚠ Missing optional column(s) for FINEMAP: MAF
SUSIE
✅ All required columns present.
✅ All optional columns present.
POLYFUN_SUSIE
✅ All required columns present.
⚠ Missing optional column(s) for POLYFUN_SUSIE: MAF
++ Fine-mapping using 3 tool(s): FINEMAP, SUSIE, POLYFUN_SUSIE

+++ Multi-finemap:: FINEMAP +++
Preparing sample size column (N).
Using existing 'N' column.
+ Subsetting LD matrix and dat to common SNPs...
Removing unnamed rows/cols
Replacing NAs with 0
+ LD_matrix = 76 SNPs.
+ dat = 76 SNPs.
+ 76 SNPs in common.
Converting obj to sparseMatrix.
Constructing master file.
Optional MAF col missing. Replacing with all '.1's
Constructing data.z file.
Constructing data.ld file.
FINEMAP path: /home/rstudio/.cache/R/echofinemap/FINEMAP/finemap_v1.4.1_x86_64/finemap_v1.4.1_x86_64
Inferred FINEMAP version: 1.4.1
Running FINEMAP.
cd .../RP11-240A16.1 &&
    .../finemap_v1.4.1_x86_64

    --sss

    --in-files .../master

    --log

    --n-threads 20

    --n-causal-snps 5

|--------------------------------------|
| Welcome to FINEMAP v1.4.1            |
|                                      |
| (c) 2015-2022 University of Helsinki |
|                                      |
| Help :                               |
| - ./finemap --help                   |
| - www.finemap.me                     |
| - www.christianbenner.com            |
|                                      |
| Contact :                            |
| - finemap@christianbenner.com        |
| - matti.pirinen@helsinki.fi          |
|--------------------------------------|

--------
SETTINGS
--------
- dataset            : all
- corr-config        : 0.95
- n-causal-snps      : 5
- n-configs-top      : 50000
- n-conv-sss         : 100
- n-iter             : 100000
- n-threads          : 20
- 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!   

- Updated prior SD of effect sizes : 0.05 0.0528 0.0558 0.0589 

- Number of GWAS samples           : 2687
- Number of SNPs                   : 76
- Prior-Pr(# of causal SNPs is k)  : 
  (0 -> 0)
   1 -> 0.584
   2 -> 0.292
   3 -> 0.096
   4 -> 0.0234
   5 -> 0.00449
- 1800 configurations evaluated (0.122/100%) : converged after 122 iterations
- Computing causal SNP statistics  : done!   
- Regional SNP heritability        : 0.0276 (SD: 0.00441 ; 95% CI: [0.0196,0.0371])
- Log10-BF of >= one causal SNP    : 24.4
- Post-expected # of causal SNPs   : 4.74
- Post-Pr(# of causal SNPs is k)   : 
  (0 -> 0)
   1 -> 9.4e-21
   2 -> 2.73e-11
   3 -> 1.41e-07
   4 -> 0.265
   5 -> 0.735
- Writing output                   : done!   
- Run time                         : 0 hours, 0 minutes, 0 seconds
2 data.cred* file(s) found in the same subfolder.
Selected file based on postPr_k: data.cred5
Importing conditional probabilities (.cred file).
No configurations were causal at PP>=0.95.
Importing marginal probabilities (.snp file).
Importing configuration probabilities (.config file).
FINEMAP was unable to identify any credible sets at PP>=0.95.
++ Credible Set SNPs identified = 0
++ Merging FINEMAP results with multi-finemap data.

+++ Multi-finemap:: SUSIE +++
Loading required namespace: Rfast
Failed with error:  'there is no package called 'Rfast''
Preparing sample size column (N).
Using existing 'N' column.
+ SUSIE:: sample_size=2,687
+ Subsetting LD matrix and dat to common SNPs...
Removing unnamed rows/cols
Replacing NAs with 0
+ LD_matrix = 76 SNPs.
+ dat = 76 SNPs.
+ 76 SNPs in common.
Converting obj to sparseMatrix.
+ SUSIE:: Using `susie_rss()` from susieR v0.12.27
+ SUSIE:: Extracting Credible Sets.
++ Credible Set SNPs identified = 2
++ Merging SUSIE results with multi-finemap data.

+++ Multi-finemap:: POLYFUN_SUSIE +++
PolyFun submodule already installed.
PolyFun:: Fine-mapping with method=SUSIE
PolyFun:: Using priors from mode=precomputed
Unable to find conda binary. Is Anaconda installed?Locus RP11-240A16.1 complete in: 0.33 min
┌─────────────────────────────────────────┐
│                                         │
│   )))> 🦇 XYLT1 [locus 2 / 3] 🦇 <(((   │
│                                         │
└─────────────────────────────────────────┘

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

── 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.
Chromosome format: 1
Detecting column delimiter.
Identified column separator: \t
Sorting rows by coordinates via bash.
Searching for header row with grep.
( grep ^'SNP' .../QC_SNPs_COLMAP.txt; grep
    -v ^'SNP' .../QC_SNPs_COLMAP.txt | sort
    -k2,2n
    -k3,3n ) > .../file2fb33669f7f_sorted.tsv
Constructing outputs
Using existing bgzipped file: /home/rstudio/echolocatoR/echolocatoR_LID/QC_SNPs_COLMAP.txt.bgz 
Set force_new=TRUE to override this.
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: 16:17034975-17054975
Adding 'query' column to results.
Retrieved data with 80 rows
Saving query ==> /home/rstudio/echolocatoR/echolocatoR_LID/RESULTS/GWAS/LID_COX/XYLT1/XYLT1_LID_COX_subset.tsv.gz
+ Query: 80 SNPs x 10 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.
++ proportion_cases not included in data subset.
Preparing sample size column (N).
Using existing 'N' column.
+ 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: 80 SNPs x 12 columns.
++ Saving standardized query ==> /home/rstudio/echolocatoR/echolocatoR_LID/RESULTS/GWAS/LID_COX/XYLT1/XYLT1_LID_COX_subset.tsv.gz

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

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

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
LD_reference identified as: 1kg.
Previously computed LD_matrix detected. Importing: /home/rstudio/echolocatoR/echolocatoR_LID/RESULTS/GWAS/LID_COX/XYLT1/LD/XYLT1.1KGphase3_LD.RDS
LD_reference identified as: r.
Converting obj to sparseMatrix.
+ FILTER:: Filtering by LD features.

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

── Step 3 ▶▶▶ Filter SNPs 🚰 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
FILTER:: Filtering by SNP features.
+ FILTER:: Post-filtered data: 78 x 12
+ Subsetting LD matrix and dat to common SNPs...
Removing unnamed rows/cols
Replacing NAs with 0
+ LD_matrix = 78 SNPs.
+ dat = 78 SNPs.
+ 78 SNPs in common.
Converting obj to sparseMatrix.

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

── Step 4 ▶▶▶ Fine-map 🔊 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Gathering method sources.
Gathering method citations.
Preparing sample size column (N).
Using existing 'N' column.
Gathering method sources.
Gathering method citations.
Gathering method sources.
Gathering method citations.
ABF
🚫 Missing required column(s) for ABF [skipping]: MAF, proportion_cases
FINEMAP
✅ All required columns present.
⚠ Missing optional column(s) for FINEMAP: MAF
SUSIE
✅ All required columns present.
✅ All optional columns present.
POLYFUN_SUSIE
✅ All required columns present.
⚠ Missing optional column(s) for POLYFUN_SUSIE: MAF
++ Fine-mapping using 3 tool(s): FINEMAP, SUSIE, POLYFUN_SUSIE

+++ Multi-finemap:: FINEMAP +++
Preparing sample size column (N).
Using existing 'N' column.
+ Subsetting LD matrix and dat to common SNPs...
Removing unnamed rows/cols
Replacing NAs with 0
+ LD_matrix = 78 SNPs.
+ dat = 78 SNPs.
+ 78 SNPs in common.
Converting obj to sparseMatrix.
Constructing master file.
Optional MAF col missing. Replacing with all '.1's
Constructing data.z file.
Constructing data.ld file.
FINEMAP path: /home/rstudio/.cache/R/echofinemap/FINEMAP/finemap_v1.4.1_x86_64/finemap_v1.4.1_x86_64
Inferred FINEMAP version: 1.4.1
Running FINEMAP.
cd .../XYLT1 &&
    .../finemap_v1.4.1_x86_64

    --sss

    --in-files .../master

    --log

    --n-threads 20

    --n-causal-snps 5

|--------------------------------------|
| Welcome to FINEMAP v1.4.1            |
|                                      |
| (c) 2015-2022 University of Helsinki |
|                                      |
| Help :                               |
| - ./finemap --help                   |
| - www.finemap.me                     |
| - www.christianbenner.com            |
|                                      |
| Contact :                            |
| - finemap@christianbenner.com        |
| - matti.pirinen@helsinki.fi          |
|--------------------------------------|

--------
SETTINGS
--------
- dataset            : all
- corr-config        : 0.95
- n-causal-snps      : 5
- n-configs-top      : 50000
- n-conv-sss         : 100
- n-iter             : 100000
- n-threads          : 20
- 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!   

- Updated prior SD of effect sizes : 0.05 0.0522 0.0545 0.0568 

- Number of GWAS samples           : 2687
- Number of SNPs                   : 78
- Prior-Pr(# of causal SNPs is k)  : 
  (0 -> 0)
   1 -> 0.584
   2 -> 0.292
   3 -> 0.0961
   4 -> 0.0234
   5 -> 0.0045
- 1077 configurations evaluated (0.198/100%) : converged after 198 iterations
- Computing causal SNP statistics  : done!   
- Regional SNP heritability        : 0.0119 (SD: 0.00385 ; 95% CI: [0.00536,0.0204])
- Log10-BF of >= one causal SNP    : 4.46
- Post-expected # of causal SNPs   : 1.96
- Post-Pr(# of causal SNPs is k)   : 
  (0 -> 0)
   1 -> 0.245
   2 -> 0.548
   3 -> 0.204
   4 -> 0.00238
   5 -> 0
- Writing output                   : done!   
- Run time                         : 0 hours, 0 minutes, 0 seconds
3 data.cred* file(s) found in the same subfolder.
Selected file based on postPr_k: data.cred2
Importing conditional probabilities (.cred file).
No configurations were causal at PP>=0.95.
Importing marginal probabilities (.snp file).
Importing configuration probabilities (.config file).
FINEMAP was unable to identify any credible sets at PP>=0.95.
++ Credible Set SNPs identified = 0
++ Merging FINEMAP results with multi-finemap data.

+++ Multi-finemap:: SUSIE +++
Loading required namespace: Rfast
Failed with error:  'there is no package called 'Rfast''
In addition: Warning messages:
1: In SUSIE(dat = dat, dataset_type = dataset_type, LD_matrix = LD_matrix,  :
  Install Rfast to speed up susieR even further:
   install.packages('Rfast')
2: In susie_suff_stat(XtX = XtX, Xty = Xty, n = n, yty = (n - 1) *  :
  IBSS algorithm did not converge in 100 iterations!
                  Please check consistency between summary statistics and LD matrix.
                  See https://stephenslab.github.io/susieR/articles/susierss_diagnostic.html
Preparing sample size column (N).
Using existing 'N' column.
+ SUSIE:: sample_size=2,687
+ Subsetting LD matrix and dat to common SNPs...
Removing unnamed rows/cols
Replacing NAs with 0
+ LD_matrix = 78 SNPs.
+ dat = 78 SNPs.
+ 78 SNPs in common.
Converting obj to sparseMatrix.
+ SUSIE:: Using `susie_rss()` from susieR v0.12.27
+ SUSIE:: Extracting Credible Sets.
++ Credible Set SNPs identified = 1
++ Merging SUSIE results with multi-finemap data.

+++ Multi-finemap:: POLYFUN_SUSIE +++
PolyFun submodule already installed.
PolyFun:: Fine-mapping with method=SUSIE
PolyFun:: Using priors from mode=precomputed
Unable to find conda binary. Is Anaconda installed?Locus XYLT1 complete in: 0.32 min
┌────────────────────────────────────────┐
│                                        │
│   )))> 🦇 LRP8 [locus 3 / 3] 🦇 <(((   │
│                                        │
└────────────────────────────────────────┘

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

── 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.
Chromosome format: 1
Detecting column delimiter.
Identified column separator: \t
Sorting rows by coordinates via bash.
Searching for header row with grep.
( grep ^'SNP' .../QC_SNPs_COLMAP.txt; grep
    -v ^'SNP' .../QC_SNPs_COLMAP.txt | sort
    -k2,2n
    -k3,3n ) > .../file2fb4113b218_sorted.tsv
Constructing outputs
Using existing bgzipped file: /home/rstudio/echolocatoR/echolocatoR_LID/QC_SNPs_COLMAP.txt.bgz 
Set force_new=TRUE to override this.
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: 1:53768300-53788300
Adding 'query' column to results.
Retrieved data with 52 rows
Saving query ==> /home/rstudio/echolocatoR/echolocatoR_LID/RESULTS/GWAS/LID_COX/LRP8/LRP8_LID_COX_subset.tsv.gz
+ Query: 52 SNPs x 10 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.
++ proportion_cases not included in data subset.
Preparing sample size column (N).
Using existing 'N' column.
+ 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: 52 SNPs x 12 columns.
++ Saving standardized query ==> /home/rstudio/echolocatoR/echolocatoR_LID/RESULTS/GWAS/LID_COX/LRP8/LRP8_LID_COX_subset.tsv.gz

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

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

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
LD_reference identified as: 1kg.
Previously computed LD_matrix detected. Importing: /home/rstudio/echolocatoR/echolocatoR_LID/RESULTS/GWAS/LID_COX/LRP8/LD/LRP8.1KGphase3_LD.RDS
LD_reference identified as: r.
Converting obj to sparseMatrix.
+ FILTER:: Filtering by LD features.

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

── Step 3 ▶▶▶ Filter SNPs 🚰 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
FILTER:: Filtering by SNP features.
+ FILTER:: Post-filtered data: 51 x 12
+ Subsetting LD matrix and dat to common SNPs...
Removing unnamed rows/cols
Replacing NAs with 0
+ LD_matrix = 51 SNPs.
+ dat = 51 SNPs.
+ 51 SNPs in common.
Converting obj to sparseMatrix.

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

── Step 4 ▶▶▶ Fine-map 🔊 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Gathering method sources.
Gathering method citations.
Preparing sample size column (N).
Using existing 'N' column.
Gathering method sources.
Gathering method citations.
Gathering method sources.
Gathering method citations.
ABF
🚫 Missing required column(s) for ABF [skipping]: MAF, proportion_cases
FINEMAP
✅ All required columns present.
⚠ Missing optional column(s) for FINEMAP: MAF
SUSIE
✅ All required columns present.
✅ All optional columns present.
POLYFUN_SUSIE
✅ All required columns present.
⚠ Missing optional column(s) for POLYFUN_SUSIE: MAF
++ Fine-mapping using 3 tool(s): FINEMAP, SUSIE, POLYFUN_SUSIE

+++ Multi-finemap:: FINEMAP +++
Preparing sample size column (N).
Using existing 'N' column.
+ Subsetting LD matrix and dat to common SNPs...
Removing unnamed rows/cols
Replacing NAs with 0
+ LD_matrix = 51 SNPs.
+ dat = 51 SNPs.
+ 51 SNPs in common.
Converting obj to sparseMatrix.
Constructing master file.
Optional MAF col missing. Replacing with all '.1's
Constructing data.z file.
Constructing data.ld file.
FINEMAP path: /home/rstudio/.cache/R/echofinemap/FINEMAP/finemap_v1.4.1_x86_64/finemap_v1.4.1_x86_64
Inferred FINEMAP version: 1.4.1
Running FINEMAP.
cd .../LRP8 &&
    .../finemap_v1.4.1_x86_64

    --sss

    --in-files .../master

    --log

    --n-threads 20

    --n-causal-snps 5

|--------------------------------------|
| Welcome to FINEMAP v1.4.1            |
|                                      |
| (c) 2015-2022 University of Helsinki |
|                                      |
| Help :                               |
| - ./finemap --help                   |
| - www.finemap.me                     |
| - www.christianbenner.com            |
|                                      |
| Contact :                            |
| - finemap@christianbenner.com        |
| - matti.pirinen@helsinki.fi          |
|--------------------------------------|

--------
SETTINGS
--------
- dataset            : all
- corr-config        : 0.95
- n-causal-snps      : 5
- n-configs-top      : 50000
- n-conv-sss         : 100
- n-iter             : 100000
- n-threads          : 20
- 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!   

- Updated prior SD of effect sizes : 0.05 0.0517 0.0535 0.0554 

- Number of GWAS samples           : 2687
- Number of SNPs                   : 51
- Prior-Pr(# of causal SNPs is k)  : 
  (0 -> 0)
   1 -> 0.585
   2 -> 0.292
   3 -> 0.0955
   4 -> 0.0229
   5 -> 0.00431
- 1081 configurations evaluated (0.123/100%) : converged after 123 iterations
- Computing causal SNP statistics  : done!   
- Regional SNP heritability        : 0.0259 (SD: 0.00368 ; 95% CI: [0.0188,0.0334])
- Log10-BF of >= one causal SNP    : 24.9
- Post-expected # of causal SNPs   : 5
- Post-Pr(# of causal SNPs is k)   : 
  (0 -> 0)
   1 -> 5.84e-22
   2 -> 1.71e-17
   3 -> 1.74e-11
   4 -> 4.56e-06
   5 -> 1
- Writing output                   : done!   
- Run time                         : 0 hours, 0 minutes, 0 seconds
1 data.cred* file(s) found in the same subfolder.
Selected file based on postPr_k: data.cred5
Importing conditional probabilities (.cred file).
No configurations were causal at PP>=0.95.
Importing marginal probabilities (.snp file).
Importing configuration probabilities (.config file).
FINEMAP was unable to identify any credible sets at PP>=0.95.
++ Credible Set SNPs identified = 0
++ Merging FINEMAP results with multi-finemap data.

+++ Multi-finemap:: SUSIE +++
Loading required namespace: Rfast
Failed with error:  'there is no package called 'Rfast''
In addition: Warning message:
In SUSIE(dat = dat, dataset_type = dataset_type, LD_matrix = LD_matrix,  :
  Install Rfast to speed up susieR even further:
   install.packages('Rfast')
Preparing sample size column (N).
Using existing 'N' column.
+ SUSIE:: sample_size=2,687
+ Subsetting LD matrix and dat to common SNPs...
Removing unnamed rows/cols
Replacing NAs with 0
+ LD_matrix = 51 SNPs.
+ dat = 51 SNPs.
+ 51 SNPs in common.
Converting obj to sparseMatrix.
+ SUSIE:: Using `susie_rss()` from susieR v0.12.27
+ SUSIE:: Extracting Credible Sets.
++ Credible Set SNPs identified = 3
++ Merging SUSIE results with multi-finemap data.

+++ Multi-finemap:: POLYFUN_SUSIE +++
PolyFun submodule already installed.
PolyFun:: Fine-mapping with method=SUSIE
PolyFun:: Using priors from mode=precomputed
Unable to find conda binary. Is Anaconda installed?Locus LRP8 complete in: 0.33 min

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

── Step 6 ▶▶▶ Postprocess data 🎁 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Returning results as nested list.
All loci done in: 0.97 min
$`RP11-240A16.1`
NULL

$XYLT1
NULL

$LRP8
NULL

$merged_dat
Null data.table (0 rows and 0 cols)

Warning message:
In SUSIE(dat = dat, dataset_type = dataset_type, LD_matrix = LD_matrix,  :
  Install Rfast to speed up susieR even further:
   install.packages('Rfast')

Session Info

``` > sessionInfo() R version 4.2.0 (2022-04-22) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.4 LTS Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3 locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats4 stats graphics grDevices utils datasets methods base other attached packages: [1] SNPlocs.Hsapiens.dbSNP155.GRCh37_0.99.22 SNPlocs.Hsapiens.dbSNP144.GRCh37_0.99.20 BSgenome_1.65.2 [4] rtracklayer_1.57.0 Biostrings_2.65.3 XVector_0.37.1 [7] GenomicRanges_1.49.1 GenomeInfoDb_1.33.5 IRanges_2.31.2 [10] S4Vectors_0.35.3 BiocGenerics_0.43.1 forcats_0.5.2 [13] stringr_1.4.1 dplyr_1.0.10 purrr_0.3.4 [16] readr_2.1.2 tidyr_1.2.0 tibble_3.1.8 [19] ggplot2_3.3.6 tidyverse_1.3.2 data.table_1.14.2 [22] echolocatoR_2.0.1 loaded via a namespace (and not attached): [1] utf8_1.2.2 reticulate_1.26 R.utils_2.12.0 tidyselect_1.1.2 RSQLite_2.2.16 [6] AnnotationDbi_1.59.1 htmlwidgets_1.5.4 grid_4.2.0 BiocParallel_1.31.12 XGR_1.1.8 [11] munsell_0.5.0 codetools_0.2-18 interp_1.1-3 DT_0.24 withr_2.5.0 [16] colorspace_2.0-3 OrganismDbi_1.39.1 Biobase_2.57.1 filelock_1.0.2 knitr_1.40 [21] supraHex_1.35.0 rstudioapi_0.14 DescTools_0.99.46 MatrixGenerics_1.9.1 GenomeInfoDbData_1.2.8 [26] mixsqp_0.3-43 bit64_4.0.5 echoconda_0.99.7 basilisk_1.9.2 vctrs_0.4.1 [31] generics_0.1.3 xfun_0.32 biovizBase_1.45.0 BiocFileCache_2.5.0 R6_2.5.1 [36] AnnotationFilter_1.21.0 bitops_1.0-7 cachem_1.0.6 reshape_0.8.9 DelayedArray_0.23.1 [41] assertthat_0.2.1 BiocIO_1.7.1 scales_1.2.1 googlesheets4_1.0.1 nnet_7.3-17 [46] rootSolve_1.8.2.3 gtable_0.3.1 lmom_2.9 ggbio_1.45.0 ensembldb_2.21.4 [51] rlang_1.0.5 MungeSumstats_1.5.13 echodata_0.99.14 splines_4.2.0 lazyeval_0.2.2 [56] gargle_1.2.0 dichromat_2.0-0.1 hexbin_1.28.2 broom_1.0.1 checkmate_2.1.0 [61] modelr_0.1.9 BiocManager_1.30.18 yaml_2.3.5 reshape2_1.4.4 snpStats_1.47.1 [66] backports_1.4.1 GenomicFeatures_1.49.6 ggnetwork_0.5.10 Hmisc_4.7-1 RBGL_1.73.0 [71] tools_4.2.0 echoplot_0.99.5 ellipsis_0.3.2 catalogueR_1.0.0 RColorBrewer_1.1-3 [76] proxy_0.4-27 coloc_5.1.0 Rcpp_1.0.9 plyr_1.8.7 base64enc_0.1-3 [81] progress_1.2.2 zlibbioc_1.43.0 RCurl_1.98-1.8 basilisk.utils_1.9.2 prettyunits_1.1.1 [86] rpart_4.1.16 deldir_1.0-6 viridis_0.6.2 haven_2.5.1 cluster_2.1.3 [91] SummarizedExperiment_1.27.2 ggrepel_0.9.1 fs_1.5.2 crul_1.2.0 magrittr_2.0.3 [96] echotabix_0.99.8 dnet_1.1.7 openxlsx_4.2.5 reprex_2.0.2 googledrive_2.0.0 [101] mvtnorm_1.1-3 ProtGenerics_1.29.0 matrixStats_0.62.0 hms_1.1.2 patchwork_1.1.2 [106] XML_3.99-0.10 jpeg_0.1-9 readxl_1.4.1 gridExtra_2.3 compiler_4.2.0 [111] biomaRt_2.53.2 crayon_1.5.1 R.oo_1.25.0 htmltools_0.5.3 echoannot_0.99.7 [116] tzdb_0.3.0 Formula_1.2-4 expm_0.999-6 Exact_3.1 lubridate_1.8.0 [121] DBI_1.1.3 dbplyr_2.2.1 MASS_7.3-58.1 rappdirs_0.3.3 boot_1.3-28 [126] Matrix_1.4-1 piggyback_0.1.3 cli_3.3.0 R.methodsS3_1.8.2 echofinemap_0.99.3 [131] parallel_4.2.0 igraph_1.3.4 pkgconfig_2.0.3 GenomicAlignments_1.33.1 dir.expiry_1.5.0 [136] RCircos_1.2.2 foreign_0.8-82 osfr_0.2.8 xml2_1.3.3 rvest_1.0.3 [141] echoLD_0.99.7 VariantAnnotation_1.43.3 digest_0.6.29 graph_1.75.0 httpcode_0.3.0 [146] cellranger_1.1.0 htmlTable_2.4.1 gld_2.6.5 restfulr_0.0.15 curl_4.3.2 [151] Rsamtools_2.13.4 rjson_0.2.21 lifecycle_1.0.1 nlme_3.1-159 jsonlite_1.8.0 [156] viridisLite_0.4.1 fansi_1.0.3 downloadR_0.99.4 pillar_1.8.1 susieR_0.12.27 [161] lattice_0.20-45 GGally_2.1.2 googleAuthR_2.0.0 KEGGREST_1.37.3 fastmap_1.1.0 [166] httr_1.4.4 survival_3.3-1 glue_1.6.2 zip_2.2.0 png_0.1-7 [171] bit_4.0.4 Rgraphviz_2.41.1 class_7.3-20 stringi_1.7.8 blob_1.2.3 [176] latticeExtra_0.6-30 memoise_2.0.1 irlba_2.3.5 e1071_1.7-11 ape_5.6-2 ```
bschilder commented 2 years ago

This step is being handled by echodata:::standardize_maf: https://github.com/RajLabMSSM/echodata/blob/main/R/standardize_maf.R

I think it's failing to impute MAF because of some flaw in the logic. I've tried adjusting this so that it will trigger imputing MAF from your 'FREQ' col. After reinstalling, let me know if this works for you. devtools::install_github("RajLabMSSM/echolocatoR", dependencies = TRUE)

bschilder commented 2 years ago

Any luck with this @AMCalejandro ?

AMCalejandro commented 2 years ago

Hi,

I just rerun this using the same script I used when I opened this error.

It is falling for me on a a step in the query

1. Input data

GWAS header This is what i am passing to finemap_loci as newSS_name_colmap

> head(data_colmaps)
           SNP CHR    POS A1 A2   FREQ    BETA     SE      P    N
1:  rs58276399   1 731718  t  c 0.8837 -0.1775 0.1583 0.2621 1297
2: rs142557973   1 731718  t  c 0.8837 -0.1775 0.1583 0.2621 1297
3: rs141242758   1 734349  t  c 0.8843 -0.1577 0.1593 0.3223 1297
4:   rs2073813   1 753541  a  g 0.1257  0.0721 0.1177 0.5399 2687
5:  rs61768174   1 766007  a  c 0.9005 -0.2559 0.1642 0.1190 1297
6:  rs60320384   1 769223  c  g 0.8749 -0.0772 0.1178 0.5124 2687

columnsnames This is what I get after running construct_colmap

> columnsnames
$munged
[1] FALSE

$CHR
[1] "CHR"

$POS
[1] "POS"

$SNP
[1] "SNP"

$P
[1] "P"

$Effect
[1] "BETA"

$StdErr
[1] "SE"

$tstat
[1] "tstat"

$Locus
[1] "Locus"

$Freq
[1] "FREQ"

$MAF
[1] "calculate"

$A1
[1] "A1"

$A2
[1] "A2"

$Gene
[1] "Gene"

$N_cases
[1] "N_cases"

$N_controls
[1] "N_controls"

$proportion_cases
[1] "calculate"

$N
[1] "N"

$verbose
[1] TRUE

topSNPs

> topSNPs
# A tibble: 3 × 7
  Locus         Gene            CHR      POS SNP                     P  BETA
  <chr>         <chr>         <int>    <dbl> <chr>               <dbl> <dbl>
1 RP11-240A16.1 RP11-240A16.1     4 32435284 rs189093213 0.00000000167  1.12
2 XYLT1         XYLT1            16 17044975 rs180924818 0.00000000626 -1.14
3 LRP8          LRP8              1 53778300 rs72673189  0.0000000153   1.02

2. Function call

finemap_loci(# GENERAL ARGUMENTS 
                                          topSNPs = topSNPs,
                                          results_dir = fullRS_path,
                                          loci = topSNPs$Locus,
                                          dataset_name = "LID_COX",
                                          dataset_type = "GWAS",  
                                          force_new_subset = TRUE,
                                          force_new_LD = FALSE,
                                          force_new_finemap = TRUE,
                                          remove_tmps = FALSE,

                                          finemap_methods = c("ABF","FINEMAP","SUSIE"),

                                          # Munge full sumstats first
                                          munged = FALSE,
                                          colmap = columnsnames,
                                          # SUMMARY STATS ARGUMENTS
                                          fullSS_path = newSS_name_colmap,
                                          fullSS_genome_build = "hg19",
                                          query_by ="tabix",

                                          compute_n = 3500,

                                          bp_distance = 10000,#500000*2,
                                          min_MAF = 0.001, 
                                          trim_gene_limits = FALSE,

                                          case_control = FALSE,

                                          # FINE-MAPPING ARGUMENTS
                                          ## General
                                          n_causal = 5,
                                          credset_thresh = .95,
                                          consensus_thresh = 2,

                                          # LD ARGUMENTS 
                                          LD_reference = "1KGphase3",#"UKB",
                                          superpopulation = "EUR",
                                          download_method = "axel",
                                          LD_genome_build = "hg19",
                                          leadSNP_LD_block = FALSE,

                                          #### PLotting args ####
                                          plot_types = c("simple"),
                                          show_plot = TRUE,
                                          zoom = "1x",
                                          tx_biotypes = NULL,
                                          nott_epigenome = FALSE,
                                          nott_show_placseq = FALSE,
                                          nott_binwidth = 200,
                                          nott_bigwig_dir = NULL,
                                          xgr_libnames = NULL,
                                          roadmap = FALSE,
                                          roadmap_query = NULL,

                                          #### General args ####
                                          seed = 2022,
                                          nThread = 20,
                                          verbose = TRUE
                                          )

3. Output

] "+ Assigning Gene and Locus independently."
Standardising column headers.
First line of summary statistics file: 
Locus   Gene    CHR POS SNP P   BETA    
Returning unmapped column names without making them uppercase.
+ Mapping colnames from MungeSumstats ==> echolocatoR
┌─────────────────────────────────────────────────┐
│                                                 │
│   )))> 🦇 RP11-240A16.1 [locus 1 / 3] 🦇 <(((   │
│                                                 │
└─────────────────────────────────────────────────┘

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

── 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.
Chromosome format: 1
Detecting column delimiter.
Identified column separator: \t
Sorting rows by coordinates via bash.
Searching for header row with grep.
( grep ^'SNP' .../QC_SNPs_COLMAP.txt; grep
    -v ^'SNP' .../QC_SNPs_COLMAP.txt | sort
    -k2,2n
    -k3,3n ) > .../file11e24b7d23ea38_sorted.tsv
Constructing outputs
Using existing bgzipped file: /home/rstudio/echolocatoR/echolocatoR_LID/QC_SNPs_COLMAP.txt.bgz 
Set force_new=TRUE to override this.
start_col not found in file.Locus RP11-240A16.1 complete in: 0.24 min
┌─────────────────────────────────────────┐
│                                         │
│   )))> 🦇 XYLT1 [locus 2 / 3] 🦇 <(((   │
│                                         │
└─────────────────────────────────────────┘

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

── 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.
Chromosome format: 1
Detecting column delimiter.
Identified column separator: \t
Sorting rows by coordinates via bash.
Searching for header row with grep.
( grep ^'SNP' .../QC_SNPs_COLMAP.txt; grep
    -v ^'SNP' .../QC_SNPs_COLMAP.txt | sort
    -k2,2n
    -k3,3n ) > .../file11e24b5d9196c9_sorted.tsv
Constructing outputs
Using existing bgzipped file: /home/rstudio/echolocatoR/echolocatoR_LID/QC_SNPs_COLMAP.txt.bgz 
Set force_new=TRUE to override this.
start_col not found in file.Locus XYLT1 complete in: 0.24 min
┌────────────────────────────────────────┐
│                                        │
│   )))> 🦇 LRP8 [locus 3 / 3] 🦇 <(((   │
│                                        │
└────────────────────────────────────────┘

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

── 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.
Chromosome format: 1
Detecting column delimiter.
Identified column separator: \t
Sorting rows by coordinates via bash.
Searching for header row with grep.
( grep ^'SNP' .../QC_SNPs_COLMAP.txt; grep
    -v ^'SNP' .../QC_SNPs_COLMAP.txt | sort
    -k2,2n
    -k3,3n ) > .../file11e24b6cdbde69_sorted.tsv
Constructing outputs
Using existing bgzipped file: /home/rstudio/echolocatoR/echolocatoR_LID/QC_SNPs_COLMAP.txt.bgz 
Set force_new=TRUE to override this.
start_col not found in file.Locus LRP8 complete in: 0.24 min

4. Session info

``` > sessionInfo() R version 4.2.0 (2022-04-22) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.5 LTS Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3 locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 [4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C [10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats4 stats graphics grDevices utils datasets methods base other attached packages: [1] SNPlocs.Hsapiens.dbSNP155.GRCh37_0.99.22 SNPlocs.Hsapiens.dbSNP144.GRCh37_0.99.20 [3] BSgenome_1.66.1 rtracklayer_1.58.0 [5] Biostrings_2.66.0 XVector_0.38.0 [7] GenomicRanges_1.50.1 GenomeInfoDb_1.34.3 [9] IRanges_2.32.0 S4Vectors_0.36.0 [11] BiocGenerics_0.44.0 forcats_0.5.2 [13] stringr_1.4.1 dplyr_1.0.10 [15] purrr_0.3.4 readr_2.1.2 [17] tidyr_1.2.0 tibble_3.1.8 [19] ggplot2_3.3.6 tidyverse_1.3.2 [21] data.table_1.14.2 echolocatoR_2.0.3 [23] echodata_0.99.16 loaded via a namespace (and not attached): [1] rappdirs_0.3.3 GGally_2.1.2 R.methodsS3_1.8.2 [4] echoLD_0.99.8 bit64_4.0.5 knitr_1.40 [7] irlba_2.3.5 DelayedArray_0.24.0 R.utils_2.12.0 [10] rpart_4.1.16 KEGGREST_1.38.0 RCurl_1.98-1.8 [13] AnnotationFilter_1.22.0 generics_0.1.3 GenomicFeatures_1.50.2 [16] RSQLite_2.2.16 proxy_0.4-27 bit_4.0.4 [19] tzdb_0.3.0 xml2_1.3.3 lubridate_1.8.0 [22] SummarizedExperiment_1.28.0 assertthat_0.2.1 viridis_0.6.2 [25] gargle_1.2.0 xfun_0.32 hms_1.1.2 [28] evaluate_0.16 fansi_1.0.3 restfulr_0.0.15 [31] progress_1.2.2 dbplyr_2.2.1 readxl_1.4.1 [34] Rgraphviz_2.41.1 igraph_1.3.4 DBI_1.1.3 [37] htmlwidgets_1.5.4 reshape_0.8.9 downloadR_0.99.5 [40] googledrive_2.0.0 ellipsis_0.3.2 ggnewscale_0.4.7 [43] backports_1.4.1 biomaRt_2.54.0 deldir_1.0-6 [46] MatrixGenerics_1.10.0 MungeSumstats_1.7.1 vctrs_0.4.1 [49] Biobase_2.58.0 remotes_2.4.2 ensembldb_2.22.0 [52] withr_2.5.0 cachem_1.0.6 checkmate_2.1.0 [55] GenomicAlignments_1.34.0 prettyunits_1.1.1 cluster_2.1.3 [58] ape_5.6-2 dir.expiry_1.6.0 lazyeval_0.2.2 [61] crayon_1.5.1 basilisk.utils_1.10.0 crul_1.2.0 [64] pkgconfig_2.0.3 nlme_3.1-159 ProtGenerics_1.30.0 [67] XGR_1.1.8 nnet_7.3-17 pals_1.7 [70] rlang_1.0.5 lifecycle_1.0.1 filelock_1.0.2 [73] httpcode_0.3.0 BiocFileCache_2.6.0 modelr_0.1.9 [76] echotabix_0.99.8 dichromat_2.0-0.1 cellranger_1.1.0 [79] coloc_5.1.0 matrixStats_0.62.0 graph_1.76.0 [82] Matrix_1.4-1 osfr_0.2.8 boot_1.3-28 [85] reprex_2.0.2 base64enc_0.1-3 googlesheets4_1.0.1 [88] png_0.1-7 viridisLite_0.4.1 rjson_0.2.21 [91] rootSolve_1.8.2.3 bitops_1.0-7 R.oo_1.25.0 [94] ggnetwork_0.5.10 blob_1.2.3 mixsqp_0.3-43 [97] echoplot_0.99.6 dnet_1.1.7 jpeg_0.1-9 [100] scales_1.2.1 memoise_2.0.1 magrittr_2.0.3 [103] plyr_1.8.7 hexbin_1.28.2 zlibbioc_1.44.0 [106] compiler_4.2.0 echoconda_0.99.8 BiocIO_1.8.0 [109] RColorBrewer_1.1-3 catalogueR_1.0.0 Rsamtools_2.14.0 [112] cli_3.3.0 echoannot_0.99.10 patchwork_1.1.2 [115] htmlTable_2.4.1 Formula_1.2-4 MASS_7.3-58.1 [118] tidyselect_1.1.2 stringi_1.7.8 yaml_2.3.5 [121] supraHex_1.35.0 latticeExtra_0.6-30 ggrepel_0.9.1 [124] grid_4.2.0 VariantAnnotation_1.44.0 tools_4.2.0 [127] lmom_2.9 parallel_4.2.0 rstudioapi_0.14 [130] foreign_0.8-82 piggyback_0.1.3 gridExtra_2.3 [133] gld_2.6.5 digest_0.6.29 snpStats_1.48.0 [136] BiocManager_1.30.18 Rcpp_1.0.9 broom_1.0.1 [139] OrganismDbi_1.40.0 httr_1.4.4 AnnotationDbi_1.60.0 [142] RCircos_1.2.2 ggbio_1.46.0 biovizBase_1.46.0 [145] colorspace_2.0-3 rvest_1.0.3 XML_3.99-0.10 [148] fs_1.5.2 reticulate_1.26 splines_4.2.0 [151] RBGL_1.74.0 expm_0.999-6 echofinemap_0.99.4 [154] basilisk_1.9.12 Exact_3.1 mapproj_1.2.8 [157] jsonlite_1.8.0 susieR_0.12.28 R6_2.5.1 [160] Hmisc_4.7-1 pillar_1.8.1 htmltools_0.5.3 [163] glue_1.6.2 fastmap_1.1.0 DT_0.24 [166] BiocParallel_1.32.1 class_7.3-20 codetools_0.2-18 [169] maps_3.4.0 mvtnorm_1.1-3 utf8_1.2.2 [172] lattice_0.20-45 curl_4.3.2 DescTools_0.99.46 [175] zip_2.2.0 openxlsx_4.2.5 interp_1.1-3 [178] survival_3.3-1 rmarkdown_2.16 googleAuthR_2.0.0 [181] munsell_0.5.0 e1071_1.7-11 GenomeInfoDbData_1.2.9 [184] haven_2.5.1 reshape2_1.4.4 gtable_0.3.1 ```