Varscan2のtumor-nomalペアのCNV検出をワンライナーで行うラッパーツールが公開されている。
Varscan2
VarScan - Variant Detection in Massively Parallel Sequencing Data
以下の作業を行う。
The Varscan wrapper script runs the following:
- samtools flagstat on each bam file
- samtools mpileup on both bam files
- Determine unique mapped read ratio
- Varscan copynumber
- Remove low coverage regions
- Varscan copyCaller
- Calculate median for recentering
- Varscan copyCaller recenter
- Separate chromosome arms
- DNAcopy (CBS)
- Merge chromosome arms
インストール
このリポジトリには、Varscan2のコピーナンバーバリエーション(CNV)のパイプラインのみが含まれている(他のVarscanツールを実行する場合は、Varscan2を直接使用する)。
コンテナの導入。
git clone https://github.com/jeltje/varscan2.git
cd varscan2
docker build -t jeltje/varscan2 .
ヘルプ
> docker run jeltje/varscan2 -h
$ docker run jeltje/varscan2 -h
/usr/local/bin/run_varscan -c <control bam file> -t <tumor bam file> -q <sample ID> -i <genome fasta> -b <centromere bed file> -w <exome whitelist> -s <tmp output>
Wrapper script for Varscan2
Runs the following steps:
1. samtools flagstat on each bam file
2. samtools mpileup on both bam files
3. determine unique mapped read ratio
4. VarScan copynumber
5. Remove low coverage regions
6. VarScan copyCaller
7. calculate median for recentering
8. VarScan copyCaller recenter
9. Separate chromosome arms
10. DNAcopy
11. Merge chromosome arms
OPTIONS:
-h Show this message
-t tumor bam file
-c control bam file
-q optional sample ID, eg TCGA-001-4-2018
-i path to indexed genome (index using samtools faidx)
-b centromere locations (bed format)
-w exome whitelist (bed format)
-s directory for temporary files. The script creates a directory varscan.N inside.
-d do not delete temporary output
-n <varscan.N> instead of creating a new temporary directory, use this one
ラン
プログラムへの入力は、BAMファイルといくつかのベッドフォーマットヘルパーファイル(下記参照)の腫瘍/正常ペア。入力bamファイルはcoordinateソートする必要がある(chr順&ポジション順)。出力は、増幅または削除のクロモソームセグメント情報のファイル。
docker run --rm -itv /path/to/input/files:/data jeltje/varscan2 -c normal.bam -t tumor.bam -q sampleid -i ref.fa -b centromeres.bed -w targets.bed -s tmpdir > varscan.cnv
varscan2については別にまとめています。
引用
varscan2/README.md at master · Jeltje/varscan2 · GitHub