plot_communities: Community graphs

View source: R/plot_communities.R

plot_communitiesR Documentation

Community graphs

Description

Graphs about the communities found by find_communities. For example the size of the communities or the distribution of QC metrics in each community.

Usage

plot_communities(comm_df, qc_df = NULL, info_df = NULL)

Arguments

comm_df

the output data.frame from find_communities

qc_df

a data.frame with QC metrics (output from qc_cells). Default is NULL (i.e. not used)

info_df

a data.frame with sample merge info (output from merge_samples). Default is NULL (i.e. not used)

Details

If the QC data.frame is provided, the distribution of QC metrics is shown to investigate if some communities are batch effects.

If multiple samples were merged (merge_samples), the proportion of cells from each sample of origin can be shown if the info_df data.frame is provided.

If qc_df and/or info_df are null but their columns present in comm_df, their corresponding graphs will be generated. Hence a merged version of comm_df, qc_df and info_df works (e.g. output of auto_cna_signal.

Value

a list of ggplot2 graphs.

Author(s)

Jean Monlong

Examples

## Not run: 
ggp.l = plot_communities(comm_df, qc_df)

## Print first graph
ggpl.l[[1]]

## Customize ggplot
ggpl.l[[1]] + ggtitle('First graph about communities')

## End(Not run)

jmonlong/scCNAutils documentation built on May 3, 2022, 4:34 a.m.