returnCluster {TimiRGeN} | R Documentation

## returnCluster

### Description

Retrieves information about which wikipathways fitted best to a specific cluster. This function is to be used after quickFuzz.

### Usage

    returnCluster(MAE, clusterData, whichCluster, fitCluster)

### Arguments

`MAE` | MultiAssayExperiment which will store the output from returnCluster. It is recommended to use the same MAE which stores output from the createClusters function.
`clusterData` | A dataframe which contains cluster-pathway fit scores and is stored as an assay within the MAE used in the createClusters function.
`whichCluster` | Integer which should corresponds to the cluster of interest.
`fitCluster` | Integer from 0-1. How well should the pathways fit into the selected cluster? Default is 0.99.

### Value

A dataframe that contains information about the pathways that corresponded best with the chosen cluster. Output will be stored as an assay in the input MAE.

### Examples

    MAE <- MultiAssayExperiment()

    metadata(MAE)[["e_list"]] <- e_list_mouse

    metadata(MAE)[["w_list"]] <- w_list_mouse[1:10]

    MAE <- wikiMatrix(MAE, ID_list = metadata(MAE)[[1]],
                      wp_list = metadata(MAE)[[2]])

    MAE <- turnPercent(MAE = MAE,
                       wikiMatrix = assay(MAE, 1))

    MAE <- createClusters(MAE, method = "c",
                        percentMatrix = assay(MAE, 2),
                        noClusters = 2, variance = 0.99)

    MAE <- returnCluster(MAE, clusterData = assay(MAE, 3), whichCluster = 1,
                         fitCluster = 0.5)

[Package TimiRGeN version 1.4.0 Index]