View source: R/aastring2dist.R
aastring2dist | R Documentation |
This function calculates pairwise distances for all combinations
of a AAStringSet
.
aastring2dist(
aa,
threads = 1,
symmetric = TRUE,
score = NULL,
mask = NULL,
region = NULL
)
aa |
|
threads |
number of parallel threads [default: 1] |
symmetric |
symmetric score matrix [default: TRUE] |
score |
|
mask |
|
region |
|
A data.frame
of pairwise distance values
distSTRING
, sites used sitesUsed
and region used
regionUsed
Kristian K Ullrich
dnastring2dist
## load example sequence data
data("hiv", package="MSA2dist")
#aastring2dist(cds2aa(hiv), score=granthamMatrix())
hiv |> cds2aa() |> aastring2dist(score=granthamMatrix())
## create mask
mask1 <- IRanges::IRanges(start=c(11,41,71), end=c(20,50,80))
## use mask
hiv |> cds2aa() |> aastring2dist(score=granthamMatrix(), mask=mask1)
## use region
region1 <- IRanges::IRanges(start=c(1,75), end=c(45,85))
hiv |> cds2aa() |> aastring2dist(score=granthamMatrix(), region=region1)
## use mask and region
hiv |> cds2aa() |> aastring2dist(score=granthamMatrix(),
mask=mask1, region=region1)
## use asymmetric score matrix
myscore <- granthamMatrix()
myscore[5, 6] <- 0
h <- hiv |> cds2aa() |> aastring2dist(score=myscore, symmetric=FALSE)
h$distSTRING[1:2, 1:2]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.