xPierMatrix {Pi} | R Documentation

## Function to extract priority or evidence matrix from a list of pNode objects

### Description

`xPierMatrix` is supposed to extract priority or evidence matrix from a list of pNode objects. Also supported is the aggregation of priority matrix (similar to the meta-analysis) generating the priority results; we view this functionality as the discovery mode of the prioritisation.

### Usage

    xPierMatrix(
    list_pNode,
    displayBy = c("score", "rank", "weight", "pvalue", "evidence"),
    combineBy = c("union", "intersect"),
    aggregateBy = c("none", "fishers", "logistic", "Ztransform",
    "orderStatistic"),
    verbose = TRUE,
    RData.location = "http://galahad.well.ox.ac.uk/bigdata",
    guid = NULL
    )

### Arguments

`list_pNode` | a list of "pNode" objects or a "pNode" object
`displayBy` | which priority will be extracted. It can be "score" for priority score/rating (by default), "rank" for priority rank, "weight" for seed weight, "pvalue" for priority p-value, "evidence" for the evidence (seed info)
`combineBy` | how to resolve nodes/targets from a list of "pNode" objects. It can be "intersect" for intersecting nodes (by default), "union" for unionising nodes
`aggregateBy` | the aggregate method used. It can be either "none" for no aggregation, or "orderStatistic" for the method based on the order statistics of p-values, "fishers" for Fisher's method, "Ztransform" for Z-transform method, "logistic" for the logistic method. Without loss of generality, the Z-transform method does well in problems where evidence against the combined null is spread widely (equal footings) or when the total evidence is weak; Fisher's method does best in problems where the evidence is concentrated in a relatively small fraction of the individual tests or when the evidence is at least moderately strong; the logistic method provides a compromise between these two. Notably, the aggregate methods 'fishers' and 'logistic' are preferred here
`verbose` | logical to indicate whether the messages will be displayed in the screen. By default, it sets to true for display
`RData.location` | the characters to tell the location of built-in RData files. See `xRDataLoader` for details
`guid` | a valid (5-character) Global Unique IDentifier for an OSF project. See `xRDataLoader` for details

### Value

If displayBy is 'evidence', an object of the class "eTarget", a list with following components:

- `evidence`: a data frame of nGene X 6 containing gene evidence information, where nGene is the number of genes, and the 7 columns are seed info including "Overall" for the total number of different types of seeds, followed by details on individual type of seeds (that is, "dGene", "pGene", "fGene", "nGene", "eGene", "cGene")

- `metag`: an "igraph" object

Otherwise (if displayBy is not 'evidence'), if aggregateBy is 'none' (by default), a data frame containing priority matrix, with each column/predictor for either priority score, or priorty rank or priority p-value. If aggregateBy is not 'none', an object of the class "dTarget", a list with following components:

- `priority`: a data frame of n X 4+7 containing gene priority (aggregated) information, where n is the number of genes, and the 4 columns are "name" (gene names), "rank" (ranks of the priority scores), "rating" (the 5-star score/rating), "description" (gene description), and 7 seed info columns including "seed" (whether or not seed genes), "nGene" (nearby genes), "cGene" (conformation genes), "eGene" (eQTL gens), "dGene" (disease genes), "pGene" (phenotype genes), and "fGene" (function genes)

- `predictor`: a data frame containing predictor matrix, with each column/predictor for either priority score/rating, or priorty rank or priority p-value

- `metag`: an "igraph" object

- `list_pNode`: a list of "pNode" objects

### Note

none

### See Also

`xSparseMatrix`, `xSymbol2GeneID`

### Examples

    RData.location <- "http://galahad.well.ox.ac.uk/bigdata"
    ## Not run:
    # get predictor matrix for targets
    df_score <- xPierMatrix(ls_pNode)
    # get evidence for targets
    eTarget <- xPierMatrix(ls_pNode, displayBy="evidence")
    # get target priority in a discovery mode
    dTarget <- xPierMatrix(ls_pNode, displayBy="pvalue",
    aggregateBy="fishers")

    ## End(Not run)

[Package Pi version 2.2.1 Index]