From 6b2bd018e2e6b5cdd1817b886d0fbe868305d1f7 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Sat, 8 Apr 2023 20:44:21 -0500 Subject: [PATCH] docs: Add examples of alignment getters --- docs/src/haplotypes.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/src/haplotypes.md b/docs/src/haplotypes.md index 4694b45..b462dba 100644 --- a/docs/src/haplotypes.md +++ b/docs/src/haplotypes.md @@ -39,6 +39,24 @@ human2 == bovine human2 == human ``` +## Alignment reconstruction + +Just like [Sequence reconstruction](@ref), alignments can also be reconstructed +from `Haplotype`s using the extension of the [`BioAlignments.alignment`](@ref) +function. + +```@repl call_variants +human_alignment = alignment(bos_human_haplotype) +human_alignment == bos_human_alignment +``` + +Alternatively, you can get the information in CIGAR format using the +extension of the [`BioAlignments.cigar`](@ref) function. + +```@repl call_variants +cigar(bos_human_haplotype) +``` + ## Reference switching All variations within a haplotype can be mapped to a new reference sequence