plot_tsne: tSNE graphs

View source: R/plot_tsne.R

plot_tsneR Documentation

tSNE graphs

Description

tSNE graphs colored according to QC metrics or sample labels.

Usage

plot_tsne(tsne_df, qc_df = NULL, comm_df = NULL, info_df = NULL)

Arguments

tsne_df

the output data.frame from run_tsne (columns: cell, tsne1, tsne2)

qc_df

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

comm_df

a data.frame with communities (output from find_communities). Default is NULL (i.e. not used)

info_df

a data.frame with sample merge info (output from merge_samples).

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 points can be colored by sample of origin by providing the info_df data.frame.

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

Value

a list of ggplot objects

Author(s)

Jean Monlong

Examples

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

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

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

## End(Not run)

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