Skip to contents

For scaffolding or plotting purposes, it may be useful to split some sequences into smaller ones.

Usage

splitSeqLevel(gb, seq, bp)

Arguments

gb

A GBreaks object.

seq

A one seqlevel from gr

bp

The breakpoint where to split.

Value

Returns a modified GRanges object in which the sequence has been split Its seqinfo has a new entry for the new levels, and the old level is not removed. If no seqlengths were present in the original object, they are arbitrarily set as the maximal end value for each seqlevel.

Note

This function only splits at breakpoints.

Author

Charles Plessy

Examples

splitSeqLevel(exampleInsertion, "chrA", 200)
#> GBreaks object with 3 ranges and 1 metadata column:
#>               seqnames    ranges strand |        query
#>                  <Rle> <IRanges>  <Rle> |    <GRanges>
#>          chrC     chrC   401-500      + | chrB:201-300
#>   chrA.chrA_1   chrA_1   100-200      + | chrB:100-200
#>   chrA.chrA_2   chrA_2     1-100      + | chrB:301-400
#>   -------
#>   seqinfo: 4 sequences from an unspecified genome