Check clustering results format
Source:R/bayesian_graphical_clustering.R
check_cluster_res_format.Rd
This function will generate warnings or errors if there are issues with the format of the input.
Used internally in extract_main_clusters()
.
Arguments
- cluster_res
Either a data frame or a list of lists. If a data frame, it needs at least two columns: "feature" and "cluster". The "feature" column should be in the format 'MotrpacRatTraining6moData::ASSAY_ABBREV;MotrpacRatTraining6moData::TISSUE_ABBREV;feature_ID'. If a list of lists, each sublist must be named with the cluster name (character string), and the values must be features in the format 'MotrpacRatTraining6moData::ASSAY_ABBREV;MotrpacRatTraining6moData::TISSUE_ABBREV;feature_ID'.
Value
a data frame with 5 columns:
feature
character, unique feature identifier in the format 'MotrpacRatTraining6moData::ASSAY_ABBREV;MotrpacRatTraining6moData::TISSUE_ABBREV;feature_ID' only for training-regulated features at 5% IHW FDR. For redundant differential features, 'feature_ID' is prepended with the specific platform to make unique identifiers. See MotrpacRatTraining6moData::REPEATED_FEATURES for details.
cluster
character, cluster label
ome
character, assay abbreviation, one of MotrpacRatTraining6moData::ASSAY_ABBREV
tissue
character, tissue abbreviation, one of MotrpacRatTraining6moData::TISSUE_ABBREV
feature_ID
character, MoTrPAC feature identifier
Examples
# Note this example is redundant because check_cluster_res_format()
# is called within extract_main_clusters(), but it provides an
# example input and output
cluster_res = extract_main_clusters()
cluster_res_checked = check_cluster_res_format(cluster_res)