cooler icon indicating copy to clipboard operation
cooler copied to clipboard

cooler cload pairix is giving segmentation fault

Open narzouni opened this issue 1 year ago • 6 comments

Hello,

I am running cooler cload pairix on a pairs.gz file with mm39 chromosome sized file. Running the command will give a segmentation fault immediately.

Does any one encounter the same issue? I still did not figure out the reason.

The command I am using is:

cooler cload pairix -p 16 mm39.genome:1000 Mapped.pairs.gz matrix_1kb.cool

where the pairs.gz was compressed by bgzip. I also indexed the file pairs.gz with pairix.

I hope anyone can give an insight or help. Thank you.

narzouni avatar May 07 '24 19:05 narzouni

Not sure why you get an error, but can you try the same command with cooler cload pairs instead of ... pairix?

Phlya avatar May 07 '24 19:05 Phlya

I tried the following command:

cooler cload pairs -c1 3 -p1 4 -c2 7 -p2 8 mm39.genome:10000 Mapped.pairs.gz matrix_10kb.cool

I used -c1 etc because these are required options.

I received a different error:

File "/usr/people/na1456/.conda/envs/HiCEnv/lib/python3.10/site-packages/cooler/cli/cload.py", line 551, in pairs f_in = get_handle(pairs_path, mode='r', compression='infer')[0] TypeError: 'IOHandles' object is not subscriptable

narzouni avatar May 07 '24 19:05 narzouni

What pandas version do you have?

Phlya avatar May 08 '24 10:05 Phlya

What pandas version do you have?

I have pandas 1.5.3

narzouni avatar May 08 '24 13:05 narzouni

OK, from what I can see this is a known issue, which has been fixed in the master branch of cooler. You can either install cooler from the master branch on GitHub, or install pandas 1.0 or 1.1. The behaviour of this function changed in pandas 1.0 and then got reversed back in 1.2...

Relevant code in the master branch for reference: https://github.com/open2c/cooler/blob/77c23f77e1a717c34d380c194df10d48d2e1cbde/src/cooler/cli/cload.py#L614

Phlya avatar May 08 '24 13:05 Phlya

It looks like pandas version was an issue. I am able to use the cooler commands without issues now.

narzouni avatar May 09 '24 15:05 narzouni

Excellent, thank you for reporting back!

Phlya avatar May 09 '24 15:05 Phlya