pointwiseInteraction: Pointwise Interaction Test

Description Usage Arguments Details Value Author(s) Examples

View source: R/pointwiseInteraction.R

Description

Test the epistasis of the gene pair by pointwise method

Usage

1
pointwiseInteraction(phenoData, x_A, x_B)

Arguments

phenoData

Vector of phenotype data which can be quantitative trait or binary trait.

x_A

Matrix of genotype of gene A.

x_B

Matrix of genotype of gene B.

Details

This function takes phenotype vector and genotype matrices as input and tests the epistasis using pointwise method. For a pair of genes, we assume that the total number of all possible SNP pairs is K (one SNP from one gene and the other SNP from the other gene). The interaction of each SNP pair between the two genes is tested. The minum p value for SNP-SNP interaction among the K pairs is output as the pointwise method result of the gene pair.

Value

Return the minum p value for SNP-SNP interaction among the K pairs

Author(s)

Futao Zhang

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
smp_num=1000
number_snp_A=25
number_snp_B=20
pheno<-sample(c(0:500),smp_num,replace=TRUE)
smpl=rep(0,number_snp_A*smp_num)
idx_1=sample(c(1:(number_snp_A*smp_num)),ceiling(number_snp_A*smp_num/100))
idx_2=sample(c(1:(number_snp_A*smp_num)),ceiling(number_snp_A*smp_num/200))
smpl[idx_1]=1
smpl[idx_2]=2
geno_A=matrix(smpl,smp_num,number_snp_A)

smpl=sample(c(0,1,2),number_snp_B*smp_num,replace=TRUE)
geno_B=matrix(smpl,smp_num,number_snp_B)
pointwiseInteraction(pheno,geno_A,geno_B)

FRGEpistasis documentation built on Nov. 8, 2020, 5:51 p.m.