getTopHit: Get top hits

View source: R/qtool_functions.R

getTopHitR Documentation

Get top hits

Description

This function get the top hit for each comparison per sample

Usage

getTopHit(samples, measure, method = "all")

Arguments

samples

vector with name of samples

measure

dataframe with similarity metrics

method

similarity metric to use for ordering. Default is all

Value

dataframe with similarity metrics for all comparisons

Examples

posBins<-lapply(1,function(chr)
    getBinsStartsEnds(window=1000000, 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,method="pearson")
tophits<-getTopHit(samples=unique(cells_segcn$sample)[1],measure=measures,method="pearson")

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