Quick Start RNA解析
1. qlogin
ターミナルを開きます。
Mac book proだと最初このような表記になっています。
(base) username@MacBook-Pro ~ %
SHIROKANEにSSHで接続します。( https://supcom.hgc.jp/internal/mediawiki/id/273 )
(base) username@MacBook-Pro ~ %ssh -l username slogin.hgc.jp
Enter passphrase for key '/Users/username/.ssh/id_rsa':
Last login: Thu Jan 7 15:18:58 2021 from 202.175.149.237
[Begin first by QLOGIN!]
Welcome to SHIROKANE supercomputer of Human Genome Center, IMS, UT.
This is a login node as the gateway with very little software.
You can type qlogin COMMAND to use all the features of SHIROKANE.
| o ,,
,--.| ,--.,--.. ,--. | --, / +- -+- .
| || | || || | | | / / |-- | ` | |
`--|`-`--'`--|`-` ` `-- `-`- '`- `- `-
` `--' https://supcom.hgc.jp/internal/mediawiki/id/357
qloginします(https://supcom.hgc.jp/internal/mediawiki/qlogin_コマンド )。
[A login node of SHIROKANE username@slogin1:~]$qlogin
要求ハードリソース
memory (s_vmem): 4.5G = ジョブは 1 スロットあたり 4.5G バイトのメモリを要求します
slots (def_slot): 1 = ジョブは 100% の CPU を要求します
total memory: 4.5G = ジョブは 4.5G バイトのメモリを要求します
通常の qlogin を実行します。
Your job 30398880 ("QLOGIN") has been submitted
waiting for interactive job to be scheduled ...
Your interactive job 30398880 has been successfully scheduled.
Establishing /home/geadmin/N1GE/utilbin/lx-amd64/qlogin_wrapper session to host gc066i ...
Warning: Permanently added '[gc066i]:34434,[172.28.1.74]:34434' (ECDSA) to the list of known hosts.
Last login: Sun Dec 20 11:54:20 2020 from yc001i
2. run
テスト用のデータを使って実行してみましょう。
[username@gc016 ~]$bash /home/kks_th/CaGMeJ_git/SCRIPT/3.0.0/CaGMeJ/build/main/CaGMeJ.sh \
--analysis_type rna \
--sample_conf /home/kks_th/CaGMeJ_git/SRC/v8/data/rna/test.csv \
--output_dir {出力先ディレクトリ} \
--nextflow_conf /home/kks_th/CaGMeJ_git/SCRIPT/3.0.0/CaGMeJ/build/main/config/rna.cfg
オプション |
説明 |
|---|---|
|
サンプル設定ファイルのパス |
|
パイプライン設定ファイルのパス |
|
出力先のフォルダのパス |
|
パイプライン本体を実行するジョブをqsubで投げるときのオプション
example) -q '-l ljob,s_vmem=64G'
|
|
nextflow実行時にworkフォルダに生成するファイルの先頭から
ドットを取り除きません。
|
|
環境変数NXF_OPTSを設定します。
example) -p '-XX:+UseSerialGC -Xmx640m -Xms32m'
|
|
javaのmodulefileのパス
example) -j java/8.392.08.1
|
Note
テスト用のデータについて
SRR7189551 - SRR7189556 (Sequence Read Archive, SRA) を使っています。
解析終了まで1時間ほどかかります。
Note
resumeについて
nextflowは出力ディレクトリの.nextflowにあるcacheをもとに途中から実行することができます。
スパコンの謎のエラーなどにより途中までしか実行できなかった場合
を想定してます。cfgファイルのclusterOptionsを変更できることは確認しています。
3. result
解析が正常に終了したか確認します。
{出力先ディレクトリ}/report.htmlに結果が出力されています。
htmlファイルは そのままで見ることができないのでlogoutしてからscpコマンドを使って自分のpcにダウンロードしてからファイルを開きます。 ( ファイルのダウンロード方法 )
openコマンドまたはダブルクリックを使うことでreport.htmlをブラウザで開きます。
(base) username@MacBook-Pro ~ %open report.html
Workflow execution completed successfully!と表示されていたら成功です。
Note
report.htmlのパーサー
以下のようにCLIでも確認できます。
[username@gc016 ~]$ python /home/kks_th/CaGMeJ_git/SRC/v8/tool/nextflow_report_check/html_parser.py \
/home/kks_th/CaGMeJ_git/SRC/v8/tool/nextflow_report_check/successfully.html
/home/kks_th/CaGMeJ_git/SRC/v1/tool/nextflow_report_check/successfully.html
Workflow execution completed successfully!
[username@gc016 ~]$ python /home/kks_th/CaGMeJ_git/SRC/v8/tool/nextflow_report_check/html_parser.py \
/home/kks_th/CaGMeJ_git/SRC/v8/tool/nextflow_report_check/unsuccessfully.html
/home/kks_th/CaGMeJ_git/SRC/v1/tool/nextflow_report_check/unsuccessfully.html
Workflow execution completed unsuccessfully!
Note
本番環境
パイプラインの開発環境も本番環境も同じスパコン上ですが、
特定のディレクトリにプログラムを置いて他のユーザーが利用する場合、
そのユーザーの環境が本番環境です。
スパコンのデフォルトの環境でパイプラインを開発してます。
ユーザーがpythonやRのライブラリをインストールしたり、.bash_profileなどを変更したり、
スパコンのデフォルトの設定が変更されたりして開発環境と本番環境が異なると
パイプラインが動作しない可能性があります。