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

Google Colab: error in rule postprocess #19

Open
metalichen opened this issue Mar 15, 2024 · 2 comments
Open

Google Colab: error in rule postprocess #19

metalichen opened this issue Mar 15, 2024 · 2 comments

Comments

@metalichen
Copy link

Hi there,

Thanks for a great tool! I ran into a problem with the colab notebook while analysing a custom set of pdb files. The pipeline seems to work fine and produce the trees, but then it crushes during the post processing.

[Fri Mar 15 13:47:44 2024]
rule postprocess:
    input: ./pdb_SP_removed_filtered_da39a/alntmscore_struct_tree.nwk
    output: ./pdb_SP_removed_filtered_da39a/alntmscore_struct_tree.PP.nwk
    log: ./pdb_SP_removed_filtered_da39a/logs/alntmscore_struct_postprocess.log
    jobid: 10
    reason: Missing output files: ./pdb_SP_removed_filtered_da39a/alntmscore_struct_tree.PP.nwk; Input files updated by another job: ./pdb_SP_removed_filtered_da39a/alntmscore_struct_tree.nwk
    wildcards: folder=./pdb_SP_removed_filtered_da39a, mattype=alntmscore
    resources: tmpdir=/tmp

Activating conda environment: foldtree

EnvironmentNameNotFound: Could not find conda environment: foldtree
You can list all discoverable environments with `conda info --envs`.



EnvironmentNameNotFound: Could not find conda environment: foldtree
You can list all discoverable environments with `conda info --envs`.


Traceback (most recent call last):
  File "/content/.snakemake/scripts/tmp5wjp6t1o.postprocess.py", line 8, in <module>
    treefile = foldseek2tree.postprocess(snakemake.input[0] , snakemake.output[0] )
  File "/content/fold_tree/workflow/../src/foldseek2tree.py", line 188, in postprocess
    tre = toytree.tree(treestr , format = 0 )
TypeError: tree() got an unexpected keyword argument 'format'
Traceback (most recent call last):
  File "/content/.snakemake/scripts/tmpft8q5cxn.postprocess.py", line 8, in <module>
    treefile = foldseek2tree.postprocess(snakemake.input[0] , snakemake.output[0] )
  File "/content/fold_tree/workflow/../src/foldseek2tree.py", line 188, in postprocess
    tre = toytree.tree(treestr , format = 0 )
TypeError: tree() got an unexpected keyword argument 'format'
[Fri Mar 15 13:47:46 2024]
Error in rule postprocess:
    jobid: 5
    input: ./pdb_SP_removed_filtered_da39a/foldtree_struct_tree.nwk
    output: ./pdb_SP_removed_filtered_da39a/foldtree_struct_tree.PP.nwk
    log: ./pdb_SP_removed_filtered_da39a/logs/foldtree_struct_postprocess.log (check log file(s) for error details)
    conda-env: foldtree

RuleException:
CalledProcessError in file /content/fold_tree/workflow/fold_tree, line 62:
Command 'source /usr/local/bin/activate 'foldtree'; set -euo pipefail;  /usr/local/bin/python3.10 /content/.snakemake/scripts/tmp5wjp6t1o.postprocess.py' returned non-zero exit status 1.
  File "/content/fold_tree/workflow/fold_tree", line 62, in __rule_postprocess
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
[Fri Mar 15 13:47:46 2024]
Error in rule postprocess:
    jobid: 10
    input: ./pdb_SP_removed_filtered_da39a/alntmscore_struct_tree.nwk
    output: ./pdb_SP_removed_filtered_da39a/alntmscore_struct_tree.PP.nwk
    log: ./pdb_SP_removed_filtered_da39a/logs/alntmscore_struct_postprocess.log (check log file(s) for error details)
    conda-env: foldtree

RuleException:
CalledProcessError in file /content/fold_tree/workflow/fold_tree, line 62:
Command 'source /usr/local/bin/activate 'foldtree'; set -euo pipefail;  /usr/local/bin/python3.10 /content/.snakemake/scripts/tmpft8q5cxn.postprocess.py' returned non-zero exit status 1.
  File "/content/fold_tree/workflow/fold_tree", line 62, in __rule_postprocess
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: .snakemake/log/2024-03-15T134515.645608.snakemake.log
---------------------------------------------------------------------------
CalledProcessError                        Traceback (most recent call last)
[<ipython-input-6-7dbc6f507333>](https://localhost:8080/#) in <cell line: 1>()
----> 1 get_ipython().run_cell_magic('bash', '-s $jobname $input_type', 'JOBNAME=$1\nINPUT_TYPE=$2\nSUFFIX=""\nif [[ $INPUT_TYPE = "custom" ]]; then\n  mkdir -p "${JOBNAME}/structs"\n  mv "${JOBNAME}/pdb_SP_removed_filtered/"*.pdb "${JOBNAME}/pdb_SP_removed_filtered/"*.cif "${JOBNAME}/structs"\n  SUFFIX="custom_structs=True"\nfi\nsnakemake --cores $(nproc --all) --use-conda -s fold_tree/workflow/fold_tree --config folder="./${JOBNAME}" filter=False $SUFFIX  #> /dev/null 2>&1\n#snakemake --cores 4 --use-conda -s fold_tree/workflow/fold_tree --config folder=./${jobname} filter=False\n')

I'd appreciate any help!

@metalichen
Copy link
Author

UPD: I tried running the pipeline with AlphaFold models instead of the custom set of pdb, and got the exact same error

@cactuskid
Copy link
Contributor

this may have been due to an update in toytree. The version is specified as an older version now and I think it should work. sorry for the delay in repsonding

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