When no seqlengths
are available, one can resort to set them as to the
maximal end coordinate found in the object.
Value
guessSeqLengths
returns sequence lengths that have been guessed
as the maximal end coordinates found in the object, or the object's
seqlengths
if if they did already exist.
See also
Other modifier functions:
bridgeRegions()
,
coalesce_contigs()
,
flipInversions()
,
forceSeqLengths()
,
keepLongestPair()
,
mergeSeqLevels()
,
reverse()
,
splitSeqLevel()
,
swap()
Examples
exampleTranslocation
#> GBreaks object with 3 ranges and 1 metadata column:
#> seqnames ranges strand | query
#> <Rle> <IRanges> <Rle> | <GRanges>
#> [1] chrA 100-200 + | chrB:100-200
#> [2] chrA 201-300 + | chrC:201-300
#> [3] chrA 301-400 + | chrB:301-400
#> -------
#> seqinfo: 1 sequence from an unspecified genome
seqlengths(exampleTranslocation$query)
#> chrB chrC
#> 600 600
guessSeqLengths(exampleTranslocation$query)
#> chrB chrC
#> 600 600
gb2 <- exampleTranslocation
seqlengths(gb2$query) <- NA
guessSeqLengths(gb2$query)
#> chrB chrC
#> 400 300