id: https://w3id.org/ber-data/transforms/phytozome-gene-exons-gff3-to-feature-model
title: Phytozome gene_exons GFF3 rows to the feature model
description: >-
  linkml-map specification from the phytozome_gene_exons_gff3 dialect
  (model/dialects/phytozome-gene-exons-gff3.yaml) to SequenceFeature in model/schema/ber_feature_model.yaml.
  It maps the nine columns and the column 9 keys that have a SequenceFeature slot (ID, Parent). The reverse
  specification is generated from this one with `linkml-map invert`, not written by hand.
comments:
  - >-
    As for the IMG functional annotation GFF (img-functional-gff.transform.yaml), four things are
    done in scripts/phytozome_gene_exons_map.py instead, because linkml-map 0.5.4 can't express
    them: column 9 becomes one Attribute per key in file order, as text; coordinate_system is the
    constant "contig"; Dataset.contigs holds one Contig per distinct seqid; and mirror_source is
    restored on the inverted strand mapping.
  - >-
    longest also sets SequenceFeature.is_representative in the script (1 true, 0 false, absent unset),
    because linkml-map can't invert an expression. Like ID and Parent, it keeps its attribute copy,
    which holds its position in column 9; the reverse step requires the two to agree. Name and pacid
    have no SequenceFeature slot and travel only as attributes.
source_schema:
  name: phytozome_gene_exons_gff3
  source_file: model/dialects/phytozome-gene-exons-gff3.yaml
target_schema:
  name: ber-feature-model
  source_file: model/schema/ber_feature_model.yaml
class_derivations:
  SequenceFeature:
    populated_from: PhytozomeGeneExonsRow
    slot_derivations:
      feature_id:
        populated_from: ID
      seqid:
        populated_from: seqid
      source:
        populated_from: source
      type:
        # An expression, so the source enum is passed through as its text.
        expr: type
      start:
        populated_from: start
      end:
        populated_from: end
      strand:
        populated_from: strand
      phase:
        populated_from: phase
      parent:
        populated_from: Parent
enum_derivations:
  StrandEnum:
    populated_from: Strand
    mirror_source: true
