LoginSignup
2
2

More than 1 year has passed since last update.

QIIME2をGalaxyで動かす

Last updated at Posted at 2021-07-06

QIIME2をGalaxy上で使う

QIIME2をGalaxyで実行したいときは、QIIME2のモジュールであるq2galaxyを利用する。
q2galaxyは、2021.4バージョン(2021.07.06時点で最新)から公開された新しい機能のようだ。
詳しくは、QIIME 2 2021.4 is now available!を参照。

QIIME2 conda activateされた環境では、Galaxyを動かすコマンドラインユーティリティであるplanemoを用いてq2galaxyをインストールが可能だが、少し面倒なので今回はDockerを使ったインストールを実施する。

以下の手順で進めていく。
1. Dockerのインストール
2. q2galaxyのDockerイメージの取得
3. Galaxy上でQIIME2を起動

Dokcerのインストール

Ubuntuにdockerをインストールするを参考にしてインストールしていたら、以下のエラーが出た。

$ sudo apt-get install -y docker-ce
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package docker-ce is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'docker-ce' has no installation candidate

どうやらDockerをインストールしようとしたubuntuサーバ側の問題で発生したエラーだった。
Ubuntu 18.10 に Docker-ceを導入するを参考に以下のコマンドを実行し解決した。

$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"

$ sudo apt update

$ sudo apt install docker-ce

q2galaxyのDockerイメージの取得

$ docker pull quay.io/qiime2/q2galaxy

Galaxy上でQIIME2を起動

下記のコマンドを入力する。
$HOME/q2galaxy_data/をコンテナ下/export/にマウントする。
-p 8080:80は、コンテナ内の80番ポートを、ホストの8080番ポートで利用できるようにしている。
8021番と8022番ポートも同様で、それぞれFTPやSFTPのプロトコルでデータを転送するのに使用できる。

$ docker run -d -p 8080:80 -p 8021:21 -p 8022:22 -v $HOME/q2galaxy_data/:/export/ quay.io/qiime2/q2galaxy

コマンドの実行後、https://hocalhost:8080にブラウザでアクセスする。

スクリーンショット 2021-07-06 19.46.45.png

QIIME2のPluginが実行可能になっている。

スクリーンショット 2021-07-06 20.36.58.png

参考

Docker - q2galaxy

QIIME 2 2021.4 is now available!

April 23, 2021

This is an alpha release of an interface which automatically generates tool descriptions for Galaxy
This means that as plugins are created and evolve, we can automatically generate complete Galaxy tools in a few seconds, rather than developing them by hand as is typically done.
This interface is tested with a new plugin named q2-mystery-stew 6, which produces 553 integration tests.

Docker の Volume がよくわからないから調べた

July 25, 2020

コンテナ内で発生したデータは同じコンテナ内のどこかに書き出されるが、コンテナを破棄すると消えてしまいます。データだけはコンテナが消えても保存しておきたかったり、別コンテナで使いたいというニーズに対して、Docker はコンテナ外にデータ保存領域をつくる機能を提供しています。
- ボリューム
Docker の管理下でストレージ領域を確保する。Linux なら /var/lib/docker/volumes/以下。
名前付きボリュームと匿名ボリュームがあり、名前付きの場合は Docker ホスト内で名前解決できるのでアクセスしやすい。匿名ボリュームは適当にハッシュ値が振られる。
他のプロセスからはさわれないので安全。基本はこれを使うのがよい。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2