tidesurf.transcript.Transcript

Contents

tidesurf.transcript.Transcript#

class tidesurf.transcript.Transcript(gene_id: str, gene_name: str, transcript_id: str, transcript_name: str, chromosome: str, strand: Strand, start: int, end: int, regions: Optional[List[Union[Exon, Intron]]] = None)#

Bases: GenomicFeature

A transcript. Contains a list of exons and introns.

Parameters:
gene_id str

ID of the corresponding gene.

gene_name str

Name of the corresponding gene.

transcript_id str

ID of the corresponding transcript.

transcript_name str

Name of the corresponding transcript.

chromosome str

Chromosome on which the exon is located.

strand Strand

Strand on which the exon is located.

start int

Genomic start position of the exon (0-based).

end int

Genomic end position of the exon (0-based).

regions List[Union[Exon, Intron]]

List of exons and introns in the transcript. A Transcript object can be initialized without regions (default: None), in which case they should be added later. If only exons are added, introns can be inserted with sort_regions().

Attributes

chromosome

Chromosome on which the feature is located.

end

Genomic end position of the feature (0-based).

gene_id

ID of the corresponding gene.

gene_name

Name of the corresponding gene.

regions

List of exons and introns in the transcript.

start

Genomic start position of the feature (0-based).

strand

Strand on which the feature is located.

transcript_id

ID of the corresponding transcript.

transcript_name

Name of the corresponding transcript.

Methods

add_exon(exon)

Add an exon to the transcript.

overlaps(chromosome, strand, start, end[, ...])

Check if the feature overlaps with a given region.

sort_regions()

Sort regions by start position and insert introns.