Skip to contents

the abundance of each gene in a cluster as a barplot.

Usage

abundanceCategoryPlot(data, cluster, output_dir)

Arguments

data

dataframe with the gene names, q-values and TF-IDF values.

cluster

the cluster to plot.

output_dir

the directory to save the plot.

Value

a ggplot2 plot saved to output_dir

Examples

data <- data.frame(
    gene = c("Gene1", "Gene2", "Gene3"),
    qval = c(0.01, 0.05, 0.001),
    tfidf = c(0.8, 0.6, 0.9),
    cluster = c("Cluster1", "Cluster1", "Cluster1")
)

# Define the cluster and output directory
cluster <- "Cluster1"
output_dir <- tempdir()

# Call the abundanceCategoryPlot function
abundanceCategoryPlot(data, cluster, output_dir)