A very small but important fix was editing this line in the .Rbuildignore. The syntax was wrong and was ignoring the rm_tbi.R file (not just .tbi files, which i do want to ignore). Therefore echotabix was blind to the rm_tbi function.
.*.tbi --> .*\.tbi$
Reprex
query_dat <- echodata::BST1[seq(1, 50), ]
locus_dir <- file.path(tempdir(), echodata::locus_dir)
LD_list <- echoLD::get_LD(
locus_dir = locus_dir,
query_dat = query_dat,
LD_reference = "1KGphase1")
Here is what I got:
LD_reference identified as: 1kg.
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 = 1KGphase1
Querying 1KG remote server.
========= echotabix::query =========
query_dat is already a GRanges object. Returning directly.
Explicit format: 'vcf'
Querying VCF tabix file.
Importing existing VCF file: /tmp/RtmpdpQfkr/VCF/RtmpdpQfkr.chr4-14884541-16649679.ALL.chr4.phase1_release_v3.20101123.snps_indels_svs.genotypes.vcf.bgz
Solution
A very small but important fix was editing this line in the .Rbuildignore. The syntax was wrong and was ignoring the rm_tbi.R file (not just .tbi files, which i do want to ignore). Therefore echotabix was blind to the rm_tbi function.
.*.tbi
-->.*\.tbi$
Reprex
Session info