macでインフォマティクス

macでインフォマティクス

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

変異が導入されたゲノムをシミュレートする simuG

 

 ゲノムシーケンステクノロジーの急速な進歩に伴い、ゲノムシーケンスデータに基づいてゲノムバリアントを特徴付けるための多くのバイオインフォマティクスツールが開発されてきた。実際の生物学的サンプルから実験的に検証されたゴールドスタンダードゲノムシーケンスデータセットの可用性が増加している一方で、in silicoシミュレーションは、バイオインフォマティクスツールのパフォーマンスを測定および比較するための強力なアプローチであり続ける。それに対応して、イルミナおよび454のART(Huang et al、2012)、PacBioのSimLoRD(Stöckeret al、2016)およびオックスフォードナノポア用のDeepSimulator(Li et al、2018)など、さまざまなシーケンステクノロジー向けに多くのリードシミュレーターが開発されている。ただし、変異が埋め込まれたゲノム配列をシミュレートするツールに関しては、選択肢がはるかに限られているように見える。現在使用可能なツールは、単純すぎるか、専門化されすぎている。たとえば、SInC(Pattnaik et al、2014)は、ランダムな1塩基多型(SNP)、挿入/欠失(INDEL)、およびコピーナンバーバリアント(CNV)をユーザー提供のリファレンスゲノムに導入できるが、既知のバリアントをシミュレートする機能はない。これは実際には一部のシミュレーションアプリケーションで非常に重要である。 Simulome(Price et al、2017)は、より細かい制御オプションを提供する別のランダムバリアントシミュレーターだが、原核生物ゲノムのみを対象に設計されている。 VarSim(Mu et al、2015)やXome-Blender(Semeraro et al、2018)など、より洗練されたツールが存在するが、これらのツールは主にヒトのガンゲノムシミュレーション用に調整されており、多くの場合、追加のサードパーティデータベースが必要である。したがって、シンプルさと汎用性のバランスをとるゲノムシミュレータが必要であると感じている。これを念頭に置いて、著者らは汎用ゲノムシミュレーターsimuGを開発した。これは、小さな(つまりSNPとINDEL)と大きな(つまりCNV、逆位、転座)の両方のゲノムバリアントをシミュレートするのに十分な汎用性を持ち、余分な依存が最小限で軽量性を維持した案件になる。さらに、simuGは、さまざまなコーディングパーティション(コーディングサイト、非コーディングサイト、4重縮退サイト、2重縮退サイトなど)でSNPをシミュレートするなど、きめ細かい制御で豊富な配列を提供する。異なる形成メカニズム(セグメントの削除、分散複製、タンデム複製など)でCNVをシミュレートし、特定の種類のブレイクポイントで逆位と転座をシミュレートする。これらの機能により、simuGは広範囲のアプリケーションシナリオに非常に適している。

 simuGはPerlで書かれたコマンドラインツールであり、すべての主流のオペレーティングシステムをサポートしている。すべての主要なタイプ(すなわち、SNP、INDEL、CNV、逆位、転座)の重複しない変異をゲノムに導入するための作業テンプレートとして、ユーザー提供のリファレンスゲノム(FASTA形式)を使用する。 SNPとINDELは同時に導入できるが、CNV(セグメントの複製と削除として実装)、逆位、転座は別々の実行で導入できる。バリアントタイプごとに、simuGは、指定されたオプションに応じて、事前定義されたバリアントまたはランダムバリアントをシミュレートできる。事前定義されたバリアントの場合、simuGが入力リファレンスゲノムに作用して対応するバリアントを導入するために、必要なバリアントをすべて指定するユーザー指定のバリアントコールフォーマット(VCF)ファイルが必要となる。ランダムバリアントの場合、simuGは、SNPの遷移/変換比を指定するための「-titv_ratio」、INDELのサイズ分布を指定するための「-indel_size_powerlaw_alpha」、および「-indel_size_powerlaw_constant」など、幅広い微調整オプションをサポートする。セグメントの重複とセグメントの削除の比率を指定するcnv_gain_loss_ratio '、タンデムと分散した複製の比率を指定する' -duplication_tandem_dispersed_ratio '、セントロメアの位置を指定する' -centromere_gff 'により、シミュレートされたランダムなCNV、反転、転置が中断しない指定された動原体。補助スクリプトvcf2model.plがさらに提供され、実際のデータに基づいたランダムSNP / INDELシミュレーションに最適なパラメーターの組み合わせを直接計算します。さらに、総染色体再配列ブレークポイントと反復配列との間の強い関連性を考えると[例えば。転位要素(TE)]実証研究(Yue et al、2017; Zhang et al、2011)で観察されたsimuGは、ランダム逆位と転座を制限して、ユーザー定義のブレイクポイントのみを使用できる( '-inversion_breakpoint_gff'または ' -translocation_breakpoint_gff 'オプション)。これらのユーザー定義のブレイクポイントの特定のフィーチャタイプとストランド情報は、ブレイクポイントのサンプリング中に考慮される。(一部略)

 必要に応じて、ユーザーはバリアントの導入から除外する染色体のリスト(例:mtDNA)を定義することもできる。シミュレーションが完了すると、3つのファイルが作成される。(i)FASTA形式の導入されたバリアントを含むシミュレーションゲノム、(ii)リファレンスゲノムとシミュレーションゲノムの両方に対する導入されたすべてのバリアントのゲノム位置を示すテーブルファイル(iii)リファレンスゲノムと比較して導入されたすべてのバリアントのゲノム位置を示すVCFファイル。(一部略) simuGやその他のツールからのVCF出力を比較する場合、そのような比較に使用されるすべてのVCFファイルは、vt(Tan et al、2015)などのツールで事前に正規化する必要があることに注意すること。

 

 




インストール

依存

  • simuG is implemented in Perl5 and does not have any extra dependency

Github( manual.pdfも入ってます)

git clone https://github.com/yjx1217/simuG.git
cd simuG/

>perl simuG.pl -h

8 simuG $perl simuG.pl -h

Usage:

    perl simuG.pl [options] [file ...]

 

Options:

    -help or -h

            Print help message. Example: -h.

 

    -man or -m

            Print more detailed help message. Example: -m.

 

    -version or -v

            Print version information. Example: -v.

 

    -refseq or -r

            Specify the reference genome to be used as the template (in

            fasta or fasta.gz format). This option is mandatory. Default =

            "". Example: -refseq ref.genome.fa(.gz).

 

    -snp_vcf

            Specify the list of exact SNP variants to be introduced (in vcf

            or vcf.gz format). When specified, the options '-snp_count',

            '-snp_model', and '-titv_ratio' will be ignored. If there are

            also INDEL variants in the vcf file, they will be automatically

            ignored. Default = "". Example: -snp_vcf snp.vcf(.gz).

 

    -snp_count

            Specify the number of SNP variants to be introduced. Default =

            "". Example: -snp_count 5000.

 

    -snp_model

            Specify the SNP model file generated by the ancillary script

            vcf2model.pl. When specified, the option '-titv_ratio' will be

            ignored. Default = "". Example: -snp_model snp_model.txt.

 

    -titv_ratio

            Specify the Ti/Tv ratio (transition/transversion ratio) used for

            simulate SNP variants. Default = 0.5. Example: -titv_ratio 2.0.

            For transition only, set '-titv_ratio Inf'. For transversion

            only, set '-titv_ratio 0'.

 

    -coding_partition_for_snp_simulation

            Specify the coding partition (e.g. 'noncoding', 'coding', '2d'

            or '4d') used for constraining simulate SNP variants within the

            specified sites. This option needs to be used together with the

            option '-gene_gff'. Default = "". Example:

            -coding_partition_for_snp_simulation 4d for simulating SNP only

            in 4-fold degenerate (4d) sites.

 

    -indel_vcf

            Specify the list of exact INDEL variants to be introduced (in

            vcf or vcf.gz format). When specified, the options

            '-indel_count', '-indel_model', '-ins_del_ratio',

            '-indel_size_powerlaw_alpha', and

            '-indel_size_powerlaw_constant' will be ignored. If there are

            also SNP variants in the vcf file, they will be automatically

            ignored. Default = "". Example: -indel_vcf indel.vcf(.gz).

 

    -indel_count

            Specify the number of INDEL variants to be introduced. Default =

            "". Example: -indel_count 500.

 

    -indel_model

            Specify the INDEL model file generated by the ancillary script

            vcf2model.pl. When specified, the options '-ins_del_ratio',

            '-indel_size_powerlaw_alpha', and

            '-indel_size_powerlaw_constant' will be ignored. Default = "".

            Example: -indel_model indel_model.txt.

 

    -ins_del_ratio

            Specify the Insertion/Deletion ratio used for simulate INDEL

            variants. Default = 1.0. Example: -ins_del_ratio 1.0. For

            insertion only, set '-ins_del_ratio Inf'. For deletion only, set

            '-ins_del_ratio 0'.

 

    -indel_size_powerlaw_alpha

            Specify the exponent factor alpha for power-law-fitted indel

            size distribution: p = C * (size) ** (alpha) for size >= 1 &

            size <= 50. Default = 2.0. Example: -indel_size_powerlaw_alpha

            2.0.

 

    -indel_size_powerlaw_constant

            Specify the exponent factor alpha for power-law-fitted indel

            size distribution: p = C * (size) ** (alpha) for size >= 1 &

            size <= 50. Default = 0.5. Example:

            -indel_size_powerlaw_constant 0.5.

 

    -cnv_vcf

            Specify the list of exact CNV variants to be introduced (in vcf

            or vcf.gz format). When specified, the options '-cnv_count',

            '-cnv_gain_loss_ratio', '-cnv_max_copy_number', '-cnv_min_size',

            and '-cnv_max_size' will be ignored. Default = "". Example:

            -cnv_vcf cnv.vcf.

 

    -cnv_count

            Specify the number of CNV variants to be introduced. Default =

            "". Example: -cnv_count 50.

 

    -cnv_gain_loss_ratio

            Specify the relative ratio of DNA again over DNA loss. Default =

            1.0. Example: -cnv_gain_loss_ratio 1.0. For copy number gain

            only, set '-cnv_gain_loss Inf'. For copy number loss only, set

            '-cnv_gain_loss_ratio 0'.

 

    -cnv_max_copy_number

            Specify the maximal copy number for CNV. Default = 10. Example:

            -cnv_max_copy_number 10.

 

    -cnv_min_size

            Specify the minimal size (in basepair) for CNV variants. Default

            = 100. Example: -cnv_min_size 100.

 

    -cnv_max_size

            Specify the maximal size (in basepair) for CNV variants. Default

            = 100000. Example: -cnv_max_size 100.

 

    -duplication_tandem_dispersed_ratio

            Specify the expect frequency ratio between tandem duplication

            and dispersed duplication for CNV variants. Default = 1.

            Example: -duplication_tandem_dispersed_ratio 1. For simulating

            tandem duplication only, set

            '-duplication_tandem_dispersed_ratio Inf'. For simulating

            dispersed duplication only, set

            '-duplication_tandem_dispersed_ratio 0'.

 

    -inversion_vcf

            Specify the list of exact inversions to be introduced (in vcf or

            vcf.gz format). When specified, the options '-inversion_count',

            '-inversion_min_size', '-inversion_max_size', and

            '-inversion_breakpoint_gff' will be ignored. Default = "".

            Example: -inversion_vcf inversion.vcf(.gz).

 

    -inversion_count

            Specify the number of inversions to be introduced. Default = "".

            Example: -inversion_count 5.

 

    -inversion_min_size

            Specify the minimal size (in basepair) for inversion. Default =

            1000. Example: -inversion_min_size 1000.

 

    -inversion_max_size

            Specify the maximal size (in basepair) for inversion. Default =

            100000. Example: -inversion_max_size 100000.

 

    -inversion_breakpoint_gff

            Specify the list of potential breakpoints for triggering

            inversions (in gff3 or gff3.gz format). Default = "". Example:

            -inversion_breakpoint_gff inversion_breakpoint.gff(.gz).

 

    -translocation_vcf

            Specify the list of exact translocations to be introduced (in

            vcf or vcf.gz format). When specified, the options

            '-translocation_count' and '-sv_breakpoint_gff' will be ignored.

            Default = "". Example: -translocation_vcf

            transloaction.vcf(.gz).

 

    -translocation_count

            Specify the number of translocations to be introduced. Default =

            "". Example: -translocation_count 1.

 

    -translocation_breakpoint_gff

            Specify the list of potential breakpoints for triggering

            translocations (in gff3 or gff3.gz format). Default = "".

            Example: -translocation_breakpoint_gff

            translocation_breakpoint.gff(.gz).

 

    -centromere_gff

            Specify centromeres for constraining the random CNV, inversion,

            and translocation simulation (in gff3 or gff3.gz format). When

            this option applied, those potential CNVs that will induce

            centromere deletion/duplication as well as the potential

            inversions and translocations with breakpoints overlapped with

            defined centromeres will be disalled. Also, potential

            translocation that will induce dicentric rearranged chromosomes

            will be disalled as well. Default = "". Example: -centromere_gff

            centromere.gff(.gz).

 

    -gene_gff

            Specify genes for constraining the random SNP, CNV, inversion,

            and translocation simulation (in gff3 or gff3.gz format). For

            random SNP simulation, this option needs to be used together

            with the option '-coding_partition_for_snp_simulation' to

            constrain SNPs simulations only in noncoding regions, coding

            regions, 2-fold degenerate (2d) sites or 4-fold degenerate (4d)

            sites. For random CNV, inversion, and translocation simulation,

            applied this option will disallow simulated breakpoints falling

            on the defined genes. Default = "". Example: -gene_gff

            gene.gff(.gz).

 

    -excluded_chr_list

            Specify the name of chromosome(s) to be excluded for introducing

            genomic variants (a single-column list file in txt format).

            Default = "". Example: -excluded_chr_list excluded_chr_list.txt.

 

    -seed or -s

            Specify an integer as the random seed for the simulation. It is

            recommended to set a very big integer for ideal randomness.

            Default = "". Example: -seed 201812201903.

 

    -prefix or -p

            Specify the prefix for output files. Default = "output_prefix".

            Example: -prefix sim.

 

perl vcf2model.pl -h

$perl vcf2model.pl -h

Usage:

    perl vcf2model.pl [options] [file ...]

 

Options:

    -help or -h

            Print help message. Example: -h.

 

    -man or -m

            Print more detailed help message. Example: -m.

 

    -version or -v

            Print version information. Example: -v.

 

    -vcf or -i

            Specify the input variant calling file (in vcf or vcf.gz

            format). Example: -vcf input.vcf(.gz).

 

    -excluded_chr_list or -e

            Specify the chromosome(s) to be excluded for variant profiling.

            Example: -excluded_chr_list excluded_chr_list.txt. Default = "".

 

    -qual or -q

            Specify the cutoff of the minimal variant quality to be

            considered. Example: -qual 30. Default = 0.

 

    -prefix or -p

            Specify the file name prefix for the output files. Example:

            -prefix test_prefix. Default = "output_prefix".

 

 

 

実行方法

1、simuG.pl (ランダム変異入りゲノムを発生させる)

リファレンスFASTAを指定する。指定したリファレンスゲノムから1塩基置換x1000、indel x 100をランダムに発生させた変異ゲノムを出力する。以下全てテストデータを使用している。

perl simuG.pl \
-refseq ./Testing_Example/SGDref.R64-2-1.fa.gz \
-snp_count 1000 \
-indel_count 100 \
-prefix output

 出力

