makeGeneSet: makeGeneSet

Description Usage Arguments Details Value See Also Examples

View source: R/makeGeneSet.R

Description

This function uses existing SQLite tables (from setGeneTable and setSNPTable) to make SNP sets. The SNP Set for each gene is the collection of SNPs located either between the start and end locations of the gene, or within a specified neighborhood around the gene. The SNP Sets are stored in the SQLite database, and returned as a list object.

Usage

1
2
    makeGeneSet(annoInfo=NULL,margin=0,annoTable='anno',geneTable='gene',
                        allTable='allchrpos',db='snplistdb',dbCleanUp=FALSE)

Arguments

annoInfo

A vector of rsIDs, a data.frame with an 'rsid' column, or a file with one rsID per line. The SNP sets will be restricted to contain only the SNPs listed here. Default is NULL, in which case all SNPs present in the SNP table in the SQLite database will be used.

margin

A number, indicating the size of the neighborhood (in base pairs) surrounding a genes start and end positions in which a SNP will be included in that genes SNP set. Default is 0.

annoTable

A string indicating the name of the SQLite table for the rsIDs from annoInfo. Also used in naming the resulting table of SNP sets ('<name>ToGene'). Default is 'anno'.

geneTable

Name of the SQLite table containg chromosome, start and end positions for each gene, as previously created by setGeneTable. Default is 'gene'.

allTable

Name of the SQLite table containg chromosome and position for each SNP, as previously created by setSNPTable. Default is 'allchrpos'.

db

Name of the SQLite database in which to find the gene and SNP tables and create the SNP set table. Default is 'snplistdb'.

dbCleanUp

Boolean indicating if the tables and views created by the function should be dropped after the SNP set is returned. Default is FALSE.

Details

Note: This function relies on the prior execution of the setGeneTable and setSNPTable functions and the SQLite databes and tables they create. If the table or db argument in either of those functions is changed from the default value, it must also be changed here.

Value

Returns a list of SNP sets of the form:

<gene name>

Vector of rsIDs of SNPs within <gene> (or the neighborhood around it)

See Also

setGeneTable, setSNPTable, snplist-package

Examples

1
2
    # Please see the vignette or the package description 
    # for an example of using this function.

Example output

Loading required package: RSQLite

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