mirror of
https://github.com/MillironX/SequenceVariation.jl.git
synced 2024-11-22 05:19:55 +00:00
Update documentation wording to reflect new type names
This commit is contained in:
parent
46c84b06bb
commit
1384783fcc
4 changed files with 26 additions and 25 deletions
|
@ -4,7 +4,7 @@ CurrentModule = SequenceVariation
|
||||||
|
|
||||||
# Comparing variations in sequences
|
# Comparing variations in sequences
|
||||||
|
|
||||||
## Checking for variations in a known variant
|
## Checking for variations in a known haplotype
|
||||||
|
|
||||||
Looking for a known [`Variation`](@ref) within a [`Haplotype`](@ref) is
|
Looking for a known [`Variation`](@ref) within a [`Haplotype`](@ref) is
|
||||||
efficiently accomplished using the `in` operator.
|
efficiently accomplished using the `in` operator.
|
||||||
|
@ -21,27 +21,27 @@ bos_ovis_alignment =
|
||||||
bos_human_alignment =
|
bos_human_alignment =
|
||||||
PairwiseAlignment(AlignedSequence(human, Alignment("32M", 1, 1)), bovine);
|
PairwiseAlignment(AlignedSequence(human, Alignment("32M", 1, 1)), bovine);
|
||||||
|
|
||||||
bos_ovis_variant = Haplotype(bos_ovis_alignment)
|
bos_ovis_haplotype = Haplotype(bos_ovis_alignment)
|
||||||
bos_human_variant = Haplotype(bos_human_alignment)
|
bos_human_haplotype = Haplotype(bos_human_alignment)
|
||||||
```
|
```
|
||||||
|
|
||||||
```@example call_variants
|
```@example call_variants
|
||||||
println("\tOvis aires\tHomo sapiens")
|
println("\tOvis aires\tHomo sapiens")
|
||||||
for v in vcat(variations(bos_ovis_variant), variations(bos_human_variant))
|
for v in vcat(variations(bos_ovis_haplotype), variations(bos_human_haplotype))
|
||||||
is_sheep = v in bos_ovis_variant
|
is_sheep = v in bos_ovis_haplotype
|
||||||
is_human = v in bos_human_variant
|
is_human = v in bos_human_haplotype
|
||||||
println("$v\t$is_sheep\t\t$is_human")
|
println("$v\t$is_sheep\t\t$is_human")
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
## Constructing new variants based on other variations
|
## Constructing new haplotypes based on other variations
|
||||||
|
|
||||||
New variants can be constructed using variations. This might be useful to pool
|
New haplotypes can be constructed using variations. This might be useful to pool
|
||||||
variations found on different reads or to filter variations from a variant
|
variations found on different reads or to filter variations from a haplotype
|
||||||
that aren't validated by another variant.
|
that aren't validated by another haplotype.
|
||||||
|
|
||||||
```@repl call_variants
|
```@repl call_variants
|
||||||
sheeple = vcat(variations(bos_ovis_variant), variations(bos_human_variant));
|
sheeple = vcat(variations(bos_ovis_haplotype), variations(bos_human_haplotype));
|
||||||
Haplotype(bovine, sheeple)
|
Haplotype(bovine, sheeple)
|
||||||
reconstruct!(bovine, ans)
|
reconstruct!(bovine, ans)
|
||||||
```
|
```
|
||||||
|
|
|
@ -2,13 +2,14 @@
|
||||||
CurrentModule = SequenceVariation
|
CurrentModule = SequenceVariation
|
||||||
```
|
```
|
||||||
|
|
||||||
# Working with variants
|
# Working with haplotypes
|
||||||
|
|
||||||
## Calling variants
|
## Calling variants
|
||||||
|
|
||||||
The first step in working with sequence variation is to identify (call)
|
The first step in working with sequence variation is to identify (call)
|
||||||
variations. SequenceVariation can directly call variants using the
|
variations between two sequences. SequenceVariation can directly call variants
|
||||||
`Haplotype(::PairwiseAlignment)` constructor of the [`Haplotype`](@ref) type.
|
using the `Haplotype(::PairwiseAlignment)` constructor of the
|
||||||
|
[`Haplotype`](@ref) type.
|
||||||
|
|
||||||
```@repl call_variants
|
```@repl call_variants
|
||||||
using SequenceVariation, BioAlignments, BioSequences
|
using SequenceVariation, BioAlignments, BioSequences
|
||||||
|
@ -22,19 +23,19 @@ bos_ovis_alignment =
|
||||||
bos_human_alignment =
|
bos_human_alignment =
|
||||||
PairwiseAlignment(AlignedSequence(human, Alignment("32M", 1, 1)), bovine);
|
PairwiseAlignment(AlignedSequence(human, Alignment("32M", 1, 1)), bovine);
|
||||||
|
|
||||||
bos_ovis_variant = Haplotype(bos_ovis_alignment)
|
bos_ovis_haplotype = Haplotype(bos_ovis_alignment)
|
||||||
bos_human_variant = Haplotype(bos_human_alignment)
|
bos_human_haplotype = Haplotype(bos_human_alignment)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Sequence reconstruction
|
## Sequence reconstruction
|
||||||
|
|
||||||
If the alternate sequence of a variant is no longer available (as is often the
|
If the alternate sequence of a haplotype is no longer available (as is often the
|
||||||
case when calling variants from alignment files), then the sequence can be
|
case when calling variants from alignment files), then the sequence can be
|
||||||
retrieved using the [`reconstruct!`](@ref) function.
|
retrieved using the [`reconstruct!`](@ref) function.
|
||||||
|
|
||||||
```@repl call_variants
|
```@repl call_variants
|
||||||
human2 = copy(bovine);
|
human2 = copy(bovine);
|
||||||
reconstruct!(human2, bos_human_variant)
|
reconstruct!(human2, bos_human_haplotype)
|
||||||
human2 == bovine
|
human2 == bovine
|
||||||
human2 == human
|
human2 == human
|
||||||
```
|
```
|
||||||
|
|
|
@ -42,13 +42,13 @@ bos_ovis_alignment =
|
||||||
bos_human_alignment =
|
bos_human_alignment =
|
||||||
PairwiseAlignment(AlignedSequence(human, Alignment("32M", 1, 1)), bovine);
|
PairwiseAlignment(AlignedSequence(human, Alignment("32M", 1, 1)), bovine);
|
||||||
|
|
||||||
bos_ovis_variant = Haplotype(bos_ovis_alignment)
|
bos_ovis_haplotype = Haplotype(bos_ovis_alignment)
|
||||||
bos_human_variant = Haplotype(bos_human_alignment)
|
bos_human_haplotype = Haplotype(bos_human_alignment)
|
||||||
```
|
```
|
||||||
|
|
||||||
```@repl call_variants
|
```@repl call_variants
|
||||||
variations(bos_ovis_variant)
|
variations(bos_ovis_haplotype)
|
||||||
variations(bos_human_variant)
|
variations(bos_human_haplotype)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Reference switching
|
## Reference switching
|
||||||
|
@ -59,8 +59,8 @@ alignment between the new and old references using the [`translate`](@ref).
|
||||||
```@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_variant))
|
human_variation = first(variations(bos_ovis_haplotype))
|
||||||
reference(ans) == bovine
|
reference(ans) == bovine
|
||||||
SequenceVariation.translate(human_variation, ovis_human_alignment)
|
SequenceVariation.translate(human_variation, ovis_human_haplotype)
|
||||||
reference(ans) == bovine
|
reference(ans) == bovine
|
||||||
```
|
```
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Haplotype{S<:BioSequence,T<:BioSymbol}
|
Haplotype{S<:BioSequence,T<:BioSymbol}
|
||||||
|
|
||||||
A set of variations within a given sequence that are all found together. Depending on the
|
A set of variations within a given sequence that are all found together. Depending on the
|
||||||
field, it might also be referred to as a "genotype," "haplotype," or "strain."
|
field, it might also be referred to as a "genotype" or "strain."
|
||||||
|
|
||||||
# Constructors
|
# Constructors
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue