bsxplorer.Genome.near_TES

Genome.near_TES(min_length: int = 4000, flank_length: int = 2000)[source]

Filter annotation by type == gene and calculate positions of near TES regions.

Warning

This method will have empty output, if type is not specified in input file.

Use down_windows=0 for Metagene.

Parameters:
  • min_length – Region length threshold.

  • flank_length – Length of flanking regions.

Return type:

Return polars.DataFrame for downstream usage.

Examples

>>> path = "/path/to/genome.gff"
>>> genome = genome.from_gff(path)
>>> genome.near_TES(min_length=2000, flank_length=2000)
shape: (14_644, 7)
┌─────────────┬────────┬────────┬────────┬──────────┬────────────┬────────────────┐
│ chr         ┆ strand ┆ start  ┆ end    ┆ upstream ┆ downstream ┆ id             │
│ ---         ┆ ---    ┆ ---    ┆ ---    ┆ ---      ┆ ---        ┆ ---            │
│ str         ┆ str    ┆ u64    ┆ u64    ┆ u64      ┆ u64        ┆ str            │
╞═════════════╪════════╪════════╪════════╪══════════╪════════════╪════════════════╡
│ NC_003070.9 ┆ +      ┆ 3899   ┆ 5899   ┆ 3899     ┆ 7899       ┆ gene-AT1G01010 │
│ …           ┆ …      ┆ …      ┆ …      ┆ …        ┆ …          ┆ …              │
│ NC_000932.1 ┆ +      ┆ 105500 ┆ 107500 ┆ 105500   ┆ 109500     ┆ gene-ArthCr087 │
│ NC_000932.1 ┆ +      ┆ 141708 ┆ 143708 ┆ 141708   ┆ 145708     ┆ gene-ArthCp086 │
└─────────────┴────────┴────────┴────────┴──────────┴────────────┴────────────────┘