assess_quality: Generate the cluster quality figure.

Description Usage Arguments Value Examples

View source: R/assess_quality.R

Description

This function takes the GECO scores table generated by the score_clusters function and finds the ROC/AUC values for the scores. These scores are then arranged into a dataframe for display with ggplot2.

Usage

1
assess_quality(GECO_scores)

Arguments

GECO_scores

The scores dataframe output by score_clusters.

Value

A ggplot2 object ready for plotting e.g. plot(returned_object)

Examples

1
2
3
4
5
6
7
8
9
# Create pseudo scores tables: >1 required
df10 <- data.frame(clust_num = sample(1:10, 200, replace = TRUE), gene_name = sample(paste0(rep("Gene.", 200), seq(1:200)), 200, replace = FALSE), pos_vec = sample(c(rep("FALSE",197), rep("TRUE",3)), 200, replace = FALSE), prob_vec = sample(runif(10), 200, replace = TRUE))
df12 <- data.frame(clust_num = sample(1:10, 200, replace = TRUE), gene_name = sample(paste0(rep("Gene.", 200), seq(1:200)), 200, replace = FALSE), pos_vec = sample(c(rep("FALSE",197), rep("TRUE",3)), 200, replace = FALSE), prob_vec = sample(runif(10), 200, replace = TRUE))
# Create the scores structure and insert our tables
scores <- list()
scores$`Ground Truth Set X`$`Iteration 1`$`10` <- df10
scores$`Ground Truth Set X`$`Iteration 1`$`12` <- df12
fig <- assess_quality(scores)
plot(fig)

JasonPBennett/GECO documentation built on Aug. 30, 2021, 4:30 p.m.