vaquerizaslab / fanc

FAN-C: Framework for the ANalysis of C-like data
GNU General Public License v3.0
107 stars 14 forks source link

ValueError: not enough values to unpack #166

Closed nieyage closed 1 year ago

nieyage commented 1 year ago

Hello @kaukrise ,

I hope you are doing well. I have successfully run the examples in your repository with no issues. However, when I attempted to apply the code to my own dataset, I encountered some problems. I've included the code and the error message below:

 fanc auto /md01/nieyg/project/A3A/00.CleanData/A76/A76_1.clean.fq.gz \
/md01/nieyg/project/A3A/00.CleanData/A76/A76_1.clean.fq.gz \
./02.fanc_out/A76/ \
-g /md01/nieyg/ref/genome/hg19/hg19.fa \
-i /md01/nieyg/ref/bowtie2/hg19/hg19 \
-n A76 -t 1 -r MboI --iterative --split-ligation-junction -q 30
2023-09-05 03:11:18,052 INFO All done.
2023-09-05 03:11:20,575 INFO FAN-C version: 0.9.26
2023-09-05 03:11:20,577 INFO One argument received, assuming existing Pairs object.
Ligation error   0% (0 of 5448692) |     | Elapsed Time: 0:00:00 ETA:  --:--:--
Ligation error 100% (5448692 of 5448692) || Elapsed Time: 0:00:00 ETA:  00:00:00
2023-09-05 03:13:01,268 INFO Pairs: 0
2023-09-05 03:13:01,268 INFO Inter-chromosomal: 0
2023-09-05 03:13:01,268 INFO Same fragment: 5448692
2023-09-05 03:13:01,268 INFO Same: 0
2023-09-05 03:13:01,269 INFO Inward: 0
2023-09-05 03:13:01,269 INFO Outward: 0
Traceback (most recent call last):
  File "/public/home/nieyg/biosoft/conda/envs/fanc/bin/fanc", line 127, in <module>
    Fanc()
  File "/public/home/nieyg/biosoft/conda/envs/fanc/bin/fanc", line 93, in __init__
    command([sys.argv[0]] + sys.argv[option_ix:], log_level=log_level, verbosity=verbosity)
  File "/public/home/nieyg/biosoft/conda/envs/fanc/lib/python3.10/site-packages/fanc/commands/fanc_commands.py", line 1141, in pairs
    ligation_bias_plot(pairs, ax=ax)
  File "/public/home/nieyg/biosoft/conda/envs/fanc/lib/python3.10/site-packages/fanc/plotting/statistics.py", line 90, in ligation_bias_plot
    x, inward_ratios, outward_ratios, bins_sizes = pairs.get_ligation_structure_biases()
  File "/public/home/nieyg/biosoft/conda/envs/fanc/lib/python3.10/site-packages/fanc/pairs.py", line 1685, in get_ligation_structure_biases
    gaps, types = _sort_data(gaps, types)
ValueError: not enough values to unpack (expected 2, got 0)
Closing remaining open files:./02.fanc_out/A76/pairs/A76.pairs...done
Traceback (most recent call last):
  File "/public/home/nieyg/biosoft/conda/envs/fanc/bin/fanc", line 127, in <module>
    Fanc()
  File "/public/home/nieyg/biosoft/conda/envs/fanc/bin/fanc", line 93, in __init__
    command([sys.argv[0]] + sys.argv[option_ix:], log_level=log_level, verbosity=verbosity)
  File "/public/home/nieyg/biosoft/conda/envs/fanc/lib/python3.10/site-packages/fanc/commands/fanc_commands.py", line 123, in auto
    return fanc.commands.auto.auto(argv, **kwargs)
  File "/public/home/nieyg/biosoft/conda/envs/fanc/lib/python3.10/site-packages/fanc/commands/auto.py", line 1311, in auto
    runner.run()
  File "/public/home/nieyg/biosoft/conda/envs/fanc/lib/python3.10/site-packages/fanc/commands/auto.py", line 141, in run
    raise RuntimeError("Task {} had non-zero exit status. "
RuntimeError: Task 9e8d9227-67da-47ff-8ee6-7b11c9bc6015 had non-zero exit status. Cancelling execution of all tasks.

Could you please provide some guidance or suggestions ? Thank you in advance for your assistance.

Best regards, Yage

liz-is commented 1 year ago

Hi Yage - it looks like you have provided the same file twice rather than separate files for read 1 and read 2. This will cause the aligned reads to not be in proper pairs, as seen in your output.