plotSuggestedK: plotSuggestedK

View source: R/plotSuggestedK.R

plotSuggestedKR Documentation

plotSuggestedK

Description

Uses the information from findSuggestedK to plot the values of jaccard similarity from the tested k range on findSuggestedK.

Usage

plotSuggestedK(scCNA, geom = c("boxplot", "tile", "dotplot", "scatterplot"))

Arguments

scCNA

The scCNA object.

geom

A character with the geom to be used for plotting.

Details

plotSuggestedK access the metadata element suggestedK_df that is saved to the scDNA object after running findSuggestedK. The dataframe is used for plotting either a heatmap, when the argument geom = 'tile', or a dotplot when argument geom = 'dotplot' or a boxplot when geom = 'boxplot'.

  • geom = 'boxplot': Plots a boxplot of the jaccard similarities across all clusters detected in the grid search. The large red points represent the mean jaccard similarity.

    #'

  • geom = 'tile': Plots a heatmap of the jaccard similarities across all clusters detected in the grid search. The filling collors represent the jaccard similarity value. Rows represent clusters and columns the k value.

    #'

  • geom = 'dotplot': Plots a dotplot of the jaccard similarities across all clusters detected in the grid search. Where the size of the dots represent the jaccard similarity for each assesed k value.

    #'

  • geom = 'scatterplot': Plots a scatterplot of the jaccard similarity explained by the number of cells. Points are colored by subclone and lines represent a linear regression across the points.

Value

A ggplot2 object with the plot of different tested k values and their jaccard similarity for each subclone

Examples

copykit_obj <- copykit_example_filtered()
copykit_obj <- findSuggestedK(copykit_obj)
plotSuggestedK(copykit_obj)

navinlabcode/copykit documentation built on Sept. 22, 2023, 9:16 a.m.