S4 class for storing the result of an association test performed on multiple genomic regions
Objects of this class are created by calling
with a non-empty
This class extends the class
GRanges directly and
therefore inherits all its slots and methods.
The following slots are defined for
type of null model on which the association test was based
character vector with sample names (if available, otherwise empty)
kernel that was used for the association test
weight vector or weighting function that was
NULL if no weighting was performed
tolerance radius parameter that was used for position-dependent kernels
which method for multiple testing correction has been applied (if any)
list of parameters that were used for reading genotypes from VCF file
factor with sex information (if any)
the matched call with which the object was created
Apart from these additional slots, all
objects have particular metadata columns (accessible via
number of variants tested in each region; a zero
does not necessarily mean that there were no variants in this region, it
only means that no variants were used for testing. Variants are
omitted from the test if they do not show any variation or if they
do not satisfy other filter criteria applied by
assocTest. This metadata column is always present.
test statistic for each region that was tested. This metadata column is always present.
p-value of test for each region that was tested. This metadata column is always present.
adjusted p-value of test for each region
that was tested. This metadata column is only present if multiple
testing correction has been applied (see
estimated p-value computed as
the relative frequency of p-values of sampled residuals that
are at least as significant as the test's p-value in each region.
This metadata column is only present if resampling has been applied,
assocTest has been called with
n.resampling greater than zero.
adjusted empirical p-value (see above). This metadata column is only present if resampling and multiple testing correction has been applied.
allows for concatenating two or more
objects; this is only meaningful if the different tests have been
performed on the same samples, on the same genome, with the same
kernel, and with the same VCF reading parameters (in case that the
association test has been performed directly on a VCF file).
All these conditions are checked and if any of them is not
fulfilled, the method quits with an error. Merging association
test results that were computed with different
parameters is possible, but the
sex component is omitted
and a warning is issued. Note that multiple
testing correction (see
p.adjust) should not be
carried out on parts, but only on the entire set of all tests.
That is why
c strips off all adjusted p-values.
multiple testing correction, see
apply filtering to p-values or adjusted p-values. For more
AssocTestResultRanges object according to specified
sorting criterion. See
for more details.
make a Manhattan plot of the association test result.
plot for more details.
make quantile-quantile (Q-Q) plot of association test result.
qqplot for more details.
displays some general information about the result of the
association test, such as, the number of samples, the number of
regions tested, the number of regions without variants, the average
number of variants in the tested regions, the genome, the kernel that
was applied, and the type of multiple testing correction (if any).
allows for displaying more information about the object than
As mentioned above, the
AssocTestResultRanges inherits all
methods from the
Ulrich Bodenhofer firstname.lastname@example.org
## 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(res.adj) ## show sorted results as(sort(res.adj), "GRanges") ## show filtered result print(filterResult(res.adj, cutoff=0.05, filterBy="p.value.adj")) ## make a Manhattan plot plot(res.adj, which="p.value.adj")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.