fRGEpistasis: Genome Wide Epistasis Study by Functional Regress Model

Description Usage Arguments Details Value Author(s) Examples

View source: R/fRGEpistasis.R

Description

This function is the entrance of the software package. It tests the Genome Wide Epistasis by Functional Regression Model.

Usage

1
fRGEpistasis(wDir, phenoInfo, gnoFiles, mapFiles, gLst, fdr, rng)

Arguments

wDir

The dataset directory. If the dataset is in the working directory, wDir is ".".

phenoInfo

It is a matrix with two columns. One column is the individual ID and the other is the phenotype. The phenotype can be quantitative trait or binary trait.

gnoFiles

The vector of genotype file names. It contains the genotype file names indicating where to read the genotype files.

mapFiles

The vector of SNP genetic map file names. It contains the map file names indicating where to read the genetic map files.

gLst

Gene annotation which includes gene name, chromosome, start position and end position.

fdr

FDR control threshold, When this value == 1, turn FDR control off.

rng

A numeric value which represents gene region extensible scope.

Details

Firstly this package reduces the dimension of genotype of all the genomic regions. Secondly this package tests the epistasis of genomic regions both of which are on the same chromosome(file). Thirdly this package tests the epistasis of genomic regions which are on different chromosomes(files).

This function is memory efficient with high performance. Memory efficiency: Only store reduced expansion data of genotypes instead of raw data of genotypes. This package reduces the dimension of genotype of all the genomic regions(see details of function "reduceGeno"). In real dataset the genotypes on different chromosome are always organized into different files. And each genotype file is very large. Reading all the files into memory is unacceptable. This package reads the files one by one and reduces the genotype dimension with Fourier expansion. In order to inform the package how many files and where to read, we need two data structures "gnoFiles" and "mapFiles" to store the file names.

high performance: Each data file only needs to read once and reduce dimension once. So I/O times are reduced and repeated computing of data reduction was avoided. This method is a kind of group test. We take a gene(or genomic region) as the test unit. The number of Test is sharply reduced comparing with point-wise interaction (SNP-SNP) test. The dimension of genotype is reduced by functional expansion, So the time of each test is reduced.

Value

Return a data frame which contains all the names of gene pairs and the p values of chi-square test for their epistasis.

Author(s)

Futao Zhang

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
wDir <-paste(system.file("extdata", package="FRGEpistasis"),"/",sep="")
gnoFiles<-read.table(system.file("extdata", "list_geno.txt", package="FRGEpistasis"))
mapFiles<-read.table(system.file("extdata", "list_map.txt", package="FRGEpistasis"))
phenoInfo <- read.csv(system.file("extdata", "phenotype.csv", package="FRGEpistasis"),header=TRUE)
gLst<-read.csv(system.file("extdata", "gene.list.csv", package="FRGEpistasis"))
rng=0
fdr=0.05
out_epi <- data.frame( )
phenoInfo [,2]=log(phenoInfo [,2])
out_epi = fRGEpistasis(wDir,phenoInfo,gnoFiles,mapFiles,gLst,fdr,rng)

Example output

Loading required package: MASS
Loading required package: fda
Loading required package: splines
Loading required package: Matrix

Attaching package: 'fda'

The following object is masked from 'package:graphics':

    matplot

[1] "Expansion gene1 of 1 on chromsome1!"
[1] "Expansion gene1 of 2 on chromsome2!"
[1] "Expansion gene2 of 2 on chromsome2!"
[1] "Expansion gene1 of 3 on chromsome3!"
[1] "Expansion gene2 of 3 on chromsome3!"
[1] "Expansion gene3 of 3 on chromsome3!"
[1] "Expansion gene1 of 1 on chromsome4!"
[1] "Expansion gene1 of 1 on chromsome5!"
[1] "Performing epistasis test inner chromsome 1"
[1] "1 of 1 with other genes both on 1 chromsome!"
[1] "Performing epistasis test outer  1 : 2 chromsomes!"
[1] "1 of 1 on  1 chromsome with other genes on 2 chromsome(2genes)"
[1] "Performing epistasis test outer  1 : 3 chromsomes!"
[1] "1 of 1 on  1 chromsome with other genes on 3 chromsome(3genes)"
[1] "Performing epistasis test outer  1 : 4 chromsomes!"
[1] "1 of 1 on  1 chromsome with other genes on 4 chromsome(1genes)"
[1] "Performing epistasis test outer  1 : 5 chromsomes!"
[1] "1 of 1 on  1 chromsome with other genes on 5 chromsome(1genes)"
[1] "Performing epistasis test inner chromsome 2"
[1] "1 of 2 with other genes both on 2 chromsome!"
[1] "2 of 2 with other genes both on 2 chromsome!"
[1] "Performing epistasis test outer  2 : 3 chromsomes!"
[1] "1 of 2 on  2 chromsome with other genes on 3 chromsome(3genes)"
[1] "2 of 2 on  2 chromsome with other genes on 3 chromsome(3genes)"
[1] "Performing epistasis test outer  2 : 4 chromsomes!"
[1] "1 of 2 on  2 chromsome with other genes on 4 chromsome(1genes)"
[1] "2 of 2 on  2 chromsome with other genes on 4 chromsome(1genes)"
[1] "Performing epistasis test outer  2 : 5 chromsomes!"
[1] "1 of 2 on  2 chromsome with other genes on 5 chromsome(1genes)"
[1] "2 of 2 on  2 chromsome with other genes on 5 chromsome(1genes)"
[1] "Performing epistasis test inner chromsome 3"
[1] "1 of 3 with other genes both on 3 chromsome!"
[1] "2 of 3 with other genes both on 3 chromsome!"
[1] "3 of 3 with other genes both on 3 chromsome!"
[1] "Performing epistasis test outer  3 : 4 chromsomes!"
[1] "1 of 3 on  3 chromsome with other genes on 4 chromsome(1genes)"
[1] "2 of 3 on  3 chromsome with other genes on 4 chromsome(1genes)"
[1] "3 of 3 on  3 chromsome with other genes on 4 chromsome(1genes)"
[1] "Performing epistasis test outer  3 : 5 chromsomes!"
[1] "1 of 3 on  3 chromsome with other genes on 5 chromsome(1genes)"
[1] "2 of 3 on  3 chromsome with other genes on 5 chromsome(1genes)"
[1] "3 of 3 on  3 chromsome with other genes on 5 chromsome(1genes)"
[1] "Performing epistasis test inner chromsome 4"
[1] "1 of 1 with other genes both on 4 chromsome!"
[1] "Performing epistasis test outer  4 : 5 chromsomes!"
[1] "1 of 1 on  4 chromsome with other genes on 5 chromsome(1genes)"
[1] "Performing epistasis test inner chromsome 5"
[1] "1 of 1 with other genes both on 5 chromsome!"

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