Conversation
|
pairtools/tests/test_scaling.py Line 27 in 8c41a26 Are single unmapped pairs somehow supposed to contribute to scaling? I think this might be why the test fails... |
|
nah, they are never counted.
…On Fri, 3 May 2024 at 15:34, Ilya Flyamer ***@***.***> wrote:
https://github.com/open2c/pairtools/blob/8c41a26b3f3a3905e307f3baa4b547203394dca1/tests/test_scaling.py#L27
Are single unmapped pairs somehow supposed to contribute to scaling? I
think this might be why the test fails...
—
Reply to this email directly, view it on GitHub
<#239 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG64CVEOSBP5SA34U4CKWLZAOG7NAVCNFSM6AAAAABHFQMVTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJTGAZTKMJSG4>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
|
Then why does the test assert 9 total pairs? It doesn't make sense to me, but somehow I guess this test was passing before? |
|
(As an aside, in the file there is a pair with both sides beyond the end of the chromosome... should that actually error or warn at least?) |
|
OK, I think I know where the problem is: when not chromsizes are provided, internally they are created from the data, and then there is a fake chrom "!" which I guess just behaves like any other chromosome... pairtools/pairtools/lib/scaling.py Line 143 in 8c41a26 So I would say the test is wrong in this case? |
|
|
||
| elif isinstance(pairs, str) or hasattr(pairs, "buffer") or hasattr(pairs, "peek"): | ||
| pairs_df, _, _ = pairsio.read_pairs(pairs, nproc=nproc_in, chunksize=chunksize) | ||
| pairs_df, _, chromsizes = pairsio.read_pairs( |
|
@golobor can we merge this? |
|
Shall we merge this? I realize the PR is full of blackification, sorry it's annoying... |
Scaling without a view was broken! Docs said it would use the chromsizes from the header, but there was no code that was doing it...