comparison_cor: Calculates correlation between a cell and a matrix of the...

Description Usage Arguments Value Examples

Description

Calculates correlation between a cell and a matrix of the same dimensions extracted from the cell's associated region.

Usage

1
2
3
4
5
6
comparison_cor(
  cellHeightValues,
  regionHeightValues,
  fft_ccf_df,
  use = "pairwise.complete.obs"
)

Arguments

cellHeightValues

list/tibble column of x3p objects containing a reference scan's cells (as returned by comparison_cellDivision)

regionHeightValues

list/tibble column of x3p objects containing a target scan's regions (as returned by comparison_getTargetRegions)

fft_ccf_df

data frame/tibble column containing the data frame of (x,y) and CCF values returned by comparison_fft_ccf

use

argument for stats::cor

Value

A vector of the same length as the input containing correlation values at the estimated alignment between each reference cell and its associated target region

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
data(fadul1.1_processed,fadul1.2_processed)

cellTibble <- fadul1.1_processed %>%
comparison_cellDivision(numCells = 64) %>%
dplyr::mutate(regionHeightValues =
             comparison_getTargetRegions(cellHeightValues = cellHeightValues,
                                         target = fadul1.2_processed)) %>%
dplyr::mutate(cellPropMissing =
           comparison_calcPropMissing(heightValues = cellHeightValues),
              regionPropMissing =
           comparison_calcPropMissing(heightValues = regionHeightValues)) %>%
dplyr::filter(cellPropMissing <= .85 & regionPropMissing <= .85) %>%
dplyr::mutate(cellHeightValues =
        comparison_standardizeHeights(heightValues = cellHeightValues),
              regionHeightValues =
        comparison_standardizeHeights(heightValues = regionHeightValues)) %>%
dplyr::mutate(cellHeightValues =
                  comparison_replaceMissing(heightValues = cellHeightValues),
              regionHeightValues =
            comparison_replaceMissing(heightValues = regionHeightValues)) %>%
dplyr::mutate(fft_ccf_df = comparison_fft_ccf(cellHeightValues,
                                              regionHeightValues)) %>%
dplyr::mutate(pairwiseCompCor = comparison_cor(cellHeightValues,
                                               regionHeightValues,
                                               fft_ccf_df))

head(cellTibble)

cmcR documentation built on April 5, 2021, 5:09 p.m.