This function adds GenomicRanges
information,
CHROM
, START
and END
to a
DNAStringSet
or an AAStringSet
and puts them into the
metadata
information.
This information can be used to find overlaps with a chromosome wide mask.
addpos2string(seq, chrom = NULL, start = NULL, end = NULL)
DNAStringSet
or AAStringSet
[mandatory]
chromosome name [mandatory]
start position [mandatory]
end position [mandatory]
An object of class DNAStringSet
or AAStringSet
## load example sequence data
data(iupac, package="MSA2dist")
## add position
iupac <- iupac |> addpos2string(chrom="chr1", start=1, end=1000)
#(iupac |> slot("metadata"))$GRanges
iupac |> getpos()
#> GRanges object with 1 range and 0 metadata columns:
#> seqnames ranges strand
#> <Rle> <IRanges> <Rle>
#> [1] chr1 1-1000 *
#> -------
#> seqinfo: 1 sequence from an unspecified genome; no seqlengths