print-methods | R Documentation |
Display method for S4 class AssocTestResultRanges
## S4 method for signature 'AssocTestResultRanges'
print(x, cutoff=0.05,
sortBy=c("p.value", "p.value.adj", "p.value.resampled",
"p.value.resampled.adj", "genome", "none"),
max.show=10)
x |
an object of class |
cutoff |
a numerical vector with one or more p-value thresholds;
if present (otherwise |
sortBy |
a character string that determines (1) how regions are
sorted and (2) according to which p-value the |
max.show |
maximum number of regions to display; if 0, no regions are displayed at all. |
print
displays the most important information stored in
an AssocTestResultRanges
object x
.
That includes the type of null model, the numbers of samples and
tested regions, the kernel that was used for testing, etc. Depending
on the cutoff
argument, a certain number of significant tests
is printed. If max.show
is larger than 0, then some regions are shown along with association
test results. Which regions are selected and how they are sorted,
depends on the arguments sortBy
and cutoff
(see above).
print
returns its argument x
invisibly.
Ulrich Bodenhofer
https://github.com/UBod/podkat
GenotypeMatrix
,
NullModel
, AssocTestResult
,
AssocTestResultRanges
## load genome description
data(hgA)
## partition genome into overlapping windows
windows <- partitionRegions(hgA)
## load genotype data from VCF file
vcfFile <- system.file("examples/example1.vcf.gz", package="podkat")
Z <- readGenotypeMatrix(vcfFile)
## read phenotype data from CSV file (continuous trait + covariates)
phenoFile <- system.file("examples/example1lin.csv", package="podkat")
pheno <-read.table(phenoFile, header=TRUE, sep=",")
## train null model with all covariates in data frame 'pheno'
nm.lin <- nullModel(y ~ ., pheno)
## perform association test for multiple regions
res <- assocTest(Z, nm.lin, windows)
## perform multiple testing correction
res.adj <- p.adjust(res)
## print 'AssocTestResultRanges' object
print(res)
print(res, max.show=0)
print(res.adj, cutoff=c(0.005, 0.01, 0.05))
print(res.adj, cutoff=0.05, sortBy="p.value.adj")
print(res.adj, cutoff=NA, sortBy="none", max.show=40)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.