plotClusters: Plots a scatter plots with samples clustered

View source: R/plotting.R

plotClustersR Documentation

Plots a scatter plots with samples clustered

Description

This function draws a scatter plot with samples grouped based of signature exposures. Only the closest cluster to the input sample is colored.

Usage

plotClusters(matrix, samples)

Arguments

matrix

matrix variables in rows and samples in columns

samples

vector with samples in the closest cluster of the input sample

Value

A plot with samples clustered by similarity in signature exposition

Examples

matrix<-cbind(s1=runif(10, min=0, max=1), s2=runif(10, min=0, max=1),
    s3=runif(10, min=0, max=1))
rownames(matrix)<-paste0("c", seq(1,10))
cell<-matrix(runif(n = 3, min = 0, max = 1))
samples<-getClusterSamples(t(matrix), cell, include=FALSE)
plotClusters(t(matrix), samples)

macintyrelab/CNpare documentation built on April 15, 2022, 4:46 a.m.