Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to execute command: partig #9

Open
xiekunwhy opened this issue Jan 4, 2025 · 4 comments
Open

Failed to execute command: partig #9

xiekunwhy opened this issue Jan 4, 2025 · 4 comments

Comments

@xiekunwhy
Copy link

Hi,

Always can not run partig even partig executable binary was copied into cphasing conda env and/or copied into CPhasing/bin, so there must be some thing wrong in alleles.py where trying to execute partig.

The CPhasing/bin
image

The partig also in conda env bin directory
image

The command line

#!/bin/bash
source /public2/home/sl_qybio/sl_qybio/miniforge3/bin/activate cphasing
export PATH=/public2/home/sl_qybio/sl_qybio/software/biosoft/CPhasing/bin:$PATH
export PYTHONPATH=/public2/home/sl_qybio/sl_qybio/software/biosoft/CPhasing:$PYTHONPATH
export LD_LIBRARY_PATH=/public2/home/sl_qybio/sl_qybio/miniforge3/envs/cphasing/lib:$LD_LIBRARY_PATH
cphasing pipeline -f gra.2hap.fa --steps 1,2,3,4,5 -hic1 gra.hic_1.fq.gz -hic2 gra.hic_2.fq.gz -t 64 -n 19:2 --pattern GATC

The error

[10:11:15] INFO     C-Phasing version: 0.2.0.r282                pipeline.py:118
           INFO     Pipeline is started on 2025-01-04.           pipeline.py:120
           INFO     Working on existing directory:               pipeline.py:140
                    `cphasing_output`                                           
           INFO     Total size of contig-level assembly: 6g      pipeline.py:585
           INFO                                                  pipeline.py:587
                    #----------------------------------#                        
                    #      Running step 1. alleles     #                        
                    #----------------------------------#                        
           INFO     Calculating the similarity of sequences ...   alleles.py:265
