get_betas_from_neale: Load and prune SNP effect sizes from Neale lab files

View source: R/get_betas_from_neale.R

get_betas_from_nealeR Documentation

Load and prune SNP effect sizes from Neale lab files

Description

Load and prune SNP effect sizes from Neale lab files

Arguments

neale_filename

path to the GWAS summary statistics file

variants_filename

path to the variants information file

threshold

p-value threshold to filter SNPs. Default is 5*10^-8

prune_distance

distance (in base pairs) to determine independence of SNPs. Default is 5*10^5 (500 kb)

Value

Returns a data.frame containing the RSIDs and beta effect estimates of the pruned SNPs, with column names 'rsid' and 'beta'

Examples

  library( GxE )
  download.file( paste0( 'https://www.dropbox.com/s/gulqmkaighh8w3b/',
                         '21001_irnt.gwas.imputed_v3.both_sexes.tsv.bgz?raw=1' ),
                 '21001_irnt.gwas.imputed_v3.both_sexes.tsv.gz',
                 method = 'libcurl' )
  download.file( paste0( 'https://www.dropbox.com/s/puxks683vb0omeg/',
                         'variants.tsv.bgz?raw=1' ),
                 'variants.tsv.gz',
                 method = 'libcurl' )
  snps = get_betas_from_neale( neale_filename = '21001_irnt.gwas.imputed_v3.both_sexes.tsv.gz',
                               variants_filename = 'variants.tsv.gz' )


JonSulc/GxE documentation built on March 29, 2022, 3:27 a.m.