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.
makeGeneSet(annoInfo=NULL,margin=0,annoTable='anno',geneTable='gene',
allTable='allchrpos',db='snplistdb',dbCleanUp=FALSE)
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.
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.
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'.
Name of the SQLite table containg chromosome, start and end positions for each gene, as previously created by setGeneTable
. Default is 'gene'.
Name of the SQLite table containg chromosome and position for each SNP, as previously created by setSNPTable
. Default is 'allchrpos'.
Name of the SQLite database in which to find the gene and SNP tables and create the SNP set table. Default is 'snplistdb'.
Boolean indicating if the tables and views created by the function should be dropped after the SNP set is returned. Default is FALSE.
Returns a list
of SNP sets of the form:
Vector of rsIDs of SNPs within <gene> (or the neighborhood around it)
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.
# NOT RUN {
# Please see the vignette or the package description
# for an example of using this function.
# }
Run the code above in your browser using DataCamp Workspace