Step 2 of tales_compare_distal(). Aligns every distinct domain sequence against
every other and returns their pairwise dissimilarity.
Arguments
- x
A tales object carrying
dom_code, as returned bytales_assign_domain_codes().- aln_method
One of
"DECIPHER"(the default),"Biostrings"or"mmseq2"."mmseq2"runs in the conda environment.- ncores
Number of cores for the pairwise alignment.
- conda_bin
Passed to
reticulate, foraln_method = "mmseq2".
Value
A domain_distances object, stamped with x's namespace.
Details
This is the expensive step, and the one worth having on its own: the domain-level distances answer questions about domain diversity without any array-level alignment.
Distances are between distinct domains, keyed by dom_code, so the
cost goes with the number of distinct sequences rather than the number of
parts. See summary() for that ratio on a given object.
dissim follows DisTAL's definition: the percentage of amino acids that
change between two domains, normalised by the longer one, with residues
one domain lacks counted as changes. A 20-residue half-repeat that is an
exact prefix of a 34-residue repeat is therefore 14/34, about 41 percent, from
it. All three backends follow this definition. They still differ slightly
pair by pair: "DECIPHER" measures distances inside one multiple
alignment of all domains, the other two align each pair separately, and
"Biostrings" also charges a cost for opening an internal gap.
See also
tales_tale_distances(), which consumes this.
Other pairwise distances:
[.pairwise_distances(),
as.matrix.pairwise_distances(),
distances_assert_square(),
distances_restrict(),
is_pairwise_distances(),
pairwise_distances(),
rvd_dna_specificity,
tales_assign_domain_codes(),
tales_compare_distal(),
tales_compare_functal(),
tales_group_hclust(),
tales_group_kmedoids(),
tales_tale_distances(),
validate_pairwise_distances()
Examples
x <- tales_from_telltales(system.file("extdata", "tellTaleExampleOutput",
package = "tantale"))
xa <- tales_assign_domain_codes(x)
tales_domain_distances(xa)
#> Computing a distance matrix between TALE parts amino acid sequences using:
#> DECIPHER