from_gtf_df

from_gtf_df#

classmethod Transcript.from_gtf_df(transcript_df, ignore_info=True, fix_truncation=False)[source]#

Initializes a Transcript object from a transcript DataFrame.

Parameters:
  • transcript_df (DataFrame) – Dataframe representing a transcript. The dataframe must contain a single transcript.

  • ignore_info (bool (default: True)) – If True, other columns in transcript_df won’t be added to the info field, except transcript_type and selenocysteines.

  • fix_truncation (bool (default: False)) – Whether or not apply truncation fixation to CDS.

Return type:

Transcript

Returns:

Initialized Transcript object.

Raises:

ValueError – if the dataframe provided is invalid (no or more than one transcript, transcript has inconsistent strand or chromosome, transcript doesn’t contain exons, CDS are not within exons, etc.)