macでインフォマティクス

macでインフォマティクス

HTS (NGS) 関連のインフォマティクス情報についてまとめています。

ハプロタイプresolved のSNV、SV、およびメチル化を包括的に検出するPRINCESS

 

 ロングリードシーケンスは、構造変異(SV)の検出やメチレーションコールに有利であることが示されている。多くの研究では、SV、メチル化、またはSNVのphasingのいずれかに焦点が当てられているが、バリアントの組み合わせによってのみ、サンプルに関する包括的な洞察が得られ、生物学や医学における新しい発見が可能となる。PRINCESSは、生のシーケンスリードを用いて、数時間以内にSNV、SV、メチル化のフルフェーズコールセットを生成する構造化されたワークフローである。PRINCESSは、低カバレッジのデータセットでも高い精度と長いphasingを達成し、しばしば検出されない反復的で複雑な医療関連の遺伝子を解読できる。PRINCESSは、MITライセンスの下、https://github.com/MeHelmy/princess で公開されている。

 

インストール

python3.9環境でテストした(ubuntu18使用)。

Github

mamba install -c conda-forge -c bioconda snakemake=5.7.1
mamba install -c bioconda pyyaml -y

git clone https://github.com/MeHelmy/princess.git
cd princess
chmod +x install.sh
#Install Clair, Training models, pypy, and intervaltree
./install.sh

> ./princess 

# ./princess 
usage: princess [-h] {all,align,sv,snv,variant,phase,overview} ...

Princess A framework for long-reads analysis.

optional arguments:
  -h, --help            show this help message and exit

Sub-commands:
  Valid sub-commands

  {all,align,sv,snv,variant,phase,overview}
    all                 This command will run the following: Align the reads. Identify SVs Identify SNVs Phase both SNVs and SVs
    align               This command will use the input sequence files and align them against the reference using either Minimap2 or NGMLR use -a to choose aligner otherwise Minimap2 will be used by default.
    sv                  This command will use bam file to identify SV using Sniffles.
    snv                 This command will use bam file to identify SNVs usin Clair.
    variant             This command will use bam file to identify SVs and SNVs.
    phase               This command will use use reads to identify SNVs by Clair and Phase them.
    overview            This command will show what steps will run.

princess version 0.01. use command -h for info.

> ./princess all -h

# ./princess all -h
usage: princess all [-h] [-v] -d Working directory -r {ont,clr,ccs} [-l] [-u] [-e] [-a {minimap,ngmlr}] [-s sampleFiles [sampleFiles ...]] -f REF [-j JOBS] [-g LOG_FILE] [-c CHRS [CHRS ...]] [-t] [-m] [-md Fast5 Directory]

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -d Working directory, --directory Working directory
                        Working directory.
  -r {ont,clr,ccs}, --ReadType {ont,clr,ccs}
                        Read techonlogy
  -l, --removeFiles     remove princess source script after running default: False)
  -u, --UseConda        Use conda for running default: True)
  -e, --Cluster         Use cluster while runing default: True)
  -a {minimap,ngmlr}, --Aligner {minimap,ngmlr}
                        In case if you want to choose specific aligner otherwise default will be used default: minimap)
  -s sampleFiles [sampleFiles ...], --sampleFiles sampleFiles [sampleFiles ...]
                        list of fatsa, fastq, or gz files.
  -f REF, --ref REF     The reference file will be used to align reads to.
  -j JOBS, --jobs JOBS  Number of running jobs default: 200 )
  -g LOG_FILE, --log LOG_FILE
                        Log file: PrincessLog.txt )
  -c CHRS [CHRS ...], --chr CHRS [CHRS ...]
                        Chromosomes list, if not specified we will use all Chromosomes.
  -t, --filter          Filter identified SNVs using Princess algorithm default: True)
  -m, --methylation     Identify methylation, mutually inclusive with -md default: False)
  -md Fast5 Directory, --methylationDirectory Fast5 Directory
                        Fast5 directory will be used to identify methylation mutually inclusinve with option -m default: False)

 

f:id:kazumaxneo:20211013222017p:plain

 

 

テストラン

公開されているHG002データセットからHiFiのリードの一部を圧縮したファイル(103MB)が公開されている(フルデータ)。

wget https://bcm.box.com/shared/static/sdml5d7csxprgu3cl5cve0lgv5jnrrlv --output-document  HiFi.fastq.gz

 

全プロセスのラン

princess all  -d analysis -r ccs -f genome.fa --jobs 7 -s HiFi.fastq.gz  --latency-wait 200 -p
  • -d   Working directory.
  • -r {ont, clr, ccs}  Read techonlogy
  • -s   sampleFiles [sampleFiles ...] list of fatsa, fastq, or gz files. 
  • -f    The reference file will be used to align reads to.
  • -j    Number of running jobs default: 200 )

snakemakeによってcondaの環境を作られ(-u)、実行される。

f:id:kazumaxneo:20211013223719p:plain

 

出力

・align 指定されたアライナーに基づいた[minimap or ngmlr]ディレクトリ。

・sv 構造バリアントファイル sv/minimap/sniffles.vcf

・snp 染色体ごとの一塩基バリアントコールを含む

・phasedはフェーズドバリアントを含む

・stat (統計情報)

・meth メチル化情報(メチル化の実行を選択した場合)

 

テスト時は不明のエラーが出てランできなかった。

引用

PRINCESS: comprehensive detection of haplotype resolved SNVs, SVs, and methylation
Medhat Mahmoud, Harshavardhan Doddapaneni, Winston Timp & Fritz J. Sedlazeck 
Genome Biology volume 22, Article number: 268 (2021)