Coder Social home page Coder Social logo

w4m-vm's Introduction

Docker Automated buil Docker Pulls Docker Stars Build Status

workflow

Virtual machine for the Workflow4Metabolomics

Our project

The Workflow4Metabolomics, W4M in short, is a French infrastructure offering software tool processing, analyzing and annotating metabolomics data. It is based on the Galaxy platform.

In the context of collaboration between metabolomics (MetaboHUB French infrastructure) and bioinformatics platforms (IFB: Institut Français de Bioinformatique), we have developed full LC/MS, GC/MS and NMR pipelines using Galaxy framework for data analysis including preprocessing, normalization, quality control, statistical analysis and annotation steps. Those modular and extensible workflows are composed with existing components (XCMS and CAMERA packages, etc.) but also a whole suite of complementary homemade tools. This implementation is accessible through a web interface, which guarantees the parameters completeness. The advanced features of Galaxy have made possible the integration of components from different sources and of different types. Thus, an extensible Virtual Research Environment (VRE) is offered to metabolomics communities (platforms, end users, etc.), and enables preconfigured workflows sharing for new users, but also experts in the field.

Citation

Giacomoni F., Le Corguillé G., Monsoor M., Landi M., Pericard P., Pétéra M., Duperier C., Tremblay-Franco M., Martin J.-F., Jacob D., Goulitquer S., Thévenot E.A. and Caron C. (2014). Workflow4Metabolomics: A collaborative research infrastructure for computational metabolomics. Bioinformatics, http://dx.doi.org/10.1093/bioinformatics/btu813

Galaxy

Galaxy is an open, web-based platform for data intensive biomedical research. Whether on the free public server or your own instance, you can perform, reproduce, and share complete analyses.

Homepage: https://galaxyproject.org/

workflow

The Virtual machine project

This project has for aim to maintain Docker and Vagrant files capable of building a full virtual machine running Galaxy and an instance of the Workflow4Metabolomics.

NOTICE

We are currently pushing our developments on GitHub and on the ToolShed.. Since april of this year, we also try to prioritize the new system to deal with the dependencies : conda. This work is still in progress. Thus in those VM, you will only find those tools available on the TS, which use the conda dependencies and pass Travis test. Sorry for that!

Dependencies using Conda

bioconda-badge

Conda is package manager that among many other things can be used to manage Python packages. It is becoming the default dependency manager within Galaxy.

Which VM

So make your choice

Docker

What is it?

