XPASS: Main function for XPASS

View source: R/XPASS.R

XPASSR Documentation

Main function for XPASS

Description

XPASS: a unified framework for cross-population trait prediction with GWAS summary statistics. This function provides both XPASS and XPASS+ implementation

Usage

XPASS(file_z1, file_z2, file_ref1, file_ref2 = NULL, file_cov1 = NULL,
  file_cov2 = NULL, file_predGeno = NULL, K1 = NULL, K2 = NULL,
  K12 = NULL, X1 = NULL, X2 = NULL, snps_fe1 = NULL,
  snps_fe2 = NULL, snp_list = NULL, sd_method = "Chromosome",
  pop = "EUR", compPosMean = T, use_CG = T, compPRS = F,
  file_out = "")

Arguments

file_z1

Z-score file for population one. Five columns are required with column names SNP, N, Z, A1, A2. A1 is the effect allele.

file_z2

Z-score file for population two. Same format with file_z1. Note that file_z1 and file_z2 are exchangeable, both can be target or auxiliary dataset.

file_ref1

Prefix of file name/path of reference genotypes corresponding to file_z1 in bed format. Exclude the .bim/.bed/.fam. extensions in the path name.

file_ref2

Prefix of file name/path of reference genotypes corresponding to file_z2 in bed format.

file_cov1

Covariates file associated with the reference genotypes file_ref1. The covariates files should not include row names and column names. The rows should be exactly corresponding to the individuals in the .fam file of reference genotypes. Each column corresponds to one covariate. A column of one should not be included in the file.

file_cov2

Covariates file associated with the reference genotypes file_ref2. Same format with file_cov2.

file_predGeno

File name/path of the genotypes of prediction dataset.

K1

n1 by n1 kingship matrix computed from file_ref1. Can improve computational efficiency if provided. If not provided, K1 will be computed from file_ref1.

K2

n2 by n2 kingship matrix computed from file_ref2. Can improve computational efficiency if provided. If not provided, K2 will be computed from file_ref2.

K12

n1 by n2 Cross-population kingship matrix computed from file_ref1 and file_ref2. Can improve computational efficiency if provided. If not provided, K12 will be computed from file_ref1 and file_ref2.

X1

n1 by p Raw genotype matrix from file_ref1. Can improve computational efficiency if provided. If not provided, X1 will be read from file_ref1.

X2

n2 by p Raw genotype matrix from file_ref2. Can improve computational efficiency if provided. If not provided, X2 will be read from file_ref2.

snps_fe1

A vector containing the SNP rs id to be included as population one-specific fixed effects in XPASS+.

snps_fe2

A vector containing the SNP rs id to be included as population two-specific fixed effects in XPASS+.

sd_method

A character string indicating the method to obtain the Jackknife standard error of parameter estimates. Should be one of "Chromosome', "LD_block" and "Jackknife", corresponding to chromosome based, LD-block (of population one) based, and SNP based Jackknife.

pop

A character string indicating from which population the LD partions should be used. Currently support "EUR" and "EAS". Default is "EUR".

compPosMean

TRUE/FALSE indicating whether to compute the posterior mean of effect sizes. Default is TRUE.

use_CG

TRUE/FALSE indicating whether to use conjugate gradient to solve for the posterior mean. Default is TRUE.

compPRS

TRUE/FALSE indicating whether to compute the PRS when file_predGeno is not NULL. If FALSE, one can use the function predict_XPASS to obtain the PRS later.

file_out

A character string of the prefix of output file name.

snps_list

A vector containing the SNP rs id to be included in the analysis. The intersection of this list and SNPs from file_z1, file_z2, file_ref1 and file_ref2 will be used in the XPASS analysis.

Value

a list with the following elements:

H:

4 by 2 matrix of estimated heritabilities, co-heritability and genetic correlation (first row) and their corresponding standard erros (second row)

mu:

A data frame storing the posterior means computed by LDpred-inf using only the target dataset (mu1) and only the auxiliary dataset (mu2), and the posterior means of the target population and the auxiliary population computed by XPASS (mu_XPASS1 and mu_XPASS2). In eff_type1 and eff_type2 columns, "RE" indicates the SNP effect is random effect and "FE" indicates the effect is treated as population-specific fixed effect in the corresponding populations. SNPs information is also returned: A1 is the effect allele, A2 is the other allele.

PRS (if file_predGeno provided and compPRS=T):

A data frame storing the PRS generated using mu1, mu2, mu_XPASS1, and mu_XPASS2, respectively.

snps:

Final SNPs included in the analysis.

fit:

An object returned by the parameter estimation function corr_ss.

Examples

See vignette.

YangLabHKUST/XPASS documentation built on June 29, 2024, 11:16 a.m.