Skip to content
Jon Belyeu edited this page Apr 27, 2019 · 9 revisions

samplot

samplot is a command line tool for rapid, multi-sample structural variant visualization. samplot takes SV coordinates and uses reads from CRAM or BAM files to produce high-quality images that highlight any alignment and depth signals that substantiate the SV,

Example:

The following command creates a plot of read data from three samples where a deletion has occurred in the region 1:24804398-24807302. The resulting plot is saved to a file called 1_24804398_24807302_DEL_trio.png.

samplot.py \
-c 1 \
-s 24804398 \
-e 24807302 \
-t DEL \
-b HG002.hs37d5.300x.bam \
   HG003.hs37d5.300x.bam \
   HG004.hs37d5.300x.bam \
-d 1 \
-o 1_24804398_24807302_DEL_trio.png

deletion_example

Installation

samplot requires no installation beyond obtaining the necessary Python libraries and cloning this repository. Libraries may be installed using conda:

conda install -y --file https://raw.githubusercontent.com/jbelyeu/samplot/master/requirements.txt

The repo may then be cloned:

git clone /~https://github.com/jbelyeu/samplot.git

For ease-of-use you may choose to place the scripts samplot.py and samplot_vcf.py, from the src/ directory of this repo, in your own bin directory. This is not required, however.

Additional Information

samplot has a number of available command-line parameters to improve the utility of the plots created. For basic information, including more in-depth discussion of the example above, go to the Basic Options page. For more complex options, go to the Advanced Options page.

samplot supports sequence data from Illumina, Oxford Nanopore Technology, Pacific Biosciences, and 10X Genomics. For more information, see Plotting ONT, PacBio, and 10X Data page.

samplot_vcf is a powerful tool for analysis of structural variants from a VCF file. For more information, see Plotting variants from a VCF page.