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)

Arguments

seq

DNAStringSet or AAStringSet [mandatory]

chrom

chromosome name [mandatory]

start

start position [mandatory]

end

end position [mandatory]

Value

An object of class DNAStringSet or AAStringSet

Author

Kristian K Ullrich

Examples

## 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