Read-in GWAS files and LD structures, and assign the first-read-in GWAS file as the reference panel. The following GWAS files and ld structures need to be adjusted based on EA and NEA of the first GWAS file.

read_gwasld(gwas.loc, ld.loc, which.ld, cohort_name, ld_name, out_loc = NULL)

Arguments

gwas.loc

A file contains a vector of length K_g. Each component of the vector refers to the location of GWAS file.

ld.loc

A file contains a vector of length K_ld. Each component of the vector refers to the location of LD strucrue file.

which.ld

A character vector of length K_g. Each component of the vector corresponds to one LD structure. The length of which.ld should equal to the number of gwas files.

cohort_name

A character vector of length K_g. Each component of the vector corresponds to one GWAS file.

ld_name

A character vector of length K_ld. Each component of the vector corresponds to one LD structure.

out_loc

Path to save pre-processed GWAS files and LD structures. By default, out_loc=NULL.

Value

The output is a list with two main components. One component contains the pre-processed GWAS file list, and another component contains the pre-processed LD structures.

Author

Siru Wang