Skip to content

Added support for arbitrary Bioc SNPlocs tarballs (dbS > 156)#205

Merged
Al-Murphy merged 2 commits intoAl-Murphy:masterfrom
sufyansuleman:add-dbsnp-tarball-support
Jun 23, 2025
Merged

Added support for arbitrary Bioc SNPlocs tarballs (dbS > 156)#205
Al-Murphy merged 2 commits intoAl-Murphy:masterfrom
sufyansuleman:add-dbsnp-tarball-support

Conversation

@sufyansuleman
Copy link
Copy Markdown

This pull request introduces a new dbSNP_tarball argument across several core functions—most notably in R/load_snp_loc_data.R, R/validate_parameters.R, and R/format_sumstats.R—to allow users to supply an arbitrary Bioc SNPlocs tarball (e.g. for builds ≥156) instead of being limited to the hard-coded 144/155 packages. When dbSNP_tarball is provided, load_snp_loc_data() automatically untars the archive, detects either a flat TSV or per-chromosome .rds files, and ingests them via data.table::fread() or readRDS() + rbindlist(). We verified that, after installing SNPlocs.Hsapiens.dbSNP156.GRCh37/GRCh38, calling format_sumstats(..., dbSNP = 156) works seamlessly without supplying a tarball, and that supplying both dbSNP = 156 and dbSNP_tarball = "" also correctly loads the same data from file. For older or unreleased builds (e.g. 157+), users can simply point to a downloaded tarball—even in the absence of an installed Bioc package—and the code will fall back to reading that archive. In testing on a toy summary-stats file, all downstream allele-flipping and RSID-imputation checks in R/check_no_rs_snp.R and R/check_no_snp.R completed successfully with build 156 both with and without the tarball. This enhancement preserves the original fallback behavior for 144/155, adds full flexibility for any future dbSNP release, and ensures backward compatibility.

@Al-Murphy Al-Murphy merged commit 0907dd0 into Al-Murphy:master Jun 23, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants