PGAP安裝筆記
2023 by RY Li
PGAP github連結:https://github.com/ncbi/pgap/wiki
運行PGAP前需要以下條件:
- Python (version 3.6 or higher)
- the ability to run Docker (see https://docs.docker.com/install/ if it is not already installed), Singularity, or Podman
- about 100GB of storage for the supplemental data and working space
- and 2GB-4GB of memory available per CPU used by your container.
- The CPU must have SSE 4.2 support (released in 2008).
將PGAP 安裝於Z2工作站,作業系統是Ubuntu,並已經安裝好Python 及 Singularity (參照CulebrONT安裝筆記):
Download
$ wget -O pgap.py https://github.com/ncbi/pgap/raw/prod/scripts/pgap.py
默認情況下,於家目錄 $home
下會有 pgap.py
檔案
$ chmod +x pgap.py
$ ./pgap.py --update
檔案有很大要下載一陣子 家目錄會出現 .pgap
的資料夾,這樣就安裝完成了~簡單唄
測試安裝
$ ./pgap.py -r -o mg37_results -g ./pgap/test_genome/MG37/ASM2732v1.annotation.nucleotide.1.fasta -s 'Mycoplasmoides genitalium'
註解自己的fasta檔案
$ ./pgap.py -r -o <results> -g <fasta> -s '<organism_name>'
如果不確定物種名稱 (organism_name),可以填上有可能的物種名稱,
在加上 --taxcheck
跟 –-auto-correct-tax
,就會自動進行 ANI 分析並依據ANI物種鑑定的結果進行註解喔
$ ./pgap.py -r -o <results> -g <fasta> --taxcheck --auto-correct-tax -s '<organism_name>'
- 另外我請ChatGPT幫我寫了一個簡單的 script,可以一次註解多個樣本:
#!/bin/bash
for sample in {01..12}; do
./pgap.py -r -o "MRSA_${sample}_results_ANI" -g "/home/onion/112_wgs_data/MRSA_assembly/${sample}/assembly.fasta" --taxcheck -s 'Staphylococcus aureus'
done