nanoporetech / pore-c

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

pore_c pairs to-matrix fails #38

Closed bistace closed 4 years ago

bistace commented 4 years ago

Hi,

I am using the porec snakemake pipeline (not sure if I should post this issue here or on the porec snakemake issue tracker, as it is related to both) and I have a problem at the step create_base_matrix. Indeed, the following command is launched but crashes:

pore_c pairs to-matrix results/pairs/DpnII_700ng_Z1.pairs.catalog.yaml results/matrix/DpnII_700ng_Z1.matrix -r 1000 -n 1 2>results/logs/results/matrix/DpnII_700ng_Z1.matrix.catalog.yaml.log

The log file is filled with this type of errors:

No iter_unit lement in merged_iter_t

And finally, porec crashes with the following error:

2020-06-12 12:11:52,956 - pore_c.analyses.pairs - INFO - Writing COO to results/matrix/DpnII_700ng_Z1.matrix.coo.csv.gz
Traceback (most recent call last):
  File "/home/bistace/anaconda3/envs/poreC/bin/pore_c", line 11, in <module>
    load_entry_point('pore-c', 'console_scripts', 'pore_c')()
  File "/home/bistace/anaconda3/envs/poreC/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/bistace/anaconda3/envs/poreC/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/bistace/anaconda3/envs/poreC/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/bistace/anaconda3/envs/poreC/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/bistace/anaconda3/envs/poreC/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/bistace/anaconda3/envs/poreC/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/bistace/porec/Pore-C-Snakemake/pore-c/src/pore_c/cli.py", line 337, in to_matrix
    metadata = convert_pairs_to_matrix(ds, resolution=resolution, n_workers=n_workers, coo=file_paths["coo"])
  File "/home/bistace/porec/Pore-C-Snakemake/pore-c/src/pore_c/analyses/pairs.py", line 174, in convert_pairs_to_matrix
    matrix.save_coo(coo)
  File "/home/bistace/porec/Pore-C-Snakemake/pore-c/src/pore_c/analyses/pairs.py", line 71, in save_coo
    raise ValueError(f"No data to write to {path}")
ValueError: No data to write to results/matrix/DpnII_700ng_Z1.matrix.coo.csv.gz

Could you please help me solve this issue?

bistace commented 4 years ago

Hi, I solved this problem by simply renaming the headers of the assembly file with seqtk rename.