f:id:kazumaxneo:20191005131034p:plain

変異したリファレンスFASTASNPsとindelそれぞれのvcf、変異位置を示したテーブルファイルが出力される。

 

CNV x 10をランダムに発生させた変異ゲノムを出力する。

perl simuG.pl \
-refseq ./Testing_Example/SGDref.R64-2-1.fa.gz \
-cnv_count 10 \
-prefix output_CNV

 

Inversion x 10をランダムに発生させた変異ゲノムを出力する。

perl simuG.pl \
-refseq ./Testing_Example/SGDref.R64-2-1.fa.gz \
-inversion_count 10 \
-prefix output_INV

  

translocation x 10をランダムに発生させた変異ゲノムを出力する。

perl simuG.pl \
-refseq ./Testing_Example/SGDref.R64-2-1.fa.gz \
 -translocation_count 10 \
-prefix output_translocation

 

1塩基置換x1000、indel x 100をランダムに発生させた変異ゲノムを出力する。ただしexcluded_chr_list.yeast.txtに記載したミトコンドリアゲノムと、SGDref.R64-2-1.centromere.gff3に記載したセントロメア領域は除く。

perl simuG.pl \
-refseq ./Testing_Example/SGDref.R64-2-1.fa.gz \
-snp_count 1000 \
-titv_ratio 2.0 \
-indel_count 100 \
-excluded_chr_list ./Testing_Example/excluded_chr_list.yeast.txt \
-centromere_gff ./Testing_Example/SGDref.R64-2-1.centromere.gff3 \
-prefix output_prefix

 excluded_chr_list.yeast.txtの中身は"chrMT"と書いてあるだけ。

 

 

2、vcf2model.pl (ユーザー指定VCFの変異入りゲノムを発生させる)

VCFを指定する(SNPsとindelのみ)。ホモのバリアントのみターゲットになる。

perl vcf2model.pl \
-vcf input.real_data.SNP_INDEL.vcf.gz \
-prefix output

 

VCFはversion4.1準拠

 

追加フラグを立てることでより高度な変異導入も可能になっています。同梱されているマニュアルPDFを参照して下さい。オーバーラップしている場合などのより詳細な説明もあります。

引用

simuG: a general-purpose genome simulator
Jia-Xing Yue, Gianni Liti

Bioinformatics, btz424, Published: 22 May 2019

 

関連