aastring2dist: aastring2dist

Description Usage Arguments Value Author(s) See Also Examples

View source: R/aastring2dist.R

Description

This function calculates pairwise distances for all combinations of a AAStringSet.

Usage

1
aastring2dist(aa, threads = 1, score = NULL, mask = NULL, region = NULL)

Arguments

aa

AAStringSet [mandatory]

threads

number of parallel threads [default: 1]

score

score matrix use a score matrix to calculate distances [mandatory]

mask

IRanges object indicating masked sites [default: NULL]

region

IRanges object indicating region to use for dist calculation (by default all sites are used) [default: NULL]

Value

A data.frame of pairwise distance values distSTRING, sites used sitesUsed and region used regionUsed

Author(s)

Kristian K Ullrich

See Also

dnastring2dist

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## load example sequence data
data("hiv", package="distSTRING")
#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)

kullrich/distSTRING documentation built on Dec. 21, 2021, 8:42 a.m.