Traceback (most recent call last):
  File "/public2/home/sl_qybio/sl_qybio/software/biosoft/CPhasing/bin/cphasing", line 7, in <module>
    sys.exit(cli())
             ^^^^^
  File "/public2/home/sl_qybio/sl_qybio/miniforge3/envs/cphasing/lib/python3.12/site-packages/click/core.py", line 1161, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/public2/home/sl_qybio/sl_qybio/miniforge3/envs/cphasing/lib/python3.12/site-packages/rich_click/rich_command.py", line 126, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/public2/home/sl_qybio/sl_qybio/miniforge3/envs/cphasing/lib/python3.12/site-packages/click/core.py", line 1697, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/public2/home/sl_qybio/sl_qybio/miniforge3/envs/cphasing/lib/python3.12/site-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/public2/home/sl_qybio/sl_qybio/miniforge3/envs/cphasing/lib/python3.12/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/public2/home/sl_qybio/sl_qybio/software/biosoft/CPhasing/cphasing/cli.py", line 1023, in pipeline
    run(fasta, 
    ^^^^^^^^^^
  File "/public2/home/sl_qybio/sl_qybio/software/biosoft/CPhasing/cphasing/pipeline/pipeline.py", line 613, in run
    alleles.main(args=args,
  File "/public2/home/sl_qybio/sl_qybio/miniforge3/envs/cphasing/lib/python3.12/site-packages/rich_click/rich_command.py", line 126, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/public2/home/sl_qybio/sl_qybio/miniforge3/envs/cphasing/lib/python3.12/site-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/public2/home/sl_qybio/sl_qybio/miniforge3/envs/cphasing/lib/python3.12/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/public2/home/sl_qybio/sl_qybio/software/biosoft/CPhasing/cphasing/cli.py", line 2344, in alleles
    pa.run()
  File "/public2/home/sl_qybio/sl_qybio/software/biosoft/CPhasing/cphasing/alleles.py", line 298, in run
    self.partig()
  File "/public2/home/sl_qybio/sl_qybio/software/biosoft/CPhasing/cphasing/alleles.py", line 285, in partig
    raise Exception('Failed to execute command:' 
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Exception: Failed to execute command:   partig -k19 -w19 -m0.5 -c60 -n5 -d0.1 -t64 ../gra.2hap.fa.

Best,
Kun

@xiekunwhy
Copy link
Author

The error still take place even I chang partig to absolute path
image

cat cphasing.sh_2401556.err
[10:54:22] INFO     C-Phasing version: 0.2.0.r282                pipeline.py:118
           INFO     Pipeline is started on 2025-01-04.           pipeline.py:120
           INFO     Working on existing directory:               pipeline.py:140
                    `cphasing_output`                                           
           INFO     Total size of contig-level assembly: 6g      pipeline.py:585
           INFO                                                  pipeline.py:587
                    #----------------------------------#                        
                    #      Running step 1. alleles     #                        
                    #----------------------------------#                        
[10:54:23] INFO     Calculating the similarity of sequences ...   alleles.py:265
Traceback (most recent call last):
  File "/public2/home/sl_qybio/sl_qybio/software/biosoft/CPhasing/bin/cphasing", line 7, in <module>
    sys.exit(cli())
             ^^^^^
  File "/public2/home/sl_qybio/sl_qybio/miniforge3/envs/cphasing/lib/python3.12/site-packages/click/core.py", line 1161, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/public2/home/sl_qybio/sl_qybio/miniforge3/envs/cphasing/lib/python3.12/site-packages/rich_click/rich_command.py", line 126, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/public2/home/sl_qybio/sl_qybio/miniforge3/envs/cphasing/lib/python3.12/site-packages/click/core.py", line 1697, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/public2/home/sl_qybio/sl_qybio/miniforge3/envs/cphasing/lib/python3.12/site-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/public2/home/sl_qybio/sl_qybio/miniforge3/envs/cphasing/lib/python3.12/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/public2/home/sl_qybio/sl_qybio/software/biosoft/CPhasing/cphasing/cli.py", line 1023, in pipeline
    run(fasta, 
    ^^^^^^^^^^
  File "/public2/home/sl_qybio/sl_qybio/software/biosoft/CPhasing/cphasing/pipeline/pipeline.py", line 613, in run
    alleles.main(args=args,
  File "/public2/home/sl_qybio/sl_qybio/miniforge3/envs/cphasing/lib/python3.12/site-packages/rich_click/rich_command.py", line 126, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/public2/home/sl_qybio/sl_qybio/miniforge3/envs/cphasing/lib/python3.12/site-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/public2/home/sl_qybio/sl_qybio/miniforge3/envs/cphasing/lib/python3.12/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/public2/home/sl_qybio/sl_qybio/software/biosoft/CPhasing/cphasing/cli.py", line 2344, in alleles
    pa.run()
  File "/public2/home/sl_qybio/sl_qybio/software/biosoft/CPhasing/cphasing/alleles.py", line 298, in run
    self.partig()
  File "/public2/home/sl_qybio/sl_qybio/software/biosoft/CPhasing/cphasing/alleles.py", line 285, in partig
    raise Exception('Failed to execute command:' 
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Exception: Failed to execute command:   /public2/home/sl_qybio/sl_qybio/software/biosoft/CPhasing/bin/partig -k19 -w19 -m0.5 -c60 -n5 -d0.1 -t64 ../gra.2hap.fa.

@xiekunwhy
Copy link
Author

partig core dumped
image

@wangyibin
Copy link
Owner

Hi,
This a limitation of C-Phasing, alleles can not process contig that length larger than 135Mb. A temporary solution is to break the long contigs, and then merge them after scaffolding. We are trying to remove this limitation in the next minor release.

Best,
Yibin

@xiekunwhy
Copy link
Author

Thank you for your reply, hope new release coming soon.
This limitation also limit user to use exists mapping results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants