Skip to content

Fix chromsizes in scaling#283

Open
Phlya wants to merge 2 commits intomasterfrom
fix-scaling
Open

Fix chromsizes in scaling#283
Phlya wants to merge 2 commits intomasterfrom
fix-scaling

Conversation

@Phlya
Copy link
Member

@Phlya Phlya commented Feb 3, 2026

Addresses #282 - the chromsizes are extracted in the compute_scaling anyway, so we just need to actually use them.

Fixes the scaling to look like this:

chrom1  start1  end1    chrom2  start2  end2    strand1 strand2 min_dist        max_dist        n_pairs n_bp2
chr1    0       195471971       chr1    0       195471971       +       +       0.0     10.0    0       1954719660.0
chr1    0       195471971       chr1    0       195471971       +       +       10.0    13.0    0       586415880.0
chr1    0       195471971       chr1    0       195471971       +       +       13.0    16.0    1       586415868.0
chr1    0       195471971       chr1    0       195471971       +       +       16.0    20.0    0       781887812.0
chr1    0       195471971       chr1    0       195471971       +       +       20.0    25.0    1       977359744.0
chr1    0       195471971       chr1    0       195471971       +       +       25.0    32.0    55      1368303596.0
chr1    0       195471971       chr1    0       195471971       +       +       32.0    40.0    439     1563775480.0
chr1    0       195471971       chr1    0       195471971       +       +       40.0    50.0    1363    1954719260.0

instead of

chrom1  start1  end1    chrom2  start2  end2    strand1 strand2 min_dist        max_dist        n_pairs n_bp2
chr1    0       -1      chr1    0       -1      +       +       0.0     10.0    0.0     0.0
chr1    0       -1      chr1    0       -1      +       +       10.0    13.0    0.0     0.0
chr1    0       -1      chr1    0       -1      +       +       13.0    16.0    1.0     0.0
chr1    0       -1      chr1    0       -1      +       +       16.0    20.0    0.0     0.0
chr1    0       -1      chr1    0       -1      +       +       20.0    25.0    1.0     0.0
chr1    0       -1      chr1    0       -1      +       +       25.0    32.0    55.0    0.0
chr1    0       -1      chr1    0       -1      +       +       32.0    40.0    439.0   0.0
chr1    0       -1      chr1    0       -1      +       +       40.0    50.0    1363.0  0.0

@Phlya
Copy link
Member Author

Phlya commented Feb 3, 2026

I believe the test was actually wrong, now I added explicit removal of (single or double) unmapped pairs, the behaviour before was somehow inconsistent whether the view/regions was provided or not I think. I don't see a reason to include unmapped reads in the scaling calculation, so better to explicitly filter them out IMO.

@Phlya Phlya requested review from agalitsyna and golobor February 3, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant