Summary function to sort and display p-values resulting from `rsnpset.pvalue()`

.

1 2 3 |

`object` |
Result from |

`sort` |
Character string indicating column by which to sort results. If not one of |

`decreasing` |
Boolean indicating if the sort column should be arranged in decreasing order. Default is |

`nrows` |
Integer indicating number of rows to display. Default is 10. |

`dropcols` |
Character vector corresponding names of columns of to be suppressed from the summary. Default is none. |

`verbose` |
Boolean indicating if additional information about the p-value calculations should be reported. Default is |

`...` |
Additional arguments affecting the summary produced. |

As a typical GWAS study may span thousands of SNPs and SNP sets, this function allows for the succinct reporting of p-values for the most significant results. For more information about the different columns reported, see the documentation for `rsnpset.pvalue()`

. If `verbose=TRUE`

, a note will be printed with the total number of SNP sets and replications used in the calculations, as well as the value of the `pval.transform`

argument from `rsnpset.pvalue()`

.

A `data.frame`

object subset from `object`

, the result of `rsnpset.pvalue()`

. Rows are selected based on the `sort`

, `decreasing`

, and `nrows`

arguments, and columns are selected based on the `dropcols`

argument.

The function `rsnpset.pvalue`

provides a description of the different p-values computed, as well as the other columns in the results.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ```
n <- 200 # Number of patients
m <- 1000 # Number of SNPs
set.seed(123)
G <- matrix(rnorm(n*m), n, m) # Normalized SNP expression levels
rsids <- paste0("rs", 1:m) # SNP rsIDs
colnames(G) <- rsids
K <- 15 # Number of SNP sets
genes <- paste0("XYZ", 1:K) # Gene names
gsets <- lapply(sample(3:50, size=K, replace=TRUE), sample, x=rsids)
names(gsets) <- genes
# Survival outcome
time <- rexp(n, 1/10) # Survival time
event <- rbinom(n, 1, 0.9) # Event indicator
## Not run:
# Optional parallel backend
library(doParallel)
registerDoParallel(cores=8)
## End(Not run)
# B >= 1000 is typically recommended
res <- rsnpset(Y=time, delta=event, G=G, snp.sets=gsets, score="cox",
B=50, r.method="permutation", ret.rank=TRUE)
pvals <- rsnpset.pvalue(res, pval.transform=TRUE)
summary(pvals)
summary(pvals, sort="W", decreasing=TRUE, nrows=5, dropcols=c("p","rank"), verbose=TRUE)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.