Skip to content

Conversation

@Phlya
Copy link
Member

@Phlya Phlya commented May 3, 2024

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...

@Phlya Phlya requested a review from golobor May 3, 2024 13:18
@Phlya
Copy link
Member Author

Phlya commented May 3, 2024

) # double unmapped pairs are currently ignored by lib.scaling

Are single unmapped pairs somehow supposed to contribute to scaling? I think this might be why the test fails...

@golobor
Copy link
Member

golobor commented May 3, 2024 via email

@Phlya
Copy link
Member Author

Phlya commented May 3, 2024

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?

@Phlya
Copy link
Member Author

Phlya commented May 3, 2024

(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?)

@Phlya
Copy link
Member Author

Phlya commented May 3, 2024

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...

if chromsizes is None:

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(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the main change

@Phlya
Copy link
Member Author

Phlya commented Jun 4, 2024

@golobor can we merge this?

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.

3 participants