bsxplorer.Genome.exon

Genome.exon(min_length: int = 100) DataFrame[source]

Filter annotation by type == exon and length threshold.

Warning

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

Parameters:

min_length – Region length threshold.

Return type:

Return polars.DataFrame for downstream usage.

Examples

>>> path = "/path/to/genome.gff"
>>> genome = genome.from_gff(path)
>>> genome.exon(min_length=200)
shape: (132_822, 7)
┌─────────────┬────────┬────────┬────────┬──────────┬────────────┬────────────────────┐
│ chr         ┆ strand ┆ start  ┆ end    ┆ upstream ┆ downstream ┆ id                 │
│ ---         ┆ ---    ┆ ---    ┆ ---    ┆ ---      ┆ ---        ┆ ---                │
│ str         ┆ str    ┆ u64    ┆ u64    ┆ u64      ┆ u64        ┆ str                │
╞═════════════╪════════╪════════╪════════╪══════════╪════════════╪════════════════════╡
│ NC_003070.9 ┆ +      ┆ 3631   ┆ 3913   ┆ 3631     ┆ 3913       ┆ exon-NM_099983.2-1 │
│ …           ┆ …      ┆ …      ┆ …      ┆ …        ┆ …          ┆ …                  │
│ NC_000932.1 ┆ +      ┆ 152806 ┆ 153195 ┆ 152806   ┆ 153195     ┆ exon-ArthCp085-1   │
│ NC_000932.1 ┆ +      ┆ 153878 ┆ 154312 ┆ 153878   ┆ 154312     ┆ exon-ArthCp085-2   │
└─────────────┴────────┴────────┴────────┴──────────┴────────────┴────────────────────┘