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

ToolTemplatingException: toolshed.g2.bx.psu.edu/repos/iuc/bcftools_call/bcftools_call/1.15.1+galaxy3 #6177

Closed
galaxyproject-sentryintegration bot opened this issue Jul 24, 2024 · 3 comments · Fixed by #6238 or #6249

Comments

@galaxyproject-sentryintegration

Sentry Issue: GALAXY-MAIN-ZGC

NotFound: cannot find 'invert_targets_file'
  File "galaxy/util/template.py", line 87, in fill_template
    return unicodify(t, log_exception=False)
  File "galaxy/util/__init__.py", line 1183, in unicodify
    value = str(value)
  File "cheetah_DynamicallyCompiledCheetahTemplate_1721670438_1896486_46576.py", line 333, in respond

NotFound: cannot find 'invert_targets_file'
  File "galaxy/util/template.py", line 87, in fill_template
    return unicodify(t, log_exception=False)
  File "galaxy/util/__init__.py", line 1183, in unicodify
    value = str(value)
  File "cheetah_DynamicallyCompiledCheetahTemplate_1721670438_1896486_46576.py", line 333, in respond

NotFound: cannot find 'invert_targets_file'
  File "galaxy/util/template.py", line 87, in fill_template
    return unicodify(t, log_exception=False)
  File "galaxy/util/__init__.py", line 1183, in unicodify
    value = str(value)
  File "cheetah_DynamicallyCompiledCheetahTemplate_1721670438_1896486_46576.py", line 333, in respond

NotFound: cannot find 'invert_targets_file'
  File "galaxy/util/template.py", line 87, in fill_template
    return unicodify(t, log_exception=False)
  File "galaxy/util/__init__.py", line 1183, in unicodify
    value = str(value)
  File "cheetah_DynamicallyCompiledCheetahTemplate_1721670438_1896486_46576.py", line 333, in respond

NotFound: cannot find 'invert_targets_file'
  File "galaxy/util/template.py", line 87, in fill_template
    return unicodify(t, log_exception=False)
  File "galaxy/util/__init__.py", line 1183, in unicodify
    value = str(value)
  File "cheetah_DynamicallyCompiledCheetahTemplate_1721670438_1896486_46576.py", line 333, in respond

NotFound: cannot find 'invert_targets_file'
  File "galaxy/util/template.py", line 87, in fill_template
    return unicodify(t, log_exception=False)
  File "galaxy/util/__init__.py", line 1183, in unicodify
    value = str(value)
  File "cheetah_DynamicallyCompiledCheetahTemplate_1721670438_1896486_46576.py", line 333, in respond

NotFound: cannot find 'invert_targets_file'
  File "galaxy/util/template.py", line 87, in fill_template
    return unicodify(t, log_exception=False)
  File "galaxy/util/__init__.py", line 1183, in unicodify
    value = str(value)
  File "cheetah_DynamicallyCompiledCheetahTemplate_1721670438_1896486_46576.py", line 333, in respond

NotFound: cannot find 'invert_targets_file'
  File "galaxy/util/template.py", line 87, in fill_template
    return unicodify(t, log_exception=False)
  File "galaxy/util/__init__.py", line 1183, in unicodify
    value = str(value)
  File "cheetah_DynamicallyCompiledCheetahTemplate_1721670438_1896486_46576.py", line 333, in respond

NotFound: cannot find 'invert_targets_file'
  File "galaxy/util/template.py", line 87, in fill_template
    return unicodify(t, log_exception=False)
  File "galaxy/util/__init__.py", line 1183, in unicodify
    value = str(value)
  File "cheetah_DynamicallyCompiledCheetahTemplate_1721670438_1896486_46576.py", line 333, in respond

NotFound: cannot find 'invert_targets_file'
  File "galaxy/util/template.py", line 87, in fill_template
    return unicodify(t, log_exception=False)
  File "galaxy/util/__init__.py", line 1183, in unicodify
    value = str(value)
  File "cheetah_DynamicallyCompiledCheetahTemplate_1721670438_1896486_46576.py", line 333, in respond

