Hi everybody,
I cannot get to run biobakery visualisation workflow. I tried the following command in the latest Docker image
biobakery_workflows wmgx_vis --input /opt/biobakery_result_files/ --output /opt/vizualisation/ --project-name TEST
Stdout :
(Nov 03 16:15:48) [0/2 - 0.00%] **Ready ** Task 0: document
(Nov 03 16:15:48) [0/2 - 0.00%] **Started ** Task 0: document
Exception:
list index out of range
Error messages will be included in output document
Traceback (most recent call last):
File “/usr/local/bin/wmgx_vis.py”, line 133, in
workflow.go()
File “/usr/local/lib/python3.6/dist-packages/anadama2/workflow.py”, line 804, in go
self._handle_finished()
File “/usr/local/lib/python3.6/dist-packages/anadama2/workflow.py”, line 836, in _handle_finished
raise RunFailed()
anadama2.workflow.RunFailed
And the content of anadama.log:
2022-11-03 16:15:51,496 LoggerReporter task_failed ERROR: task 0, document : Failed! Error message : Error executing action 0. Original Exception:
Traceback (most recent call last):
File “/usr/local/lib/python3.6/dist-packages/anadama2/runners.py”, line 200, in _run_task_locally
action_func(task)
File “/usr/local/lib/python3.6/dist-packages/anadama2/document.py”, line 315, in create
doc.weave(shell=PwebProcessorSpaces)
File “/usr/local/lib/python3.6/dist-packages/pweave/pweb.py”, line 198, in weave
self.run(shell)
File “/usr/local/lib/python3.6/dist-packages/pweave/pweb.py”, line 149, in run
runner.run()
File “/usr/local/lib/python3.6/dist-packages/pweave/processors.py”, line 65, in run
self.executed = list(map(self._runcode, self.parsed))
File “/usr/local/lib/python3.6/dist-packages/pweave/processors.py”, line 131, in _runcode
chunk[‘content’] = self.loadinline(chunk[‘content’])
File “/usr/local/lib/python3.6/dist-packages/anadama2/document.py”, line 259, in loadinline
result = self.loadstring(code_str).strip()
File “/usr/local/lib/python3.6/dist-packages/pweave/processors.py”, line 296, in loadstring
exec(compiled, scope)
File “chunk”, line 1, in
NameError: name ‘caption’ is not defined
I then tried a different approach.
Following the advice in this post from Biobakery’s forum, I tried to set up biobakery through conda:
conda create -c biobakery -n biobakery_3.6 python=3.6 biobakery_workflows tbb=2020.2 networkx=1.11 pweave=0.25 python-leveldb
Trying to run the vizualisation workflow failed:
biobakery_workflows vis --input run_test/output/ --output run_test/vis --log-level DEBUG --project-name TEST
Traceback (most recent call last):
File “/home/theoscilicium/miniconda3/envs/biobakery/bin/vis.py”, line 123, in
args.introduction_text = “{#id .class width=675px height=505px}\n\n”+intro_methods
File “/home/theoscilicium/miniconda3/envs/biobakery/lib/python3.6/site-packages/biobakery_workflows/utilities.py”, line 1170, in get_package_file
found_files=list(filter(lambda file: os.path.isfile(os.path.join(package_install_folder,file)),os.listdir(package_install_folder)))
FileNotFoundError: [Errno 2] No such file or directory: ‘/home/theoscilicium/miniconda3/envs/biobakery/lib/python3.6/site-packages/biobakery_workflows/…/images’`
I thave been able to circumvent this problem by doing
ln -s /home/theoscilicium/miniconda3/envs/biobakery/images/ /home/theoscilicium/miniconda3/envs/biobakery/lib/python3.6/site-packages/images
I then ran again the vis workflow, here is the content of anadama.log:
2022-11-03 16:35:13,339 LoggerReporter started INFO: Beginning AnADAMA run with 6 tasks.
2022-11-03 16:35:13,340 LoggerReporter started INFO: Workflow description = A workflow for visualization
2022-11-03 16:35:13,340 LoggerReporter started INFO: Workflow version = 3.1
2022-11-03 16:35:13,340 LoggerReporter started INFO: Workflow configuration options
2022-11-03 16:35:13,340 LoggerReporter started INFO: input = run_test/output/
2022-11-03 16:35:13,340 LoggerReporter started INFO: project_name = TEST
2022-11-03 16:35:13,340 LoggerReporter started INFO: author_name =
2022-11-03 16:35:13,340 LoggerReporter started INFO: header_image =
2022-11-03 16:35:13,340 LoggerReporter started INFO: input_metadata =
2022-11-03 16:35:13,340 LoggerReporter started INFO: input_file_type =
2022-11-03 16:35:13,340 LoggerReporter started INFO: input_picard = None
2022-11-03 16:35:13,340 LoggerReporter started INFO: input_picard_extension = quality_by_cycle_metrics
2022-11-03 16:35:13,340 LoggerReporter started INFO: metadata_categorical =
2022-11-03 16:35:13,340 LoggerReporter started INFO: metadata_continuous =
2022-11-03 16:35:13,340 LoggerReporter started INFO: metadata_exclude =
2022-11-03 16:35:13,340 LoggerReporter started INFO: min_abundance = 0.01
2022-11-03 16:35:13,340 LoggerReporter started INFO: min_samples = 3
2022-11-03 16:35:13,340 LoggerReporter started INFO: max_sets_heatmap = 25
2022-11-03 16:35:13,340 LoggerReporter started INFO: max_missing = 20.0
2022-11-03 16:35:13,340 LoggerReporter started INFO: max_sets_barplot = 15
2022-11-03 16:35:13,340 LoggerReporter started INFO: max_groups_barplot = 5
2022-11-03 16:35:13,340 LoggerReporter started INFO: correlation_threshold = 0.7
2022-11-03 16:35:13,340 LoggerReporter started INFO: format = html
2022-11-03 16:35:13,340 LoggerReporter started INFO: introduction_text =
2022-11-03 16:35:13,340 LoggerReporter started INFO: print_template = False
2022-11-03 16:35:13,340 LoggerReporter started INFO: use_template =
2022-11-03 16:35:13,340 LoggerReporter started INFO: output = run_test/vis
2022-11-03 16:35:13,340 LoggerReporter started INFO: config = None
2022-11-03 16:35:13,340 LoggerReporter started INFO: jobs = 1
2022-11-03 16:35:13,340 LoggerReporter started INFO: grid_jobs = 0
2022-11-03 16:35:13,340 LoggerReporter started INFO: grid = None
2022-11-03 16:35:13,340 LoggerReporter started INFO: grid_partition =
2022-11-03 16:35:13,340 LoggerReporter started INFO: grid_benchmark = off
2022-11-03 16:35:13,340 LoggerReporter started INFO: grid_options = None
2022-11-03 16:35:13,340 LoggerReporter started INFO: grid_submit_sleep = 5
2022-11-03 16:35:13,340 LoggerReporter started INFO: grid_environment = None
2022-11-03 16:35:13,340 LoggerReporter started INFO: grid_scratch =
2022-11-03 16:35:13,340 LoggerReporter started INFO: grid_time_max = None
2022-11-03 16:35:13,340 LoggerReporter started INFO: grid_mem_max = None
2022-11-03 16:35:13,340 LoggerReporter started INFO: dry_run = False
2022-11-03 16:35:13,340 LoggerReporter started INFO: skip_nothing = False
2022-11-03 16:35:13,340 LoggerReporter started INFO: quit_early = False
2022-11-03 16:35:13,340 LoggerReporter started INFO: until_task = None
2022-11-03 16:35:13,340 LoggerReporter started INFO: exclude_task = None
2022-11-03 16:35:13,341 LoggerReporter started INFO: target = None
2022-11-03 16:35:13,341 LoggerReporter started INFO: exclude_target = None
2022-11-03 16:35:13,341 LoggerReporter started INFO: log_level = DEBUG
2022-11-03 16:35:13,359 anadama2.workflow go DEBUG: Sorting task_nos by network topology
2022-11-03 16:35:13,359 anadama2.workflow go DEBUG: Sorting complete
2022-11-03 16:35:13,359 anadama2.tracked any_different DEBUG: Dep ‘/home/theoscilicium/bb_docker_test/run_test/vis’ of type <class ‘anadama2.tracked.HugeTrackedFile’> changed: wasn’t previously saved in backend
2022-11-03 16:35:13,359 anadama2.workflow _filter_skipped_tasks DEBUG: Can’t skip task 4 because of dep change
2022-11-03 16:35:13,359 anadama2.workflow _filter_skipped_tasks DEBUG: Can’t skip task 5 because of dep change
2022-11-03 16:35:13,359 anadama2.tracked any_different DEBUG: Dep ‘/home/theoscilicium/bb_docker_test/run_test/vis.zip’ of type <class ‘anadama2.tracked.HugeTrackedFile’> changed: wasn’t previously saved in backend
2022-11-03 16:35:13,359 anadama2.workflow _filter_skipped_tasks DEBUG: Can’t skip task 4 because of dep change
2022-11-03 16:35:13,359 anadama2.tracked any_different DEBUG: Dep ‘/home/theoscilicium/bb_docker_test/run_test/output/metaphlan/merged/metaphlan_taxonomic_profiles.tsv’ of type <class ‘anadama2.tracked.HugeTrackedFile’> changed: wasn’t previously saved in backend
2022-11-03 16:35:13,359 anadama2.workflow _filter_skipped_tasks DEBUG: Can’t skip task 2 because of dep change
2022-11-03 16:35:13,359 anadama2.workflow _filter_skipped_tasks DEBUG: Can’t skip task 3 because of dep change
2022-11-03 16:35:13,360 anadama2.tracked any_different DEBUG: Dep ‘/home/theoscilicium/bb_docker_test/run_test/vis/wmgx_report.html’ of type <class ‘anadama2.tracked.HugeTrackedFile’> changed: wasn’t previously saved in backend
2022-11-03 16:35:13,360 anadama2.workflow _filter_skipped_tasks DEBUG: Can’t skip task 2 because of dep change
2022-11-03 16:35:13,360 anadama2.tracked any_different DEBUG: Dep ‘/home/theoscilicium/bb_docker_test/run_test/output/humann/merged/ecs_relab.tsv’ of type <class ‘anadama2.tracked.HugeTrackedFile’> changed: wasn’t previously saved in backend
2022-11-03 16:35:13,360 anadama2.workflow _filter_skipped_tasks DEBUG: Can’t skip task 0 because of dep change
2022-11-03 16:35:13,360 anadama2.workflow _filter_skipped_tasks DEBUG: Can’t skip task 1 because of dep change
2022-11-03 16:35:13,360 anadama2.tracked any_different DEBUG: Dep ‘/home/theoscilicium/bb_docker_test/run_test/vis/ecs/ecs_relab.tsv’ of type <class ‘anadama2.tracked.HugeTrackedFile’> changed: wasn’t previously saved in backend
2022-11-03 16:35:13,360 anadama2.workflow _filter_skipped_tasks DEBUG: Can’t skip task 0 because of dep change
2022-11-03 16:35:13,360 anadama2.runners run_tasks DEBUG: Running 6 tasks locally and serially
2022-11-03 16:35:13,360 LoggerReporter log_event DEBUG: task 5, Track pre-existing dependencies : ready and waiting for resources : 0 parents: . 1 children: [4].
2022-11-03 16:35:13,360 LoggerReporter log_event DEBUG: task 5, Track pre-existing dependencies : starting to run : 0 parents: . 1 children: [4].
2022-11-03 16:35:13,360 anadama2.runners _run_task_locally DEBUG: Executing task 5 action 0
2022-11-03 16:35:13,360 anadama2.runners _run_task_locally DEBUG: Completed executing task 5 action 0
2022-11-03 16:35:13,360 LoggerReporter log_event DEBUG: task 5, Track pre-existing dependencies : completed successfully
2022-11-03 16:35:13,360 LoggerReporter log_event DEBUG: task 3, Track pre-existing dependencies : ready and waiting for resources : 0 parents: . 1 children: [2].
2022-11-03 16:35:13,360 LoggerReporter log_event DEBUG: task 3, Track pre-existing dependencies : starting to run : 0 parents: . 1 children: [2].
2022-11-03 16:35:13,360 anadama2.runners _run_task_locally DEBUG: Executing task 3 action 0
2022-11-03 16:35:13,360 anadama2.runners _run_task_locally DEBUG: Completed executing task 3 action 0
2022-11-03 16:35:13,360 LoggerReporter log_event DEBUG: task 3, Track pre-existing dependencies : completed successfully
2022-11-03 16:35:13,360 LoggerReporter log_event DEBUG: task 1, Track pre-existing dependencies : ready and waiting for resources : 0 parents: . 1 children: [0].
2022-11-03 16:35:13,361 LoggerReporter log_event DEBUG: task 1, Track pre-existing dependencies : starting to run : 0 parents: . 1 children: [0].
2022-11-03 16:35:13,361 anadama2.runners _run_task_locally DEBUG: Executing task 1 action 0
2022-11-03 16:35:13,361 anadama2.runners _run_task_locally DEBUG: Completed executing task 1 action 0
2022-11-03 16:35:13,361 LoggerReporter log_event DEBUG: task 1, Track pre-existing dependencies : completed successfully
2022-11-03 16:35:13,361 LoggerReporter log_event INFO: task 0, humann_rename_table_ecs : ready and waiting for resources : 1 parents: [1]. 1 children: [2].
2022-11-03 16:35:13,361 LoggerReporter log_event INFO: task 0, humann_rename_table_ecs : starting to run : 1 parents: [1]. 1 children: [2].
2022-11-03 16:35:13,361 LoggerReporter task_command INFO: Executing with shell: mkdir -p run_test/vis/ecs && humann_rename_table --input /home/theoscilicium/bb_docker_test/run_test/output/humann/merged/ecs_relab.tsv --output /home/theoscilicium/bb_docker_test/run_test/vis/ecs/ecs_relab.tsv --names ec
2022-11-03 16:35:13,361 anadama2.runners _run_task_locally DEBUG: Executing task 0 action 0
2022-11-03 16:35:13,433 anadama2.helpers actually_sh INFO: Execution complete. Stdout:
Stderr: b"Loading table from: /home/theoscilicium/bb_docker_test/run_test/output/humann/merged/ecs_relab.tsv\n Treating /home/theoscilicium/bb_docker_test/run_test/output/humann/merged/ecs_relab.tsv as stratified output, e.g. [‘1.1.1.1’, ‘g__Acidaminococcus.s__Acidaminococcus_intestini’]\nLoading mapping file from: /home/theoscilicium/miniconda3/envs/biobakery/lib/python3.6/site-packages/humann/tools/…/data/misc/map_level4ec_name.txt.gz\nRenamed 224 of 232 entries (96.55%)\n"
2022-11-03 16:35:13,433 anadama2.runners _run_task_locally DEBUG: Completed executing task 0 action 0
2022-11-03 16:35:13,433 LoggerReporter log_event INFO: task 0, humann_rename_table_ecs : completed successfully
2022-11-03 16:35:13,434 LoggerReporter log_event INFO: task 2, document : ready and waiting for resources : 2 parents: [3, 0]. 1 children: [4].
2022-11-03 16:35:13,434 LoggerReporter log_event INFO: task 2, document : starting to run : 2 parents: [3, 0]. 1 children: [4].
2022-11-03 16:35:13,434 anadama2.runners _run_task_locally DEBUG: Executing task 2 action 0
2022-11-03 16:35:13,441 anadama2.helpers actually_sh INFO: Executing with shell: pweave /home/theoscilicium/bb_docker_test/run_test/vis/tmpy_tmnit1/wmgx_report.pmd -o /home/theoscilicium/bb_docker_test/run_test/vis/tmpy_tmnit1/wmgx_report.md
2022-11-03 16:35:15,080 LoggerReporter task_failed ERROR: task 2, document : Failed! Error message : Error executing action 0. Original Exception:
Traceback (most recent call last):
File “/home/theoscilicium/miniconda3/envs/biobakery/lib/python3.6/site-packages/anadama2/runners.py”, line 200, in _run_task_locally
action_func(task)
File “/home/theoscilicium/miniconda3/envs/biobakery/lib/python3.6/site-packages/anadama2/document.py”, line 319, in create
sh(“pweave {0} -o {1}”.format(temp_template,intermediate_template),log_command=True)()
File “/home/theoscilicium/miniconda3/envs/biobakery/lib/python3.6/site-packages/anadama2/helpers.py”, line 107, in actually_sh
ret = _sh(s, **kwargs)
File “/home/theoscilicium/miniconda3/envs/biobakery/lib/python3.6/site-packages/anadama2/util/init.py”, line 320, in sh
raise ShellException(proc.returncode, msg.format(cmd, ret[0].decode(‘utf-8’), ret[1].decode(‘utf-8’)))
anadama2.util.ShellException: [Errno 1] Command ‘pweave /home/theoscilicium/bb_docker_test/run_test/vis/tmpy_tmnit1/wmgx_report.pmd -o /home/theoscilicium/bb_docker_test/run_test/vis/tmpy_tmnit1/wmgx_report.md’ failed.
Out: Error in trying to detect pandoc version
Your pandoc version is below 1.16, not setting figure size and id
Processing chunk 1 named None from line 12
Processing chunk 2 named read qc counts from line 27
Processing chunk 3 named write qc table paired from line 42
Processing chunk 4 named write qc table orphan from line 53
Processing chunk 5 named compute read ratios and show table from line 67
Processing chunk 6 named plot filtered read counts from line 88
Processing chunk 7 named read metaphlan profile and filter from line 119
Processing chunk 8 named compile species and genera and show table of counts from line 137
Processing chunk 9 named find alpha diversity plots from line 146
Processing chunk 10 named show alpha diversity boxplots from line 156
Processing chunk 11 named show alpha diversity scatterplots from line 162
Processing chunk 12 named show pcoa species from line 174Err: Exception:
[Errno 2] No such file or directory: ‘R’: ‘R’
Error messages will be included in output document
Traceback (most recent call last):
File “/home/theoscilicium/miniconda3/envs/biobakery/bin/pweave”, line 6, in
sys.exit(pweave.scripts.weave())
File “/home/theoscilicium/miniconda3/envs/biobakery/lib/python3.6/site-packages/pweave/scripts.py”, line 55, in weave
pweave.weave(infile, **opts_dict)
File “/home/theoscilicium/miniconda3/envs/biobakery/lib/python3.6/site-packages/pweave/init.py”, line 73, in weave
doc.weave(shell)
File “/home/theoscilicium/miniconda3/envs/biobakery/lib/python3.6/site-packages/pweave/pweb.py”, line 198, in weave
self.run(shell)
File “/home/theoscilicium/miniconda3/envs/biobakery/lib/python3.6/site-packages/pweave/pweb.py”, line 149, in run
runner.run()
File “/home/theoscilicium/miniconda3/envs/biobakery/lib/python3.6/site-packages/pweave/processors.py”, line 65, in run
self.executed = list(map(self._runcode, self.parsed))
File “/home/theoscilicium/miniconda3/envs/biobakery/lib/python3.6/site-packages/pweave/processors.py”, line 131, in _runcode
chunk[‘content’] = self.loadinline(chunk[‘content’])
File “/home/theoscilicium/miniconda3/envs/biobakery/lib/python3.6/site-packages/pweave/processors.py”, line 331, in loadinline
result = self.loadstring(self.add_echo(code_str)).strip()
File “/home/theoscilicium/miniconda3/envs/biobakery/lib/python3.6/site-packages/pweave/processors.py”, line 296, in loadstring
exec(compiled, scope)
File “chunk”, line 1, in
NameError: name ‘caption’ is not defined2022-11-03 16:35:15,080 LoggerReporter task_failed ERROR: task 4, archive : Failed! Error message : Task failed because parent task ‘2’ failed
2022-11-03 16:35:15,080 LoggerReporter finished ERROR: AnADAMA run finished with errors.
This problem of NameError: name ‘caption’ is not defined has been reported here in Aug. 2022 before, but I could not find any satisfactory workaround…
Any help, pointers or anything would all be very appreciated :).