Skip to content

convert from mcool does not seem to work #88

Open
@ripkrizbi

Description

@ripkrizbi

Hi, I'm trying to prepare a contact map for instagraal and I'm unable to get the required format out of hicstuff. If I run the pipeline with default parameters, the pipeline runs successfully and outputs mcool. So far so good.

But, either trying to convert post-hoc (hicstuff convert), or running the original pipeline with -M graal results in an output error, complaining about an unsuccessful uft8 conversion:

Traceback (most recent call last):
  File "/home/kristian/miniconda3/bin/hicstuff", line 8, in <module>
    sys.exit(main())
  File "/home/kristian/miniconda3/lib/python3.10/site-packages/hicstuff/main.py", line 57, in main
    command.execute()
  File "/home/kristian/miniconda3/lib/python3.10/site-packages/hicstuff/commands.py", line 891, in execute
    hpi.full_pipeline(
  File "/home/kristian/miniconda3/lib/python3.10/site-packages/hicstuff/pipeline.py", line 1004, in full_pipeline
    hcd.attribute_fragments(pairs, pairs_idx, restrict_table)
  File "/home/kristian/miniconda3/lib/python3.10/site-packages/hicstuff/digest.py", line 176, in attribute_fragments
    pairs_header = hio.get_pairs_header(pairs_file)
  File "/home/kristian/miniconda3/lib/python3.10/site-packages/hicstuff/io.py", line 1299, in get_pairs_header
    line = pairs.readline()
  File "/home/kristian/miniconda3/lib/python3.10/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte

A quick glance at the code (and help) tells me that the format supported for conversion is the cool and not mcool, so am I right to suspect that the conversion functionality is missing at the moment?
Also a quick google with the utf-8 error shows there may be missing a binary flag when opening the file and I suspect this may be because of the fact that the file is NOT cool then it is open as something else...

Any help in getting the graal-compatible output (preferably without re-running the mapping) would be much appreciated!

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions