Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: J. Alvarez-Jarreta <jalvarez@ebi.ac.uk>
  • Loading branch information
MatBarba and JAlvarezJarreta authored Mar 21, 2024
1 parent 13efa0e commit 296f10f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/python/ensembl/io/genomio/gff3/restructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,14 @@ def move_only_exons_to_new_mrna(gene: SeqFeature) -> None:


def move_cds_to_existing_mrna(gene: SeqFeature) -> None:
"""Move CDS child features of a gene, to the mRNA.
"""Move CDS child features of a gene to the mRNA.
This is to fix the case where we have the following structure::
gene -> [ mRNA, CDSs ]
and change it to::
gene -> [ mRNA -> [ CDSs ] ]
The mRNA itself might have exons, in which case check that they match the CDS coordinates.
Args:
Expand Down
5 changes: 4 additions & 1 deletion src/python/ensembl/io/genomio/gff3/simplifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,11 @@ def __init__(
Args:
genome_path: Genome metadata file.
skip_unrecognized: If a biotype is unknown, don't include it. Raise GFFParserError otherwise.
skip_unrecognized: Do not include unknown biotypes instead of raising an exception.
allow_pseudogene_with_cds: Keep CDSs under pseudogenes that have them. Delete them otherwise.
Raises:
GFFParserError: If a biotype is unknown and `skip_unrecognized` is False.
"""
self.skip_unrecognized = skip_unrecognized
self.allow_pseudogene_with_cds = allow_pseudogene_with_cds
Expand Down

0 comments on commit 296f10f

Please sign in to comment.