Description Usage Arguments Details Value References See Also Examples
This function provides a interface to read all SNPs of genes from the PLINK data object.
1 | longskat_get_gene( gen.obj, gene.set, snp.impute="mean", verbose = FALSE )
|
gen.obj |
Reference class , it is a wrapper of plink data object obtained from the function |
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. |
;
The parameter gene.set
can be gene index (numeric) or gene names (string).
The returned list object could contain multiple genes. It includes
snp.mat |
List, SNP Matrices for genes in |
maf |
List, SNP MAF vectors for genes in |
nmiss |
List, SNP missing information for genes in |
gene.name |
List, gene names for genes in |
Wang Z., Xu K., Zhang X., Wu X., and Wang Z., (2016) Longitudinal SNP-set association analysis of quantitative phenotypes. Genetic Epidemiology.
longskat_plink_load
and longskat_gene_test
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);
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.