Target genes
- class ASOkai.Targets.TargetGene(id, name, chr, start, end, strand, sequence, sites, genome=None, chromosome=None, **kwargs)[source]
Bases:
Serializable,GeneA gene together with the target sites extracted from it.
- Parameters:
id (str)
name (str)
chr (str)
start (int)
end (int)
strand (Literal['+', '-'])
sequence (Seq)
sites (Mapping[str, Site])
genome (Genome | None)
chromosome (Chromosome | None)
- id: str
- name: str
- locus: Locus
- property sequence: Seq
Return the target-gene sequence in the 5’ to 3’ direction.
- site_by_id(site_id)[source]
Return the target site identified by
site_id.- Parameters:
site_id (str)
- Return type:
- add_site(site)[source]
Add a target site whose ID is not already present.
- Parameters:
site (Site)
- Return type:
None
- remove_site(site_id)[source]
Remove the target site identified by
site_id.- Parameters:
site_id (str)
- Return type:
None
File contract
This is the JSON record ASOkai stores for TargetGene. 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__": "TargetGene", "__module__": "ASOkai.Targets._target_gene", "sequence": "A", "sites": { "example": { "__class__": "GenomicSite", "__module__": "ASOkai.Sites._genomic_site", "id": "example", "sequence": "A", "chr": "example", "start": 1, "end": 1, "strand": "+" } }, "name": "example", "id": "example", "chr": "example", "start": 1, "end": 1, "strand": "+" }, "objects": {} }
Fields
JSON field
Details
__class__Accepted value:
"TargetGene"Requirement: Required; keep unchanged in input files
Meaning: Identifies this JSON object as TargetGene. ASOkai writes it automatically.
__module__Accepted value:
"ASOkai.Targets._target_gene"Requirement: Required; keep unchanged in input files
Meaning: Tells ASOkai where TargetGene is defined. ASOkai writes it automatically.
idAccepted value: string
Requirement: Required
Meaning: Gene ID.
chrAccepted value: string
Requirement: Required
Meaning: Chromosome containing the gene.
startAccepted value: integer
Requirement: Required
Meaning: 1-based inclusive genomic start coordinate.
endAccepted value: integer
Requirement: Required
Meaning: 1-based inclusive genomic end coordinate.
strandAccepted value:
"+","-"Requirement: Required
Meaning: Gene strand.
nameAccepted value: string
Requirement: Required
Meaning: Gene name.
sequenceAccepted value: string
Requirement: Required
Example:
"A"Meaning: The gene sequence in the 5' to 3' direction.
sitesAccepted value: an object mapping string keys to
GenomicSiteobjects orTranscriptSiteobjectsRequirement: Required
Meaning: Target sites keyed by their unique site IDs.