Adding Galaxy EU workflow to IWC Library - Planemo installation

Hello - This is my first post on here, and I apologize in advance if this is not the correct category. I am familiar with using the Galaxy interface to run and test tools and workflows but not much beyond that.

My goal is to add a Galaxy workflow (from Galaxy EU server) to the IWC workflow library. I tried following these guidelines from the GitHub:

To prepare, I downloaded GitHub Desktop and needed to make sure I had Python and planemo installed.

I installed the most recent version of Python (3.13.0) for Windows from the official Python website. Then, I went to PyPi to install Planemo, following the instructions to create a virtual environment using Command Prompt (Windows 11).

Links:

However, this is where I ran into issues. I do not have a strong programming background, so I had a hard time understanding what went wrong. From what I could gather, the installation was going fine up until pysam. I have pasted the error here for reference:

Collecting pysam (from ephemeris>=0.10.3->planemo)
Downloading pysam-0.22.1.tar.gz (4.6 MB)
━━━━━━━━━ 4.6/4.6 26.5 eta 0:00:00
MB MB/s
Installing build dependencies … done
Getting requirements to build wheel … error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [60 lines of output]
# pysam: cython is available - using cythonize if necessary
# pysam: htslib mode is shared
# pysam: HTSLIB_CONFIGURE_OPTIONS=None
‘.’ is not recognized as an internal or external command,
operable program or batch file.
‘.’ is not recognized as an internal or external command,
operable program or batch file.
# pysam: htslib configure options: None
Traceback (most recent call last):
File “C:\Users\kathe\AppData\Local\Programs\Python\Python313\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py”, line 353, in
main()
~~~~^^
File “C:\Users\kathe\AppData\Local\Programs\Python\Python313\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py”, line 335, in main
json_out[‘return_val’] = hook(**hook_input[‘kwargs’])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\kathe\AppData\Local\Programs\Python\Python313\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py”, line 118, in get_requires_for_build_wheel
return hook(config_settings)
File “C:\Users\kathe\AppData\Local\Temp\pip-build-env-xxk9ip04\overlay\Lib\site-packages\setuptools\build_meta.py”, line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\kathe\AppData\Local\Temp\pip-build-env-xxk9ip04\overlay\Lib\site-packages\setuptools\build_meta.py”, line 304, in _get_build_requires
self.run_setup()
~~~~~~~~~~~~~~^^
File “C:\Users\kathe\AppData\Local\Temp\pip-build-env-xxk9ip04\overlay\Lib\site-packages\setuptools\build_meta.py”, line 522, in run_setup
super().run_setup(setup_script=setup_script)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\kathe\AppData\Local\Temp\pip-build-env-xxk9ip04\overlay\Lib\site-packages\setuptools\build_meta.py”, line 320, in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File “”, line 437, in
File “”, line 81, in run_make_print_config
File “C:\Users\kathe\AppData\Local\Programs\Python\Python313\Lib\subprocess.py”, line 472, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
**kwargs).stdout
^^^^^^^^^
File “C:\Users\kathe\AppData\Local\Programs\Python\Python313\Lib\subprocess.py”, line 554, in run
with Popen(*popenargs, **kwargs) as process:
~~~~~^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\kathe\AppData\Local\Programs\Python\Python313\Lib\subprocess.py”, line 1036, in init
self._execute_child(args, executable, preexec_fn, close_fds,
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pass_fds, cwd, env,
^^^^^^^^^^^^^^^^^^^
…<5 lines>…
gid, gids, uid, umask,
^^^^^^^^^^^^^^^^^^^^^^
start_new_session, process_group)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\kathe\AppData\Local\Programs\Python\Python313\Lib\subprocess.py”, line 1548, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
# no special security
^^^^^^^^^^^^^^^^^^^^^
…<4 lines>…
cwd,
^^^^
startupinfo)
^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

After trying various fixes (downgrading to an older Python version, updating packages, checking I was typing in the correct commands, etc), I couldn’t get planemo installed using the command line on Windows. I searched online, and to my understanding, pysam is not (officially) supported on Windows (not sure if that’s changed).

