Description Usage Arguments Details Value Author(s) References See Also Examples
Given an AssocTestResultRanges object,
this method adds a metadata column with adjusted p-values.
1 2 | ## S4 method for signature 'AssocTestResultRanges'
p.adjust(p, method=p.adjust.methods, n=length(p))
|
p |
object of class |
method |
correction method (see |
n |
parameter available for consistency with standard
|
This function is a wrapper around the standard
p.adjust function from the
stats package. It takes the
p.value metadata column from the
AssocTestResultRanges object p, applies
the multiple testing correction method specified as method
argument. The method returns a copy of p with an additional
metadata column p.value.adj that contains the adjusted
p-values. If p already contained a metadata column
p.value.adj, this column is overwritten with the new adjusted
p-values.
If p also contains a metadata column p.value.resampled,
multiple testing correction is also applied to resampled p-values.
The resulting adjusted p-values are placed in the metadata column
p.value.resampled.adj.
Note that, for consistency with the standard
p.adjust function, the default
correction method is “holm”.
an AssocTestResultRanges object (see details above)
Ulrich Bodenhofer bodenhofer@bioinf.jku.at
http://www.bioinf.jku.at/software/podkat
AssocTestResultRanges,
p.adjust
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## 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 (continous 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)
print(res)
## perform multiple testing correction
res.adj <- p.adjust(res, method="BH")
print(res.adj)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.