From ecaa995d2b63d82117f44f192298cf32d7887596 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Thu, 5 Jan 2023 13:10:24 -0600 Subject: [PATCH] Update API documentation for different `translate` methods --- docs/src/api.md | 3 ++- docs/src/variations.md | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/src/api.md b/docs/src/api.md index 8dcb67a..ef8121e 100644 --- a/docs/src/api.md +++ b/docs/src/api.md @@ -22,6 +22,7 @@ Haplotype reference(::Haplotype) variations reconstruct +translate(::Haplotype{S,T}, ::PairwiseAlignment{S,S}) where {S,T} ``` ## Variations @@ -30,7 +31,7 @@ reconstruct Variation reference(::Variation) mutation -translate +translate(::Variation{S,T}, ::PairwiseAlignment{S,S}) where {S,T} refbases altbases ``` diff --git a/docs/src/variations.md b/docs/src/variations.md index 46d2e79..8397c20 100644 --- a/docs/src/variations.md +++ b/docs/src/variations.md @@ -54,13 +54,15 @@ variations(bos_human_haplotype) ## Reference switching 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 ovis_human_alignment = PairwiseAlignment(AlignedSequence(human, Alignment("32M", 1, 1)), ovine) human_variation = first(variations(bos_ovis_haplotype)) reference(ans) == bovine -SequenceVariation.translate(human_variation, ovis_human_haplotype) +SequenceVariation.translate(human_variation, ovis_human_alignment) reference(ans) == bovine ```