macでインフォマティクス

macでインフォマティクス

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

複数のSV検出結果を統合し、精度の高いSVコールを行う MetaSV

8/19 pindel、lumpy、cnvkit、breakdanerコマンドミス修正

 

 SVは、ゲノムの多様性およびゲノムの障害に寄与することに関与している(Stankiewicz and Lupski、2010)。したがって、SVの検出には相当量の作業が行われている。一般に、SVを検出するためのツールは、リードのアライメントからの以下の信号のうちの1つまたは複数を使用する:split-read [分割アライメント。例: Pindel(Ye et、2009)]、read-pair[異常なペアエンドアライメント。例: BreakDancer(Chen et al、2009)]、カバレッジデプス[異常なカバレージ。例: CNVnator(Abyzov et al、2011)]、ジャンクションマッピング[既知のSVブレークポイントへのアライメント。例: BreakSeq2(Abyzov et al、2015; Lam et al、2010)]またはブレークポイント周辺のアセンブリ[MindTheGap(Rizk et al、2014)]。しかし、SVタイプとサイズのニッチがあり、すべてのタイプのSVを包括的に検出するシグナルはない。これは、SV検出を改善するための複数の方法を統合するツールの開発を必要とする。

 以前の研究(Lam et al、2012; Mills et al、2011)は、複数のツールと方法によって作成されたバリアントコールが一般により正確であることを示している。このため、複数の方法を採用するためのツールが開発されている。 DELLY(Rausch et al、2012)、LUMPY(Layer etal、2014)、SVMerge(Wong etal、2010)などの複数のツールの結果をマージするものなどがある。ただし、LUMPYとDELLYは挿入を検出することができず、SVMergeはコールのマージの際に個々のツールのSV解像度を無視する。したがって、この研究は、異なるタイプとサイズのSVを高い精度と解像度で検出するための既存のSVマージングツールの限界に取り組もうとしている。

 MetaSVは、複数のSV検出方法とツールを使用して、信頼性が高く正確なSVコールセットを検出する。 MetaSVの新しさは、以下の重要なアイデアの組み合わせにある。複数の独立した方法の組み合わせで報告されたコールは一般に品質が良く、動的プログラミングによるローカルアセンブリを使用してSVブレークポイントを絞り込むことができる。

 MetaSVは、以下のステップ(論文 図1)で進行する。

Intra-tool merging:同じツールで生成された潜在的なduplicate callsがここでマージされる。十分なオーバーラップがある場合、2つのコールはマージされる。
Inter-tool merging:複数のツールで生成されたコールがマージされる。複数のツールに共通するコールのブレークポイントを決定する際には、精度が高いことが知られているメソッドが優先される(e.g., スプリット・リード情報の方がリード・ペア情報より優先)。このメソッド認識マージは、報告されたSVのブレークポイントが可能な限り正確であることを確実にするために重要である。
Local assembly:追加の証拠を収集してSVの配列を決定するため、ツールによって報告されたSV領域に対してローカルアセンブリが実行される。アセンブリのため独自のペア情報を使用する機能があるため、SPAdes(Bankevich etal、2012)アセンブラが使用される。
Breakpoint resolutionアセンブリされたSV配列は、ダイナミックプログラミングを使用してブレークポイントを検出または調整するためリファレンスとアライメントされる(Abyzov and Gerstein、2011)。
Genotyping:SVブレークポイント周辺のカバレッジがSVのzygosityを決定するために使用される。最終的な出力は、各SVのgenotypeを持つVCFファイルとして生成される。
Annotation:MetaSVは入力と出力をVCFで標準化している。各SVには、個々のツールによって行われた対応するコーラーを示し、その信頼レベルを分類するために注釈が付けられる。複数のツールで検出されたSVは、高い信頼性があるとみなされる。

  

MetaSV HP

http://bioinform.github.io/metasv/

f:id:kazumaxneo:20180731173653j:plain

 

MetaSV: An Accurate and Integrative Structural-Variant Caller for Next Generation Sequencing

f:id:kazumaxneo:20180731174637j:plain

 MetaSVパイプライン。論文より転載。

 

 MetaSVに関するツイート。

 

インストール

mac os 10.12のAnaconda環境でテストしたが、アセンブリをonにするとエラーを起こした(spades 3.6.2と3.12でテストした)。

依存

  • pybedtools: Note that bedtools (version 2.21 or greater) has to be installed separately in order for pybedtools to work. Please use pybedtools version 0.6.9.
  • pysam-0.7.7: MetaSV has only been tested with version 0.7.7 of pysam.
  • pyvcf: Please use pyvcf version 0.6.7.

In addition, paths to the following tools must be provided as MetaSV arguments:

  • SPAdes: Used for assembly around the SV breakpoints
  • AGE: Used for determining the SV breakpoints using assembled contigs. Please compile AGE without OpenMP support using make OMP=no.

spades(bioconda)、age(bioconda)もcondaで導入可能("spades.py"と "age_align"でヘルプが出るなら、whichでパス確認)。

spadesは"conda search spades"でインストール可能なバージョンを調べ、3.6.2を導入した(*5)。

conda search spades
conda install -c bioconda spades==3.6.2

 

上記に加え、metaSVに入力するSVをコールするツールも必要になる。 ヘルプには以下のSV検出ツール(SV caller)のオプションが記載されている。

  • Pindel
  • breakdancer (breakdancer-max)
  • breakseq (2も含む?)
  • cnvnator
  • gatk
  • manta
  • lumpy
  • cnvkit
  • wham

SV検出に使うcallerだけ導入すればよい。インストール方法については、各コマンド実行部分に簡単な説明を残した。

 

本体 Github

condaで導入できる(リンク)。

conda install -c bioconda metasv 
#permittionエラーが出たので、てテスト時はsudoで0.4.0を入れた (" metasv==0.4.0")

run_metasv.py

$ run_metasv.py -h

usage: run_metasv.py [-h] --sample Sample

                     [--pindel_vcf pindel_vcf [pindel_vcf ...]]

                     [--pindel_native File list [File list ...]]

                     [--breakdancer_vcf breakdancer_vcf [breakdancer_vcf ...]]

                     [--breakdancer_native File list [File list ...]]

                     [--breakseq_vcf breakseq_vcf [breakseq_vcf ...]]

                     [--breakseq_native breakseq_native [breakseq_native ...]]

                     [--cnvnator_vcf cnvnator_vcf [cnvnator_vcf ...]]

                     [--cnvnator_native File list [File list ...]]

                     [--gatk_vcf file [file ...]]

                     [--manta_vcf MANTA_VCF [MANTA_VCF ...]]

                     [--lumpy_vcf LUMPY_VCF [LUMPY_VCF ...]]

                     [--cnvkit_vcf CNVKIT_VCF [CNVKIT_VCF ...]]

                     [--wham_vcf WHAM_VCF [WHAM_VCF ...]]

                     [--mean_read_length MEAN_READ_LENGTH] --reference

                     reference [--chromosomes CHROMOSOMES [CHROMOSOMES ...]]

                     [--gaps gaps] [--filter_gaps] [--keep_standard_contigs]

                     [--bams BAMS [BAMS ...]] [--isize_mean ISIZE_MEAN]

                     [--isize_sd ISIZE_SD] [--wiggle WIGGLE]

                     [--inswiggle INSWIGGLE] [--minsvlen MINSVLEN]

                     [--maxsvlen MAXSVLEN] [--overlap_ratio OVERLAP_RATIO]

                     [--min_avg_base_qual MIN_AVG_BASE_QUAL]

                     [--min_mapq MIN_MAPQ] [--min_soft_clip MIN_SOFT_CLIP]

                     [--max_nm MAX_NM] [--min_matches MIN_MATCHES]

                     [--min_support_ins MIN_SUPPORT_INS]

                     [--min_support_frac_ins MIN_SUPPORT_FRAC_INS]

                     [--max_ins_intervals MAX_INS_INTERVALS]

                     [--mean_read_coverage MEAN_READ_COVERAGE]

                     [--min_ins_cov_frac MIN_INS_COV_FRAC]

                     [--max_ins_cov_frac MAX_INS_COV_FRAC]

                     [--sc_other_scale SC_OTHER_SCALE] [--spades SPADES]

                     [--spades_options SPADES_OPTIONS]

                     [--spades_timeout SPADES_TIMEOUT] [--disable_assembly]

                     [--svs_to_assemble {DUP,INV,DEL,INS} [{DUP,INV,DEL,INS} ...]]

                     [--svs_to_softclip {DUP,INV,DEL,INS} [{DUP,INV,DEL,INS} ...]]

                     [--extraction_max_read_pairs EXTRACTION_MAX_READ_PAIRS]

                     [--spades_max_interval_size SPADES_MAX_INTERVAL_SIZE]

                     [--assembly_max_tools ASSEMBLY_MAX_TOOLS]

                     [--assembly_pad ASSEMBLY_PAD] [--stop_spades_on_fail]

                     [--age AGE] [--age_timeout AGE_TIMEOUT]

                     [--min_inv_subalign_len MIN_INV_SUBALIGN_LEN]

                     [--min_del_subalign_len MIN_DEL_SUBALIGN_LEN]

                     [--age_window AGE_WINDOW] [--boost_sc]

                     [--gt_window GT_WINDOW] [--gt_normal_frac GT_NORMAL_FRAC]

                     [--svs_to_report {INV,CTX,INS,DEL,ITX,DUP} [{INV,CTX,INS,DEL,ITX,DUP} ...]]

                     [--enable_per_tool_output] [--workdir WORKDIR]

                     [--num_threads NUM_THREADS] --outdir OUTDIR [--version]

 

Merge SVs from multiple tools for accurate SV calling

 

optional arguments:

  -h, --help            show this help message and exit

 

Input data options:

  --sample Sample       Sample name (default: None)

  --pindel_vcf pindel_vcf [pindel_vcf ...]

                        VCF file or dir for Pindel VCFs (default: )

  --pindel_native File list [File list ...]

                        Pindel native files (default: )

  --breakdancer_vcf breakdancer_vcf [breakdancer_vcf ...]

                        VCF file or dir for BreakDancer VCFs (default: )

  --breakdancer_native File list [File list ...]

                        BreakDancer native files (default: )

  --breakseq_vcf breakseq_vcf [breakseq_vcf ...]

                        VCF file or dir for BreakSeq VCFs (default: )

  --breakseq_native breakseq_native [breakseq_native ...]

                        BreakSeq native GFF files (default: )

  --cnvnator_vcf cnvnator_vcf [cnvnator_vcf ...]

                        VCF file or dir for CNVnator VCFs (default: )

  --cnvnator_native File list [File list ...]

                        CNVnator native files (default: )

  --gatk_vcf file [file ...]

                        VCF file or dir for gatk VCFs (default: )

  --manta_vcf MANTA_VCF [MANTA_VCF ...]

                        VCF file or dir for Manta VCFs (default: )

  --lumpy_vcf LUMPY_VCF [LUMPY_VCF ...]

                        VCF file or dir for Lumpy VCFs (default: )

  --cnvkit_vcf CNVKIT_VCF [CNVKIT_VCF ...]

                        VCF file or dir for CNVkit VCFs (default: )

  --wham_vcf WHAM_VCF [WHAM_VCF ...]

                        VCF file or dir for WHAM VCFs (default: )

  --mean_read_length MEAN_READ_LENGTH

                        Mean read length (default: 100)

 

Reference options:

  --reference reference

                        Reference file (default: None)

  --chromosomes CHROMOSOMES [CHROMOSOMES ...]

                        Chromosome list to process. If unspecified, then all

                        chromosomes will be considered. (default: )

  --gaps gaps           Gap bed file (default: None)

  --filter_gaps         Filter out gaps (default: False)

  --keep_standard_contigs

                        Keep only the major contigs + MT (default: False)

 

Input BAM options:

  --bams BAMS [BAMS ...]

                        BAMs (default: [])

  --isize_mean ISIZE_MEAN

                        Insert size mean (default: 350.0)

  --isize_sd ISIZE_SD   Insert size standard deviation (default: 50.0)

 

Tool output merging options:

  --wiggle WIGGLE       Wiggle for interval overlap (default: 100)

  --inswiggle INSWIGGLE

                        Wiggle for insertions, overides wiggle (default: 100)

  --minsvlen MINSVLEN   Minimum length acceptable to be an SV (default: 50)

  --maxsvlen MAXSVLEN   Maximum length SV to report (default: 1000000)

  --overlap_ratio OVERLAP_RATIO

                        Reciprocal overlap ratio (default: 0.5)

 

Soft-clip detection options:

  --min_avg_base_qual MIN_AVG_BASE_QUAL

                        Minimum average base quality (default: 20)

  --min_mapq MIN_MAPQ   Minimum MAPQ (default: 5)

  --min_soft_clip MIN_SOFT_CLIP

                        Minimum soft-clip (default: 20)

  --max_nm MAX_NM       Maximum number of edits (default: 10)

  --min_matches MIN_MATCHES

                        Mininum number of matches (default: 50)

  --min_support_ins MIN_SUPPORT_INS

                        Minimum read support for calling insertions using

                        soft-clips (including neighbors) (default: 15)

  --min_support_frac_ins MIN_SUPPORT_FRAC_INS

                        Minimum fraction of reads supporting insertion using

                        soft-clips (including neighbors) (default: 0.05)

  --max_ins_intervals MAX_INS_INTERVALS

                        Maximum number of insertion intervals to generate

                        (default: 10000)

  --mean_read_coverage MEAN_READ_COVERAGE

                        Mean read coverage (default: 50)

  --min_ins_cov_frac MIN_INS_COV_FRAC

                        Minimum read coverage around the insertion breakpoint.

                        (default: 0.5)

  --max_ins_cov_frac MAX_INS_COV_FRAC

                        Maximum read coverage around the insertion breakpoint.

                        (default: 1.5)

  --sc_other_scale SC_OTHER_SCALE

                        Control degree of incorporation of breakpoints from

                        other methods. (default: 5)

 

Assembly options:

  --spades SPADES       Path to SPAdes executable (default: None)

  --spades_options SPADES_OPTIONS

                        Options for SPAdes (default: )

  --spades_timeout SPADES_TIMEOUT

                        Maximum time (in seconds) for running SPAdes on an

                        interval (default: 300)

  --disable_assembly    Disable assembly (default: False)

  --svs_to_assemble {DUP,INV,DEL,INS} [{DUP,INV,DEL,INS} ...]

                        SVs to assemble (default: ['INS', 'INV', 'DUP'])

  --svs_to_softclip {DUP,INV,DEL,INS} [{DUP,INV,DEL,INS} ...]

                        SVs to soft-clip (default: ['INS', 'INV', 'DUP'])

  --extraction_max_read_pairs EXTRACTION_MAX_READ_PAIRS

                        Maximum number of pairs to extract for assembly

                        (default: 10000)

  --spades_max_interval_size SPADES_MAX_INTERVAL_SIZE

                        Maximum SV length for assembly (default: 50000)

  --assembly_max_tools ASSEMBLY_MAX_TOOLS

                        Skip assembly if more than this many tools support a

                        call (default 1) (default: 1)

  --assembly_pad ASSEMBLY_PAD

                        Padding base pairs to use for assembling breakpoint

                        with Spades and AGE (default: 500)

  --stop_spades_on_fail

                        Abort on SPAdes failure (default: False)

  --age AGE             Path to AGE executable (default: None)

  --age_timeout AGE_TIMEOUT

                        Maximum time (in seconds) for running AGE on an

                        assembled contig (default: 300)

  --min_inv_subalign_len MIN_INV_SUBALIGN_LEN

                        Minimum length of inversion sub-alginment (default:

                        50)

  --min_del_subalign_len MIN_DEL_SUBALIGN_LEN

                        Minimum length of deletion sub-alginment (default: 50)

  --age_window AGE_WINDOW

                        Window size for AGE to merge nearby breakpoints

                        (default: 20)

  --boost_sc            Use soft-clips for improving breakpoint detection

                        (default: False)

 

Genotyping options:

  --gt_window GT_WINDOW

                        Window for genotyping (default: 100)

  --gt_normal_frac GT_NORMAL_FRAC

                        Min. fraction of reads supporting reference for

                        genotyping (default: 0.05)

 

Output options:

  --svs_to_report {INV,CTX,INS,DEL,ITX,DUP} [{INV,CTX,INS,DEL,ITX,DUP} ...]

                        SV types to report (default: set(['INV', 'CTX', 'INS',

                        'DEL', 'ITX', 'DUP']))

  --enable_per_tool_output

                        Enable output of merged SVs for individual tools

                        (default: False)

 

Running environment options:

  --workdir WORKDIR     Scratch directory for working (default: work)

  --num_threads NUM_THREADS

                        Number of threads to use (default: 1)

  --outdir OUTDIR       Output directory (default: None)

 

Other options:

  --version             show program's version number and exit

——

 

 

テストラン

git clone https://github.com/bioinform/metasv.git
cd metasv/test/
./test_run.sh

 test_run.sh実行前

f:id:kazumaxneo:20180731145324j:plain

実行後。out/にvariants.vcfができている。

f:id:kazumaxneo:20180731145348j:plain

variants.vcfの中身。

f:id:kazumaxneo:20180731145507j:plain

動作している。

 

ラン

いくつかのSVコーラーは以前まとめて紹介してます(リンク)。ここでは各ツールの SVコールコマンドと、それを入力としてmetaSVを実行する手順を確認する。

 

1、mapping

ペアエンドのfastqからbamを作成する。リファレンスはhuman_g1k_v37_decoy.faとする。minimap2でマッピングし(*1)、samtoolsにパイプしてソートし、BAM出力(*2)(*6, *7)。

#normal fastq
minimap2 -ax sr -R "@RG ID:X LB:Y SM:NA12877 PL:ILLUMINA"
-t 16 human_g1k_v37_decoy.fa pair1.fg pair2.fq
|samtools sort -@ 16 -m 4g -O BAM - > sample.bam
samtools index sample.bam

PCR duplicationを除き、リアライメントまで実行したいときは、こちらを参照。

 

2、Breakdancer-maxでSVコール(リンク)。dokcer imageを使う。

#コンテナ内で作業する
docker pull molecular/breakdancer #pull
docker run --rm -itv /Volumes/10TB/test/:/data/ molecular/breakdancer

> bam2cfg.pl sample.bam > breakdancer.cfg
> breakdancer-max breakdancer.cfg > breakdancer_output

 

3、PindelでSVコール(リンク)。dokcer imageを使う。

#コンテナ内で作業する
docker pull opengenomics/pindel
docker run -m "50g" --rm -itv /Volumes/10TB/test/:/data/ opengenomics/pindel


> #configファイル作成
> printf "sample.bam_350_sample1" > config
> sed -e 's/_/ /g' config > pindel_config && rm config #tabを入れたかったので少し遠回りした
> #pindel実行
> pindel -f human_g1k_v37_decoy.fa -T 10 -i pindel_config -o pindel
> cat pindel_SI pindel_D pindel_LI pindel_TD > pindel_merge
> pindel2vcf -R human_g1k_v37_decoy.fa -r human_g1k_v37_decoy.fa -p pindel_merge -v pindel.vcf -d 20180801 -e 4
> exit #コンテナを抜ける

vcffilter -f " SVTYPE = INS | SVTYPE = DEL " pindel.vcf > pindel.indel.vcf

 

4、MantaでSVコール(リンク)。dokcer imageを使う。

docker pull eitanbanks/manta-1.0.3
#configファイル作成
docker run --rm -itv /Volumes/10TB/test/:/data eitanbanks/manta-1.0.3
/bin/manta/bin/configManta.py
--normalBam=/data/sample.bam
--referenceFasta=/data/human_g1k_v37_decoy.fa
--runDir=/data/output

#configファイルを実行
docker run --rm -itv /Volumes/10TB/test/:/data eitanbanks/manta-1.0.3
data/output/runWorkflow.py -m local -j 8 --memGb=20

 

5、LumpyでSVコール(リンク)。Lumpyはbrewで導入した。

#normal bam
samtools view -@ 12 -b -F 1294 sample.bam > sample.discordants.unsorted.bam
samtools view -@ 12 -h sample.bam | extractSplitReads_BwaMem -i stdin | samtools view -Sb - > sample.splitters.unsorted.bam
samtools sort -@ 12 sample.discordants.unsorted.bam > sample.discordants.bam
samtools sort -@ 12 sample.splitters.unsorted.bam > sample.splitters.bam

#lumpyを実行
lumpyexpress -B sample.bam -S sample.splitters.bam -D sample.discordants.bam -o lumpy.vcf

 

6、CnvkitでSVコール(リンク)。Cnvkitはcondaで導入した。dockerイメージ使うなら"docker pull etal/cnvkit"。

cnvkit.py batch sample.bam --normal \
--targets my_baits.bed --fasta human_g1k_v37_decoy.fa \
--output-reference sample.cnn --output-dir cnvkit/

#.cnsからvcfを出力
cnvkit.py export vcf cnvkit/sample.cns -i "SampleID" -o sample.cnv.vcf

 

7、CnvnatorでSVコール(リンク)。dokcer imageを使う。メモリ要求量が大きいようなので、メモリlimitは100gとした(*4)。

#オフィシャルらしきものもあるが、timothyjamesbeckerさんのをpullした(リンク)。
docker pull timothyjamesbecker/cnvnator
docker run -m "100g" --rm -itv /Volumes/10TB/test/:/data/ timothyjamesbecker/cnvnator
#作成中

 

 

SVコールが終わったら、MetaSV実行する。

方法1

Only merging output of 5 SV detectors without further sof-clips based analysis or local assembly.

SV callerの結果のマージだけ実行。soft clipやローカルアセンブリを介した解析は行わない。

run_metasv.py --reference human_g1k_v37_decoy.fa 
--lumpy_vcf lumpy_tumor_normal.vcf
--cnvkit_vcf Sample.cnv.vcf
--breakdancer_native breakdancer_output
--manta_vcf manta.vcf
--pindel_vcf pindel.indel.vcf
--outdir metasv_out --sample HG005 --disable_assembly --filter_gaps --keep_standard_contigs --num_threads 12 --workdir work

出力ディレクトリ。統合されフィルタリングされたVCFファイルが出力される。

f:id:kazumaxneo:20180803163629j:plain

 

方法2

