Sign inSign up

cmgantwerpen/pangolin

By cmgantwerpen

•Updated 11 months ago

performance optimized version of Pangolin, splice site predicting

Image
0

370

cmgantwerpen/pangolin repository overview

⁠PANGOLIN : Splice prediction

This container is built on a fork of pangolin with ~5x improved throughput. Apart from some rounding differences, output is identical to the original implementation.

see: https://github.com/geertvandeweyer/pangolin⁠

⁠USAGE

docker pull cmgantwerpen/pangolin:1.0.1

The main difference is addition of batch-size parameters. Tweak this to optimize your GPU/RAM usage

docker run --gpus all -v /data:/data cmgantwerpen/pangolin:1.0.1 \
       pangolin \
       --variant_batchsize 1024 \
       --tensor_batchsize 256 \
       /data/variants.in.vcf \
       /data/hg38.fasta \
       /data/gencode.db \
       /data/variants.out

The batch-parameters define memory consumption and performance:

  • variant_batchsize : This many variants are grouped into a cpu-based tensor, and saved to disk.
  • tensor_batchsize : when working on GPU, batches are further divided to fit into GPU memory

⁠Some metrics:

  • a variant batch of 1920 uses <2Gb of system RAM
  • a tensor batch of 192 uses ~1.5Gb of GPU memory

Speed improvements:

(values show predictions per hour)

card typeoriginal throughputnew throughputSpeedup
GTX 960M2700 / hour4750 / hour75%
GeForce RTX 20709000 / hour37500 / hour4x
GeForce RTX 409035000 / hour187000 / hour5x

⁠full command overview:

usage: pangolin [-h] [-c COLUMN_IDS] [-m {False,True}] [-s SCORE_CUTOFF] [-d DISTANCE] [--score_exons {False,True}] [--loglevel {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [--tmpdir TMPDIR] [--variant_batchsize VARIANT_BATCHSIZE]
                [--tensor_batchsize TENSOR_BATCHSIZE]
                variant_file reference_file annotation_file output_file

positional arguments:
  variant_file          VCF or CSV file with a header (see COLUMN_IDS option).
  reference_file        FASTA file containing a reference genome sequence.
  annotation_file       gffutils database file. Can be generated using create_db.py.
  output_file           Prefix for output file. Will be a VCF/CSV if variant_file is VCF/CSV.

options:
  -h, --help            show this help message and exit
  -c COLUMN_IDS, --column_ids COLUMN_IDS
                        (If variant_file is a CSV) Column IDs for: chromosome, variant position, reference bases, and alternative bases. Separate IDs by commas. (Default: CHROM,POS,REF,ALT)
  -m {False,True}, --mask {False,True}
                        If True, splice gains (increases in score) at annotated splice sites and splice losses (decreases in score) at unannotated splice sites will be set to 0. (Default: True)
  -s SCORE_CUTOFF, --score_cutoff SCORE_CUTOFF
                        Output all sites with absolute predicted change in score >= cutoff, instead of only the maximum loss/gain sites.
  -d DISTANCE, --distance DISTANCE
                        Number of bases on either side of the variant for which splice scores should be calculated. (Default: 50)
  --score_exons {False,True}
                        Output changes in score for both splice sites of annotated exons, as long as one splice site is within the considered range (specified by -d). Output will be: gene|site1_pos:score|site2_pos:score|...
  --loglevel {DEBUG,INFO,WARNING,ERROR,CRITICAL}
                        Set the logging level. (Default: INFO)
  --tmpdir TMPDIR       Location to create temporary directory for storing intermediate files.
  --variant_batchsize VARIANT_BATCHSIZE
                        Number of variants to score in a single CPU batch. (Default: 1280)
  --tensor_batchsize TENSOR_BATCHSIZE
                        Number of variants to process in a single GPU batch. (Default: 128)

Tag summary

Content type

Image

Digest

sha256:6182028a4…

Size

5.5 GB

Last updated

11 months ago

docker pull cmgantwerpen/pangolin:1.0.1-cuda-12.0.0