CNV-SimはCopy numver variationのシミュレータ。ランダム、または提供されたリストに従って、リードの増幅および欠失が起きる。このツールは2種類のシミュレーション機能を持つ。1つは全ゲノムにおけるCNVシミュレーションで、 CNV-Simは、ARTの機能を利用してゲノムに変異を導入する。もう1つはターゲットexomeでのCNVシミュレーションで、 CNV-SimはWessimの機能を利用してバリエーションを導入する。
CNV-Sim
https://nabavilab.github.io/CNV-Sim/
インストール
mac os 10.13のvirtualenv環境でテストした。
依存
- Python 2.7
- Python pip
- Pysam Module
- Biopython Module
- bedtools
- Download ART simulator and put the binary file art_illumina in cnvsim/ART directory.
https://github.com/NabaviLab/CNV-Sim
ここではdockerイメージをpullして実行する。
docker pull nabavilab/cnv-sim
# ホストの~/testと仮想環境の/homeをデータ共有ディレクトリに指定してコンテナを作成する。
docker run -i -t -v ~/test/:/home nabavilab/cnv-sim
> ./cnv-sim.py
# ./cnv-sim.py
Usage: cnv-sim.py [-h] [-v] [-o OUTPUT_DIR_NAME] [-n N_READS] [-l READ_LENGTH]
[--cnv_list CNV_LIST] [-g REGIONS_COUNT]
[-r_min REGION_MINIMUM_LENGTH]
[-r_max REGION_MAXIMUM_LENGTH] [-a AMPLIFICATIONS]
[-d DELETIONS] [-cn_min COPY_NUMBER_MINIMUM]
[-cn_max COPY_NUMBER_MAXIMUM]
{genome,exome} genome [target]
cnv-sim.py: error: too few arguments
root@693dc39cd6d5:/# ./cnv-sim.py -h
Usage: cnv-sim.py [-h] [-v] [-o OUTPUT_DIR_NAME] [-n N_READS] [-l READ_LENGTH]
[--cnv_list CNV_LIST] [-g REGIONS_COUNT]
[-r_min REGION_MINIMUM_LENGTH]
[-r_max REGION_MAXIMUM_LENGTH] [-a AMPLIFICATIONS]
[-d DELETIONS] [-cn_min COPY_NUMBER_MINIMUM]
[-cn_max COPY_NUMBER_MAXIMUM]
{genome,exome} genome [target]
Generates NGS short reads that encompass copy number variations in whole
genome and targeted exome sequencing
Positional arguments:
{genome,exome} simulate copy number variations in whole genome or
exome regions
genome path to the referece genome file in FASTA format
target path to the target regions file in BED format (if
using exome) (default: None)
Optional arguments:
-h, --help show this help message and exit
-v, --version Show program's version number and exit.
-o OUTPUT_DIR_NAME, --output_dir_name OUTPUT_DIR_NAME
a name to be used to create the output directory
(overrides existing directory with the same name).
(default: simulation_output)
-n N_READS, --n_reads N_READS
total number of reads without variations (default:
10000)
-l READ_LENGTH, --read_length READ_LENGTH
read length (bp) (default: 100)
--cnv_list CNV_LIST path to a CNV list file in BED format chr | start |
end | variation. If not passed, it is randomly
generated using CNV list parameters below (default:
None)
CNV list parameters:
parameters to be used if CNV list is not passed
-g REGIONS_COUNT, --regions_count REGIONS_COUNT
number of CNV regions to be generated randomly
(default: 20)
-r_min REGION_MINIMUM_LENGTH, --region_minimum_length REGION_MINIMUM_LENGTH
minimum length of each CNV region (default: 1000)
-r_max REGION_MAXIMUM_LENGTH, --region_maximum_length REGION_MAXIMUM_LENGTH
maximum length of each CNV region (default: 100000)
-a AMPLIFICATIONS, --amplifications AMPLIFICATIONS
percentage of amplifications in range [0.0: 1.0].
(default: 0.5)
-d DELETIONS, --deletions DELETIONS
percentage of deletions in range [0.0: 1.0]. (default:
0.5)
-cn_min COPY_NUMBER_MINIMUM, --copy_number_minimum COPY_NUMBER_MINIMUM
minimum level of variations (copy number) introduced
(default: 3)
-cn_max COPY_NUMBER_MAXIMUM, --copy_number_maximum COPY_NUMBER_MAXIMUM
maximum level of variation (copy number) introduced
(default: 10)
本ツールはGalaxyでも利用できます。
ラン
1、Whole genome sequencing(WGS)
python cnv-sim.py -o /home/output genome ref.fa
- -n total number of reads without variations (default: 10000)
- -l read length (bp) (default 100)
- --cnv_list path to a CNV list file in BED format chr | start | end | variation. If not passed, it is randomly generated using CNV list parameters below (default: None)
CNV list parameters:
- --regions_count number of CNV regions to be generated randomly (default: 20)
- --region_minimum_length minimum length of each CNV region (default: 1000)
- --region_maximum_length maximum length of each CNV region (default: 100000)
- --amplifications percentage of amplifications in range [0.0: 1.0]. (default: 0.5)
- --deletions percentage of deletions in range [0.0: 1.0]. (default: 0.5)
- --copy_number_minimum minimum level of variations (copy number) introduced (default: 3)
- --copy_number_maximum maximum level of variation (copy number) introduced (default: 10)
(パラメータは他にもあり)
出力。コントロールfastqとCNV発生fastqがそれぞれ出力される。
fastq以外に、CNV導入部位を示したbedファイルが出力される。
$ cat ~/data/output/copynumber.bed
chrom chr_start chrom_stop num_positions copy_number
chr1 79807 178369 98563 8
NC_000911.2 255485 287125 31641 7
NC_000911.2 434875 475189 40315 5
NC_000911.2 611009 645153 34145 3
NC_000911.2 792744 886430 93687 -7
NC_000911.2 968451 1008520 40070 -3
NC_000911.2 1148059 1246988 98930 -6
NC_000911.2 1329679 1419362 89684 8
NC_000911.2 1509169 1545824 36656 -8
NC_000911.2 1685490 1751100 65611 7
NC_000911.2 1860801 1864780 3980 9
NC_000911.2 2039344 2092153 52810 5
NC_000911.2 2222901 2309058 86158 4
NC_000911.2 2397019 2422555 25537 -5
NC_000911.2 2574494 2603223 28730 -3
NC_000911.2 2757358 2767279 9922 -7
NC_000911.2 2934080 3023367 89288 3
NC_000911.2 3109834 3206147 96314 -5
NC_000911.2 3295165 3323697 28533 -9
NC_000911.2 3470924 3483713 12790 -9
デフォルトパラメータではランダムな20ヶ所にCNVが導入される。
2、Whole Exome sequencing(WES)
キャプチャ領域をbedで指定する。
python cnv-sim.py -o /home/output exome ref.fa input.bed
引用
https://help.rc.ufl.edu/doc/CNV-Sim