get_CMPS {cmpsR} | R Documentation |
Compute the CMPS score
Description
Compute the CMPS score from a list of positions of (consistent) correlation peaks.
Usage
get_CMPS(input_ccp, Tx = 25)
Arguments
input_ccp |
a list of positions for (consistent) correlation peaks |
Tx |
integer, the tolerance zone is |
Value
a list of six components:
-
CMPS_score
: computed CMPS score -
nseg
: the number of basis segments -
congruent_pos
: the congruent position that results in the CMPS score -
congruent_seg
: a boolean vector of the congruent matching profile segments -
congruent_seg_idx
: the index of the congruent matching profile segments -
pos_df
: a dataframe that includes all positions and their corresponding CMPS score
Examples
data("bullets")
land2_3 <- bullets$sigs[bullets$bulletland == "2-3"][[1]]
land1_2 <- bullets$sigs[bullets$bulletland == "1-2"][[1]]
x <- land2_3$sig
y <- land1_2$sig
segments <- get_segs(x, len = 50)
nseg <- length(segments$segs)
seg_scale_max <- 3
npeaks_set <- c(5,3,1)
outlength <- c(50, 100, 200)
ccp_list <- lapply(1:nseg, function(nseg) {
ccr_list <- lapply(1:seg_scale_max, function(seg_scale) {
get_ccr_peaks(y, segments, seg_outlength = outlength[seg_scale],
nseg = nseg, npeaks = npeaks_set[seg_scale])
})
get_ccp(ccr_list, Tx = 25)
})
cmps <- get_CMPS(ccp_list, Tx = 25)
[Package cmpsR version 0.1.2 Index]