sanger-tol / genomenote

Nextflow DSL2 pipeline to generate a Genome Note, including assembly statistics, quality metrics, and Hi-C contact maps. This workflow is part of the Tree of Life production suite.
https://pipelines.tol.sanger.ac.uk/genomenote
MIT License
24 stars 6 forks source link

Local module: cooler/cload_pairs #7

Closed priyanka-surana closed 2 years ago

priyanka-surana commented 2 years ago

Description of feature

Software/tool: cooler/cload_pairs

Function: Create the .cool file from filtered genome index and BED files

priyanka-surana commented 2 years ago

We must find out from Charlotte what she needs so we can generate that and save it.

priyanka-surana commented 2 years ago

nf-core module cooler/cload works – https://github.com/nf-core/modules/blob/master/modules/cooler/cload/main.nf

The command submitted is

cooler cload \
    pairs -0 -c1 3 -p1 4 -c2 7 -p2 8 \
     \
    GCA_922984935.filtered.list:1000 \
    mMelMel3_T1.sorted.bed \
    mMelMel3_T1.1000.cool

and it fails with the following error:

Command error:
    is_cat = pd.api.types.is_categorical(bins["chrom"])

  INFO:cooler.create:Writing chunk 0: tmpandrnf0c.multi.cool::0
  INFO:cooler.create:Creating cooler at "tmpandrnf0c.multi.cool::/0"
  INFO:cooler.create:Writing chroms
  INFO:cooler.create:Writing bins
  INFO:cooler.create:Writing pixels
  INFO:cooler.create:Writing indexes
  INFO:cooler.create:Writing info
  INFO:cooler.create:Merging into mMelMel3_T1.1000.cool
  INFO:cooler.create:Creating cooler at "mMelMel3_T1.1000.cool::/"
  INFO:cooler.create:Writing chroms
  INFO:cooler.create:Writing bins
  INFO:cooler.create:Writing pixels
  INFO:cooler.reduce:nnzs: [0]
  INFO:cooler.reduce:current: [0]
  Traceback (most recent call last):
    File "/usr/local/bin/cooler", line 10, in <module>
      sys.exit(cli())
    File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
      return self.main(*args, **kwargs)
    File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1053, in main
      rv = self.invoke(ctx)
    File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
      return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
      return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
      return ctx.invoke(self.callback, **ctx.params)
    File "/usr/local/lib/python3.9/site-packages/click/core.py", line 754, in invoke
      return __callback(*args, **kwargs)
    File "/usr/local/lib/python3.9/site-packages/cooler/cli/cload.py", line 580, in pairs
      create_cooler(
    File "/usr/local/lib/python3.9/site-packages/cooler/create/_create.py", line 1039, in create_cooler
      create_from_unordered(
    File "/usr/local/lib/python3.9/site-packages/cooler/create/_create.py", line 765, in create_from_unordered
      create(cool_uri, bins, chunks, columns=columns, dtypes=dtypes, mode=mode, **kwargs)
    File "/usr/local/lib/python3.9/site-packages/cooler/create/_create.py", line 643, in create
      nnz, ncontacts = write_pixels(
    File "/usr/local/lib/python3.9/site-packages/cooler/create/_create.py", line 214, in write_pixels
      for i, chunk in enumerate(iterable):
    File "/usr/local/lib/python3.9/site-packages/cooler/reduce.py", line 156, in __iter__
      combined = pd.concat(
    File "/usr/local/lib/python3.9/site-packages/pandas/util/_decorators.py", line 311, in wrapper
      return func(*args, **kwargs)
    File "/usr/local/lib/python3.9/site-packages/pandas/core/reshape/concat.py", line 294, in concat
      op = _Concatenator(
    File "/usr/local/lib/python3.9/site-packages/pandas/core/reshape/concat.py", line 351, in __init__
      raise ValueError("No objects to concatenate")
  ValueError: No objects to concatenate

If someone with more knowledge about cooler than me, could advise that would be great. Same error happens with small genome dataset.

muffato commented 2 years ago

I don't know how to use cooler, and would just ask on #informatics

priyanka-surana commented 2 years ago

Resolved. Issue was upstream with a singularity image.