snplist-package: Tools to Create Gene Sets

Description Details Author(s) See Also Examples

Description

A set of functions to create SQL tables of gene and SNP information and compose them into a SNP Set, for example for use with the RSNPset package, or to export to a PLINK set.

Details

Package: snplist
Type: Package
Version: 0.18.1
Date: 2017-12-11
License: GPL-3

Please see the example function calls below, or refer to the individual function documentation or the included vignette for more information.

Author(s)

Authors: Chanhee Yi, Alexander Sibley, and Kouros Owzar Maintainer: Alexander Sibley <alexander.sibley@dm.duke.edu>

See Also

RSQLite, Rcpp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
chromosome <- c(1,5,22,"X","Y","MT")

geneNum <- 5
snpNum <- 1200
annoDataNum <- 500

chrLength <- 1000
geneLength <- 100

gene <- paste("gene",1:geneNum,sep="")
chr <- sample(chromosome,geneNum,replace=TRUE)
start <- sample(chrLength,geneNum,replace=TRUE)
d <- sample(geneLength,geneNum,replace=TRUE)
end <- start+d
geneInfo <- data.frame(gene,chr,start,end)

rsid <- paste("rs",1:snpNum,sep="")
chr <- sample(chromosome,snpNum,replace=TRUE)
pos <- sample(chrLength+geneLength,snpNum,replace=TRUE)
snpInfo <- data.frame(rsid,chr,pos)

annoInfo <- data.frame("rsid"=sample(rsid,annoDataNum))

dim(geneInfo)
dim(snpInfo)
dim(annoInfo)

## Not run: 
setGeneTable(geneInfo)
setSNPTable(snpInfo)
geneset <- makeGeneSet(annoInfo)
exportPLINKSet(geneset,"geneSet.set")
file.show("geneSet.set")

## End(Not run)

snplist documentation built on Oct. 9, 2021, 5:06 p.m.