returnCluster: returnCluster

Description Usage Arguments Value Examples

View source: R/returnCluster.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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)

TimiRGeN documentation built on April 17, 2021, 6:03 p.m.