I found the Galaxy FAQ (FAQ: Where can I get planemo? / Creating Galaxy tools from Conda Through Deployment / Development in Galaxy) and ended up updating the “Ubuntu for Windows” application on my laptop to Ubuntu 20.04.4 LTS and using Python 3.11.4 to make a virtual environment. I used “pip install planemo” inside this virtual environment and it worked.

Due to my inexperience, I have some (probably silly) questions, but I figured I’d ask to be safer than sorry:

Can I still follow the GitHub instructions to add a workflow to IWC using Ubuntu on Windows? Will the commands be different?

Would I have to run commands inside the virtual environment I made in Ubuntu for planemo to be recognized and work?

Again I’m not a programmer, so I’m not sure if I did things correctly.

Thank you in advance. I appreciate any help on this!

2 Likes

Welcome, @katherine-d21

Great to see you trying something new!!

For this question, yes, run everything inside that environment.

Then for this question, I’m not entirely sure, but my guess is yes. You could cross check with the linux instructions, since that is where you are working now. The set up instructions you were following are mostly about getting the environment configured, which you have done now.

And, did you see the link to the IWC Matrix chat? That is where to reach the people who do this everyday. Find this at the GalaxyProject Hub here → Galaxy Working Groups - Galaxy Community Hub

Hope this helps! :hammer_and_wrench:

Hello @jennaj - Thank you for your quick response! I really appreciate the information you shared. I did not know there was a IWC Matrix chat as I’m still learning about IWC, but I will make an account to get in touch with people who have more experience doing this. Thanks again.

1 Like

Yes you can. My guess would be that installing planemo under windows was the tricky part. Commands should be generally the same on Linux as on WSL.

The virtual environment is where planemo is installed, so you basically cannot run it without activating/using the virtual environment. If you run something like source .venv/bin/activate where .venv is the folder where you installed the virtual environment, it will activate and you will then be able to invoke planemo commands.

Hello @marten - I just saw this, so sorry for the delay! Thank you for your response. I appreciate you taking the time to do so.

Please bear with me (I’m trying to make sure I understand what you’re saying): so I’m using Ubuntu, which WSL uses to make a Linux-like environment. And WSL is used to run Linux commands on a computer that runs Windows. And by making a virtual environment within Ubuntu, I can make sure that whatever I install/run in contained in that environment and it won’t affect/break the rest of my computer. Is that correct?

Another topic:

Will GitHub Desktop have issues connecting to/recognizing the virtual environment? Context: I have the GitHub Desktop app, and opened the IWC repository through the desktop app (GitHub - galaxyproject/iwc: Galaxy Workflows maintained by the Intergalactic Workflow Commission > green Code button > Open with GitHub Desktop).

I saved the IWC repository locally to my computer (This PC > C: > GitHub > iwc). On the other hand, my Ubuntu virtual environment is located at "wsl.localhost\Ubuntu\home\katd20 … " so it’s also on my local machine. Would GitHub still be able to find the Ubuntu virtual environment?

My programming experience consists of a few college courses where I used R and QIIME2 and self-teaching myself through books and online resources. I still have much to learn so I thank you in advance for your patience with my questions!

Yeah, that is pretty much correct. You have a good grasp.

I don’t think it needs to know about the virtual environment for planemo or planemo itself. These are distinct things that come in different steps of working with iwc workflows.

The virtual environment has little to do with ubuntu. It is sort of a dedicated space (in form of a folder) where you told planemo to put its dependencies. You can use it to control what Python and other dependencies’ versions are stored for planemo, but for the rest of the OS it is just a folder and it does not need to know more.

This could be tricky, I do not know how these co-exist on Windows. I assume you should be able to work with a repository stored under WSL using your windows github app (and vice versa with planemo) but you should experiment to make sure.

2 Likes

Thank you for your detailed response! You clarified some things for me. And I will try some things and go from there. Thanks again for your help.

2 Likes

Happy to help, keep us updated on your efforts!

1 Like