NVIDIA / Parabricks / 軟體下載與安裝(v1)
===
###### tags: `Parabricks-v3.1`
###### tags: `基因體`, `NVIDIA`, `Clara`, `Parabricks`, `二級分析`
<br>
[TOC]
<br>
## 測試方法一 (向 Nvidia 請求授權下載 Parabricks)
1. ### 前往 [NVIDIA CLARA PARABRICKS 首頁](https://www.nvidia.com/zh-tw/healthcare/clara-parabricks/)
- https://www.nvidia.com/zh-tw/healthcare/clara-parabricks/
- https://www.nvidia.com/en-us/healthcare/clara-parabricks/
- [FREE ONE-MONTH TRIAL](https://www.nvidia.com/en-us/docs/nvidia-parabricks-general/)
2. ### 點選 [免費試用一個月](https://www.nvidia.com/en-us/docs/nvidia-parabricks-general/)

- 備註
- ==每個帳戶只能發一次請求,第二次以後就不受理==
- 同一個帳戶發了第二次、第三次都沒收到
- 換了新帳戶後,第一次有收到回應,第二次又沒收到
3. ### 填寫基本資料後送出

- 填寫 ASUS mail 都會收不到
- 填寫 gmail 可以收到 (2021/06/01 確認)
4. ### 收到 mail 通知 (gmail: 有可能跑到促銷廣告裡)
- 舊版
[](https://i.imgur.com/1U76c00.png)
<br>
:::info
:information_source: **CLARA PARABRICKS PIPELINES EVAL**
<br>
Thank you for requesting access to NVIDIA Clara Parabricks Pipelines.
Below is your license key for your free 1-month evaluation to Parabricks Pipelines.
<br>
**[Install Parabricks Pipelines](http://go.nvidianews.com/HO000690MaZgvNdn6vF00YE)**
<br>
To help get you started with quick-start guides, please visit our **[documentation page](https://www.nvidia.com/en-us/docs/parabricks/)**.
<br>
If you have any questions, please reach out to us on our **[developer forums](http://go.nvidianews.com/Bv060O0NM000dnvF0gZ6a9E)**.
<br>
For use on DNANexus, please follow the **[instructions](http://go.nvidianews.com/P060MnEO6F0a0d0w0g2Nv90)** using the license file from the install link above.
<br>
Thank you,
The NVIDIA Parabricks team
:::
- 論壇(forum):https://forums.developer.nvidia.com/c/healthcare/Parabricks
<br>
5. ### 點選 [Install Parabricks Pipelines](http://go.nvidianews.com/HO000690MaZgvNdn6vF00YE)
6. ### 網址自動導向到 https://s3.amazonaws.com/parabricks.licenses/v311_NOV_END/parabricks.tar.gz?AWSAccessKeyId=...

- 「請求日」超過「過期日」(程式的 bug)
- 請求日:2020-10-26
- 過期日:2020-10-21
- [[Nvidia][Forum] How could I try clara parabricks?](https://forums.developer.nvidia.com/t/how-could-i-try-clara-parabricks/157689)
7. ### 結論
失敗,無法取得 Parabricks 軟體
預期的[下載檔內容](https://www.nvidia.com/en-us/docs/parabricks/local-installation/),應該有
- installer.py: Installer to download and install the software
- license.bin: License file based on your license with NVIDIA Parabricks
- EULA.txt: End User License Agreement
<br>
<hr>
<br>
## ~~測試方法二 (它是透過 container 執行,但無 license.bin,執行會被拒)~~
1. ### 輸入關鍵字尋找

2. ### https://ngc.nvidia.com/catalog/containers/hpc:parabricks
[](https://ngc.nvidia.com/catalog/containers/hpc:parabricks)
3. ### Pull Command
```docker pull nvcr.io/hpc/parabricks:v2.5.0```
- nvcr: Nvidia Container Release
- ngc: Nvidia GPU Cloud
- 目前 ngc 上,並沒有 ```nvcr.io/hpc/parabricks:v3.1.1```
```
'docker pull nvcr.io/hpc/parabricks:v3.1.1
Error response from daemon: manifest for nvcr.io/hpc/parabricks:v3.1.1 not found: manifest unknown: manifest unknown
Cannot download Parabricks docker image.
Contact Parabricks-Support@nvidia.com for troubleshooting
```
4. ### 執行簡易 docker 測試1 - 顯示用法
```nvidia-docker run --rm nvcr.io/hpc/parabricks:v2.5.0 -h```
或
```docker run --rm nvcr.io/hpc/parabricks:v2.5.0 -h```
- 參考資料:[Running with nvidia-docker](https://ngc.nvidia.com/catalog/containers/hpc:picongpu)
- 實際測試:==**不需要再接 pbrun 指令,否則會有錯訊息**==
```
Unrecognized command pbrun <--- 無法識別 pbrun 指令
usage: pbrun <command> [<args>]
Help: pbrun -h
```
5. ### 執行簡易 docker 測試2 - 顯示版本
```docker run --rm nvcr.io/hpc/parabricks:v2.5.0 --version```
或
```docker run --rm nvcr.io/hpc/parabricks:v2.5.0 version```
或
```docker run --rm nvcr.io/hpc/parabricks:v2.5.0 pbrun --version```
6. ### 台大基因案例子
```
docker run --rm \
-v /home/diatango_lin/tj_tsai/parabricks/dataset/D15780_S13_L001/:/dataset/ \
nvcr.io/hpc/parabricks:v2.5.0 fq2bam \
--ref /dataset/human_g1k_v37_decoy.fasta \
--in-fq /dataset/D15780_S13_L001_R1.fastq.gz /dataset/D15780_S13_L001_R2.fastq.gz \
--out-bam /dataset/out.bam
```
<br>
**執行結果**
```
[Parabricks Options Mesg]: Checking argument compatibility
[Parabricks Options Mesg]: Automatically generating ID prefix
[Parabricks Options Mesg]: Read group created for /dataset/D15780_S13_L001_R1.fastq.gz and
/dataset/D15780_S13_L001_R2.fastq.gz
[Parabricks Options Mesg]: @RG\tID:000000000-C54LP.1\tLB:lib1\tPL:bar\tSM:sample\tPU:000000000-C54LP.1
License file ```license.bin``` not found in installation folder or passed in as argument
Please contact support@parabricks.com for any questions. Exiting...
```
- License file license.bin not found in installation folder
<br>
**取得 license.bin,重新執行**
```bash
# 加上 -v /home/diatango_lin/tj_tsai/software/parabricks/license.bin:/opt/parabricks/license.bin
docker run --rm \
-v /home/diatango_lin/tj_tsai/software/parabricks/license.bin:/opt/parabricks/license.bin \
-v /home/diatango_lin/tj_tsai/parabricks/dataset/D15780_S13_L001/:/dataset/ \
nvcr.io/hpc/parabricks:v2.5.0 fq2bam \
--ref /dataset/human_g1k_v37_decoy.fasta \
--in-fq /dataset/D15780_S13_L001_R1.fastq.gz /dataset/D15780_S13_L001_R2.fastq.gz \
--out-bam /dataset/out.bam
```
- 根據 [installer.py](https://github.com/prabindh/parabricks-changes/blob/master/installer.py)
- ```--install-location``` 預設在 "/opt/" + "/parabricks"
- 結果還是一樣
```License file license.bin not found in installation folder or passed in as argument```
- 前往論壇,詢問 Nvidia,
結果 Nvidia 回應:請使用正常管道的 trial version
https://forums.developer.nvidia.com/t/nvidia-parabricks-what-is-the-correct-path-of-license-bin-in-a-container/158035
- 後來使用 trial version,
透過 docker inspect 知道:```license.bin``` 是要掛在 ```/INSTALL/``` 底下
```bash
docker run --rm \
-v /opt/parabricks/:/INSTALL/ \
-v /mnt/parabricks/dataset/D15780_S13_L001/:/dataset/ \
nvcr.io/hpc/parabricks:v2.5.0 \
fq2bam \
--ref /dataset/b37/human_g1k_v37_decoy.fasta \
--in-fq /dataset/D15780_S13_L001_R1.fastq.gz /dataset/D15780_S13_L001_R2.fastq.gz \
--out-bam /dataset/out.bam
```
執行結果:
```
[Parabricks Options Mesg]: Checking argument compatibility
[Parabricks Options Mesg]: Automatically generating ID prefix
[Parabricks Options Mesg]: Read group created for /dataset/D15780_S13_L001_R1.fastq.gz and
/dataset/D15780_S13_L001_R2.fastq.gz
[Parabricks Options Mesg]: @RG\tID:000000000-C54LP.1\tLB:lib1\tPL:bar\tSM:sample\tPU:000000000-C54LP.1
------------------------------------------------------------------------------
|| Parabricks accelerated Genomics Pipeline ||
|| Version v2.5.0 ||
|| GPU-BWA mem, Sorting, Marking Duplicates, BQSR ||
|| Contact: Parabricks-Support@nvidia.com ||
------------------------------------------------------------------------------
[E::bwa_idx_load_from_disk] fail to locate the index files
------------------------------------------------------------------------------
|| Program: GPU-BWA mem, Sorting, Marking Duplicates, BQSR ||
|| Version: v2.5.0 ||
|| Start Time: Mon Nov 2 03:56:13 2020 ||
|| End Time: Mon Nov 2 03:56:13 2020 ||
|| Total Time: 0 seconds ||
------------------------------------------------------------------------------
Please contact support@parabricks.com for any questions. Exiting...
```
有錯誤訊息:
```
[E::bwa_idx_load_from_disk] fail to locate the index files
```
經過追查,起因於:「沒有完整的 fasta 索引檔」
```
D15780_S13_L001/b37.full/
├── human_g1k_v37_decoy.dict
├── human_g1k_v37_decoy.fasta
├── human_g1k_v37_decoy.fasta.amb
├── human_g1k_v37_decoy.fasta.ann
├── human_g1k_v37_decoy.fasta.bwt
├── human_g1k_v37_decoy.fasta.fai
├── human_g1k_v37_decoy.fasta.flat
├── human_g1k_v37_decoy.fasta.gdx
├── human_g1k_v37_decoy.fasta.pac
└── human_g1k_v37_decoy.fasta.sa
0 directories, 10 files
```
<br>
變更資料來源後,再執行一次:
- /dataset/b37/ 變更為 /dataset/b37.full/
```bash
docker run --rm \
-v /opt/parabricks/:/INSTALL/ \
-v /mnt/parabricks/dataset/D15780_S13_L001/:/dataset/ \
nvcr.io/hpc/parabricks:v2.5.0 \
fq2bam \
--ref /dataset/b37.full/human_g1k_v37_decoy.fasta \
--in-fq /dataset/D15780_S13_L001_R1.fastq.gz /dataset/D15780_S13_L001_R2.fastq.gz \
--out-bam /dataset/out.bam
```
<br>
執行結果:
```
[Parabricks Options Mesg]: Checking argument compatibility
[Parabricks Options Mesg]: Automatically generating ID prefix
[Parabricks Options Mesg]: Read group created for /dataset/D15780_S13_L001_R1.fastq.gz and
/dataset/D15780_S13_L001_R2.fastq.gz
[Parabricks Options Mesg]: @RG\tID:000000000-C54LP.1\tLB:lib1\tPL:bar\tSM:sample\tPU:000000000-C54LP.1
------------------------------------------------------------------------------
|| Parabricks accelerated Genomics Pipeline ||
|| Version v2.5.0 ||
|| GPU-BWA mem, Sorting, Marking Duplicates, BQSR ||
|| Contact: Parabricks-Support@nvidia.com ||
------------------------------------------------------------------------------
[M::bwa_idx_load_from_disk] read 0 ALT contigs
GPU-BWA mem
ProgressMeter Reads Base Pairs Aligned
GPU-BWA Mem time: 28.461105 seconds
GPU-BWA Mem is finished.
GPU Sorting, Marking Dups, BQSR
ProgressMeter SAM Entries Completed
Total GPU-BWA Mem + Sorting + MarkingDups + BQSR Generation + BAM writing
Processing time: 36.641302 seconds
[main] CMD: PARABRICKS mem -Z ./pbOpts.txt /dataset/b37.full/human_g1k_v37_decoy.fasta /dataset/D15780_S13_L001_R1.fastq.gz /dataset/D15780_S13_L001_R2.fastq.gz @RG\tID:000000000-C54LP.1\tLB:lib1\tPL:bar\tSM:sample\tPU:000000000-C54LP.1
[main] Real time: 50.952 sec; CPU: 265.815 sec
------------------------------------------------------------------------------
|| Program: GPU-BWA mem, Sorting, Marking Duplicates, BQSR ||
|| Version: v2.5.0 ||
|| Start Time: Wed Nov 4 01:13:56 2020 ||
|| End Time: Wed Nov 4 01:14:47 2020 ||
|| Total Time: 51 seconds ||
------------------------------------------------------------------------------
```
<br>
關於 parabricks image 的差異,個人主觀認為:
- nvcr.io/hpc/parabricks:v2.5.0 ,版本是 v2.5.0 (~~然後也無法正確讀取 index files~~)
- parabricks/release:v3.1.1 ,版本是 v3.1.1,應該是全新改版
上述已發布在 [[Nvidia/Parabricks] What is the correct path of license.bin in a container?](https://forums.developer.nvidia.com/t/nvidia-parabricks-what-is-the-correct-path-of-license-bin-in-a-container/158035)
<br>
<hr>
<br>
## 測試方法三 (成功)
- ### [[Nvidia][Forum]](https://forums.developer.nvidia.com/c/healthcare/Parabricks/290?ncid=em-prod-75940&mkt_tok=eyJpIjoiTkRaa05UYzRZek13TnpnMSIsInQiOiJoS1RSdVFLNlIwOEI3Wk1hOFVlYnVHbnZaa1Z6emJhUERWMXpvVWJxbk1ETXNVSmZVZml6czdFbXFlcmc1XC9JVVVQV21LdU5qZXlvQVFHajBiWmxOUUVRc1lDaFpTZmNLRG1qZlJocDI5b1l6dlBjV0E5blJoV1ByY3MxUDlBZXEifQ%3D%3D)
- [How could I try clara parabricks?](https://forums.developer.nvidia.com/t/how-could-i-try-clara-parabricks/157689)
> Greetings, Our apologies for this mishap; it appears that there’s a new policy for the link expiration that we’ll be addressing separately - here’s an updated link pointer for you to use instead:
>
> wget -O parabricks.tar.gz "https://s3.amazonaws.com/parabricks.licenses/v311_NOV_END/parabricks.tar.gz?AWSAccessKeyId=AKIAJGDUNN2G2ZAH3Q3A&Signature=MzWbwsjmXWdzyACJT2JUH1XlMAs%3D&Expires=1608564579"
- [Evaluation License Download Links Are Invalid](https://forums.developer.nvidia.com/t/evaluation-license-download-links-are-invalid/157233) (expired!!)
> Hi, thanks for reaching out to us. Could you please try the following link, which expires at the end of Nov? "https://s3.amazonaws.com/parabricks.licenses/v311_NOV_END/parabricks.tar.gz?AWSAccessKeyId=AKIAJGDUNN2G2ZAH3Q3A&Expires=1603296915&Signature=7LXvM92YJvFxRuXRA5WSPNnxLPU%3D" Thank you!
- ### ==詳細的執行結果,請參考==
[[Hackmd] NVIDIA / Parabricks / docker inspect …](/dicZf7wIT_6P_cqASd2EDQ)
<br>
<hr>
<br>
## 測試方法一 (接續)(新版 2021/06/02)
[](https://i.imgur.com/lsg7bK0.png)
<br>
[](https://i.imgur.com/GKQTVxZ.png)
<br>

<br>
[](https://i.imgur.com/9QZ57DV.png)
<br>
- Here is a link to the trial license resource
https://ngc.nvidia.com/resources/external-parabricks-trial-users:parabricks_free_trial
要使用你申請的 email 帳號,來登入到 nvidia (若沒帳號,則要註冊)
也就是,權限 `external-parabricks-trial-users` 綁定到 email 帳號
> You have been added to external-parabricks-trial-users organization.
> You are now a member of the NGC private registry " external-parabricks-trial-users "
> 
> - Description
> NVIDIA Clara Parabricks is a computational framework supporting genomics applications. It employs NVIDIA’s software stacks to build GPU accelerated libraries, pipelines, and reference application workflows for primary, secondary, and tertiary analysis.
沒權限,是底下這樣

- [Here](https://forums.developer.nvidia.com/uploads/short-url/5kvnj7M9EiMH70vInNOHsj3GOiM.pdf) are the download instructions!
https://forums.developer.nvidia.com/t/how-to-download-clara-parabricks-pipelines-trial-version/165217
- 直接點選下載 link (不work, 沒有link)
- 從 File Browser 下載 (OK)
- 透過 ngc 指令下載 (OK)
- parabricks.tar.gz
```
├── [ 793] Dockerfile_post
├── [2.4K] Dockerfile_post_extra_tools
├── [ 32K] EULA.txt
├── [ 24K] installer.py
├── [ 697] installMantaAndStrelka.sh
├── [ 181] license.bin
├── [ 698] singularity_post
└── [1.6K] singularity_post_extra_tools
```
<br>
<hr>
<br>
## [補充] 在平台上安裝軟體
### 安裝在 ESC4000 的資訊
```
$ sudo python3 parabricks/installer.py
====================================
Installing Parabricks
Final Selection:
Install Directory: /opt/parabricks
Install Version: v3.1.1
Install Container Type: docker
Install Architecture: x86_64
registry.gitlab.com
====================================
```
- GPU 記憶體不夠
- ESC4000 上,只有 11.1 GB
- 實際在 TWCC/203.145.218.3 上,需要 11945 MiB
<br>
### 安裝在 TWCC/203.145.218.3 的資訊
> ssh -i alpr_twcc_key.pem ubuntu@203.145.218.3
```
====================================
Installing Parabricks
Final Selection:
Install Directory: /opt/parabricks
Install Version: v3.1.1
Install Container Type: docker
Install Architecture: x86_64
registry.gitlab.com
====================================
Do you want to create a symlink to /usr/bin/pbrun
```
- 兩張 V100
- 當前 nvidia-docker 的資訊
```bash
$ nvidia-docker version
NVIDIA Docker: 2.5.0
Client: Docker Engine - Community
Version: 19.03.4
API version: 1.40
Go version: go1.12.10
Git commit: 9013bf583a
Built: Fri Oct 18 15:54:09 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.4
API version: 1.40 (minimum version 1.12)
Go version: go1.12.10
Git commit: 9013bf583a
Built: Fri Oct 18 15:52:40 2019
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.10
GitCommit: b34a5c8af56e510852c35414db4c1f4fa6172339
nvidia:
Version: 1.0.0-rc8+dev
GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
docker-init:
Version: 0.18.0
GitCommit: fec3683
```
<br>
### [一般安裝方式](https://www.nvidia.com/en-us/docs/parabricks/quickstart-guide/)
```
# Step 1: Unzip the package.
$ tar -xzf parabricks.tar.gz
# Step 2: Run the installer
$ sudo ./parabricks/installer.py
# Step 3: verify your installation.
# This should display the parabricks version number:
$ pbrun version
```
- **[trouble shooting]** docker: permission denied
> WARNING: Error loading config file: /home/ubuntu/.docker/config.json: open /home/ubuntu/.docker/config.json: permission denied
>
```bash
$ ll /home/ubuntu/.docker/config.json
-rw------- 1 root root 86 Oct 30 18:48 /home/ubuntu/.docker/config.json
$ sudo chown $(id -u):$(id -g) /home/ubuntu/.docker/config.json
$ ll /home/ubuntu/.docker/config.json
-rw------- 1 ubuntu ubuntu 86 Oct 30 18:48 /home/ubuntu/.docker/config.json
```
- **[trouble shooting]** docker: permission denied
> docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
```bash
$ cat /etc/group | tail
...
docker:x:999:
```
```bash
# 將目前使用者,加入到 docker 群組
# -a, --append
# append the user to the supplemental GROUPS
# mentioned by the -G option without removing
# him/her from other groups
# -G, --groups GROUPS
# new list of supplementary GROUPS
$ sudo usermod -aG docker $USER
```
```bash
ubuntu@alprworker-1203417-iaas:~/tj_tsai/parabricks/dataset$ cat /etc/group | tail
...
docker:x:999:ubuntu
```
- **[trouble shooting]** docker image 消失了
```
Unable to find image 'parabricks/release:v3.1.1' locally
docker: Error response from daemon: pull access denied for parabricks/release, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
```
- 原因

- 只要執行的方式,是非法的 (就是自己帶參數進去)
- 只要失敗 (比如路徑錯誤),image 就會消失 (應該是被移除)
- 查 docker images 就會找不到
<br>
- installer.py 執行的指令
```
docker login registry.gitlab.com -u pbuser -p dMwDDPMjGcyyzGZvu5dB
docker pull registry.gitlab.com/pbuser/release/x86_64:v3.1.1
```
執行結果:
```
$ docker login registry.gitlab.com -u pbuser -p dMwDDPMjGcyyzGZvu5dB
WARNING: Error loading config file: /home/ubuntu/.docker/config.json: open /home/ubuntu/.docker/config.json: permission denied
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /home/ubuntu/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
$ docker pull registry.gitlab.com/pbuser/release/x86_64:v3.1.1
v3.1.1: Pulling from pbuser/release/x86_64
Digest: sha256:aeed0fc58ce8ff7c8dc03c8905752f794b0d33faa1e851d1bf785bf853de0e61
Status: Downloaded newer image for registry.gitlab.com/pbuser/release/x86_64:v3.1.1
registry.gitlab.com/pbuser/release/x86_64:v3.1.1
```
重新命名 docker image
```
$ sudo docker tag registry.gitlab.com/pbuser/release/x86_64:v3.1.1 parabricks/release:v3.1.1
```
<br>
### [INSTALLING WITH SINGULARITY 3.0 OR HIGHER](https://www.nvidia.com/en-us/docs/parabricks/local-installation/) (這是透過 singularity)
- 1) Log in to a machine with sudo access and singularity 3.0 or higher.
- 2) To download the software:
```
$ wget -O parabricks.tar.gz " < DOWNLOAD_LINK > "
```
- 3) Unzip the package
```
$ tar -xvzf parabricks.tar.gz
```
- 4) Do a local installation:
```
$ mkdir localdir
$ sudo ./parabricks/installer.py --install-location localdir --container singularity
```
- 5) Everything will be installed in localdir/parabricks folder. Tar this folder.
```
$ cd localdir
$ tar -cvzf parabricks_install.tar.gz parabricks
```
- 6) and copy it to the node which will be used for testing and has singularity v3.x.
- 7) Untar the tar.gz file in some <INSTALL_DIR>$ cd <INSTALL_DIR>
```
$ tar -xvzf parabricks_install.tar.gz
```
<br>
## [補充] 軟體授權 (license.bin)
- [FAQS AND TROUBLESHOOTING](https://www.nvidia.com/en-us/docs/parabricks/quickstart-guide/faqs-and-troubleshooting/)
> You might need to move the license to the correct path. It should be stored at **/opt/parabricks/license.bin**
- #### Parabrick 工具如何提供「有授權」、「有期限」的憑證? (它是如何控制能不能使用?)
- 有一個二進位的授權,放在:
```/opt/parabricks/license.bin```
(類似憑證的概念)
- 這個會過期,就會無法使用 pbrun 指令
要續約,就要找 Nvida
<br>
## [補充] [官方測試資料](https://www.nvidia.com/en-us/docs/parabricks/quickstart-guide/)
```bash
$ wget -O parabricks_sample.tar.gz \
"https://s3.amazonaws.com/parabricks.sample/parabricks_sample.tar.gz?Expires=1613069864&Signature=WxLeyitbvR%2B0rO4MX%2B0GohDw89g%3D&AWSAccessKeyId=AKIAJGDUNN2G2ZAH3Q3A"
# To run the sample dataset:
$ tar -xvzf parabricks_sample.tar.gz
```
```
parabricks_sample
├── Data
│ ├── sample_1.fq.gz (2.5G)
│ └── sample_2.fq.gz (2.7G)
└── Ref
├── Homo_sapiens_assembly38.dict
├── Homo_sapiens_assembly38.fasta (3.1G)
├── Homo_sapiens_assembly38.fasta.amb
├── Homo_sapiens_assembly38.fasta.ann
├── Homo_sapiens_assembly38.fasta.bwt
├── Homo_sapiens_assembly38.fasta.fai
├── Homo_sapiens_assembly38.fasta.pac
├── Homo_sapiens_assembly38.fasta.sa
├── Homo_sapiens_assembly38.known_indels.vcf.gz (59M)
└── Homo_sapiens_assembly38.known_indels.vcf.gz.tbi (1.5M)
2 directories, 12 files
```
<br>
## [補充] 私人測試資料
- ### 台大基因案例子
```bash
pbrun fq2bam \
--ref /home/diatango_lin/tj_tsai/parabricks/dataset/D15780_S13_L001/human_g1k_v37_decoy.fasta \
--in-fq /home/diatango_lin/tj_tsai/parabricks/dataset/D15780_S13_L001/D15780_S13_L001_R1.fastq.gz \
/home/diatango_lin/tj_tsai/parabricks/dataset/D15780_S13_L001/D15780_S13_L001_R2.fastq.gz \
--out-bam /home/diatango_lin/tj_tsai/parabricks/dataset/D15780_S13_L001/out.bam
```
縮短指令:
```bash
dataset="/home/diatango_lin/tj_tsai/parabricks/dataset/D15780_S13_L001"
pbrun fq2bam \
--ref $dataset/human_g1k_v37_decoy.fasta \
--in-fq $dataset/D15780_S13_L001_R1.fastq.gz \
$dataset/D15780_S13_L001_R2.fastq.gz \
--out-bam $dataset/out.bam
```
執行結果:
```
Please visit https://www.nvidia.com/en-us/docs/parabricks/ for detailed documentation
[Parabricks Options Mesg]: Checking argument compatibility
[Parabricks Options Mesg]: Automatically generating ID prefix
[Parabricks Options Mesg]: Read group created for
/home/diatango_lin/tj_tsai/parabricks/dataset/D15780_S13_L001/D15780_S13_L001_R1.fastq.gz and
/home/diatango_lin/tj_tsai/parabricks/dataset/D15780_S13_L001/D15780_S13_L001_R2.fastq.gz
[Parabricks Options Mesg]: @RG\tID:000000000-C54LP.1\tLB:lib1\tPL:bar\tSM:sample\tPU:000000000-C54LP.1
------------------------------------------------------------------------------
|| Parabricks accelerated Genomics Pipeline ||
|| Version v3.1.1 ||
|| GPU-BWA mem, Sorting Phase-I ||
|| Contact: Parabricks-Support@nvidia.com ||
------------------------------------------------------------------------------
Not enough available memory for these GPUs...
Please contact Parabricks-Support@nvidia.com if you are rightfully using the software but cannot run it.
Please contact Parabricks-Support@nvidia.com for any questions. Exiting...
Could not run fq2bam
Exiting pbrun ...
```
- Not enough available memory for these GPUs...
- 無法在 ESC4000 上跑,需在 TWCC/203.145.218.3 上執行
<br>
## [補充]```install.py``` 詳細執行過程
```bash
Downloading image
$ docker login registry.gitlab.com -u pbuser -p dMwDDPMjGcyyzGZvu5dB
$ docker pull registry.gitlab.com/pbuser/release/x86_64:v3.1.1
$ docker logout registry.gitlab.com
Installing image
$ docker tag registry.gitlab.com/pbuser/release/x86_64:v3.1.1 parabricks/release:v3.1.1
$ docker inspect --type=image parabricks/release:v3.1.1
$ docker rmi registry.gitlab.com/pbuser/release/x86_64:v3.1.1
Copying Scripts
$ docker run --name=raw_run parabricks/release:v3.1.1 version
$ docker cp raw_run:/parabricks/release-v3.1.1.tar.gz /opt/parabricks
$ docker rm -f raw_run
$ tar -xzf /opt/parabricks/release-v3.1.1.tar.gz -C /opt/parabricks
$ /opt/parabricks/pbrun version
```
- image 儲存的地方,位於 /var/lib/docker 底下
```
$ sudo find /var/lib/docker/ | grep v3.1
/var/lib/docker/overlay2/4f6......448/diff/parabricks/release-v3.1.1.tar.gz
```
### 備份&還原 image
```bash
# save image
#docker save registry.gitlab.com/pbuser/release/x86_64:v3.1.1 > parabricks_release-v3.1.1.tar.gz
docker save -o parabricks_release-v3.1.1.tar.gz registry.gitlab.com/pbuser/release/x86_64:v3.1.1
# restore image
docker load -i parabricks_release-v3.1.1.tar
# rename image
docker tag registry.gitlab.com/pbuser/release/x86_64:v3.1.1 parabricks/release:v3.1.1
```
## [補充] 上傳資料到 TWCC/203.145.218.3 的平均速度:873.96 (KB/s)
```
WES-EDA-013A_R1.fastq.gz 100% 2536MB 749.0KB/s 57:47
WES-EDA-013A_R2.fastq.gz 100% 2751MB 1.0MB/s 45:27
```
```
├── [ 2658993692] WES-EDA-013A_R1.fastq.gz
└── [ 2884234372] WES-EDA-013A_R2.fastq.gz
```
- 檔案大小,全部共 5543228064 bytes (=5.16 GB)
- 上傳時間,全部共 1h:43m:14s (=6194s)
- 透過外網,上傳資料到 TWCC 的平均速度:
5543228064 / 6194 / 1024 = 873.96 (KB/s)
<br>
## [補充] v2/v3 版本差異性比較
### image 差異性
```
$ docker images | grep para
parabricks/release v3.1.1 71c75a606a99 6 weeks ago 2.73GB
parabricks/release v3.1.0 9bc71dfc4617 7 weeks ago 2.73GB
parabricks/release v3.0.0 20d4f4cab175 5 months ago 2.62GB
nvcr.io/hpc/parabricks v2.5.0 206e72b0a027 7 months ago 1.49GB
```
### pbrun (in dcoker) 指令 help 差異性
```
$ nvidia-docker run --rm parabricks/release:v3.1.1 pbrun
```
[](https://i.imgur.com/1dYcDMn.png)