Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: running cphasing pipeline with "--chimeric-correct" option cause error in ploting #15

Open
Echoring opened this issue Feb 21, 2025 · 1 comment

Comments

@Echoring
Copy link

Echoring commented Feb 21, 2025

Dear developers,

Thank you for developing such excellent tool.

When I using cphasing pipeline, I notice that without "--chimeric-correct" option, everything is alright, but with this option switch on, an error will occur in the final step 5 (plotting).

I take some investigation and find that the issue is,
https://github.com/wangyibin/CPhasing/blob/main/cphasing/core.py#L1761-L1769
in this block, record.split(":")[1].split() on uncorrected lines #chromsize: h1tg000550l 30760 get ['h1tg000550l', '30760'],
but on corrected lines #chromsize: h2tg000071l:250501-1084447 833947, it split on the second : and get ['h2tg000071l'], causing the error.

Add maxsplit=1 to L1764 (_res = [record.split(":", maxsplit=1)[1].split() for record in _res]) seems solve this issue. (haven't checked yet) (tested, success, but some homologous chromosome shows no contact, seems there may be more uncatched error)

Best wishes.

@wangyibin
Copy link
Owner

I am very sorry for replying so late.
Thank you for your report on the bug of PairHeader processing. We will fix it in the next release.

The problem of loss contact is a bug of the cphasing pairs2cool command; you can add the parameter of --low-memory to generate a new .cool file to skip it. And we will fix it in the next release.

Best wishes.

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

No branches or pull requests

2 participants