traseR {traseR} | R Documentation

## TRait-Associated SNP EnRichment analyses

### Description

Perform GWAS trait-associated SNP enrichment analyses in genomic intervals using different approaches

### Usage

    traseR(snpdb, region, snpdb.bg=NULL, keyword = NULL, rankby = c("pvalue", "odds.ratio"),
    test.method = c("binomial", "fisher","chisq", "nonparametric"), alternative = c("greater", "less", "two.sided"),
    ntimes=100,nbatch=1,
    trait.threshold = 0, traitclass.threshold=0, pvalue = 1e-3)

### Arguments

`snpdb` | A GRange object. It could be 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,`Source`,`Trait`,`SNP`,`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. It could also be a data frame with columns as, `SNP`,`Chr`,`Position`.
`region` | A GRange object or data frame, which is genomic intervals with three columns, chromosome, genomic start position, genomic end position.
`snpdb.bg` | A GRange object contains non-trait-associated SNPs. They are treated as background for statistical testing instead of whole genome as background if specified.
`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.
`rankby` | Traits could be ranked by either p-value or adds.ratio based on the enrichment level of trait-associated SNPs in genomic intervals.
`test.method` | Several hypothesis testing options are provided: `binomial`(binomial test),`fisher`(Fisher's exact test),`chisq`(Chi-squared test),`chisq`(nonparametric test). Default is `binomial`(binomial test)
`alternative` | Indicate the alternative hypothesis. If `greater`, test if the genomic intervals are enriched in trait-associated SNPs than background. If `less`, test if the genomic intervals are depleted in trait-associated SNPs than background. If `two.sided`, test if there is difference between the enrichment of trait-associated SNPs in genomic intervals and in background.
`ntimes` | The number of shuffling time for one batch. See `nbatch`.
`nbatch` | The number of batches. The product of `ntimes` and `nbatch` is the total number of shuffling time.
`trait.threshold` | Test traits with number of SNPs more than the threshold.
`traitclass.threshold` | Test trait class with number of SNPs more than the threshold.
`pvalue` | SNPs with p-value less than this threshold are used for analyses.

### Details

Return a list that contains three data frames. One data frame `tb.all` contains the results of enrichment analyses for all trait-associated SNPs in genomic intervals. Another data frame `tb1` contains the results of enrichment analyses for each trait-associated SNPs in genomic intervals separately. Another data frame `tb2` contains the results of enrichment analyses for each trait-class-associated SNPs in genomic intervals separately.

### Value

The data frame `tb1` has columns,

`Trait` | Name of trait
`p.value` | P-value calculated from hypothesis testing
`q.value` | Adjusted p-value from multiple testing using FDR correction
`odds.ratio` | Odds ratio calculated based on number of trait-associated SNPs in genomic intervals, number of trait-associated SNPs across whole genome, genomic intervals size (bps) and genome size (bps)
`taSNP.hits` | Number of trait-associated SNPs in genomic intervals
`taSNP.num` | Number of SNPs for specific trait

### Author(s)

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

### See Also

print.traseR

### Examples

    	data(taSNP)
    	data(Tcell)
    	x=traseR(snpdb=taSNP,region=Tcell)
    	print(x)

[Package traseR version 1.10.0 Index]