ClinSV
Robust detection of clinically relevant structural and copy number variation from whole genome sequencing data
Install / Use
/learn @KCCG/ClinSVREADME
Robust detection of clinically relevant structural and copy number variation from whole genome sequencing data
Microarrays have been the mainstay for detecting clinically relevant copy number variants (CNV) in patients. Whole genome sequencing (WGS) has the potential to provide far higher resolution of CNV detection and to resolve structural variation (SV) invisible to current microarrays. Current WGS-based approaches however have high error rates, poor reproducibility, and difficulties in annotating, visualizing, and prioritizing rare variants.
We developed ClinSV to overcome these challenges, enabling the use of WGS to identify short, and large CNV and balanced SV, with high analytical sensitivity, reproducibility, and low false positive rates. ClinSV is designed to be easily integrated into production WGS analysis pipelines, and generate output which is easily interpreted by researchers and clinicians. We developed ClinSV mostly in the context of analysing WGS data from a single-lane of an Illumina HiSeq X sequencer, thus ~30-40x coverage. We focused mostly on the use of ClinSV to identify rare, gene-affecting variation in the context of rare genetic disease. We have used it to detect Mitochondrial SV, and somatic SV from tumour-normal paired WGS.
ClinSV has the following features:
- Integration of three CNV signals: depth of coverage, split and spanning reads
- Extensive quality attributes for CNV and SV
- CNV and copy-number neutral SV are assigned High, Pass, Low quality tranches
- Variant segregation if a user-supplied PED file is supplied
- Gene and phenotype annotation of each SV
- Full, and focussed result tables for easy clinical interpretation
- Quality Control report
- Analytical validaiton report, if NA12878 is being analysed
- Multiple population allele frequency measures to help identify rare variants
- Visualisation framework via IGV and multiple supporting tracks
For 500 WGS samples of the Medical Genome Reference Bank population, allele frequencies were derived from split-reads, discordant pairs, depth of coverage changes and ClinSV calls. This allows to also filter out common low confident variant calls and sequencing artefacts.
Please refer to the manuscript for further details.
ClinSV version 1.1.0
This repository contains the source code and Docker files required to run ClinSV version 1.1.0. This version supports both GRCh38 and GRCh37 decoy (hs37d5) reference genomes.
The easiest way to run ClinSV is via Docker. If you really want to compile from source, then see INSTALL_b38.md.
Release Notes - v1.1.0
- Able to to use either ref-genomes on the fly depending on the file path passed into the
-refcommand.-ref /app/ref-data/refdata-b38for GRCh38 (b38) and-ref /app/ref-data/refdata-b37for GRCh38 (b37). - Support of hg19 style nomenclature (ex
1,2,3,4..X,Y,MT) for input bams using the b37 reference genome. Note this is an unstable feature. It is recommended to lift over your bam files first to the ref genome you would want to use. - Able to use maximum available CPUs for the bigwig:createWigs and lumpy:caller steps.
- Able to limit the amount of CPUs used by ClinSV with the
-jcommand where a path to a json file which contains the max limit on resources used for each step is passed as input. For more details see here. - Added script to make a smoother development experience using the docker container. For more details see here.
- Bug fix #61: igv .xml file now uses the correct reference genome dependeant on the reference genome used.
- Bug fix #60: the coverage by chromosome view in the QC report is now outputed correctly.
Download
ClinSV requires a reference genome to run. Currently only GRCh38 and GRCh37 decoy (hs37d5) reference genomes are supported.
GRCh38 (b38) files
Download human genome reference data GRCh38 (37GB):
wget https://clinsv.s3.ccia.org.au/clinsv_b38/refdata-b38_v1.0.tar
tar xf refdata-b38_v1.0.tar
Download a sample bam to test ClinSV (71GB):
wget https://clinsv.s3.ccia.org.au/clinsv_b38/NA12878_b38.bam
wget https://clinsv.s3.ccia.org.au/clinsv_b38/NA12878_b38.bam.bai
or a smaller subsampled BAM file (4.7GB)
wget https://clinsv.s3.ccia.org.au/clinsv_b38/NA12878.grch38.subsampled.bam
wget https://clinsv.s3.ccia.org.au/clinsv_b38/NA12878.grch38.subsampled.bam.bai
GRCh37 (b37) files
Download human genome reference data GRCh37 decoy (hs37d5):
wget https://clinsv.s3.ccia.org.au/clinsv_b37/refdata-b37_v0.9.tar
# check md5sum: 921ecb9b9649563a16e3a47f25954951
tar xf refdata-b37_v0.9.tar
Download a sample bam to test ClinSV:
wget https://clinsv.s3.ccia.org.au/clinsv_b37/NA12878_v0.9.bam
wget https://clinsv.s3.ccia.org.au/clinsv_b37/NA12878_v0.9.bam.bai
File structure to run Docker image
In order to use the docker image with the docker run instructions, your working directory needs to be set up as below:
Current working directory
| |contains your bam files *.bam
| |contains your bai files *.bai
└───clinsv
| └───refdata-b3x
| | /all of refdata-b3x's content/
└───test_run
| this is where clinsv generates all its output
Extract the refdata-b3x tar files in the clinsv folder
Run ClinSV
Using Docker
docker pull containerregistrypubliccb.azurecr.io/clinsv:v1.1.0
refdata_path=$PWD/clinsv/
input_path=$PWD
project_folder=$PWD/test_run
docker run -v $refdata_path:/app/ref-data \
-v $project_folder:/app/project_folder \
-v $input_path:/app/input \
--entrypoint "perl" containerregistrypubliccb.azurecr.io/clinsv:v1.1.0 /app/clinsv/bin/clinsv \
-r all \
-p /app/project_folder/ \
-i "/app/input/*.bam" \
-ref /app/ref-data/refdata-b3x \
-w
Expect this to take ~8 hours for a 30x WGS 80GB BAM file.
Expect this to take ~2.5 hours with the subsampled 4.7GB BAM file.
Using Singularity
Currently only ClinSV v0.9 is supported on Singularity, as such, only the GRCh37 decoy (hs37d5) reference genome and respecitvely aligned BAMs can be used.
wget https://clinsv.s3.ccia.org.au/clinsv_b37/clinsv.sif
singularity run clinsv.sif \
-i "$input_path/*.bam" \
-ref $refdata_path \
-p $PWD/project_folder
Linux Native
Download precompiled ClinSV bundle for CentOS 6.8 x86_64. Also only uses ClinSV v0.9, as such, only the GRCh37 decoy (hs37d5) reference genome and respecitvely aligned BAMs can be used.
wget https://clinsv.s3.ccia.org.au/clinsv_b37/ClinSV_x86_64_v0.9.tar.gz
tar zxf ClinSV_x86_64_v0.9.tar.gz
clinsv_path=$PWD/clinsv
export PATH=$clinsv_path/bin:$PATH
clinsv -r all -p $PWD/project_folder -i "$input_path/*.bam" -ref $refdata_path
ClinSV usage and options
### This script runs ClinSV on a single node ###
Version: v1.1.0
Author: Andre E Minoche, James Bradley, Mark J Cowley
usage: clinsv -p /path/to/project -i /path/to/input_bams/*.bam -ref /path/to/ref_data [options]
### Options:
-p Project folder [current_dir]. This can take two colon separated values, see README.md
-r Analysis steps to run [all]. All is equivalent to bigwig,lumpy,cnvnator,annotate,prioritize,qc,igv
Multiple steps must be comma separated with no spaces in-between.
-i Path to input bams [./input/*.bam]. Requires bam index ending to be \"*.bam.bai.\".
Bam and index files can also be soft-links.
-s Sample information file [./sampleInfo.txt] If not set and if not already present,
such file gets generated from bam file names.
-f Force specified analysis step(s) and overwrite existing output.
-a Ask for confirmation before launching next analysis step.
-n Name stem for joint-called files (e.g joint vcf file) in case different sample grouping exists.
This is necessary if different sets of samples specified wtih -s are analysed within the same
project folder, E.g. a family trio and a set of single proband individuals.
-w short for 'web': In the IGV session file, stream the annotation tracks from a server. Convenient if you
prefer to run ClinSV on an HPC (where you have a copy of the annotation bundle) and view results on your desktop
-j Path to json file which specifies the resources to be used for each step
-l Lumpy batch size. Number of sampels to be joint-called [15].
-ref Path to reference data dir [./refdata-b38 or ./refdata-b37]. This can take two colon separated values, see README.md
-hg19 Specify that input bams use hg19 chromosome nomenclature (e.g. short form '1,2,3..X,Y,MT'), use when using input bams that are
aligned to hg19. Ensure to use with the reference data refdata-b37. Warning this is an unstable feature. Highly recommend to lift over input bams to
GRCh37/GRCh38 with another tool, then use ClinSV with those ref genomes.
-eval Create the NA12878 validation report section [no].
-h print this help
# To rerun a specific analysis steps:
clinsv -r annotsv,prioritize -f
Advanced options
When providing a pedigree file, the output will contain additional columns showing e.g. how often a variant was observed among affected and unaffected individuals. The pedigree file has to be named "sampleInfo.ped" and it has to be placed into the project folder.
To mark variants affecting user defined candidate genes, a gene list list has to be placed into the project folder and named "testGene.ids". Gene names have to be as in ENSEMBL GRCh37.
Compile dependencies from source
see INSTALL.md
Hardware requirements
- based on 30-40x WGS (80GB BAM file): 16 CPUs, 60GB RAM, 200 GB storage
Output
QC report
results/sample.QC_report.pdf
Quality control metrics, including a detailed description.
Variant files
results/sample.RARE_PASS_GENE.xlsx
Rare gene affecting vari