NotFound: cannot find 'invert_targets_file' while searching for 'section.targets.invert_targets_file'
(12 additional frame(s) were not displayed)
...
  File "galaxy/util/template.py", line 115, in fill_template
    return fill_template(
  File "galaxy/util/template.py", line 123, in fill_template
    raise first_exception or e
  File "galaxy/util/template.py", line 87, in fill_template
    return unicodify(t, log_exception=False)
  File "galaxy/util/__init__.py", line 1183, in unicodify
    value = str(value)
  File "cheetah_DynamicallyCompiledCheetahTemplate_1721670438_1896486_46576.py", line 333, in respond

ToolTemplatingException: Error occurred while building command line for tool 'toolshed.g2.bx.psu.edu/repos/iuc/bcftools_call/bcftools_call/1.15.1+galaxy3'
  File "galaxy/jobs/runners/__init__.py", line 297, in prepare_job
    job_wrapper.prepare()
  File "galaxy/jobs/__init__.py", line 1260, in prepare
    ) = tool_evaluator.build()
  File "galaxy/tools/evaluation.py", line 611, in build
    global_tool_logs(self._build_command_line, config_file, "Building Command Line", self.tool)
  File "galaxy/tools/evaluation.py", line 111, in global_tool_logs
    raise ToolTemplatingException(

(59406029) Failure preparing job
@jennaj
Copy link
Member

jennaj commented Jul 24, 2024

Funny. I spent some time tracking this down, then found this!

Bug is triggered by a nested parameter: target chromosome filter

@mvdbeek mvdbeek changed the title ToolTemplatingException: Error occurred while building command line for tool 'toolshed.g2.bx.psu.edu/repos/iuc/bcftools_ca... ToolTemplatingException: toolshed.g2.bx.psu.edu/repos/iuc/bcftools_call/bcftools_call/1.15.1+galaxy3 Jul 25, 2024
@galaxyproject-sentryintegration
Copy link
Author

Another one, this time while accessing tgts_sec

Sentry Issue: GALAXY-MAIN-ZJ1

@mvdbeek
Copy link
Member

mvdbeek commented Aug 13, 2024

The relevant part of the compiled template is this:

#set $section = $sec_consensus_variant_calling.variant_calling
#set $targets_path = None
#if $section.method == 'multiallelic':
    #if $section.genotypes.constrain == 'alleles':
        #set $section = $sec_consensus_variant_calling.variant_calling.genotypes
        

#set $targets_path = None
#if 'targets' in $section
  #if $section.targets.targets_src == 'targets_file':
    #set $targets_path = 'targets_file.tab.gz'
    bgzip -c "$section.targets.targets_file" > $targets_path &&
    tabix -s 1 -b 2 -e 2 $targets_path &&
  #end if
#elif $tgts_sec.targets_file:
  #set $targets_path = 'targets_file.tab.gz'
  bgzip -c "$section.targets_file" > $targets_path &&
  tabix -s 1 -b 2 -e 2 $targets_path &&
#end if


where we set the targets_path variable.

Then later in the template we do:

#if $targets_path is not None:
  --targets-file "${section.invert_targets_file}${targets_path}"
#elif $section.targets_file:
  --targets-file "${section.invert_targets_file}${section.targets_file}"
#end if

invert_targets_file is never defined in the tool parameters. I guess we're missing the invert_targets_file boolean in sec_consensus_variant_calling.variant_calling

mvdbeek added a commit to mvdbeek/tools-iuc that referenced this issue Aug 14, 2024
mvdbeek added a commit to mvdbeek/tools-iuc that referenced this issue Aug 14, 2024
nilchia pushed a commit to pavanvidem/tools-iuc that referenced this issue Aug 24, 2024
* Fix bcftools call

Fixes galaxyproject#6177

* Add bcftools call test for target file option

This test would previously resulted in a cheetah templating error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants