Skip to content

Max_expected reference coherence calculation for spatial coherence #9

@erik40021

Description

@erik40021

Hi,
thanks a lot for publishing the code and for this interesting approach!

I am applying your scripts to calculate spatial coherence in 10x visium samples and there I stumbled across this function:

one_val = function(spots_num) { 
  a = sqrt((4*spots_num)/(6*sqrt(3)))
  oneval = (6*spots_num-12*a-6)/spots_num
  return(oneval)
}

As I understand it estimates the maximum expected coherence in a window of spots for the given number of spots assigned to the metaprogram/cluster in question.
However, it is unclear to me how the formula that is implemented here works. Could you explain the maths behind this function?

This would help me a lot!!
Thanks in advance,
Erik

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions