Description Usage Arguments Value Author(s) See Also Examples
View source: R/addmask2string.R
This function adds mask information as an IRanges
object,
START
and END
information, to a
DNAStringSet
or an AAStringSet
and puts them into the
metadata
information.
This information can be used to restrict the distance calculation to
specific regions of the DNAStringSet
or the AAStringSet
.
1 | addmask2string(seq, mask = NULL, append = TRUE)
|
seq |
|
mask |
|
append |
indicate if mask should be appended or overwritten [default: TRUE] |
An object of class DNAStringSet
or AAStringSet
Kristian K Ullrich
addregion2string
,
addpop2string
,
addpos2string
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | data(iupac, package="distSTRING")
iupac.aa <- iupac |> cds2aa(shorten = TRUE)
## create mask
mask1 <- IRanges::IRanges(start=c(1,41), end=c(20,50))
## add mask
iupac.aa <- iupac.aa |> addmask2string(mask=mask1)
iupac.aa@metadata$mask
## append mask
mask2 <- IRanges::IRanges(start=c(21), end=c(30))
iupac.aa <- iupac.aa |> addmask2string(mask=mask2)
iupac.aa@metadata$mask
## overwrite mask
iupac.aa <- iupac.aa |> addmask2string(mask=mask2, append=FALSE)
iupac.aa@metadata$mask
## reduce by mask
iupac.aa.region <- iupac.aa |> string2region(mask=iupac.aa@metadata$mask)
iupac.aa.region@metadata
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.