No description
Find a file
2025-07-30 18:20:36 -05:00
.github ci: Fix documention workflow 2023-12-21 18:43:29 -07:00
deps feat: Add Comonicon precompile script 2023-05-23 14:55:32 +00:00
docs docs: Polish tutorials 2023-12-22 19:02:33 +00:00
example chore: Add all generated output files to gitignore 2023-04-25 10:20:58 -05:00
src perf: Add bounds for haplotype matrix 2023-12-22 15:23:46 +00:00
test test: Add tests for cli stability 2023-05-23 14:55:32 +00:00
.gitignore chore: Add all generated output files to gitignore 2023-04-25 10:20:58 -05:00
.JuliaFormatter.toml chore: Enable Julia markdown formatting for docs 2023-06-04 21:49:53 +00:00
CHANGELOG.md chore: Bump version number in CHANGELOG 2023-12-22 19:28:42 +00:00
CITATION.bib Bump version numbers 2022-07-29 17:20:39 +00:00
CODE_OF_CONDUCT.md Flesh out README 2021-11-29 15:43:14 -06:00
Comonicon.toml fix: Add cpu_target to Comonicon config 2023-06-04 21:51:45 +00:00
LICENSE Update author and repo information 2021-11-08 08:48:08 -06:00
Project.toml chore: Specify stdlib compat entries 2023-12-22 19:28:42 +00:00
README.md docs: Update README to post-v1 info 2023-12-22 19:02:33 +00:00

HapLink

Project Status: Active – The project has reached a stable, usable state and is being actively developed. GitHub tag (latest by date) License Stable Dev Build Status Coverage Code Style: Blue Conda (channel only) Genie Downloads

This project follows the semver pro forma and uses the OneFlow branching model.

Call haplotypes based on linkage disequilibrium between variant sites on long sequencing reads. Uses maximum liklihood methods for reads that are shorter than the entire genome. Comes with its own variant caller.


Installation

🐍 Via Bioconda

⚠️🐧 Linux-only!

Recommended for running HapLink on the command line

conda create -n haplink -c bioconda -c conda-forge haplink -y
conda activate haplink

∴ Via Julia REPL

Recommended for running HapLink within a Julia session

julia> ]
(@v1.6) pkg> add HapLink

To use this install of HapLink from the command line, you will need to add $HOME/.julia/bin to your $PATH.

📦 Via Apptainer

Recommended for running HapLink on a HPC

apptainer pull docker://ghcr.io/ksumngs/haplink.jl

🐳 Via Docker

docker pull ghcr.io/ksumngs/haplink.jl:latest

Usage

Please check the docs for more detailed instructions on how to use HapLink, both on the command line and in the REPL.

The basic flow of HapLink is

Step Command Output Format
1. Call variants haplink variants VCF
2. Call haplotypes haplink haplotypes YAML
3. Convert haplotype calls into sequences haplink sequences FASTA

You can see how this works using the files in the example directory:

haplink variants \
  example/reference.fasta \
  example/sample.bam \
  > sample.vcf

haplink haplotypes \
  example/reference.fasta \
  sample.vcf \
  example/sample.bam \
  > sample.yaml

haplink sequences \
  example/reference.fasta \
  sample.yaml \
  sample.fasta

Development

HapLink is written in Julia. While the focus of the program is the command line interface (CLI), it also exposes a nearly identical API in the form of a Julia Package, which is described in the docs.

Development environment

For consistency, the recommended version of Julia as well as all the recommended formatters and commit hooks are listed in a Nix file. If you have [direnv] and [Nix] installed, then simply run

direnv allow .
pre-commit install

to setup Julia and the commit hook tools.

Editing the package

HapLink.jl is a self-contained Julia package, and its development process is identical to any other package as discussed in the Pkg documentation.

$ git clone https://github.com/ksumngs/HapLink.jl.git
$ cd HapLink.jl
$ julia
(@v1.6) pkg> activate .
(HapLink) pkg> instantiate
julia> using HapLink
julia> ...

To test your changes on the command line application, ensure that $HOME/.julia/bin is on your $PATH, then from the Julia REPL

julia> ]
(@v1.6) pkg> activate .
(HapLink) pkg> build

This will update the application shim to include your changes.