umxGSEM_dl_tutorial_files: Download tutorial-scale Genomic SEM files

View source: R/umxGSEM.R

umxGSEM_dl_tutorial_filesR Documentation

Download tutorial-scale Genomic SEM files

Description

Fetches the IBG / GenomicSEM practical pack (~45 MB): 1k-SNP SCZ/BIP/MDD sumstats, a tiny 1000G MAF table, HapMap3 w_hm3.snplist, and EUR LD scores (⁠eur_w_ld_chr/⁠). That is enough to run umxGSEM_munge() and see ldsc on a toy SNP list. It is not a production data installer.

Files land in tools::R_user_dir("umx", "data")/GSEM_tutorial unless path is set. 1k-SNP tables and LD scores come from the umx GitHub Release tag gsem-tutorial (not from the CRAN tarball). Existing files are left alone unless overwrite = TRUE.

ldsc on these SNPs is pedagogical. About 1k variants will not recover sensible heritabilities. For a real structural model use Psych_LDSC / Anthro_LDSC (or a covstruc from full-sumstat ldsc).

Production files (do not use this helper):

  • Full GWAS sumstats from the relevant consortium (not "top hits").

  • HapMap3 list: ⁠https://zenodo.org/records/7773502/files/w_hm3.snplist.gz⁠ (gunzip to w_hm3.snplist; header must include SNP).

  • Local ldsc only: Alkes EUR LD scores ⁠https://alkesgroup.broadinstitute.org/LDSCORE/eur_w_ld_chr.tar.bz2⁠ (~500 MB -> ~1.2 GB) and weights_hm3_noMHC.tgz (~150 MB). Ancestry must match the GWAS. Skip if you already have a covstruc.

  • 1000G EUR plink (~10-20 GB) only if sumstats lack allele frequency and you need an FRQ filter in munge. GenomicSEM's 1000G MAF table is the usual GSEM path, not bim/bed/bam.

Usage

umxGSEM_dl_tutorial_files(path = NULL, overwrite = FALSE, url = "default")

Arguments

path

Directory to write into. Default: file.path(tools::R_user_dir("umx", "data"), "GSEM_tutorial").

overwrite

If TRUE, re-download the Release tarball even when files already exist. Default FALSE.

url

Tarball URL, or a path to a local .tar.gz. Default is the gsem-tutorial Release asset on tbates/umx.

Value

A named list of absolute paths: dir, hm3, ld, sumstats (character vector of three subset files), ref.

See Also

umxGSEM_munge(), umxGSEM(), umxGSEM_GWAS(), Psych_LDSC

Other GSEM: Anthro_LDSC, Psych_LDSC, plot.umx_GWAS(), umxGSEM(), umxGSEM_GWAS(), umxGSEM_label_ldsc(), umxGSEM_ldsc(), umxGSEM_munge(), umxGSEM_std(), umxGSEM_sumstats(), umxSummary.MxDataStatic(), umxSummary.list()

Examples

## Not run: 
tut = umxGSEM_dl_tutorial_files()
umxGSEM_munge(tut$sumstats, hm3 = tut$hm3, trait.names = c("SCZ", "BIP", "MDD"),
	Ns = c(105318, 16731, 173005), output_dir = tut$dir)
data(Psych_LDSC)
m1 = umxGSEM("g ~= SCZ + BIP + MDD", covstruc = Psych_LDSC)

## End(Not run)

umx documentation built on Oct. 11, 2026, 5:07 p.m.