s_ldsc: Estimate genetic covariance matrices within functional...

View source: R/s_ldsc.R

s_ldscR Documentation

Estimate genetic covariance matrices within functional annotations using multivariable Stratified LD score regression

Description

Function to run Stratified LD score regression.

Usage

s_ldsc(traits,sample.prev=NULL,population.prev=NULL,ld,wld,frq,trait.names=NULL,n.blocks=200,ldsc.log=NULL,exclude_cont=TRUE, ...)

Arguments

traits

A vector of file names which point to LDSC munged files for trait you want to include.

sample.prev

A vector of sample prevalences for dichotomous traits and NA for continous traits. Default = NULL.

population.prev

A vector of population prevalences for dichotomous traits and NA for continous traits. Default = NULL.

ld

A folder (or folders) of partitioned LD scores used as the independent variable in S-LDSC.

wld

A folder of non-partitioned LD scores used as regression weights.

frq

A folder of allele frequency files.

trait.names

A character vector specifying how the traits should be named. These variable names can subsequently be used in later steps for model specification.

n.blocks

Number of blocks to use for the jacknive procedure which is used to estiamte entries in V, higher values will be optimal if you have a large number of variables and also slower, defaults to 200.

ldsc.log

What to name the .log file if you want to overrride default to name file based on file names used as input.

exclude_cont

Whether to exclude continuous annotations from S-LDSC estimation.

Value

The function returns a list with 9 named entries

S

The zero-order genetic covariance matrices for each annotation.

V

The zero-order sampling covariance matrices for each annotation.

S_Tau

The tau matrices for each annotation.

V_Tau

The tau sampling covariance matrices for each annotation.

I

matrix containing the "cross trait intercepts", or the error covariance between traits induced by overlap, in terms of subjects, between the GWASes on which the analyses are based

N

a vector contsaining the sample size (for the genetic variances) and the geometric mean of sample sizes (i.e. sqrt(N1,N2)) between two samples for the covariances

m

number of SNPs used to compute the LD scores with.

Prop

The proportional size of each annotation relative to the annotation containing all SNPs.

Select

A data.frame that codes flanking window and continuous annotations as 2 and all other annotations as 1. This is used by the 'enrich' function to exclude the flanking window and continuous annotations from enrichment estimates.


MichelNivard/GenomicSEM documentation built on Dec. 19, 2024, 8:01 a.m.