Skip to content

Conversation

@jamespeapen
Copy link
Member

This is tested on the example k562 data at 1mb and 100kb, but should probably be tested on other HiC datasets.

It computes the dot products of V and the correlation matrix. Dot products signs show whether the directions of V for each row/bin match the direction of the correlation matrix. We pick the majority direction by summing them up and if the direction is negative the V sign is flipped.

The paper describing this method uses this example where the red lines are the data directions and the blue line is the singular vector going in the opposite direction.
image

fixSign also reports the direction dominance to give users a 'confidence' metric to show how many more dot products supported the dominant direction.

In the case of the 1mb inference the difference is very small. For 100kb, its larger:

# 1mb - flip sign
# difference: 0.01
      -1        1
0.505618 0.494382

Original                                                         Fixed
imageimage

# 100kb - keep sign
# difference: 0.27
       -1         1 
0.3646659 0.6353341

> 0.9-0.1
[1] 0.8
> 0.8-0.2
[1] 0.6
> 0.7-0.3
[1] 0.4
> 0.6-0.4
[1] 0.2
> 0.5-0.5
[1] 0

Original
image

This is a harder to verify for single-cell inference without single-cell references.

@jamespeapen jamespeapen added this to the v2 milestone Jan 14, 2026
@jamespeapen jamespeapen requested a review from biobenkj January 14, 2026 16:19
@jamespeapen jamespeapen added the enhancement New feature or request label Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant