PMCC-BioinformaticsCore / janis-core

Core python modules for Janis Pipeline workflow assistant
GNU General Public License v3.0
4 stars 9 forks source link

Failed translation of Galaxy tool with ID containing a macro #119

Open ddeepwell opened 8 months ago

ddeepwell commented 8 months ago

Translation of the Galaxy tool bcftools_reheader fails with error RuntimeError: could not find wrapper for bcftools_reheader:b7be725976b6

It appears that this is caused by the tool id containing a macro which requires parsing. The bcftoolsreheader id attribute is `id="bcftools@EXECUTABLE@"`

The get_xml_id function in janis_core/ingestion/galaxy/utils/galaxy.py is not general enough to handle galaxy tools with macros in the id xml attribute. This leads to the get_xml_by_id function to incorrectly return None because the queryid does not match the "bcftools@EXECUTABLE@" string.

This can be reproduced with

from janis_core.ingestion.galaxy.gxwrappers import fetch_xml
owner = "iuc"
repo = "bcftools_reheader"
revision = "b7be725976b6"
tool_id = "bcftools_reheader"
fetch_xml(owner, repo, revision, tool_id)