Skip to main content

granite is a collection of software to call, filter and work with genomic variants

Project description

granite

Python 3.6

granite is a collection of software to work with genomic variants. The suite provides inheritance mode callers and utilities to filter and refine variants called by other methods in VCF format.

granite library can also be used through an API to manipulate files in VCF format.

For more details, see granite documentation.

Availability and requirements

A ready-to-use docker image is available to download.

docker pull b3rse/granite:v0.1.8

To run locally, install the following libraries:

pip install numpy pysam bitarray h5py matplotlib
pip install --user pytabix

Additional software needs to be available in the environment:

To install the program from source, run the following commands:

git clone https://github.com/dbmi-bgm/granite
cd granite
python setup.py install

To install the program with pip:

pip install granite-suite

File formats

The program is compatible with standard BED, BAM and VCF formats (VCFv4.x).

ReadCountKeeper (.rck)

RCK is a tabular format that allows to efficiently store counts by strand (ForWard-ReVerse) for reads that support REFerence allele, ALTernate alleles, INSertions or DELetions at CHRomosome and POSition. RCK files can be further compressed with bgzip and indexed with tabix for storage, portability and faster random access. 1-based.

Tabular format structure:

#CHR   POS   COVERAGE   REF_FW   REF_RV   ALT_FW   ALT_RV   INS_FW   INS_RV   DEL_FW   DEL_REV
13     1     23         0        0        11       12       0        0        0        0
13     2     35         18       15       1        1        0        0        0        0

Commands to compress and index files:

bgzip PATH/TO/FILE
tabix -b 2 -s 1 -e 0 -c "#" PATH/TO/FILE.gz

BinaryIndexGenome (.big)

BIG is a hdf5-based binary format that stores boolean values for each genomic position as bit arrays. Each position is represented in three complementary arrays that account for SNVs (Single-Nucleotide Variants), insertions and deletions respectively. 1-based.

hdf5 format structure:

e.g.
chr1_snv: array(bool)
chr1_ins: array(bool)
chr1_del: array(bool)
chr2_snv: array(bool)
...
...
chrM_del: array(bool)

note: hdf5 keys are built as the chromosome name based on reference (e.g. chr1) plus the suffix specifying whether the array represents SNVs (_snv), insertions (_ins) or deletions (_del).

Pedigree in JSON format

When the program requires pedigree information, the expected format is as follow:

[
  {
    "individual": "NA12877",
    "sample_name": "NA12877_sample",
    "gender": "M",
    "parents": []
  },
  {
    "individual": "NA12878",
    "sample_name": "NA12878_sample",
    "gender": "F",
    "parents": []
  },
  {
    "individual": "NA12879",
    "sample_name": "NA12879_sample",
    "gender": "F",
    "parents": ["NA12878", "NA12877"]
  }
]

where individual is the unique identifier for member inside the pedigree, sample_name is the corresponding sample ID in VCF file, and parents is the list of unique identifiers for member parents if any.

Usage

    granite <command> ...

    positional arguments:
      <command>
        novoCaller   Bayesian de novo variant caller
        comHet       compound heterozygous variant caller
        mpileupCounts
                     samtools wrapper to calculate reads statistics for pileup at
                     each position
        blackList    utility to blacklist and filter out variants from input VCF
                     file based on positions set in BIG format file and/or
                     population allele frequency
        whiteList    utility to whitelist and select a subset of variants from
                     input VCF file based on specified annotations and positions
        cleanVCF     utility to clean INFO field of input VCF file
        geneList     utility to clean VEP annotations of input VCF file using a
                     list of genes
        toBig        utility that converts counts from bgzip and tabix indexed RCK
                     format into BIG format. Positions are "called" by reads
                     counts or allelic balance for single or multiple files (joint
                     calls) in specified regions
        rckTar       utility to create a tar archive from bgzip and tabix indexed
                     RCK files. Creates an index file for the archive
        qcVCF        utility to create a report of different metrics calculated
                     for input VCF file
        validateVCF  utility to calculate error models for input VCF file using
                     pedigree information

