filter_transcript_support_level

filter_transcript_support_level#

alphagenome.data.gene_annotation.filter_transcript_support_level(gtf, transcript_support_levels)[source]#

Filter GTF to only transcripts with specific GENCODE support levels.

The transcript support level (TSL) indicates how well mRNA and EST alignments support a transcript over its full length (see the Ensembl glossary, https://www.ensembl.org/Help/Glossary). The levels are:

  • 1: All splice junctions are supported by at least one non-suspect mRNA.

  • 2: The best supporting mRNA is flagged as suspect, or the support is from multiple ESTs.

  • 3: The only support is from a single EST.

  • 4: The best supporting EST is flagged as suspect.

  • 5: No single transcript supports the model structure.

  • NA: The transcript was not analyzed (not supported by this filter).

Parameters:
  • gtf (DataFrame) – pd.DataFrame of GENCODE GTF entries. Must contain column ‘transcript_support_level’.

  • transcript_support_levels (str | Sequence[str]) – List of valid transcript support levels to use for filtering. This must be a subset of [‘1’, ‘2’, ‘3’, ‘4’, ‘5’]. Can also be single string.

Return type:

DataFrame

Returns:

The input gtf, subset to rows with the specified support level(s).

See the GENCODE GTF format documentation for further details: https://www.gencodegenes.org/pages/data_format.html