nanoporetech / pore-c

Pore-C support
Mozilla Public License 2.0
52 stars 5 forks source link

error message during conversion to cool format #51

Open erbon7 opened 2 years ago

erbon7 commented 2 years ago

Hi,

I have an error message while trying to convert contacts pairs to cool format with the command

pore_c contacts export sample1.contacts cooler sample1  --fragment-table vd.fragment.parquet --chromsizes chrom_hg19.sizes

The error message is

/env/cng/proj/LBA/scratch/eb/tools/anaconda3/envs/pore-c/lib/python3.7/site-packages/pandas/core/arrays/categorical.py:2631: FutureWarning: The `inplace` parameter in pandas.Categorical.set_categories is deprecated and will be remove
d in a future version. Removing unused categories will always return a new Categorical object.
  res = method(*args, **kwargs)
2022-03-24 09:04:35,451 - cooler.create - INFO - Creating cooler at "PAE96406.cool::/"
2022-03-24 09:04:35,456 - cooler.create - INFO - Writing chroms
2022-03-24 09:04:35,460 - cooler.create - INFO - Writing bins
2022-03-24 09:04:36,051 - cooler.create - INFO - Writing pixels
Traceback (most recent call last):
  File "/env/cng/proj/LBA/scratch/eb/tools/anaconda3/envs/pore-c/bin/pore_c", line 33, in <module>
    sys.exit(load_entry_point('pore-c', 'console_scripts', 'pore_c')())
  File "/env/cng/proj/LBA/scratch/eb/tools/anaconda3/envs/pore-c/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/env/cng/proj/LBA/scratch/eb/tools/anaconda3/envs/pore-c/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/env/cng/proj/LBA/scratch/eb/tools/anaconda3/envs/pore-c/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/env/cng/proj/LBA/scratch/eb/tools/anaconda3/envs/pore-c/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/env/cng/proj/LBA/scratch/eb/tools/anaconda3/envs/pore-c/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/env/cng/proj/LBA/scratch/eb/tools/anaconda3/envs/pore-c/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/env/cng/proj/LBA/scratch/eb/tools/anaconda3/envs/pore-c/lib/python3.7/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/env/export/v_home/q_unix/bonnet/src/git-pore-c/pore_c/cli.py", line 895, in export
    by_haplotype=by_haplotype,
  File "/env/export/v_home/q_unix/bonnet/src/git-pore-c/pore_c/analyses/contacts.py", line 90, in export_to_cooler
    create_cooler(cooler_path, bins_df, pixels, ordered=True, symmetric_upper=True, ensure_sorted=True)
  File "/env/cng/proj/LBA/scratch/eb/tools/anaconda3/envs/pore-c/lib/python3.7/site-packages/cooler/create/_create.py", line 1036, in create_cooler
    lock=lock,
  File "/env/cng/proj/LBA/scratch/eb/tools/anaconda3/envs/pore-c/lib/python3.7/site-packages/cooler/create/_create.py", line 644, in create
    file_path, target, meta.columns, iterable, h5opts, lock
  File "/env/cng/proj/LBA/scratch/eb/tools/anaconda3/envs/pore-c/lib/python3.7/site-packages/cooler/create/_create.py", line 214, in write_pixels
    for i, chunk in enumerate(iterable):
  File "/env/cng/proj/LBA/scratch/eb/tools/anaconda3/envs/pore-c/lib/python3.7/site-packages/cooler/create/_ingest.py", line 359, in _validate_pixels
    raise BadInputError("Found bin1_id greater than bin2_id")
cooler.create._ingest.BadInputError: Found bin1_id greater than bin2_id

Thanks for your help