bsxplorer.Genome.all

Genome.all(min_length: int = 0, flank_length: int = 0) DataFrame[source]

Filter annotation and calculate positions of flanking regions.

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.all(min_length = 0)
shape: (710_650, 7)
┌─────────────┬────────┬────────┬────────┬──────────┬────────────┬─────────────────┐
│ chr         ┆ strand ┆ start  ┆ end    ┆ upstream ┆ downstream ┆ id              │
│ ---         ┆ ---    ┆ ---    ┆ ---    ┆ ---      ┆ ---        ┆ ---             │
│ str         ┆ str    ┆ u64    ┆ u64    ┆ u64      ┆ u64        ┆ str             │
╞═════════════╪════════╪════════╪════════╪══════════╪════════════╪═════════════════╡
│ NC_003070.9 ┆ +      ┆ 3631   ┆ 5899   ┆ 1631     ┆ 7899       ┆ gene-AT1G01010  │
│ …           ┆ …      ┆ …      ┆ …      ┆ …        ┆ …          ┆ …               │
│ NC_000932.1 ┆ +      ┆ 153878 ┆ 154312 ┆ 151878   ┆ 156312     ┆ cds-NP_051123.1 │
│ NC_000932.1 ┆ ?      ┆ 69611  ┆ 140650 ┆ 67611    ┆ 142650     ┆ rna-ArthCp047   │
└─────────────┴────────┴────────┴────────┴──────────┴────────────┴─────────────────┘