Site types

Target extraction assigns site: IDs from the genome assembly and the site’s 1-based inclusive genomic coordinates, including strand. A site that spans a splice junction lists its genomic segments in transcript order, separated by |. The same physical site keeps its ID across extraction order, target name versus gene ID, and overlapping target regions. Transcript offsets remain available in TranscriptSite.loci but do not define the shared site ID.

class ASOkai.Sites.Site(id, sequence, **kwargs)[source]

Bases: Serializable, ABC

Abstract base class for sites whose sequences are stored 5’ to 3’.

Parameters:
  • id (str)

  • sequence (Seq)

id: str
property sequence: Seq

Return the site sequence in the 5’ to 3’ direction.

class ASOkai.Sites.GenomicSite(chr, start, end, strand, sequence, id=None, genome=None, **kwargs)[source]

Bases: Site, GenomeElement

A sequence located at one genomic locus.

Parameters:
  • chr (str)

  • start (int)

  • end (int)

  • strand (Literal['+', '-'])

  • sequence (Seq)

  • id (str | None)

  • genome (Genome | None)

locus: Locus

File contract

This is the JSON record ASOkai stores for GenomicSite. A JSON file has a root value and an objects table. Objects used once are inline; repeatedly used objects move to the table and are linked by references. Nested records follow their own class contracts.

The __class__ and __module__ fields identify the object type. ASOkai adds them when writing JSON; keep the fixed values shown below when supplying an input file yourself.

Example file

{
    "root": {
        "__class__": "GenomicSite",
        "__module__": "ASOkai.Sites._genomic_site",
        "id": "example",
        "sequence": "A",
        "chr": "example",
        "start": 1,
        "end": 1,
        "strand": "+"
    },
    "objects": {}
}

Fields

JSON field

Details

__class__

Accepted value: "GenomicSite"

Requirement: Required; keep unchanged in input files

Meaning: Identifies this JSON object as GenomicSite. ASOkai writes it automatically.

__module__

Accepted value: "ASOkai.Sites._genomic_site"

Requirement: Required; keep unchanged in input files

Meaning: Tells ASOkai where GenomicSite is defined. ASOkai writes it automatically.

id

Accepted value: string

Requirement: Required

Meaning: Stable site identifier. Constructors derive it from the locus when omitted.

chr

Accepted value: string

Requirement: Required

Meaning: Chromosome containing the site.

start

Accepted value: integer

Requirement: Required

Meaning: The start position of the site (1-based inclusive).

end

Accepted value: integer

Requirement: Required

Meaning: The end position of the site (1-based inclusive).

strand

Accepted value: "+", "-"

Requirement: Required

Meaning: Genomic strand containing the site.

sequence

Accepted value: string

Requirement: Required

Example: "A"

Meaning: Site sequence in the 5'-to-3' direction.

class ASOkai.Sites.TranscriptSite(loci, sequence, id=None, **kwargs)[source]

Bases: Site

A sequence occurring at one or more transcript loci.

Parameters:
  • loci (list[TranscriptLocus])

  • sequence (Seq)

  • id (str | None)

loci: list[TranscriptLocus]

File contract

This is the JSON record ASOkai stores for TranscriptSite. A JSON file has a root value and an objects table. Objects used once are inline; repeatedly used objects move to the table and are linked by references. Nested records follow their own class contracts.

The __class__ and __module__ fields identify the object type. ASOkai adds them when writing JSON; keep the fixed values shown below when supplying an input file yourself.

Fields

JSON field

Details

__class__

Accepted value: "TranscriptSite"

Requirement: Required; keep unchanged in input files

Meaning: Identifies this JSON object as TranscriptSite. ASOkai writes it automatically.

__module__

Accepted value: "ASOkai.Sites._transcript_site"

Requirement: Required; keep unchanged in input files

Meaning: Tells ASOkai where TranscriptSite is defined. ASOkai writes it automatically.

id

Accepted value: string

Requirement: Required

Meaning: Stable site identifier. When omitted, it is derived from the first transcript locus.

sequence

Accepted value: string

Requirement: Required

Example: "A"

Meaning: Site sequence in the 5'-to-3' direction.

loci

Accepted value: an array of objects

Requirement: Required

Meaning: Locations of this sequence on spliced transcripts.