Complete run of MetaSV using all 4 SV detectors, soft-clips based analysis to enhance insertion detection, and local assembly to improve breakpoint resolution.

全解析。

run_metasv.py --reference human_g1k_v37_decoy.fa 
--lumpy_vcf lumpy_tumor_normal.vcf
--cnvkit_vcf Sample.cnv.vcf
--breakdancer_native breakdancer_output
--manta_vcf manta.vcf
--pindel_vcf pindel.indel.vcf
--spades SPAdes/spades.py --age AGE/age_align
--min_support_ins 2 --max_ins_intervals 500000 --isize_mean 500
--isize_sd 150 --num_threads 12 --workdir work --outdir out
--sample HG005 --bam alignments.bam

mac osでは、アセンブリしたcontigのindex作成あたりでエラーを起こした。やはりlinux機でテストした方が良かったかもしれない。

 

 

他の方法は著者らが準備した説明ページで確認して下さい。BreakSeq2のコマンドはわからなかったので載せてません。GATKについては、バージョンが異なると内容が変わり、余計な混乱を招くので載せてません(GATK3と最新のGATK4の違いとか)。

MetaSV 

 

より新しい手法も発表されてきています。また紹介します。

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5859555/

引用

MetaSV: an accurate and integrative structural-variant caller for next generation sequencing
Marghoob Mohiyuddin, John C. Mu, Jian Li, Narges Bani Asadi, Mark B. Gerstein,Alexej Abyzov, Wing H. Wong, and Hugo Y.K. Lam

Bioinformatics. 2015 Aug 15; 31(16): 2741–2744. 

 

*1 elprepでの簡単フィルタイングを考えたが、elprepの一部タスクは全データをメモリ内に収納して動作するためメモリ要求量が高く、chrごとにsplitしてもメモリが足りないのでやめた(ヒト50xWGSでも、おそらくは384GBくらいメモリが確保されていれば、splitで動く)

elprep split

   ↓

elprep filter --mark-duplicates --remove-duplicates --filter-mapping-quality 1 --clean-sam

 

*2 mac osでランしたかったので、処理速度の低下には目をつぶり、dokcer imagesを使っている。

*3 使用スレッド数を増やす場合、利用可能なメモリー量などに応じて慎重に行って下さい。

*4 実メモリに応じて変えて下さい。

*5 新しくても動くかもしれない。未検討。

*6 メモリ追加。指定値xスレッド数、だけメモリを食います。

*7 sort時にtoo many  filesのエラーが出たら、このページを参考にopen filesの上限を上げて下さい(現在の値を確認するには"ulimit -n")。

 

コピー数変化の検出と可視化ツール CNVkit

2020 3/22 実行例追記

2022/04/29 インストール手順修正

 

 コピー数変化は、ガンを含む多くの疾患の有用な診断指標である。ゲノム全体のコピー数解析のゴールドスタンダードは、 array comparative genomic hybridization(array CGH)である[論文より ref.1,2]。より最近では、全ゲノムシーケンシングデータからコピー数の情報を得る方法が開発されている(非特許文献4参照)。臨床用途では、エキソンや疾患関連遺伝子のセットなどのシーケンス解析では、興味のある領域をより高いカバレッジでシーケンスして、バリアントコールの感受性を高めることが好まれる[ref.5]。これらのデータを解析するため、 CNVer [ref.6]、ExomeCNV [ref.7]、exomeCopy [ref.8]、CONTRA [ref.9]、CoNIFER [ref.10]、ExomeDepth [ref.11]、VarScan 2 [ref.12]、XHMM [ref.13]、ngCGH [ref.14]、EXCAVATOR [ref.15]、CANO​​ES [ref.16]、PatternCNV [ref.17]、CODEX [ref.18]、Control-FREEC [ref.19]およびcn.MOPS [ref.20]などのコピー数を解析するツールも開発されてきた。しかしながら、これらのアプローチは、遺伝子間および通常はイントロン領域のシーケンスリードを使用せず、コピー数を推測する可能性を制限する。

 ターゲットエンリッチメントでは、標的領域はハイブリダイゼーションによりキャプチャされる。しかし、かなりの量のオフターゲットDNAがライブラリーに残っており、このDNAはシーケンスされてリードのかなりの部分を占めている。したがって、オフターゲットのリードは、全ゲノムに渡り非常に低カバレッジのシーケンスを提供する。ターゲット外のリードだけではSNVおよび他の小さなバリアントをコールする十分なカバレッジは得られないが、最近cnvOffSeq [ref.21]およびCopywriteR [ref.22]によって実証されたように、ラージスケールではコピー数推測に有用な情報を提供する。

 著者らは、ターゲットシーケンスでコピー数変化および改変の分析のための計算方法を開発した。このツールキットはCNVkitと呼ばれ、CNV検出のパイプラインを実装している。オンとオフの両方のターゲットシーケンシングリードを利用し、一連の修正を適用してコピー数のコール精度を向上させている。オンとオフのターゲット領域のビニングされたリードデプスを比較し、異なる解像度であるにもかかわらず、コピー数の類似した推定値を提供することを見出した。真のコピー数変化によって駆動されていないであろうビニングされたリードカウントの変動を補正するアルゴリズムをいくつか評価した。最後に、CNVkitメソッドと2つの競合するCNVコーラーの結果をarray CGHと比較し、CNVkitがarray CGHと最もよく一致することを確認した。

 

マニュアル(丁寧にまとめられています。ボリュームがあります。)

https://cnvkit.readthedocs.io/en/stable/

f:id:kazumaxneo:20180616203502j:plain

 

Biostars quwestion

https://www.biostars.org/t/CNVkit/

 

インストール

mac os10.13のanaconda2-4.3.0でテストした。

依存

Github

#bioconda (コメントいただきました通り修正しました。)
mamba create -n cnvkit -c conda-forge -c bioconda python=3.9 cnvkit -y
conda activate cnvkit

pipでも導入できる。Dockerコンテナも準備されている。
#dockerイメージ
docker pull etal/cnvkit

cnvkit.py -h

]$ cnvkit.py -h

 

 

usage: cnvkit.py [-h]

                 {batch,target,access,antitarget,autobin,coverage,reference,fix,segment,call,diagram,scatter,heatmap,breaks,genemetrics,gainloss,sex,gender,metrics,segmetrics,import-picard,import-seg,import-theta,import-rna,export,version}

                 ...

 

CNVkit, a command-line toolkit for copy number analysis.

 

positional arguments:

  {batch,target,access,antitarget,autobin,coverage,reference,fix,segment,call,diagram,scatter,heatmap,breaks,genemetrics,gainloss,sex,gender,metrics,segmetrics,import-picard,import-seg,import-theta,import-rna,export,version}

                        Sub-commands (use with -h for more info)

    batch               Run the complete CNVkit pipeline on one or more BAM

                        files.

    target              Transform bait intervals into targets more suitable

                        for CNVkit.

    access              List the locations of accessible sequence regions in a

                        FASTA file.

    antitarget          Derive off-target ("antitarget") bins from target

                        regions.

    autobin             Quickly calculate reasonable bin sizes from BAM read

                        counts.

    coverage            Calculate coverage in the given regions from BAM read

                        depths.

    reference           Compile a coverage reference from the given files

                        (normal samples).

    fix                 Combine target and antitarget coverages and correct

                        for biases. Adjust raw coverage data according to the

                        given reference, correct potential biases and re-

                        center.

    segment             Infer copy number segments from the given coverage

                        table.

    call                Call copy number variants from segmented log2 ratios.

    diagram             Draw copy number (log2 coverages, CBS calls) on

                        chromosomes as a diagram. If both the raw probes and

                        segments are given, show them side-by-side on each

                        chromosome (segments on the left side, probes on the

                        right side).

    scatter             Plot probe log2 coverages and segmentation calls

                        together.

    heatmap             Plot copy number for multiple samples as a heatmap.

    breaks              List the targeted genes in which a copy number

                        breakpoint occurs.

    genemetrics         Identify targeted genes with copy number gain or loss.

    sex                 Guess samples' sex from the relative coverage of

                        chromosomes X and Y.

    metrics             Compute coverage deviations and other metrics for

                        self-evaluation.

    segmetrics          Compute segment-level metrics from bin-level log2

                        ratios.

    import-picard       Convert Picard CalculateHsMetrics tabular output to

                        CNVkit .cnn files. The input file is generated by the

                        PER_TARGET_COVERAGE option in the CalculateHsMetrics

                        script in Picard tools. If 'antitarget' is in the

                        input filename, the generated output filename will

                        have the suffix '.antitargetcoverage.cnn', otherwise

                        '.targetcoverage.cnn'.

    import-seg          Convert a SEG file to CNVkit .cns files.

    import-theta        Convert THetA output to a BED-like, CNVkit-like

                        tabular format. Equivalently, use the THetA results

                        file to convert CNVkit .cns segments to integer copy

                        number calls.

    import-rna          Convert a cohort of per-gene log2 ratios to CNVkit

                        .cnr format.

    export              Convert CNVkit output files to another format.

    version             Display this program's version.

 

optional arguments:

  -h, --help            show this help message and exit

 

See the online manual for details: https://cnvkit.readthedocs.io

たくさんのコマンドがある。

例えばcnvkitの全パイプラインを実行するbatchコマンドのヘルプを表示する。

cnvkit.py batch -h

 $ cnvkit.py batch -h

usage: cnvkit.py batch [-h] [-m {hybrid,amplicon,wgs}] [-y] [-c]

                       [--drop-low-coverage] [-p [PROCESSES]]

                       [--rlibpath DIRECTORY] [-n [FILES [FILES ...]]]

                       [-f FILENAME] [-t FILENAME] [-a FILENAME]

                       [--annotate FILENAME] [--short-names]

                       [--target-avg-size TARGET_AVG_SIZE] [-g FILENAME]

                       [--antitarget-avg-size ANTITARGET_AVG_SIZE]

                       [--antitarget-min-size ANTITARGET_MIN_SIZE]

                       [--output-reference FILENAME] [-r REFERENCE]

                       [-d DIRECTORY] [--scatter] [--diagram]

                       [bam_files [bam_files ...]]

 

positional arguments:

  bam_files             Mapped sequence reads (.bam)

 

optional arguments:

  -h, --help            show this help message and exit

  -m {hybrid,amplicon,wgs}, --method {hybrid,amplicon,wgs}

                        Sequencing protocol: hybridization capture ('hybrid'),

                        targeted amplicon sequencing ('amplicon'), or whole

                        genome sequencing ('wgs'). Determines whether and how

                        to use antitarget bins. [Default: hybrid]

  -y, --male-reference, --haploid-x-reference

                        Use or assume a male reference (i.e. female samples

                        will have +1 log-CNR of chrX; otherwise male samples

                        would have -1 chrX).

  -c, --count-reads     Get read depths by counting read midpoints within each

                        bin. (An alternative algorithm).

  --drop-low-coverage   Drop very-low-coverage bins before segmentation to

                        avoid false-positive deletions in poor-quality tumor

                        samples.

  -p [PROCESSES], --processes [PROCESSES]

                        Number of subprocesses used to running each of the BAM

                        files in parallel. Without an argument, use the

                        maximum number of available CPUs. [Default: process

                        each BAM in serial]

  --rlibpath DIRECTORY  Path to an alternative site-library to use for R

                        packages.

 

