PacificBiosciences / paraphase

HiFi-based caller for highly similar paralogous genes
BSD 3-Clause Clear License
29 stars 4 forks source link

Paraphase

HiFi-based caller for highly similar paralogous genes

Many medically relevant genes fall into 'dark' regions where variant calling is limited due to high sequence homology with paralogs or pseudogenes. Paraphase is a Python tool that takes HiFi aligned BAMs as input (whole-genome or enrichment), phases haplotypes for genes of the same family, determines copy numbers and makes phased variant calls.

Paraphase diagram Paraphase takes all reads from a gene family, realigns to one representative gene of the family and then phases them into haplotypes. This approach bypasses the error-prone process of aligning reads to multiple similar regions and allows us to examine all copies of genes in a gene family. This gene-family-centered approach allows Paraphase to perform well when there is a copy number difference between an individual and the reference, as is often the case in segmental duplications. Futhermore, this approach also streamlines sequence comparisons between genes within the same family, making it straightforward to conduct analyses such as identifying non-allelic gene conversions.

Paraphase supports 160 segmental duplication regions in GRCh38. Among these, there are 11 medically relevant regions that are also supported in GRCh37/hg19:

Please check out our latest preprint and our earlier paper on its application to the gene SMN1 for more details about Paraphase.
Chen X, Harting J, Farrow E, et al. Comprehensive SMN1 and SMN2 profiling for spinal muscular atrophy analysis using long-read PacBio HiFi sequencing. The American Journal of Human Genetics. 2023;0(0). doi:10.1016/j.ajhg.2023.01.001

For whole-genome sequencing (WGS) data, we recommend >20X, ideally 30X, genome coverage. Low coverage or short read length could result in less accurate phasing, especially when gene copies are highly similar to each other. For hybrid capture-based enrichment data, a higher read depth (>50X) is recommended as the read length is generally shorter than WGS.

Contact

If you have suggestions or need assistance, please don't hesitate to reach out by email or open a GitHub issue.

Xiao Chen: xchen@pacificbiosciences.com

Dependencies

Installation

Paraphase can be installed through pip or conda:

pip install paraphase
# or
conda install -c conda-forge -c bioconda paraphase

Alternatively, Paraphase can be installed from GitHub.

git clone https://github.com/PacificBiosciences/paraphase
cd paraphase
python setup.py install

Running the program

paraphase -b input.bam -o output_directory -r genome_fasta

Alternatively when you have a list of bam files

paraphase -l list.txt -o output_directory -r genome_fasta

Required parameters:

Please note that the input BAM should be one that's aligned to the ENTIRE reference genome (either GRCh38 or GRCh37/hg19), and this reference should NOT include ALT contigs. The fasta file of this reference genome should be provided to Paraphase with -r. Recommendations on reference genomes to use are documented here.

Optional parameters:

Interpreting the output

Paraphase produces a few output files in the directory specified by -o, with the specified or default prefix.

  1. .vcf in ${prefix}_paraphase_vcfs folder. A VCF file is written for each region (gene family). More descriptions on the VCF can be found here.

  2. .paraphase.bam: This BAM file can be loaded into IGV for visualization of haplotypes (group reads by HP tag and color alignments by YC tag). All haplotypes are aligned against the main gene of interest. Tutorials/Examples are provided for medically relevant genes (See below).

  3. .paraphase.json: Output file summarizing haplotypes and variant calls for each gene family in each sample. In brief, a few generally used fields are explained below.

    • final_haplotypes: phased haplotypes for all gene copies in a gene family
    • total_cn: total copy number of the family (sum of gene and paralog/pseudogene)
    • two_copy_haplotypes: haplotypes that are present in two copies based on depth. This happens when (in a small number of cases) two haplotypes are identical and we infer that there exist two of them instead of one by checking the read depth.
    • haplotype_details: lists information about each haplotype
    • boundary: the boundary of the region that is resolved on the haplotype. This is useful when a haplotype is only partially phased.
    • alleles_final: haplotypes phased into alleles. This is possible when the segmental duplication is in tandem.

Tutorials/Examples are provided for interpreting the json output and visualizing haplotypes for medically relevant genes listed below: