longskat_get_gene: Get SNP matrix of gene.

Description Usage Arguments Details Value References See Also Examples

Description

This function provides a interface to read all SNPs of genes from the PLINK data object.

Usage

1
longskat_get_gene(  gen.obj, gene.set, snp.impute="mean", verbose = FALSE )

Arguments

gen.obj

Reference class , it is a wrapper of plink data object obtained from the function longskat_plink_load.

gene.set

Vector of numeric or string, indicating the gene index or gene name.

snp.impute

String, indicating the method of SNP imputation, the default model uses the mean of each variant to replace the missing SNP data. Two optional values: 'mean' or 'random'.

verbose

Logical variable, indicating whether some debug information can be outputted.

;

Details

The parameter gene.set can be gene index (numeric) or gene names (string).

Value

The returned list object could contain multiple genes. It includes

snp.mat

List, SNP Matrices for genes in gene.set.

maf

List, SNP MAF vectors for genes in gene.set.

nmiss

List, SNP missing information for genes in gene.set.

gene.name

List, gene names for genes in gene.set.

References

Wang Z., Xu K., Zhang X., Wu X., and Wang Z., (2016) Longitudinal SNP-set association analysis of quantitative phenotypes. Genetic Epidemiology.

See Also

longskat_plink_load and longskat_gene_test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## data simulation for the power test
p0 <- longskat_gene_simulate( plink.format=T, file.plink.prefix="tmp-plink-load", 
      power.test=T, n.gene=20);

## Loading PLINK data set into the reference object
plk <- longskat_plink_load ( p0$file.plink.bed, p0$file.plink.bim, p0$file.plink.fam, 
      p0$file.gene.set,  verbose=TRUE);

## Retriving the SNP matrix from the reference object
snps <- longskat_get_gene( plk, 1:2, snp.impute="mean" );

## show the structures of the result.
str(snps);

ZWang-Lab/LSKAT documentation built on May 10, 2019, 1:55 a.m.