To construct a new copy number reference:

  -n [FILES [FILES ...]], --normal [FILES [FILES ...]]

                        Normal samples (.bam) used to construct the pooled,

                        paired, or flat reference. If this option is used but

                        no filenames are given, a "flat" reference will be

                        built. Otherwise, all filenames following this option

                        will be used.

  -f FILENAME, --fasta FILENAME

                        Reference genome, FASTA format (e.g. UCSC hg19.fa)

  -t FILENAME, --targets FILENAME

                        Target intervals (.bed or .list)

  -a FILENAME, --antitargets FILENAME

                        Antitarget intervals (.bed or .list)

  --annotate FILENAME   Use gene models from this file to assign names to the

                        target regions. Format: UCSC refFlat.txt or

                        ensFlat.txt file (preferred), or BED, interval list,

                        GFF, or similar.

  --short-names         Reduce multi-accession bait labels to be short and

                        consistent.

  --target-avg-size TARGET_AVG_SIZE

                        Average size of split target bins (results are

                        approximate).

  -g FILENAME, --access FILENAME

                        Regions of accessible sequence on chromosomes (.bed),

                        as output by the 'access' command.

  --antitarget-avg-size ANTITARGET_AVG_SIZE

                        Average size of antitarget bins (results are

                        approximate).

  --antitarget-min-size ANTITARGET_MIN_SIZE

                        Minimum size of antitarget bins (smaller regions are

                        dropped).

  --output-reference FILENAME

                        Output filename/path for the new reference file being

                        created. (If given, ignores the -o/--output-dir option

                        and will write the file to the given path. Otherwise,

                        "reference.cnn" will be created in the current

                        directory or specified output directory.)

 

To reuse an existing reference:

  -r REFERENCE, --reference REFERENCE

                        Copy number reference file (.cnn).

 

Output options:

  -d DIRECTORY, --output-dir DIRECTORY

                        Output directory.

  --scatter             Create a whole-genome copy ratio profile as a PDF

                        scatter plot.

  --diagram             Create an ideogram of copy ratios on chromosomes as a

                        PDF.

——

試せてませんが、galaxyやDNA Nexusでも利用できるようです。

Galaxy | (sandbox for testing) | Tool Shed

https://platform.dnanexus.com/login

 

実行方法

--CNVの検出--

様々なサブコマンドがあるが、ここでは全パイプラインを動かすbatchコマンドと、出力を変換するexportコマンドを紹介する(Quick startより)。 

batch: Run the complete CNVkit pipeline on one or more BAM files.

パターンA: turmor-normal

cnvkit.py batch *Tumor.bam --normal *Normal.bam \
--targets my_baits.bed --fasta hg19.fasta \
--access data/access-5kb-mappable.hg19.bed \
--output-reference my_reference.cnn --output-dir example/

 

パターンB: 比較対象のbamがない場合、baitリファレンスを指定することでランできる。その場合、"--normal"フラグを引数なしで立てる。

cnvkit.py batch *Tumor.bam --normal -t my_baits.bed -f hg19.fasta \
--access data/access-5kb-mappable.hg19.bed \
--output-reference my_flat_reference.cnn -d example/

 ランが終わると、出力ディレクトリにいくつかのファイルができる。

  • Target and antitarget bin-level coverages (.cnn)
  • Copy number reference profile (.cnn)
  • Bin-level log2 ratios (.cnr)
  • Segmented log2 ratios (.cns)

詳細はフォーマット解説参照。

https://cnvkit.readthedocs.io/en/stable/fileformats.html

 出力をvcfに変換する。

export: Convert CNVkit output files to another format.

cnvkit.py export vcf example/sample.cns -i "SampleID" -o sample.cnv.vcf

 

 

 --CNVの可視化--

Bin-level log2 ratios (.cnr)ファイルとsegmentation callsをプロットする(おそらくhumanゲノムを想定しているので注意)