novoCaller

novoCaller is a Bayesian calling algorithm for de novo mutations. The model uses read-level information both in pedigree (trio) and unrelated samples to rank and assign a probabilty to each call. The software represents an updated and improved implementation of the original algorithm described in Mohanty et al. 2019.

comHet

comHet is a calling algorithm for compound heterozygous mutations. The model uses genotype-level information in pedigree (trio) and VEP-based annotations to call possible compound heterozygous pairs. VEP annotations are used to assign variants to genes and transcripts, genotype information allows to refine calls based on inheritance mode. Calls are further flagged as "Phased" or "Unphased", where "Phased" means that genotype information supports in-trans inheritance for alternate alleles from parents.

blackList

blackList allows to filter-out variants from input VCF file based on positions set in BIG format file and/or provided population allele frequency.

whiteList

whiteList allows to select and filter-in a subset of variants from input VCF file based on specified annotations and positions. The software can use provided VEP, ClinVar or SpliceAI annotations. Positions can be also specfied as a BED format file.

cleanVCF

cleanVCF allows to clean INFO field of input VCF file. The software can remove a list of TAG from INFO field, or can be used to clean VEP annotations.

geneList

geneList allows to clean VEP annotations by applyng a list of genes. The software removes all the transcripts that do not map to a gene on the list.

qcVCF

qcVCF produces a report in JSON format with different quality metrics calculated for input VCF file. Both single sample and family-based metrics are available.

mpileupCounts

mpileupCounts uses samtools to access input BAM and calculates statistics for reads pileup at each position in the specified region, returns counts in RCK format.

toBig

toBig converts counts from bgzip and tabix indexed RCK format into BIG format. Positions are "called" by read counts or allelic balance for single or multiple files (joint calls) in specified regions. Positions "called" are set to True (or 1) in BIG binary structure.

rckTar

rckTar creates a tar archive from bgzip and tabix indexed RCK files. Creates an index file for the archive.

validateVCF

validateVCF allows to calculate error models for different inheritance modes for input VCF file using pedigree information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

granite-suite-0.1.8.tar.gz (49.5 kB view details)

Uploaded Source

Built Distributions

granite_suite-0.1.8-py3.7.egg (55.3 kB view details)

Uploaded Source

granite_suite-0.1.8-py3-none-any.whl (57.0 kB view details)

Uploaded Python 3

File details

Details for the file granite-suite-0.1.8.tar.gz.

File metadata

  • Download URL: granite-suite-0.1.8.tar.gz
  • Upload date:
  • Size: 49.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

File hashes

Hashes for granite-suite-0.1.8.tar.gz
Algorithm Hash digest
SHA256 8c6fdfca7c45c70a9feb9681636f78485f0f7a5caafcebefae454202de7ce6b0
MD5 423028edc265931ff57b6ae7383e0440
BLAKE2b-256 7fab182d7ffa717bde2aa5b3306378791f72139b510209946dbc000722381a5d

See more details on using hashes here.

File details

Details for the file granite_suite-0.1.8-py3.7.egg.

File metadata

  • Download URL: granite_suite-0.1.8-py3.7.egg
  • Upload date:
  • Size: 55.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

File hashes

Hashes for granite_suite-0.1.8-py3.7.egg
Algorithm Hash digest
SHA256 2b01d9b2f154ce849b0c2e2e0eff2db8bbc4826404797961f674d55d10ddab79
MD5 6d85af43924828af6acf64b16b6c74e1
BLAKE2b-256 35d8e254cd4a27eef10738368bd410d2a4ff3d92f3e1431380bfa570266384fd

See more details on using hashes here.

File details

Details for the file granite_suite-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: granite_suite-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 57.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

File hashes

Hashes for granite_suite-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 e3eb2a0d959f086365e8376af0389b65369442e86ee1a13996a2eb48e56c5447
MD5 70802fa252d4922330a1dfe764f8e5a7
BLAKE2b-256 7e497a052fde42ede5080f451b8bcaee32b3dd06bb6365a97b3082ac9e845533

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page