Learn R Programming

snplist (version 0.18.3)

snplist-package: Tools to Create Gene Sets

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.

Arguments

Author

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

Details

Package:snplist
Type:Package
Version:0.18.3
Date:2025-04-21
License:GPL-3

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

See Also

RSQLite, Rcpp

Examples

Run this code
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)

if (FALSE) {
setGeneTable(geneInfo)
setSNPTable(snpInfo)
geneset <- makeGeneSet(annoInfo)
exportPLINKSet(geneset,"geneSet.set")
file.show("geneSet.set")
}

Run the code above in your browser using DataLab