plot_simdensity: Density plot showing the distribution of similarities

View source: R/plotting.R

plot_simdensityR Documentation

Density plot showing the distribution of similarities

Description

This function draws similarity values across all comparisons. Then, the best value obtained for the sample of interest is plotted to see how probable is to get this similarity value

Usage

plot_simdensity(measures, method)

Arguments

measures

dataframe with similarity metrics of comparisons between the sample of interest and the rest of cell lines included in the dataset

method

similarity metric to use for plotting. Options are pearson, manhattan, euclidean, and cosine

Value

A density plot with the distribution of similarities including the best similarity value obtained for the sample of interest. The min and max values are also reported

Examples

## Not run: 
posBins<-lapply(seq_len(22),function(chr) getBinsStartsEnds(window=500000, chr, lengthChr[chr]))
ccle_cn<-getCNbins(posBins=posBins, data=cells_segcn, samples=unique(cells_segcn$sample)[1:2])
exp_cell<-as.matrix(ccle_cn[,1])
colnames(exp_cell)<-unique(cells_segcn$sample)[1]
measures<-getSimilarities(dat1=exp_cell,dat2=ccle_cn)
plot_simdensity(measures,method="pearson")

## End(Not run)

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