This Docker container is based on the quay.io/bgruening/galaxy:16.04 (https://github.com/bgruening/docker-galaxy-stable) as a Galaxy flavour Nested in this Docker image, the script install_tools_wrapper.sh will install tools from ToolSheds using Ansible roles provided by the Galaxy project (https://github.com/galaxyproject/ansible-galaxy-tools) Get more documentations this Docker container on https://github.com/bgruening/docker-galaxy-stable: Usage to save data on this read-only system, using an external Slurm cluster, ...

Prerequisites

Docker

https://www.docker.com

###Make a sub-choice:

Step 1: Running the Docker container

If you have just build a docker image through the Custom Build Section. Omit workflow4metabolomics/ in the docker image name

Detached/Daemon mode

From your host:

docker pull workflow4metabolomics/galaxy-workflow4metabolomics # to update the local image version
docker run -d -p 8080:80 workflow4metabolomics/galaxy-workflow4metabolomics

# check that your docker is running
docker ps

# to get a ssh connection and use bash, you need your CONTAINER ID (`docker ps`)
docker exec -i -t ed6031485d06 /bin/bash

Remark: on macOS, since you use docker-machine to run docker, you need to allow port forwarding on your docker-machine instance so the docker container port is forwarded to your host machine. For this you have to run the following command:

docker-machine ssh your_docker_machine_name -f -N -L 8080:localhost:8080

Interactive mode

From your host:

docker pull workflow4metabolomics/galaxy-workflow4metabolomics # to update the local image version
docker run -i -t -p 8080:80 workflow4metabolomics/galaxy-workflow4metabolomics /bin/bash

From the Docker image:

startup

MORE: FTP support and Persistent data

docker run -d -p 8080:80 -p 8021:21 -p 8022:22 -v /home/user/galaxy_storage/:/export/ workflow4metabolomics/galaxy-workflow4metabolomics

Because Docker container are "read-only", you will lost all your changes within the container at shutdown until you ask the Galaxy instance to write in a folder mounted from the host /home/user/galaxy_storage/ under /export/ into the container.

From a MacOX:

There are some issue with those two features depending on which Docker solution was chosen. See this thread: bgruening/docker-galaxy-stable#210

  • Docker for Mac: the export directory works and the SFTP too using Filezilla but not the FTP
  • Docker Toolbox: the FTP works but not the export directory

Step 2: Use Galaxy

Finally, after maybe a couple of minute (dependeing of your machine), you can connect to the Galaxy portal from a browser running on your host: http://localhost:8080/.

You can login as administrator of your Galaxy instance using the login [email protected] and the password admin

Custom Build Section: building a custom Docker container from this repository

If you want to add or remove tools from the "official" workflow4metabolomics docker container

Installation

git clone --recursive [email protected]:workflow4metabolomics/w4m-vm.git

Settings

You can change the tools you want to be installed in tools-playbook-list/docker-ubuntu/tool_list_LCMS.yaml.

The Building step

From your host:

docker build -t galaxy-workflow4metabolomics .

# check your images
docker images

Running step

See Step 1

Vagrant

What does it do?

  1. Create a virtual machine (Vagrant and https://github.com/pierrickrogermele/w4m-vm)
  2. Install Galaxy (https://github.com/galaxyproject/ansible-galaxy)
  3. Start Galaxy
  4. Install "ToolSheded" W4M Tools in Galaxy (https://github.com/galaxyproject/ansible-galaxy-tools and http://workflow4metabolomics.org/)
  5. Restart Galaxy

Prerequisites

Vagrant

https://www.vagrantup.com/

Ansible

virtualenv .venv; . .venv/bin/activate # optional
pip install ansible

Installation

git clone --recursive [email protected]:workflow4metabolomics/w4m-vm.git

Settings

You can change the tools you want to be installed in tools-playbook-list/tool_list_LCMS.yaml

Running the build

Only the Ubuntu versioning is working, currently. The CentOS version does not work, however this would be a priori the preferred choice for the Workflow4Metabolomics team.

To get a production instance

. ~/.venv/bin/activate # optional
cd vagrant-ubuntu
TOOL_LIST='../tools-playbook-list/tool_list_LCMS.yaml' vagrant up

To get a dev instance

. ~/.venv/bin/activate # optional
cd vagrant-ubuntu
TOOL_LIST='../tools-playbook-list/tool_list_LCMS_dev.yaml' vagrant up
  1. When running for the first time, Galaxy will download and install all required Python modules (eggs), and then run all migration scripts.
  2. Then, the tools will be installed.
  3. Since we use conda to manage the dependencies, the first time you launch a tool, Galaxy will install using conda the tool dependencies. This step can take a few minutes. Keep cool!

Use Galaxy and the VM

Web interface

Finally, you can connect to the Galaxy portal from a browser running on your host: http://localhost:8080/.

SSH

To access through SSH to your image if you build it

vagrant ssh

Or if you get directly a .ova

ssh -Y [email protected] -p 2222

During tools installations

You can monitor the tools installation:

  1. Register in http://localhost:8080/ a user named [email protected]

Troubleshooting

  • If anything fails during the migration step, you'll have to rerun it using the following command:
sh manage_db.sh upgrade
./run.sh

w4m-vm's People

Contributors

pkrog avatar lecorguille avatar pcm32 avatar sneumann avatar

Stargazers

Björn Grüning avatar

Watchers

James Cloos avatar Meseret avatar  avatar Clemens Blank avatar  avatar Zhou Shiyi avatar

w4m-vm's Issues

Remove docker related files

Docker stuff has been moved to dedicated repos w4m-docker. All docker related files can now be removed, and dedicate this repos to the VM only.

Cannot install tools from tool_shed with ansible

failed: [w4mprod-qwerty] (item={
	'name': 'w4mclassfilter',
	'owner': 'eschen42',
	'tool_panel_section_id':
	'contribution_ALL',
	'revisions': ['9f5c0e23c205'],
	'github': {'repos': 'https://github.com/HegemanLab/w4mclassfilter_galaxy_wrapper',
	           'prod': 'v0.98.11',
	           'dev': 'master'},
	'xml': 'tools/w4mclassfilter/w4mclassfilter.xml'})
	=> {"ansible_loop_var": "item",
		"changed": false,
		"cmd": ["/tmp/venv/bin/shed-tools",
		         "install",
				 "-y",
				 "github:\n    dev: master\n    prod: v0.98.11\n    repos: https://github.com/HegemanLab/w4mclassfilter_galaxy_wrapper\nname: w4mclassfilter\nowner: eschen42\nrevisions:\n- 9f5c0e23c205\ntool_panel_section_id: contribution_ALL\nxml: tools/w4mclassfilter/w4mclassfilter.xml\n",
				 "-a",
				 "zapoto",
				 "-g",
				 "http://127.0.0.1:8080"],
		 "delta": "0:00:00.681857",
		 "end": "2019-12-02 13:23:52.162938",
		 "failed_when_result": true,
		 "item": {"github": {"dev": "master",
			                 "prod": "v0.98.11",
				                 "repos": "https://github.com/HegemanLab/w4mclassfilter_galaxy_wrapper"},
			 "name": "w4mclassfilter",
			 "owner": "eschen42",
			 "revisions": ["9f5c0e23c205"],
			 "tool_panel_section_id": "contribution_ALL",
			 "xml": "tools/w4mclassfilter/w4mclassfilter.xml"},
		"msg": "non-zero return code",
		"rc": 1,
		"start": "2019-12-02 13:23:51.481081",
		"stderr": "(1/1) Installing repository w4mclassfilter from eschen42 to section \"contribution_ALL\" at revision 9f5c0e23c205 (TRT: 0:00:00.524645)\r\nTraceback (most recent call last):\n  File \"/tmp/venv/lib/python3.6/site-packages/ephemeris/shed_tools.py\", line 609, in install_repositories\n    install_repository_revision(repository, self.tsc)\n  File \"/tmp/venv/lib/python3.6/site-packages/ephemeris/shed_tools.py\", line 428, in install_repository_revision\n    response = tool_shed_client.install_repository_revision(**repository)\n  File \"/tmp/venv/lib/python3.6/site-packages/bioblend/galaxy/toolshed/__init__.py\", line 146, in install_repository_revision\n    return self._post(url=url, payload=payload)\n  File \"/tmp/venv/lib/python3.6/site-packages/bioblend/galaxy/client.py\", line 160, in _post\n    files_attached=files_attached)\n  File \"/tmp/venv/lib/python3.6/site-packages/bioblend/galaxyclient.py\", line 146, in make_post_request\n    body=r.text, status_code=r.status_code)\nbioblend.ConnectionError: Unexpected HTTP status code: 403: {\"err_msg\": \"You are not authorized to request the latest installable revision for a repository in this Galaxy instance.\", \"err_code\": 403006}\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/tmp/venv/bin/shed-tools\", line 8, in <module>\n    sys.exit(main())\n  File \"/tmp/venv/lib/python3.6/site-packages/ephemeris/shed_tools.py\", line 744, in main\n    install_tool_manager.install_repositories()\n  File \"/tmp/venv/lib/python3.6/site-packages/ephemeris/shed_tools.py\", line 619, in install_repositories\n    if \"504\" in e.message:\nAttributeError: 'ConnectionError' object has no attribute 'message'",
		"stderr_lines": ["(1/1) Installing repository w4mclassfilter from eschen42 to section \"contribution_ALL\" at revision 9f5c0e23c205 (TRT: 0:00:00.524645)",
			"Traceback (most recent call last):",
			"  File \"/tmp/venv/lib/python3.6/site-packages/ephemeris/shed_tools.py\", line 609, in install_repositories",
			"    install_repository_revision(repository, self.tsc)",
			"  File \"/tmp/venv/lib/python3.6/site-packages/ephemeris/shed_tools.py\", line 428, in install_repository_revision",
			"    response = tool_shed_client.install_repository_revision(**repository)",
			"  File \"/tmp/venv/lib/python3.6/site-packages/bioblend/galaxy/toolshed/__init__.py\", line 146, in install_repository_revision",
			"    return self._post(url=url, payload=payload)",
			"  File \"/tmp/venv/lib/python3.6/site-packages/bioblend/galaxy/client.py\", line 160, in _post",
			"    files_attached=files_attached)",
			"  File \"/tmp/venv/lib/python3.6/site-packages/bioblend/galaxyclient.py\", line 146, in make_post_request",
			"    body=r.text, status_code=r.status_code)",
			"bioblend.ConnectionError: Unexpected HTTP status code: 403: {\"err_msg\": \"You are not authorized to request the latest installable revision for a repository in this Galaxy instance.\", \"err_code\": 403006}",
			"",
			"During handling of the above exception, another exception occurred:",
			"",
			"Traceback (most recent call last):",
			"  File \"/tmp/venv/bin/shed-tools\", line 8, in <module>",
			"    sys.exit(main())",
			"  File \"/tmp/venv/lib/python3.6/site-packages/ephemeris/shed_tools.py\", line 744, in main",
			"    install_tool_manager.install_repositories()",
			"  File \"/tmp/venv/lib/python3.6/site-packages/ephemeris/shed_tools.py\", line 619, in install_repositories",
			"    if \"504\" in e.message:",
			"AttributeError: 'ConnectionError' object has no attribute 'message'"],
		"stdout": "",
		"stdout_lines": []}

Update Galaxy and tools

  • Update Galaxy to 18.09.
  • Update all tools to latest version.
  • Create config/sanitize_whitelist.txt file to allow HTML rendering.

Missing datatypes in VM

Hi,

While trying to use the new VM w4mprod_azerty_1 (build done by @fgiacomoni) i have the following error when launching xcms.xcmsSet on a zip folder (https://github.com/workflow4metabolomics/metaMS/blob/master/galaxy/metaMS/test-data/W4M_GCMS_Dataset.zip)

all default parameters--> execute

Fatal error: Exit code 1 ()
Error: package or namespace load failed for 'mzR' in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/vagrant/galaxy/config/job_working_directory/000/25/conda-env/lib/R/library/mzR/libs/mzR.so':
libnetcdf.so.11: cannot open shared object file: No such file or directory
Error: library(pkg, quietly = TRUE, logical.return = TRUE, character.only = TRUE) is not TRUE
Execution halted
WARNING:galaxy.model:Datatype class not found for extension 'rdata.xcms.raw'
WARNING:galaxy.model:Datatype class not found for extension 'rdata.xcms.raw'
WARNING:galaxy.model:Datatype class not found for extension 'rdata.xcms.raw'
WARNING:galaxy.model:Datatype class not found for extension 'rdata.xcms.raw'
WARNING:galaxy.model:Datatype class not found for extension 'rdata.xcms.raw'

I think that other datatypes are missing
Help me
Yann

service galaxy start after ova boot ?

After vm producing with the vagrant method, it's easy to export the vm in a OVA format.
When deploying the ova new instance on VirtualBox:

  • keyboard is in US (not an issue but need to work on it for azerty people)
  • galaxy don't start after the boot - need to connect by ssh and exec a ./run.sh
  • shared folders is still the old one (warn at the boot)

Suggestion: move docker code to dedicated repos

@lecorguille @cduperier
I was wondering if it would not be better to split the code, and have a dedicated repos for docker (w4m-docker), for more visibility and ease of maintenance.
What do you think ?
Since the only thing in common is the list of tools, we could have either a repos dedicated to that (w4m-ansible) or a copy in each repos.

[vagrant-vm] warning to solve

During the vagrant up:

[DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and 
make sure become_method is 'sudo' (default).
This feature will be removed in a 
future release. Deprecation warnings can be disabled by setting 
deprecation_warnings=False in ansible.cfg.

Tool panel organization

Hi all,
I tried the new VM available on workflow4metabolomics.org, and I noticed that the tool panel is organized in a specific way that does not match the organization in the prod instance. Is this a choice?

Generic tool installation script

Write Python script for installing tools from github sources, using the yaml file in w4m-config, plus another file listing dependencies for each tool.
Implement different modes for installation:

  • (develop|maste|another branch): use the same branch for all tools
  • (develop|maste|another branch),mytool:(mybranch|myversiontag),myothertool:(myotherbranch|myotherversiontag),etc: use a default branch/version and some specific branch for certain tools.

[vagrant-vm] Tools outside sections

After a break in the testing of this solution, now, tools don't appear in the good sections in the tool panel.

A lot of layer have obviously be updated:

  • Ansible python library
  • Ansible-galaxy
  • Ansible-galaxy-tools
  • Galaxy itself
  • Vagrant

Build does *not* fail on mzR

Hi, in https://hub.docker.com/r/lecorguille/galaxy-workflow4metabolomics/builds/bex55xgwjaageqeuggt92sn/
I don't see a failure due to mzR (or it didn't reach that step yet ?!). There is * The PostgreSQL server failed to start. Please check the log output:``` and galaxy fails withOperationalError: (psycopg2.OperationalError) could not connect to server: Connection refused````.
We have a working bioconductor_metabolomics docker at http://phenomenal-h2020.eu/jenkins/job/bioc_docker_devel_metabolomics/11/ . Yours, Steffen

Docker build fails

ping @pierrickroger

I don't know why but since today, the builds fail because there is no more <section> in the shed_tool_conf.xml. So my tool which duplicate tool within the pannel fails.
When undo my last commits to return in the last stage which succeed but it still fails.

I also zip quite old version (based on commit tag around 2.5.0). It succeeds because I hadn't add my tool at that moment but there isn't any section.

I guess that one layer under mine have been modify?

I don't ask you to resolve that but I'm off for 3 weeks so I wanted to informe you if you spot those buildinf error in the DockerHub interface.

So far, we have a master and a release which seem OK. Ouf!

Add conda support

I will try to make installed conda within the vagrant virtual machine to allow Galaxy to deal with conda to install dependencies.

Meeting errors when building vm development version on macOS

     [exec] RUNNING HANDLER [../roles/ansible-galaxy-tools : Check if Galaxy is managed by supervisor] ***
     [exec] fatal: [default]: FAILED! => {"changed": false, "failed": true, "module_stderr": "sudo: a password is required\n", "module_stdout": "", "msg": "MODULE FAILURE"}
     [exec] ...ignoring
     [exec] RUNNING HANDLER [../roles/ansible-galaxy-tools : Restart Galaxy in docker container] ***
     [exec] fatal: [default]: FAILED! => {"changed": true, "cmd": ["docker", "exec", "galaxy", "supervisorctl", "restart", "galaxy:"], "delta": "0:00:00.020628", "end": "2017-02-08 08:40:43.185843", "failed": true, "rc": 1, "start": "2017-02-08 08:40:43.165215", "stderr": "Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?", "stdout": "", "stdout_lines": [], "warnings": []}

Planemo

Planemo should be installed within the VM

cd ~
virtualenv venv_planemo
source ~/venv_planemo/bin/activate
pip install planemo

or directly in the PATH via

sudo pip install planemo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.