R/computeSim.R

Defines functions computeSim

# Compute similarity between contig and linkage group
# @useDynLib contiBAIT
# @import Rcpp
# @import BH
# @keywords internal 

computeSim <- function(contigStrand, linkageStrand, minimumLibraryOverlap)
{
	numCommon <- sum(!is.na(contigStrand) & !is.na(linkageStrand))
	numEqual <- sum((contigStrand == 2) == (linkageStrand == 2), na.rm=TRUE)
	if(numCommon < minimumLibraryOverlap) NA else numEqual / numCommon
}

Try the contiBAIT package in your browser

Any scripts or data that you put into this service are public.

contiBAIT documentation built on Nov. 8, 2020, 5:49 p.m.