createClusters: createClusters

Description Usage Arguments Value Examples

View source: R/createClusters.R

Description

Creates soft clusters to assess changes in gene abundance during the time course in many pathways. createClusters will create 3 data files. 1) Clusters will contain cluster logistics information and will be stored as metadata, 2) MfuzzData will contain fuzzy clustering information and will be stored as an experiment, 3) ClusterData will contain cluster-pathway fit information and will be stored as an assay. This function may take some time as it downloads pathway information.

Usage

1
2
createClusters(MAE, method, percentMatrix, noClusters,
dataString = '', variance)

Arguments

MAE

MultiAssayExperiment which will store the results from createClusters. It is recommended to use the MAE object which stores the output of by turnPercent.

method

Either "c" or "s", respectively for combined or separated analysis.

percentMatrix

A matrix containing wikipathway-data information. It is output from the turnPercent function and will be stored as an assay within the MAE used in the turnPercent function.

noClusters

Number of clusters to create, the default is 5.

dataString

Only for use in "s" analysis. Insert the prefix string e.g. "mRNA" or "miR". The string added should be the same as the prefixString added during the addPrefix function.

variance

Numeric value from 0-1 to control strictness of filtering. Higher variance means more pathways will be excluded from the analysis.

Value

3 new objects in the input MAE. Clusters(metadata): A list to be used as the input in checkClusters and quickFuzz. MfuzzData(ExperimentList): An ExpressionSet object to be used as input for quickFuzz. ClusterData(assay): An assay to be used as input for returnCluster.

Examples

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

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