Last data update: 2014.03.03

R: ROR
HAP.rorR Documentation

ROR

Description

perform ROR for sequence-based association analysis

Usage

HAP.ror(case.sub, ctl.sub, lib.sub, lib.sub.names, alpha = 0.01, ref.level = NA, display.proc = TRUE)

Arguments

case.sub

case subjects, two columns for two haplotypes

ctl.sub

control subjects, two columns for two haplotypes

lib.sub

the alleles library contains allele sequences for those only appear in the case and control samples

lib.sub.names

the corresponding names of the alleles (mapping of full name in the library and short name in samples)

alpha

significance level

ref.level

name of the reference allele, "NA" use the most common allele as reference, can also specify allele name, for DRB1, it is "101"

display.proc

display the grouping process or not? default is TRUE

Details

This function performs ROR for sequence-based association analysis

Value

dev.list

deviances for all steps of ROR

AIC.list

AICs for all steps of ROR

df.list

degree of freedom for all steps of ROR

records

the record of the whole ROR process

deleted.snps.ls

the history of SNP deletions for all steps of ROR

deleted.snps

the final vector of deleted SNPs

grp.result

the final grouping result

model.summary

the GLM model summary for the final grouping

Author(s)

Lue Ping Zhao and Xin Huang
Maintainer: Xin Huang <xhuang.fhcrc@gmail.com>

References

Zhao, L.P. and Huang, X. Recursive organizer (ROR): an analytic framework for sequence-based association analysis. Human Genetics, 2013

Examples

library("HAP.ROR")
data(case.sub)
data(ctl.sub)
data(lib.sub)
data(lib.sub.names)
ror.res <- HAP.ror(case.sub, ctl.sub, lib.sub, lib.sub.names, alpha=0.01, ref.level="101");

# grouping result:
round(ror.res$dev.list, 2);
round(ror.res$AIC.list, 2);
ror.res$df.list;
ror.res$deleted.snps;
ror.res$grp.result;
ror.res$significant;
# model summary:
ror.res$model.summary;

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(HAP.ROR)
Loading required package: hash
hash-2.2.6 provided by Decision Patterns

Loading required package: ape

Attaching package: 'HAP.ROR'

The following object is masked from 'package:stats':

    AIC

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/HAP.ROR/HAP.ror.Rd_%03d_medium.png", width=480, height=480)
> ### Name: HAP.ror
> ### Title: ROR
> ### Aliases: HAP.ror
> ### Keywords: ~kwd1 ~kwd2
> 
> ### ** Examples
> 
> library("HAP.ROR")
> data(case.sub)
> data(ctl.sub)
> data(lib.sub)
> data(lib.sub.names)
> ror.res <- HAP.ror(case.sub, ctl.sub, lib.sub, lib.sub.names, alpha=0.01, ref.level="101");
deleting: 49 50 51 61 68 70 76 78 80 81 
deleting: 49 50 51 61 68 70 76 78 80 81 26 40 41 48 55 56 60 67 77 79 
deleting: 49 50 51 61 68 70 76 78 80 81 26 40 41 48 55 56 60 67 77 79 12 23 25 29 52 57 59 62 63 65 66 69 71 72 
deleting: 49 50 51 61 68 70 76 78 80 81 26 40 41 48 55 56 60 67 77 79 12 23 25 29 52 57 59 62 63 65 66 69 71 72 17 18 22 24 35 37 42 47 53 54 92 
deleting: 49 50 51 61 68 70 76 78 80 81 26 40 41 48 55 56 60 67 77 79 12 23 25 29 52 57 59 62 63 65 66 69 71 72 17 18 22 24 35 37 42 47 53 54 92 1 2 4 7 13 14 15 16 39 83 85 86 89 90 
deleting: 49 50 51 61 68 70 76 78 80 81 26 40 41 48 55 56 60 67 77 79 12 23 25 29 52 57 59 62 63 65 66 69 71 72 17 18 22 24 35 37 42 47 53 54 92 1 2 4 7 13 14 15 16 39 83 85 86 89 90 9 10 11 20 30 31 32 33 34 36 43 64 91 
deleting: 49 50 51 61 68 70 76 78 80 81 26 40 41 48 55 56 60 67 77 79 12 23 25 29 52 57 59 62 63 65 66 69 71 72 17 18 22 24 35 37 42 47 53 54 92 1 2 4 7 13 14 15 16 39 83 85 86 89 90 9 10 11 20 30 31 32 33 34 36 43 64 91 8 58 74 75 87 88 
deleting: 49 50 51 61 68 70 76 78 80 81 26 40 41 48 55 56 60 67 77 79 12 23 25 29 52 57 59 62 63 65 66 69 71 72 17 18 22 24 35 37 42 47 53 54 92 1 2 4 7 13 14 15 16 39 83 85 86 89 90 9 10 11 20 30 31 32 33 34 36 43 64 91 8 58 74 75 87 88 3 5 21 27 28 44 45 46 82 84 
deleting: 49 50 51 61 68 70 76 78 80 81 26 40 41 48 55 56 60 67 77 79 12 23 25 29 52 57 59 62 63 65 66 69 71 72 17 18 22 24 35 37 42 47 53 54 92 1 2 4 7 13 14 15 16 39 83 85 86 89 90 9 10 11 20 30 31 32 33 34 36 43 64 91 8 58 74 75 87 88 3 5 21 27 28 44 45 46 82 84 6 19 38 73 
There were 12 warnings (use warnings() to see them)
> 
> # grouping result:
> round(ror.res$dev.list, 2);
[1]   0.00   0.02   4.29   3.51   3.75   0.21   4.90   3.32 -91.25
> round(ror.res$AIC.list, 2);
[1] 0.95 0.88 0.04 0.06 0.05 0.65 0.03 0.07 0.00
> ror.res$df.list;
[1]   1   1   1   1   1   1   1   1 -75
> ror.res$deleted.snps;
 [1]  1  2  3  4  5  7  8  9 10 11 12 13 14 15 16 17 18 20 21 22 23 24 25 26 27
[26] 28 29 30 31 32 33 34 35 36 37 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
[51] 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 74 75 76 77 78 79
[76] 80 81 82 83 84 85 86 87 88 89 90 91 92
> ror.res$grp.result;
                   grp
 [1,] "DRB1*01:01" "1"
 [2,] "DRB1*03:01" "1"
 [3,] "DRB1*04:01" "1"
 [4,] "DRB1*04:04" "1"
 [5,] "DRB1*07:01" "1"
 [6,] "DRB1*08:01" "1"
 [7,] "DRB1*09:01" "1"
 [8,] "DRB1*13:01" "1"
 [9,] "DRB1*13:02" "1"
> ror.res$significant;
[1] 1
> # model summary:
> ror.res$model.summary;

Call:
glm(formula = grp.sample[, 1] ~ allele.factor, family = binomial)

Deviance Residuals: 
   Min      1Q  Median      3Q     Max  
-1.435  -1.435   0.940   0.940   0.940  

Coefficients:
               Estimate Std. Error z value Pr(>|z|)  
(Intercept)      0.5878     0.2494   2.356   0.0185 *
allele.factor  -18.2099  1819.5131  -0.010   0.9920  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 104.539  on 76  degrees of freedom
Residual deviance:  91.246  on 75  degrees of freedom
AIC: 95.246

Number of Fisher Scoring iterations: 17

> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>