Update API documentation for different translate methods

This commit is contained in:
Thomas A. Christensen II 2023-01-05 13:10:24 -06:00
parent 6a4a39c859
commit ecaa995d2b
2 changed files with 6 additions and 3 deletions

View file

@ -22,6 +22,7 @@ Haplotype
reference(::Haplotype) reference(::Haplotype)
variations variations
reconstruct reconstruct
translate(::Haplotype{S,T}, ::PairwiseAlignment{S,S}) where {S,T}
``` ```
## Variations ## Variations
@ -30,7 +31,7 @@ reconstruct
Variation Variation
reference(::Variation) reference(::Variation)
mutation mutation
translate translate(::Variation{S,T}, ::PairwiseAlignment{S,S}) where {S,T}
refbases refbases
altbases altbases
``` ```

View file

@ -54,13 +54,15 @@ variations(bos_human_haplotype)
## Reference switching ## Reference switching
An individual variation can be mapped to a new reference sequence given an An individual variation can be mapped to a new reference sequence given an
alignment between the new and old references using the [`translate`](@ref). alignment between the new and old references using the
[`translate`](@ref translate(::Variation{S,T}, ::PairwiseAlignment{S,S}) where {S,T})
function.
```@repl call_variants ```@repl call_variants
ovis_human_alignment = ovis_human_alignment =
PairwiseAlignment(AlignedSequence(human, Alignment("32M", 1, 1)), ovine) PairwiseAlignment(AlignedSequence(human, Alignment("32M", 1, 1)), ovine)
human_variation = first(variations(bos_ovis_haplotype)) human_variation = first(variations(bos_ovis_haplotype))
reference(ans) == bovine reference(ans) == bovine
SequenceVariation.translate(human_variation, ovis_human_haplotype) SequenceVariation.translate(human_variation, ovis_human_alignment)
reference(ans) == bovine reference(ans) == bovine
``` ```