scglue.genomics.Bed.expand
- Bed.expand(upstream, downstream, chr_len=None)[source]
Expand genomic features towards upstream and downstream
- Parameters:
upstream (
int) – Number of bps to expand in the upstream directiondownstream (
int) – Number of bps to expand in the downstream directionchr_len (
typing.Optional[typing.Mapping[str,int]]) – Length of each chromosome
- Return type:
- Returns:
expanded_bed – A new
Bedobject, containing expanded features of the currentBedobject
Note
Starting position < 0 after expansion is always trimmed. Ending position exceeding chromosome length is trimmed only if
chr_lenis specified.