querys {traseR} | R Documentation

## Retrieve trait-associated SNPs based

### Description

These are a group of functions to retrieve the trait-associated SNPs based on input

### Usage

    queryKeyword(snpdb, region=NULL, keyword = NULL, returnby = c("SNP_ID", "trait"), pvalue = 1e-3)

    queryGene(snpdb, genes = NULL)

    querySNP(snpdb, snpid, region = NULL)

### Arguments

`snpdb` | A GRange object or data frame, which is GWAS trait-associated SNPs downloaded from up-to-date dbGaP and NHGRI public database. It is maintained to be updated to the latest version. The data frame contains the following columns,`Trait`,`SNP_ID`,`p.value`,`Chr`,`Position`,`Context`,`GENE_NAME`,`GENE_START`,`GENE_END`,`GENE_STRAND`. The data frame is in `data` subdirectory. Users are free to add more SNP records to the data frame for practical use.
`region` | A data frame, which is genomic intervals with three columns, chromosome, genomic start position, genomic end position.
`keyword` | The keyword is used when specific trait is of interest. If `keyword` is specified, only the SNPs associated to the trait are used for analyses. Otherwise, all traits will be analyzed.
`snpid` | SNP rs number
`genes` | Gene name
`pvalue` | SNPs with p-value less than this threshold are used for analyses.
`returnby` | Either SNP or trait. If `returnby` is specified as 'SNP_ID', a data frame based on 'SNP_ID' is returned. If `returnby` is specified as 'trait', a data frame based on 'trait' is returned.

### Value

queryKeyword: Return a data frame of traits containing the keyword queryGene: Return a data frame of traits associated with the gene querySNP: Return a data frame of traits associated with the SNP

### Author(s)

Li Chen <li.chen@emory.edu>, Zhaohui Qin<zhaohui.qin@emory.edu>

### Examples

    	data(taSNP)
    	data(Tcell)
    	x=queryKeyword(snpdb=taSNP,region=Tcell,keyword="Autoimmune",returnby="SNP_ID")
    	x=queryGene(snpdb=taSNP,genes=c("AGRN","UBE2J2","SSU72"))
    	x=querySNP(snpdb=taSNP,snpid=c("rs3766178","rs880051"))

[Package traseR version 1.18.0 Index]