Description Usage Arguments Details Value Author(s) References See Also Examples
Rearrange association test results according to sort criterion
1 2 3 4 |
x |
object of class |
decreasing |
logical indicating if sorting should be done in decreasing order |
sortBy |
sort criterion (see details below) |
The function sort
takes an AssocTestResultRanges
object x
and returns a new object of the same class, but with
the regions rearranged according to the sort criterion sortBy
.
As an example, if sortBy
is “p.value” regions are sorted
according to raw p-values in ascending order, analogously for the choices
“p.value.adj”, “p.value.resampled”, and
“p.value.resampled.adj”. If sortBy
is “genome”, the
regions are arranged along the genome in the same way as a
GRanges
object would be sorted.
If decreasing
is TRUE
, the order is reversed.
an AssocTestResultRanges
object;
Ulrich Bodenhofer bodenhofer@bioinf.jku.at
http://www.bioinf.jku.at/software/podkat
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 | ## 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)
## show sorted results (default: by raw p-value)
as(sort(res), "GRanges")
print(sort(res), sortBy="none")
## show results sorted by adjusted p-value
as(sort(res.adj, sortBy="p.value.adj"), "GRanges")
print(sort(res.adj, sortBy="p.value.adj"), sortBy="none")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.