Description Usage Arguments Value Author(s) See Also Examples
View source: R/string2region.R
This function subsets a DNAStringSet
or an
AAStringSet
by a mask
and region
given one or both
options as IRanges
.
1 | string2region(seq, mask = NULL, region = NULL, add = TRUE)
|
seq |
|
mask |
|
region |
|
add |
indicate if mask and region should be added to |
A list
object with the following components:
DNAStringSet
or AAStringSet
regionUsed
Kristian K Ullrich
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## load example sequence data
data("hiv", package="distSTRING")
## create mask
mask1 <- IRanges::IRanges(start=c(11,41,71), end=c(20,50,80))
## use mask
hiv.region <- hiv |> cds2aa() |> string2region(mask=mask1)
hiv.region@metadata$regionUsed
## use region
region1 <- IRanges::IRanges(start=c(1,75), end=c(45,85))
hiv.region <- hiv |> cds2aa() |> string2region(region=region1)
hiv.region@metadata$regionUsed
## use mask and region
hiv.region <- hiv |> cds2aa() |> string2region(mask=mask1, region=region1)
hiv.region@metadata$regionUsed
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.