scatter(リンク: Plot probe log2 coverages and segmentation calls
together.

cnvkit.py scatter example/sample.cnr -s example/sample.cns

 

diagram(リンク: Draw copy number (log2 coverages, CBS calls) on chromosomes as a diagram.

cnvkit.py diagram -s example/sample.cns example/sample.cnr

 

heatmap(リンク: Plot copy number for multiple samples as a heatmap.

cnvkit.py heatmap example/*.cns

 

heatmap機能は縦にサンプルを並べて描画するので(リンク)、familyやpopulation解析など、一定の数のサンプルを比較する時に使えるんじゃないかと思います。

 

 

追記

コンティグごとのカバレッジを出力する。

#contig.faのindexからbedを作る。
samtools faidx contig.fa
awk '{print $1 "\t0\t" $2}' contig.fa.fai > contig.bed

#cnvkit.pyのcoverageコマンド実行
cnvkit.py coverage -o out input.bam contig.bed

出力

f:id:kazumaxneo:20200322203852p:plain

 

引用

CNVkit: Genome-Wide Copy Number Detection and Visualization from Targeted DNA Sequencing

Eric Talevich, A. Hunter Shain, Thomas Botton, Boris C. Bastian

PLoS Comput Biol. 2016 Apr; 12(4): e1004873.

 

オリジナルfastqと比較してbamのリード情報が完全に同じかどうか調べる BamHash

 

 (ゲノム)リシーケンシングプロジェクトは、既知ゲノムを有する種の個体のシーケンシング解析であり、大量のraw シーケンシングリードを生成し、その後、これらはリファレンスゲノムにアライメントされる。シーケンシングコストが減少し、現在のシーケンシング技術のスループットが増加し続けているため、データストレージが問題になっている。

 Rawシーケンシングリードは、一般的に圧縮されたFASTQファイル形式で保存される。マッピング後に得られたアライメント情報はBAMファイルに格納される(Li et al、2009)。このBAMファイルはソートされ、さらに処理されるが、最も重要なのは、FASTQファイルのオリジナル情報が全て含まれていることである。ソートされたBAMファイルは、ソートされていないBAMファイルと比較してより優れた圧縮を提供し、ゲノム領域に対するランダムルックアップを可能にする。この理由のために、ほとんど全てのポストアラインメント解析が可能である。例えばバリアントコール、リアライメント、ローカルアセンブリは、元のFASTQファイルではなく、ソートされたBAMファイルを使って実行される。

 BAMファイルにはFASTQファイルのすべての情報が含まれているため、アライメント後にFASTQファイルを削除することには正当性がある。つまりFASTQファイルの内容はBAMファイルから再生成することができる。

 しかし、FASTQファイルを削除する前に、データの損失がないこと、すなわちFASTQファイルのシーケンスがBAMファイルのシーケンスとまったく同じであることを確認する必要がある。 2つのファイルは様々な理由により異なる場合がある。アライメントパイプラインにエラーがあると、一貫性のないファイルが生成される可能性がある。アライメントパイプラインは十分にテストされたツールに基づいているが、通常の状態で動作することを意図しており、ハードウェアの故障やディスク領域がなくなった場合に動作が予測できない可能性がある。したがって、パイプライン全体の出力を独立して検証できることが重要になる。

 (この論文では)FASTQとBAMファイル間のデータの整合性を検証するためのツールであるBamHashを紹介する。このプログラムは両方のfastqの配列とリード名から64ビットのfingerprint(用語)を計算する。この方法は入力の変化に対して非常に敏感であるため、1ヌクレオチドの変化でも異なるfingerprintを生じる。偶然同じfingerprintを生成する確率は天文学的に小さい。このツールの役割は、異なるフィンガープリントを持つFASTQファイルとBAMファイルにフラグを立てて、FASTQファイルの削除が安全でないとマークをつけることである。

 BamHashは、ファイルのfingerprintを計算するmd5sumプログラムと同じ役割を果たす。フォーマットと順序が異なるため、FASTQとBAMファイルのmd5sumのfingerprint(Rivest、1992)を比較しても同等の結果は得られない。著者らの方法は高速かつメモリ効率的である。30xヒトゲノムシーケンシングのBAMファイルのfingerprintを30分で計算することができる。

 

BamHashに関するツイート。

 

インストール

ubuntu18.04でテストした。

 Github

git clone https://github.com/DecodeGenetics/BamHash.git
cd BamHash/
make

> ./bamhash_checksum_bam -h

$ ./bamhash_checksum_bam -h

bamhash_checksum_bam - Checksum of a bam file

=============================================

 

SYNOPSIS

    bamhash_checksum_bam [OPTIONS] <in.bam> <in2.bam> ...

 

DESCRIPTION

    Program for checksum of sequence reads.

 

    -h, --help

          Displays this help message.

    --version

          Display version information

 

  Options:

    -d, --debug

          Debug mode. Prints full hex for each read to stdout

    -R, --no-readnames

          Do not use read names as part of checksum

    -Q, --no-quality

          Do not use read quality as part of checksum

    -P, --no-paired

          Bam files were not generated with paired-end reads

 

VERSION

    bamhash_checksum_bam version: 1.1

    Last update May 2015

 

> ./bamhash_checksum_fasta -h

$ ./bamhash_checksum_fasta -h

bamhash_checksum_fasta - Checksum of a set of fasta files

=========================================================

 

SYNOPSIS

    bamhash_checksum_fasta [OPTIONS] <in1.fasta> [in2.fasta ... ]

 

DESCRIPTION

    Program for checksum of sequence reads.

 

    -h, --help

          Displays this help message.

    --version

          Display version information

 

  Options:

    -d, --debug

          Debug mode. Prints full hex for each read to stdout

    -R, --no-readnames

          Do not use read names as part of checksum

 

VERSION

    bamhash_checksum_fasta version: 1.1

    Last update May 2015

 

——

> ./bamhash_checksum_fastq -h

$ ./bamhash_checksum_fastq -h

bamhash_checksum_fastq - Checksum of a set of fastq files

=========================================================

 

SYNOPSIS

    bamhash_checksum_fastq [OPTIONS] <in1.fastq.gz> [in2.fastq.gz ... ]

 

DESCRIPTION

    Program for checksum of sequence reads.

 

    -h, --help

          Displays this help message.

    --version

          Display version information

 

  Options:

    -d, --debug

          Debug mode. Prints full hex for each read to stdout

    -R, --no-readnames

          Do not use read names as part of checksum

    -Q, --no-quality

          Do not use read quality as part of checksum

    -P, --no-paired

          List of fastq files are not paired-end reads

 

VERSION

    bamhash_checksum_fastq version: 1.1

    Last update May 2015

kazu@ubuntu:~/BamHash$

——

 

 

ラン

ペアエンドのbamファイル(シングルエンドは"--no-paired"をつける)

bamhash_checksum_bam [OPTIONS] <in.bam> <in2.bam> ...

ペアエンドのfastq

bamhash_checksum_fastq [OPTIONS] <in1.fastq.gz> [in2.fastq.gz ... ]

ペアエンドのFASTAファイル(シングルエンドは"--no-paired"をつける)

bamhash_checksum_fastq [OPTIONS] <in1.fastq.gz> [in2.fastq.gz ... ]

ペアエンドのFASTAからbamを作成した時は、bamのchecksumを"--no-quality"フラグをつけて行う。

 

テスト

とあるbamファイルのハッシュ値(fastq部分だけのハッシュ値)を調べる。

$ bamhash_checksum_bam recal_reads.bam 

c7d51310b2a044d3 508742

次にそのfastqのchecksumを調べる。

$ bamhash_checksum_fastq R1.fastq R2.fastq 

1e5b86c9181ca09f 254371

異なると判定された。これは、sam=>bamにするときにelprep(リンク)で不要なリード情報を除いたbamを使ったためである。次は、先ほどと同じbamだがフィルタリングせず作ったbamのハッシュ値

$ bamhash_checksum_bam R1R2_sorted.bam 

1e5b86c9181ca09f 508742

合致している。

 

 

引用
BamHash: a checksum program for verifying the integrity of sequence data
Óskarsdóttir A, Másson G, Melsted P

Bioinformatics. 2016 Jan 1;32(1):140-1

 

バイオインフォマティクスデータの検索と分析サイト Datasets2Tools

 

 ウェブの導入により、研究成果の伝統的な印刷出版物のソフトウェアベースの拡張が可能になった。a)研究論文をより簡単にコピー及び配布できるよりソフトウエアベースでpublishできる。 b)研究によって収集されたデータは、再利用および統合的で遡った(retrospective )分析のために、他の人がより容易に利用できるようにすることができる。 c)研究データを分析し視覚化するための方法とソフトウェアツールは、より強力かつアクセスしやすくなった。ウェブの導入によって促進されたこれらの発展は、生物医学研究の進歩にとって重要であったが、研究結果がどのようにデジタルで伝達されるかを改善するための多くの作業が残されている。ウェブの導入によりバイオインフォマティクス分野も促進されており、毎年何百もの新しいツールやデータベースが公開されている。同時に、biological sampleから大量の情報を抽出するhigh-content のバイオテクノロジーの進歩によるデータ収集の急速な成長は、この豊富なデータを管理するための集約型生物医学レポジトリの開発につながった。例えば、遺伝子発現トランスクリプトミクスとエピゲノミクスデータのためのOmnibus(GEO)(論文より ref.1)がある。実際、生物医学および生物学研究のすべての分野をカバーする多くのリポジトリが現在存在している。これらのリポジトリは、DataMed(ref.2)やFAIRSharing(ref.3)などのサイトで検索を行うよう索引付けされている。同様に、OMICtools(ref.4)などのバイオインフォマティクスツールを集約して索引付けするためのいくつかの取り組みが行われている。

 集約型の生物医学データリポジトリのデータセットランディングページから開始してpublication-ready な図を生成したり、インタラクティブな視覚化グラフィックを生成する方法があるが、現在ほとんどの集約型生物医学リポジトリは、その中に含まれるデータセットを操作できるツールから切り離されている。バイオインフォマティクス分析のプロセスを合理化する努力がなされているが、最近まで、データセットを処理するために適用されたほとんどのバイオインフォマティクスツールは、分析を実行したユーザーには引き続き他のユーザーと共有できる永続URLを提供しない。しかし、特定の集約型データリポジトリに含まれるデータセットから生成され、特定のバイオインフォマティクスツールによって分析されるような、事前に生成された ‘缶詰型’ の分析結果を表示するウェブページは徐々に蓄積されている。 GeneMANIA(ref.5)、Enrichr(ref.6,7)、Clustergrammer(ref.8)、L1000CDS2(ref.9)などのソフトウェアツールは、分析のために遺伝子シグネチャーを提出するユーザー、または相互作用ネットワークを構築するユーザーに、これらのツール、他者と共有できる永続URLを提供する。これに加えて、Galaxy(ref.10)のようなプラットフォームは、Web上で共有できる複雑なバイオインフォマティクスワークフローやパイプラインを簡単に作成できるインターフェイスを提供する。同様に、JupyterやR Markdown(ref.11)のようなインタラクティブなノートブックは、バイオインフォマティクスの分析をウェブ上で体系的に共有するためのプラットフォームである。再現性のある生物医学的および生物学的研究結果を作成し、伝達し、共有するこれらの新しい永続的方法は、我々が「缶詰め分析( ‘canned analysis’)」と呼ぶ新しい形の出版物と考えることができる。

 ここでは、初期状態で31,473のcanned analysisを揃えたcanned analysisのバイオインフォマティクス分析プラットフォームDatasets2Toolsを紹介する。31,473のcanned analysisは、選択されたツールを使用して6,431のデータセットに適用され、永続的なcanned analysisのURLが提供される。Datasets2Toolsは、4つのリーディングバイオインフォマティクスジャーナルBMC BioinformaticsBioinformaticsDatabase、そして Nucleic Acids Researchに掲載されている4901のソフトウェアツールのインデックスも作成している。Datasets2Toolsを使用すると、関連するデータセット、ツール、およびcanned analysisのデジタルオブジェクトをすばやく見つけることができる。著者らは、Datasets2Toolsがコミュニティへの貢献を通じて拡大することを期待している。 Datasets2Toolsは、Google Chromeブラウザの拡張機能Application Programming InterfaceAPI)としても提供されている(リンク)。

 Datasets2Toolsのユニークな機能の1つは、検索でき、アクセスでき、相互運用でき、再利用可能な(FAIR)原則に準拠する、データセット、ツール、およびcanned analysisを評価する機能である(ref.12)。 DataSet2Toolsに含まれる3種類のデジタルオブジェクト(データセット、ツール、およびcanned analysis)の検出可能性、アクセシビリティ、相互運用性、および再利用性に関するさまざまな側面に関する9つのYesまたはNoの質問に答えることができる。評価はデータベースに保存され、各データセット、ツール、または缶詰分析の近くに記章として表示される。 Datasets2Tools内の索引付けされたすべてのバイオインフォマティクスツールは出版物に由来しているため、Altmetric Attention ScoresおよびPlumXアセスメントならびに各ツールのPubMed引用はツールのカードの近くに表示される。このツール・メトリックの可視化は、ユーザーがバイオインフォマティクス・ツールをよりよく識別し、ランク付けするのに役立つ。 Datasets2Toolsのコンポーネントと機能の概要を論文図1に示す(pubmed)。

 

ヘルプページ

http://amp.pharm.mssm.edu/datasets2tools/help

 

 

概要

 Datasets2Toolsは 30,000以上のバイオインフォマティクス解析と、6,000以上のデータセット、4,000以上の計算ツールの索引付けを行っているデジタルオブジェクトの発見と評価のためのプラットフォーム。 これらには、豊富なエンリッチメント分析、遺伝子相互作用ネットワーク、インタラクティブなデータの可視化、 マイクロアレイ、RNA-seq、プロテオミクスなどのデータセットの計算ツールを提供している。 ユーザーは、webページのインタラクティブな検索インターフェイスを使用してこれらのオブジェクトを検索できる。缶詰分析というのは、バイオインフォマティクス分析の結果を、見つけやすく、アクセス可能で、相互運用可能で、再利用可能な方法で保存するように設計された新しいタイプのデジタルオブジェクトと定義されている(詳細な定義は論文とhelp参照)。

 

使用方法 

Datasets2Tools

f:id:kazumaxneo:20180727084219p:plain

 

GEO accesion number(GEOはNGSやアレイのレポジトリで分析もできる)による検索。 

f:id:kazumaxneo:20180731211906j:plain

ツール検索

http://amp.pharm.mssm.edu/datasets2tools/search?object_type=tool

f:id:kazumaxneo:20180727084109p:plain

 

例えば、NCBI GEOのこのデータ(ID: GSE39509)を調べたいとする(マウスのtumorのRNA seq)。

https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE39509

f:id:kazumaxneo:20180731212056j:plain

IDで検索。

f:id:kazumaxneo:20180731212229j:plain

hitした。クリックする。

f:id:kazumaxneo:20180731212249j:plain

詳細が表示される。

f:id:kazumaxneo:20180731212331j:plain

Toolsタブではこのデータの分析に使われたツールが表示される。そのツールに飛んで、詳細を調べたり、他にこのツールが使われた解析にさらにリンクすることもできる。

f:id:kazumaxneo:20180731212412j:plain

Viewを押すと、GSE39509のデータから作られたヒートマップに飛ぶ。

f:id:kazumaxneo:20180731212758j:plain

マウスのホイールで拡大縮小できる。これだけでも論文よりずっと便利(論文のヒートマップは格好だけはいいが、拡大しても字が潰れて見えなかったり、データの価値が損なわれていることがある)。

f:id:kazumaxneo:20180731212826j:plain

左のメニューから、縦方向と列方向のソート方法を変えたり、ヒートマップの濃さを調整できる。また、ブラウザで表示できるSVG形式、または行列のテキストファイルとしてデータをダウンロードできる。

まずは興味あるキーワードでラフに検索してみて下さい。そこからさらに絞り込めます。

f:id:kazumaxneo:20180731214615j:plain

 

 

ユーザーがデータをアップロードすることも可能。

http://amp.pharm.mssm.edu/datasets2tools/contribute

f:id:kazumaxneo:20180727083836p:plain

 

chrome extensionとしても供給されている(ダイレクトリンクできる)。

f:id:kazumaxneo:20180727083752p:plain

 

おまけ

Ma'ayan LabのGithubレポジトリには他にもいくつかのツールが登録されている。そのうちの1つBioToolBayは、Datasets2Toolsと同じく、4つの主要バイオインフォマティクスジャーナルにアクセスされた論文のツールを検索できるHPらしい。

http://amp.pharm.mssm.edu/biotoolbay

f:id:kazumaxneo:20180731143431j:plain

ユニークリソース、可視化ツール、データベースなど、などで分類されている。

例えば可視化ツール一覧。まだ下にスクロールできる。

f:id:kazumaxneo:20180731143644j:plain

ツールをクリックすれば詳細を確認できる。

f:id:kazumaxneo:20180731144004j:plain

 

 

 感じたこと

 バイオインフォマティクスに限らないが、論文の図表で提示されたデータの多くは、通常、パースしたりフィルタリングされ、その上、場合によっては他のデータと比較可能なように正規化された、編集済みデータである(ただし生のデータが出される研究もたくさんある)。このようなデータセットは、著者らが適切に解釈できると判断した手順で処理されており、読み手が論文内で主張されていることを理解するには必要十分になっている。しかし、角度を変えて分析したい時には少し困る。このブログで書くと釈迦に説教になってしまうが、一般に、競合する研究者やその研究成果を基礎にしてより新しい研究を行いたい研究者がデータドリブンで新しい現象を見つけ出そうとする時、往往にして、false positiveのリスクを取ってでも最大限の情報を抽出したいと思うものである(特にomic関係でよくある。統計のcut-off valueは重要な役目を持つが、値自体に意味は薄いので、cut-offの向こうには大事な遺伝子が潜んでいる可能性がある)。具体的には、論文とともに公共レポジトリにdepositされた生データをダウンロードし(しばしば無い場合すらある)、寸暇を惜しんで自ら同じようなセットセットを作り上げたりする。これには、意外にバカにならないくらいの時間がかかったりする。しかし、たとえその論文のmethodsを注意深く読みながらデータの再解析を実行したとしても、環境の違いで再現できないことがしばしばある(理由は無数に考えられる)。バージョンを統一してもできない場合があり、それが意図的なものではないかと疑義が立つことすらあるが、それは別の問題なので、触れるだけにとどめる。

 このような問題は、オリジナルデータは一切編集できないが、見かけ上だけフィルタリングやパース条件を変えられるインタラクティブなデータベースサイトに図表データがアップロードされていたり、depositされたデータを瞬時に可視化できるデータベースがあれば低減できる(NCBI GEO自体もそうです)。Datasets2Toolsは、公開されたデータを素早く、ユーザーが理解できる形で分析、再利用できることを目標に構築されている(FAIR Principles )。

 

紛らわしい文章を書きましたが、Datasets2ToolsはNCBI GEOにアクセッションされたデータから図を作っています。公開されているデータの中に、論文の著者らが直接アップしたものがどれだけあるのかは不明です。

 

引用

Datasets2Tools, repository and search engine for bioinformatics datasets, tools and canned analyses

Torre D, Krawczuk P, Jagodnik KM, Lachmann A, Wang Z, Wang L, Kuleshov MV, Ma'ayan A

Sci Data. 2018 Feb 27;5:180023.

高速なgermlineとsomaticのSV検出ツール Manta

 

 ゲノムシーケンシングおよびゲノムエンリッチメントシーケンシングは、臨床での遺伝性および体細胞突然変異発見のためにますます使用されてきているが、このシナリオにおける構造変異(SV)およびindelsの迅速な発見のためのツールは限られている。著者らは、SVと中サイズのindelsと大きなサイズの挿入を統一された迅速なプロセスで正確に検出し、評価するための新しい方法であるMantaを使いこのギャップに取り組む。 Mantaは、シークエンシングアッセイのペアエンドとスプリットマッピングから効率的なパラレルワークフローでバリアントを検出する。現在、研究とpopulation genomicsに焦点を当てた多くの高度な構造変異検出ツールが利用可能である(Layer et al、2014; Rausch et al、2012; Sindi et al、2012; Ye et al、2009)。しかし、著者らの知る限り、関連するサンプルの個々のセットまたは小さなセットに焦点を当てた迅速なワークフローに、多くのバリアントタイプを組み合わせることはできない。臨床パイプラインに重点を置くMantaは、リファレンスゲノムと任意の標準リードマッパーからのアラインメント(bam)のみを使用して、検出、アセンブリ、スコアリングのための完全なソリューションを提供する。これは、二倍体個体の生殖系列分析および腫瘍 - ノーマルサンプルペアの体細胞分析のためのスコアリングモデルを提供し、現在開発中のRNA-Seq、de novo変異、および他に類を見ない腫瘍のためのさらなる応用を提供する。(一部略)。

 Mantaのワークフローは、個々のサンプルまたは小さなサンプルセットで高い並列性を実現するように設計されている。それは2つのフェーズで動作する。(一部略)すべてのワークフローコンポーネントの詳細は補足資料(ダイレクトリンク)のメソッドで説明されている。

 

bamからSVが予測された領域についてgraphを作成し、その graphからバリアントを予測する。正確な予測ができなかった場合、ペアエンド情報だけから予測され、IMPRECISEのタグがつく。

f:id:kazumaxneo:20180730132404j:plain

Mantaのワークフロー。論文補足資料より転載(ダイレクトリンク)。

 

著者らの環境では、よく使われるゴールデンスタンダードindelのplatinum genomes NA12878(家系図 CEPE pedigree)(これ以外にもGenome in a bottle (GIAB) のデータがある)の50xシーケンシングデータ(illumina)のbamを、Mantaは20分未満で処理できるとされる(環境: 20 physical cores using a dual Xeon E5-2680 v2 server with the BAM accessed from a conventional local drive, peak total memory (RSS) for this run was 2.35 Gb)。 

ハードウエア必要条件

  • Memory Typical memory requirements are <1Gb/core for germline analysis and <2Gb/core for cancer/FFPE/highly rearranged samples. The exact requirement depends on many factors including sequencing depth, read length, fragment size and sample quality.
  • CPU Manta does not require or benefit from any specific modern CPU feature (e.g. NUMA, AVX..), but in general faster clock and larger caches will improve performance.
  • I/O I/O can be roughly approximated as 1.1 reads of the input alignment file per analysis, with no writes that are significant relative to the alignment file size.

MantaはWGSとWES向けのツールで、以下のような解析に対応している。

  • Joint analysis of small sets of diploid individuals (where 'small' means family-scale -- roughly 10 or fewer samples)
  • Subtractive analysis of a matched tumor/normal sample pair
  • Analysis of an individual tumor sample 

Mantaは以下のようなSVサブクラス検出に対応している。

  • Deletions
  • Insertions
  • Fully-assembled insertions
  • Partially-assembled (ie. inferred) insertions
  • Inversions
  • Tandem Duplications
  • Interchromosomal Translocations

Mantaは以下のようなSVサブクラスは検出できない。

  • Dispersed duplications
  • Most expansion/contraction variants of a reference tandem repeat
  • Small inversions
  • The limiting size is not tested, but in theory detection falls off below ~200bases. So-called micro-inversions might be detected indirectly as combined insertion/deletion variants.
  • Fully-assembled large insertions
  • The maximum fully-assembled insertion size should correspond to approximately twice the read-pair fragment size, but note that power to fully assemble the insertion should fall off to impractical levels before this size
  • Note that manta does detect and report very large insertions when the breakend signature of such an event is found, even though the inserted sequence cannot be fully assembled.

マニュアル

manta/docs/userGuide at master · Illumina/manta · GitHub

 Mantaに関するツイート。


8/3 dockerコマンド修正

 

インストール

mac os10.13でdokcerを使いテストした。

本体 Github

リリースからソースコードのほか、cent os向けバイナリをダウンロードできる。

https://github.com/Illumina/manta/releases

linuxならcondaでも導入できる(リンク)。

ここではdockerコンテナを使う。

docker pull eitanbanks/manta-1.0.3

 > docker run --rm -it eitanbanks/manta-1.0.3 /bin/manta/bin/configManta.py -h

$  docker run --rm -i -t -v /Users/user/data/:/data eitanbanks/manta-1.0.3 /bin/manta/bin/configManta.py -h

Usage: configManta.py [options]

 

Version: 1.0.3

 

This script configures the Manta SV analysis pipeline.

You must specify a BAM or CRAM file for at least one sample.

 

Configuration will produce a workflow run script which

can execute the workflow on a single node or through

sge and resume any interrupted execution.

 

Options:

  --version             show program's version number and exit

  -h, --help            show this help message and exit

  --config=FILE         provide a configuration file to override defaults in

                        global config file

                        (/usr/bin/manta/bin/configManta.py.ini)

  --allHelp             show all extended/hidden options

 

  Workflow options:

    --bam=FILE, --normalBam=FILE

                        Normal sample BAM or CRAM file. May be specified more

                        than once, multiple inputs will be treated as each BAM

                        file representing a different sample. [optional] (no

                        default)

    --tumorBam=FILE, --tumourBam=FILE

                        Tumor sample BAM or CRAM file. Only up to one tumor

                        bam file accepted. [optional] (no default)

    --exome             Set options for WES input: turn off depth filters

    --rna               Set options for RNA-Seq input: turn off depth filters

                        and don't treat anomalous reads as SV evidence when

                        the proper-pair bit is set.

    --unstrandedRNA     Set if RNA-Seq input is unstranded: Allows splice-

                        junctions on either strand

    --referenceFasta=FILE

                        samtools-indexed reference fasta file [required]

    --runDir=DIR        Run script and run output will be written to this

                        directory [required] (default: MantaWorkflow)

 

  Extended options:

    These options are either unlikely to be reset after initial site

    configuration or only of interest for workflow development/debugging.

    They will not be printed here if a default exists unless --allHelp is

    specified

 

    --scanSizeMb=INT    Maximum sequence region size (in megabases) scanned by

                        each task during SV Locus graph generation. (default:

                        12)

    --region=REGION     Limit the analysis to a region of the genome for

                        debugging purposes. If this argument is provided

                        multiple times all specified regions will be analyzed

                        together. All regions must be non-overlapping to get a

                        meaningful result. Examples: '--region chr20' (whole

                        chromosome), '--region chr2:100-2000 --region

                        chr3:2500-3000' (two regions)'

——

us

dokcerイメージから表示するなら

docker run --rm -it  eitanbanks/manta-1.0.3 /bin/manta/bin/configManta.py -h

 

>  runWorkflow.py -h #上記のコマンドを打つと、このpyflowのスクリプトができる。

Usage: runWorkflow.py [options]

 

Version: 1.4.0

 

Options:

  --version             show program's version number and exit

  -h, --help            show this help message and exit

  -m MODE, --mode=MODE  select run mode (local|sge)

  -q QUEUE, --queue=QUEUE

                        specify scheduler queue name

  -j JOBS, --jobs=JOBS  number of jobs, must be an integer or 'unlimited'

                        (default: Estimate total cores on this node for local

                        mode, 128 for sge mode)

  -g MEMGB, --memGb=MEMGB

                        gigabytes of memory available to run workflow -- only

                        meaningful in local mode, must be an integer (default:

                        Estimate the total memory for this node for local

                        mode, 'unlimited' for sge mode)

  -d, --dryRun          dryRun workflow code without actually running command-

                        tasks

  --quiet               Don't write any log output to stderr (but still write

                        to workspace/pyflow.data/logs/pyflow_log.txt)

 

  development debug options:

    --rescore           Reset task list to re-run hypothesis generation and

                        scoring without resetting graph generation.

 

  extended portability options (should not be needed by most users):

    --maxTaskRuntime=hh:mm:ss

                        Specify scheduler max runtime per task, argument is

                        provided to the 'h_rt' resource limit if using SGE (no

                        default)

 

Note this script can be re-run to continue the workflow run in case of

interruption. Also note that dryRun option has limited utility when

task definition depends on upstream task results -- in this case the

dry run will not cover the full 'live' run task set.

 

 

ラン

1、はじめにマッピングしてbamを作成する。著者らはマッパーにBWA-MEM version 0.7.5a を使っている。

 

2、Configurationファイルの作成。bin/configManta.pyを使う。入力はマッピングして得たbam(cram)とそのリファレンスfasta。bam(cram)、fasta共にindexファイルも必要。

Single Diploid Sample Analysis

#~/documnets/input_file/とイメージのdata/を共有ディレクトリとする。ただしdockerを使わないなら1行目は不要。またファイルパスの/data/部分も不要。
docker run --rm -itv /Users/uesaka/Documents/input_file:/data eitanbanks/manta-1.0.3 \
/bin/manta/bin/configManta.py \
--bam=/data/NA12878_S1.bam \
--referenceFasta=/data/hg19.fa \
--runDir=/data/output

 Joint Diploid Sample Analysis(例えばCEPE familyのコホート(ここではTrio))

docker run --rm -itv /Users/uesaka/Documents/input_file:/data eitanbanks/manta-1.0.3 \
/bin/manta/bin/configManta.py \
--bam=/data/NA12878_S1.cram \
--bam=/data/NA12891_S1.cram \
--bam=/data/NA12892_S1.cram \
--referenceFasta /data/hg19.fa \
--runDir=/data/output

 Tumor Normal Analysis(case-contorol)

docker run --rm -itv /Users/uesaka/Documents/input_file:/data eitanbanks/manta-1.0.3 \
/bin/manta/bin/configManta.py \
--normalBam=/data/HCC1187BL.cram \
--tumorBam=/data/HCC1187C.cram \
--referenceFasta=/data/hg19.fa \
--runDir=/data/output

 Tumor-Only Analysis

docker run --rm -itv /Users/uesaka/Documents/input_file:/data eitanbanks/manta-1.0.3 \
/bin/manta/bin/configManta.py \
--tumorBam=/data/HCC1187C.cram \
--referenceFasta=/data/hg19.fa \
--runDir=/data/output

 

3、 Configurationファイルの実行(シングルノードでの実行。SGE clusterのランはGithub参照)(*1)。

#dockerを使わないなら1行目は不要
docker run --rm -itv /Users/uesaka/Documents/input_file:/data eitanbanks/manta-1.0.3 \
data/output/runWorkflow.py -m local -j 8 --memGb=20

ジョブが終わると、germline解析では3つのVCFファイルが出力される(results/variants)。turmor/nomal解析ではさらにもう1つVCFができ(tumorSV.vcf)、合計4つのVCFが出力される。VCFのフォーマットはversion4.1に則っている。ポジションはSVのleft-shifted breakend coordinateが報告される。

1、diploidSV.vcf.gz

2、somaticSV.vcf.gz

3、candidateSV.vcf.gzとそのサブセットのcandidateSmallIndels.vcf.gz

4、tumorSV.vcf.gz

他にもStatisticsファイルが出力される。

1、alignmentStatsSummary.txt

2、svLocusGraphStats.tsv

3、svCandidateGenerationStats.tsv

4、svCandidateGenerationStats.xml

複数サンプルがある場合、bamの@RGのサンプル名(@RGのSM:のところ) をspecificな名前にしてbamを作ってください。bamを作った後に修正するならまとめ のsamtools view部分参照。

 

GIhubだけでもかなり丁寧に説明されています。まずGithubのマークダウンのマニュアル(リンク)に目を通し、方法論についての詳細は論文(publishされたのはBioinfomaticsジャーナルの"SEQUENCE ANALYSIS")のsupllementary(ダイレクトリンク)を読んでください。

引用

Manta: rapid detection of structural variants and indels for germline and cancer sequencing applications
Chen X, Schulz-Trieglaff O, Shaw R, Barnes B, Schlesinger F, Källberg M, Cox AJ, Kruglyak S, Saunders CT

Bioinformatics. 2016 Apr 15;32(8):1220-2

 

*1

"docker run"時、必要に応じてメモリlimitのオプションも使って下さい。

60G以上になるとkillするなら -m "60g" 

circulating cell free DNAから超高感度な変異検出を行う SiNVICT

 

 精密腫瘍学(precision oncology)の最も有望な分野の1つは、患者に合わせたカスタムターゲット療法の開発である。このような療法の開発および効率的な適用を成功させるには、患者の腫瘍DNAの治療誘発性変化の効率的かつ安価な同定手段とモニタリング方法を必要とする。残念なことに、特に進行性のガンでは、ガンの罹患率および死亡率の主な原因は、組織サンプリングに容易にアクセスできない複数の転移性病変の発生である。例えば、前立腺ガンでは> 90%以上の転移が骨および/または深部リンパ節で起こる(Bubendorf et al、2000)。このような部位を生検は患者の死亡率と関連してしまうため、したがって一般的には行われない。

 1948年以来、哺乳類の血液中に循環している無細胞DNA(cfDNA)の存在が知られている(Mandel、1948)。 cfDNAは細胞死に至る(壊死/アポトーシス)細胞(正常および腫瘍の両方)から放出されると考えられている - 1994年、癌患者の血液中に変異RAS遺伝子断片が検出された(see Schwarzenbach et al 、2011年)。 cfDNAを生成する非特異的メカニズムは、サンプリング変動の対象となる患者の全ての腫瘍DNAを、そしておそらく腫瘍の血流への完全な表現となる。以前の研究では、例えば、著者たちは、去勢抵抗性前立腺癌(CRPC)患者のcfDNAから様々な変異型AR(アンドロゲン受容体)遺伝子の存在を観察したが(Azad et al、2015)、これをもっとも説明できるのはそれぞれの患者の体内に癌細胞に複数のsubpopulationsが存在していたということである。複数の腫瘍foci / subclonesのこの完全な表現は、腫瘍由来のDNA源としての血漿の使用に重要な利点を提供する。残念なことに、患者の血液中に正常および腫瘍DNA両方が存在していることは、cfDNAシーケンシング分析に重大な問題を提起する。事態を悪化させているのは、腫瘍DNAは複数のサブクローンに由来することが多く、従って高度にheterogeneousであることである(一部略)。

 特定の集団内の1塩基変異(SNV)およびindelsを見出すために、体細胞および生殖細胞系や同時に複数サンプリングしてのWhole Genome Shotgun Sequencingを使用して突然変異コーラーが存在する。例えば、GATK(McKenna et al、2010)、VarScan2(Koboldt et al、2012)、Freebayes(Garrison and Marth、2012)、Strelka(Saunders et al、2012)(Strelka2の簡単な紹介)、MuTect(Cibulskis et al、2013)その他。これらのツールのほとんどは、頻度論またはベイズのアプローチを使用して、遺伝子座のバリアントコールがノイズ由来の偽陽性コールなのか(シーケンシングまたはマッピングエラー)、真の突然変異なのか推定する。その中でも、VarScan2はいくつかの発見的手法を使用して候補セットのサイズを縮小し、フィッシャーの正確検定のようないくつかの統計的検定を腫瘍/良性腫瘍ペアに適用して体細胞突然変異をコールする。さらに、strand biasなどの追加要因に基づきフィルタリングを可能にするポストプロセッシング機能も備えている。 Freebayes、MuTect、Strelkaなどの他のツールは、変異を呼び出すためにベイジアンの文脈で突然変異している場所の前後の確率を利用する。残念なことに、これらのツールは次のようなデータに対応していない、(i)患者の複数の時点からのシーケンシングデータ、(ii)非常に高いリードデプス(平均20〜30 k、90 kまで、おそらく将来的にはより高い)、(iii)極端に低い希釈率(約0.01%の変異の対立遺伝子パーセンテージ(Lipson et al、2014)、(iv)腫瘍内のheterogeneityが高いサンプル、または(v)システマティックなノイズの多いサンプル。さらに、ctDNAレベルは、限局性疾患を有する患者および治療を受けた患者における既存のctDNA検出アプローチの分析感度(Bettegowda et al、2014)よりも低くなり得る。

 上記の問題に対処するために、非常に高いリードデプスと非常に低い希釈率を扱える計算ツールSiNVICTを紹介する。 SiNVICTは、単一の腫瘍サンプル、複数の腫瘍サンプルバッチ、または単一の患者の複数時点でシーケンスされた複数サンプルで実行できる。この機能により、SiNVICTは1人の患者の複数のガンステージの同時シーケンシング解析や、異なる患者グループサンプルの同時シーケンシング解析ができる。これらのサンプルが類似の疾患進行および希釈レベルを有する場合、SiNVICTはその系統的なノイズを特徴付けるためにバッチの信号対雑音比(SNR)を利用し、シーケンシングされた領域のノイズの不均一性による偽陽性コールを減らそうと努力する。

 2つのシークエンシングプラットフォームで得られた同じ腫瘍サンプルのデータを使いSiNVICTの堅牢性を評価した(Illuminaの0.1%置換; IonTorrentの1%indel (Glenn、2011)]。著者らの実験は、SiNVICTが両方のシーケンシングプラットフォームで生成されたデータのコールに非常に敏感であることを示している。(一部略)。

 重要なことであるが、SiNVICTはユニークな問題に対処するものであり、既存の一般的なSNVおよびindelコーラー(例えばゲノム解析ツールキット)には匹敵しない。それらのツールは、シーケンシングデプスが高いデータセットの一部を処理するのが一般的で、 同じリードはPCR duplicatesとしてマークされる。しかしながら、ディープアンプリコンシーケンシングでは、同一のリードは必ずしもPCRアーティファクトとはならない、

 

gene target amplicon sequencing向けのツールです。論文では、SiNVICTの評価に、イルミナのIllumina DesignStudio (リンク)(*1)で作った14遺伝子のプローブ配列mixtureを使ったアンプリコンシーケンシングを行っています。

 

SiNVICTに関するツイート。


インストール

cent os7に導入した。

本体 Github

git clone --recursive https://github.com/sfu-compbio/sinvict.git
cd sinvict/
make

./sinvict -h

$ ./sinvict -h

 

SiNVICT: Ultra Sensitive Detection of Single Nucleotide Variants and Indels in Circulating Tumour DNA.

 

Allowed arguments:

--help or -h : Print help message.

--error-rate or -e : Error rate for the sequencing platform used.

--min-depth or -m : Minimum Read Depth required for high confidence in a call.

--left-strand-bias or -l : Lower limit for the strand bias value interval to be used in assessing the confidence of a call.

--right-strand-bias or -r : Upper limit for the strand bias value interval to be used in assessing the confidence of a call.

--read-end-fraction or -f : Average position of the called base on the reads supporting the call as a fraction.End values such as 0.01 as useful for filtering read end artifacts.

--qscore-cutoff or -q : Cutoff value for the qScore assigned to each call by the Poisson model used.

--tumor-directory-path or -t : Specifies directory for the input files.

--output-directory-path or -o : Specifies directory for the output files.

--use-poisson-germline or -s : Use a more robust poisson model to guess somatic/germline status.

 

--tumor-directory-path and --output-directory-path must be specified

 

Usage: ./sinvict -e=[error-rate] -m=[min-depth] -l=[left-strand-bias] -r=[right-strand-bias] -f=[read-end-fraction] -q=[qscore-cutoff] -t=<tumor-directory-path> -o=<output-directory-path> -s=<use-poisson-germline>

 

ラン

SiNVICTを使うにはbamを作成し、リードカウントを得る必要がある。著者は以下の手順で進めることを推奨している。

  1. Trimming FASTQ files (optional, fastq->fastq).
  2. Mapping (fastq -> bam).
  3. Recalibration and error correction (optional, bam -> bam).
  4. Obtaining mapping statistics per location (bam -> readcount).

(1) クオリティトリミングしアダプターが残っているなら除く。(2) bwaやmrFASTでマッピングしてbamを作成し、(3) ABRAなどで不正確なアライメントを改善しノイズを減らす(紹介)。(4) bam-readcountを使ってリードカウントを得る(紹介)。

 

出力されたテキストファイルをディレクトリ(ここではread-count_dir/ とする)に収納し、SiNVICTのコマンドを実行する。複数サンプルあるなら、全てディレクトリに収納しておく。

mkdir output
sinvict -t read-count_dir -o output
  • --min-depth    Minimum required read depth for a call to be considered reliable. (Default: 100)
  • --error-rate    Error Rate for the sequencing technology used (e.g. Illumina, Ion Torrent, ...) (Default: 0.01)
  • --left-strand-bias and --right-strand-bias    The strand bias values in the range [leftStrandBias, rightStrandBias] will be considered reliable. This [lsb, rsb] interval has to be between [0,1]. (Defaults: 0.3 and 0.7)
  • --read-end-fraction    Despite the trimming step, calls can be marked as low confidence according to the average position of the base on the reads that support a call. This value should be within range 0-1. (Default: 0.01)
  • --qscore-cutoff    The poisson model used by SiNVICT assigns a QScore to every call. Calls with a QScore below the user defined threshold will be considered low confidence. This value should be in range 0-99. (Default: 95)
  • --tumor-directory-path    The path to the directory where the readcount files are located.
  • --output-directory-path    The path to an empty directory where the output files will be generated.

結果はoutput/に出力される。 

$ ls -lth output/

合計 16K

-rw-rw-r--. 1 parallels parallels 7.8K  7月 28 22:55 calls_level1.sinvict

-rw-rw-r--. 1 parallels parallels 7.5K  7月 28 22:55 calls_level2.sinvict

-rw-rw-r--. 1 parallels parallels 7.3K  7月 28 22:55 calls_level3.sinvict

-rw-rw-r--. 1 parallels parallels 7.1K  7月 28 22:55 calls_level4.sinvict

-rw-rw-r--. 1 parallels parallels    0  7月 28 22:55 calls_level5.sinvict

-rw-rw-r--. 1 parallels parallels    0  7月 28 22:55 calls_level6.sinvict

フィルタリングレベルで6つのバリアントコールが出力される。6のcalls_level6.sinvictが全てのフィルタリングをクリアしたファイルとなる。テスト時は5でサイズがゼロになった。

  1. Poisson model: calls_level1.sinvict
  2. Minimum Read Depth filter: calls_level2.sinvict
  3. Strand-bias filter: calls_level3.sinvict
  4. Average position of called location among all reads supporting the call: calls_level4.sinvict
  5. Signal-to-Noise ratio filter: calls_level5.sinvict
  6. Homopolymer Regions filter: calls_level6.sinvict

出力はVCFに似た形式です。各フィールドはGIthubのページで解説されています。

 

引用

SiNVICT: ultra-sensitive detection of single nucleotide variants and indels in circulating tumour DNA.
Kockan C, Hach F, Sarrafi I, Bell RH, McConeghy B, Beja K, Haegert A, Wyatt AW, Volik SV, Chi KN, Collins CC, Sahinalp SC
Bioinformatics. 2017 Jan 1;33(1):26-34

 

参考

*1

DesignStudioを用いたプローブデザインの方法と最適化のヒント

https://jp.illumina.com/content/dam/illumina-marketing/apac/japan/documents/pdf/2016_ilmn_webinar_designstudio_session1.pdf

バリアントをランク付けする Variant Ranker

 

 変異を特定することは、病気の病因を理解する上で重要である。ハイスループットな次世代ゲノム技術の進歩により、ゲノムシーケンシング、エクソンシークエンシング、RNA-SeqおよびChIP-Seqは、複雑なメンデル症の感受性遺伝子座を同定するための標準となっている。課題は、これらの手法が因果関係の変異を識別するために生成する膨大なデータをふるいにかけることにある。これに加えて、有害性の予測(例えばPolyPhen [論文より ref.1]、SIFT [ref.2]、MutationTaster [ref.3])や保全(例えば ' (PhyloP [ref.4]、SiPhy [ref.5]、GERP [ref.6])、異なるツールからの予測にかなりのばらつきが存在することが問題になる。さらに、バリアント機能の注釈はデータベースごとに異なる傾向がある。 SnpEff [ref.7](簡単な紹介)、SeattleSeq [ref.8]、ANNOVAR [ref.9]のようなバリアントのアノテーションには、非常に有用なツールがいくつか存在するが、バリアントをランク付けする能力はない。 eXtasy [ref.10]やSPRING [ref.11]のようなツールは、同義置換以外をランク付けする。他のケースでは、VAAST [ref.12]やKGGSeq [ref.13]のようなツールは病気の原因となるバリアントの優先順位を決める便利なコマンドラインツールだが、通常はツールをダウンロードして実行するためにはある程度のプログラミング知識が必要となる。

 著者らは、様々なアルゴリズムやデータベースからの変異型の予測とアノテーションをそれぞれ組み合わせる簡単な方法を提供することにより、ゲノムデータを解釈する課題に取り組むWebベースのバイオインフォマティクスツール、Variant Rankerを開発した。最終結果は、機能的研究または実験的検証のために引き継がれる変異のランク付けされたリストである。このツールを使用すると、いくつかのデータベースのバリアントに存在する既存の情報と利用可能な情報を結合した単一のスコアを計算することによって、優先順位付きバリアントのランク付けされたリストが生成される。 Variant Rankerは、de factoVCF [ref.14]とANNOVAR [ref.9]の形式を使用して、すべてのタイプのシーケンシングデータに適用できる。このツールの利点は、使いやすさ、すべてのバリアント(コーディングおよびノンコーディング)スコアリング、およびユーザーに提供されるフィルタリングの柔軟性である。ユーザーは、データベースを介して迅速に結果を照会することができ、バイオインフォマティクスのスキルが限られている人を含む、容易にアクセス可能で解釈可能な出力を提供する。ランク付けされた変異/遺伝子リストから重要な生物学的接続を発見するための下流の機能的濃縮分析の目的で、ネットワークアナライザーが統合されている。ネットワークアプローチを介してDAVID(アノテーション、ビジュアライゼーション、統合ディスカバリ用のデータベース、https://david.ncifcrf.gov)[ref.15、16]の表形式の結果を調べるネットワーク視覚化ツールである。

 バリアントランキングアルゴリズム

 使用可能なアノテーションを使用して、すべてのバリアントが0と1の間のウェイトを割り当てることによってエンコードされる。たとえば、ANNOVARアノテーションでのルールに従ってエクステリアにウェイトが与えられる。対応する重みは、それぞれ、1,5,5,6、4 / 6,3 / 6,2 / 6,1 / 6となる。保存アルゴリズムと予測アルゴリズムからのスコアは、各アルゴリズムを使用して対応する重みに変換される。例えば、変異がGERP [ref.6] score> 2(高度に保存されている)である場合、それに対応する重み1が与えられる。同様に、予測アルゴリズムPolyphen2の場合、重みは1(損傷)、0.5(おそらく損傷) MetaSVM [ref.23]、MutationTaster [ref.3]、MutationAssessor [ref.24]、およびFATHMM [ref.25]は、重み1(有害)および0(耐性)に続いて、SIFT [ref.2]、LRT [ref.22] 。 ENCODE [ref.27]エレメント、転写因子結合部位または保存部位を持つ領域の変異、およびdbSNPに存在しない場合、またはGWASカタログ[ref.28]またはクリニカルバリア[ref.29]データベースに存在する場合には、バイナリー加重(1または0)を適用する。集団頻度データベースでは、希少対立遺伝子に重み付けするために重み付け(1 - 対立遺伝子頻度)が割り当てられる。

 このように、新規であり、いくつかの予測アルゴリズム(異なるアルゴリズムは異なる予測を有する傾向がある)によって有害で​​あると予測される、機能的に重要な変異に対してより高いスコアが与えられる。各バリアントの合計得点は、バリアント当たりの符号化ウェイトの合計を取ることによって得られ、その後、すべてのバリアントは、それらの合計得点でソートされ、ランク付けされる。この方法には、バリアントごとに利用可能な情報に基づいて、単一のスコアが与えられる利点もある。

 

チュートリアル

http://paschou-lab.mbg.duth.gr/html5up/Tutorial33.html 

 

実行方法

Variant Ranker以外に複数のモジュールがある。

1、Variant Ranker: Single sample VCF/List of Variants(リンク

データセットの変異のランク付けとアノテーションを実行し、複数ソースの情報から各変異の有害性、新規性および既存の情報などの優先度を統合する。

VCFを指定し、パラメータを設定してsubmitする。

f:id:kazumaxneo:20180728135114j:plain

Sample Identifier:はなるべくspecificな名前にする。これは、Sample Identifierで検索できるが、その時他のデータもヒットしないようにするため。メールアドレスも記載する。ジョブが終わればしゅつ力リンクつきメールが届く。

ランタイムはバリアントコールの数などで変わってくるが、およそ30000コールあるテストvcfでは数十分で結果が得られた(チュートリアルに説明あり)。

チュートリアルでは、Variant Rankerの使用例として、論文で副産物的に報告(pubmed)された突発性の溶血性貧血(wiki)のWESデータ解析由来VCFを使っている。論文ではPKLRが原因遺伝子として報告されているが、Variant RNakerのVCFランキングでは、PKLRが4位に検出されている。下のリンク先にjob ID"nonregistered-2016-01-13_13:24:42"を貼り付ければ結果が見れる。

Welcome - : Spectral Ranking Home

f:id:kazumaxneo:20180728140732j:plain

出力はここには載せません。自分で実行してください。出力内容についての説明(リンク)。

チュートリアルには、他に、ファイファー症候群(wiki)とミラー症候群(wiki)の患者の合成データ由来VCF解析例がある(3万以上のbiallelic variantsからのランキング)。

 

2、Filtering Multi-sample VCF/Case-Control Filtering 

Cases / Controls間(ケースコントロール:wiki)のバリアントをフィルタリングし、ランク付けされたバリアントリストを取得する。ssnpshiftを"casecontrol"フラグつきで走らせて拡張VCFを作っておく必要がある(e.g., java -jar SnpSift.jar caseControl "++++0-----" cc.vcf )。

http://paschou-lab.mbg.duth.gr/index/login/CC.php

f:id:kazumaxneo:20180728142426j:plain

ラン時に簡単なフィルタリング条件を設定できるが、その時、以下のパラメータをつけることが推奨されている。

  1. Cases and not Controls: NCase>0 and NControl=0
  2. Controls and not Cases: NControl>0 and NCase=0

f:id:kazumaxneo:20180728143241j:plain

 

 

3、Filtering Result Explorer
Variant Rankerの結果をフィルタリングする。保存したバリアントランキング結果をアップロードする以外に、 Variant Rankerの結果のページから直接利用することもできる。ユーザー指定の条件でフィルタリングして、機能的に重要なバリアントを抽出するために使う。

f:id:kazumaxneo:20180728150425j:plain

 

 

4、Network Analyser

ネットワークアナライザーは、関連する遺伝子を調べるため biological connections を視覚化するためのツール。アノテーション、ビジュアライゼーション、DAVID(https://david.ncifcrf.gov)データベースを利用する。 例えばVariant Rankerのトップランク遺伝子をここに入力して関連する遺伝子を分析する。

http://paschou-lab.mbg.duth.gr/index/login/PathwayNR.php

f:id:kazumaxneo:20180728151913j:plain

ネットワークの表示にはFlash playerのプラグインが必要になります。

 

5、SNPtoGene

バリアントのポジションリストから遺伝子名に変換する。入力はBEDファイルに対応している。リストが多すぎると機能しない。

f:id:kazumaxneo:20180728145922j:plain

 

全モジュール。

http://paschou-lab.mbg.duth.gr/html5up/index.html

f:id:kazumaxneo:20180728134652j:plain

 

論文での使用例もある。

https://www.frontiersin.org/articles/10.3389/fnins.2016.00428/full

 

*他にも同じ名前のツールがあります。注意してください。

引用

Variant Ranker: a web-tool to rank genomic data according to functional significance.

Alexander J, Mantzaris D, Georgitsi M, Drineas P, Paschou P

BMC Bioinformatics. 2017 Jul 17;18(1):341.