CREATE VIEW five_aminomethyl_two_thiouridine AS
  SELECT
    feature_id AS five_aminomethyl_two_thiouridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_aminomethyl_two_thiouridine';

--- ************************************************
--- *** relation: five_methylaminomethyluridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_methylaminomethyluridine is a modified ***
--- ***  uridine base feature.                   ***
--- ************************************************
---

CREATE VIEW five_methylaminomethyluridine AS
  SELECT
    feature_id AS five_methylaminomethyluridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_methylaminomethyluridine';

--- ************************************************
--- *** relation: five_mam_2_thiouridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_methylaminomethyl_2_thiouridine is a m ***
--- *** odified uridine base feature.            ***
--- ************************************************
---

CREATE VIEW five_mam_2_thiouridine AS
  SELECT
    feature_id AS five_mam_2_thiouridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_methylaminomethyl_two_thiouridine';

--- ************************************************
--- *** relation: five_methylaminomethyl_two_selenouridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_methylaminomethyl_2_selenouridine is a ***
--- ***  modified uridine base feature.          ***
--- ************************************************
---

CREATE VIEW five_methylaminomethyl_two_selenouridine AS
  SELECT
    feature_id AS five_methylaminomethyl_two_selenouridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_methylaminomethyl_two_selenouridine';

--- ************************************************
--- *** relation: five_carbamoylmethyluridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_carbamoylmethyluridine is a modified u ***
--- *** ridine base feature.                     ***
--- ************************************************
---

CREATE VIEW five_carbamoylmethyluridine AS
  SELECT
    feature_id AS five_carbamoylmethyluridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_carbamoylmethyluridine';

--- ************************************************
--- *** relation: five_cm_2_prime_o_methU ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_carbamoylmethyl_2_prime_O_methyluridin ***
--- *** e is a modified uridine base feature.    ***
--- ************************************************
---

CREATE VIEW five_cm_2_prime_o_methU AS
  SELECT
    feature_id AS five_cm_2_prime_o_methU_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_carbamoylmethyl_two_prime_O_methyluridine';

--- ************************************************
--- *** relation: five_carboxymethylaminomethyluridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_carboxymethylaminomethyluridine is a m ***
--- *** odified uridine base feature.            ***
--- ************************************************
---

CREATE VIEW five_carboxymethylaminomethyluridine AS
  SELECT
    feature_id AS five_carboxymethylaminomethyluridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_carboxymethylaminomethyluridine';

--- ************************************************
--- *** relation: five_carboxymethylaminomethyl_two_prime_o_methyluridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_carboxymethylaminomethyl_2_prime_O_met ***
--- *** hyluridine is a modified uridine base fe ***
--- *** ature.                                   ***
--- ************************************************
---

CREATE VIEW five_carboxymethylaminomethyl_two_prime_o_methyluridine AS
  SELECT
    feature_id AS five_carboxymethylaminomethyl_two_prime_o_methyluridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_carboxymethylaminomethyl_two_prime_O_methyluridine';

--- ************************************************
--- *** relation: five_carboxymethylaminomethyl_two_thiouridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_carboxymethylaminomethyl_2_thiouridine ***
--- ***  is a modified uridine base feature.     ***
--- ************************************************
---

CREATE VIEW five_carboxymethylaminomethyl_two_thiouridine AS
  SELECT
    feature_id AS five_carboxymethylaminomethyl_two_thiouridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_carboxymethylaminomethyl_two_thiouridine';

--- ************************************************
--- *** relation: three_methyluridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 3_methyluridine is a modified uridine ba ***
--- *** se feature.                              ***
--- ************************************************
---

CREATE VIEW three_methyluridine AS
  SELECT
    feature_id AS three_methyluridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'three_methyluridine';

--- ************************************************
--- *** relation: one_methyl_3_3_amino_three_carboxypropyl_pseudouridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 1_methyl_3_3_amino_3_carboxypropyl_pseud ***
--- *** ouridine is a modified uridine base feat ***
--- *** ure.                                     ***
--- ************************************************
---

CREATE VIEW one_methyl_3_3_amino_three_carboxypropyl_pseudouridine AS
  SELECT
    feature_id AS one_methyl_3_3_amino_three_carboxypropyl_pseudouridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'one_methyl_three_three_amino_three_carboxypropyl_pseudouridine';

--- ************************************************
--- *** relation: five_carboxymethyluridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_carboxymethyluridine is a modified uri ***
--- *** dine base feature.                       ***
--- ************************************************
---

CREATE VIEW five_carboxymethyluridine AS
  SELECT
    feature_id AS five_carboxymethyluridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_carboxymethyluridine';

--- ************************************************
--- *** relation: three_two_prime_o_dimethyluridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 3_2prime_O_dimethyluridine is a modified ***
--- ***  uridine base feature.                   ***
--- ************************************************
---

CREATE VIEW three_two_prime_o_dimethyluridine AS
  SELECT
    feature_id AS three_two_prime_o_dimethyluridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'three_two_prime_O_dimethyluridine';

--- ************************************************
--- *** relation: five_methyldihydrouridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_methyldihydrouridine is a modified uri ***
--- *** dine base feature.                       ***
--- ************************************************
---

CREATE VIEW five_methyldihydrouridine AS
  SELECT
    feature_id AS five_methyldihydrouridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_methyldihydrouridine';

--- ************************************************
--- *** relation: three_methylpseudouridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 3_methylpseudouridine is a modified urid ***
--- *** ine base feature.                        ***
--- ************************************************
---

CREATE VIEW three_methylpseudouridine AS
  SELECT
    feature_id AS three_methylpseudouridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'three_methylpseudouridine';

--- ************************************************
--- *** relation: five_taurinomethyluridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_taurinomethyluridine is a modified uri ***
--- *** dine base feature.                       ***
--- ************************************************
---

CREATE VIEW five_taurinomethyluridine AS
  SELECT
    feature_id AS five_taurinomethyluridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_taurinomethyluridine';

--- ************************************************
--- *** relation: five_taurinomethyl_two_thiouridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_taurinomethyl_2_thiouridineis a modifi ***
--- *** ed uridine base feature.                 ***
--- ************************************************
---

CREATE VIEW five_taurinomethyl_two_thiouridine AS
  SELECT
    feature_id AS five_taurinomethyl_two_thiouridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_taurinomethyl_two_thiouridine';

--- ************************************************
--- *** relation: five_isopentenylaminomethyl_uridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_isopentenylaminomethyl_uridine is a mo ***
--- *** dified uridine base feature.             ***
--- ************************************************
---

CREATE VIEW five_isopentenylaminomethyl_uridine AS
  SELECT
    feature_id AS five_isopentenylaminomethyl_uridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_isopentenylaminomethyl_uridine';

--- ************************************************
--- *** relation: five_isopentenylaminomethyl_two_thiouridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_isopentenylaminomethyl_2_thiouridine i ***
--- *** s a modified uridine base feature.       ***
--- ************************************************
---

CREATE VIEW five_isopentenylaminomethyl_two_thiouridine AS
  SELECT
    feature_id AS five_isopentenylaminomethyl_two_thiouridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_isopentenylaminomethyl_two_thiouridine';

--- ************************************************
--- *** relation: five_isopentenylaminomethyl_two_prime_o_methyluridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_isopentenylaminomethyl_2prime_O_methyl ***
--- *** uridine is a modified uridine base featu ***
--- *** re.                                      ***
--- ************************************************
---

CREATE VIEW five_isopentenylaminomethyl_two_prime_o_methyluridine AS
  SELECT
    feature_id AS five_isopentenylaminomethyl_two_prime_o_methyluridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_isopentenylaminomethyl_two_prime_O_methyluridine';

--- ************************************************
--- *** relation: histone_binding_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of a DNA molecule that is bound ***
--- ***  by a histone.                           ***
--- ************************************************
---

CREATE VIEW histone_binding_site AS
  SELECT
    feature_id AS histone_binding_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'histone_binding_site';

--- ************************************************
--- *** relation: cds_fragment ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW cds_fragment AS
  SELECT
    feature_id AS cds_fragment_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'CDS_fragment';

--- ************************************************
--- *** relation: modified_amino_acid_feature ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified amino ac ***
--- *** id feature.                              ***
--- ************************************************
---

CREATE VIEW modified_amino_acid_feature AS
  SELECT
    feature_id AS modified_amino_acid_feature_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_glycine' OR cvterm.name = 'modified_L_alanine' OR cvterm.name = 'modified_L_asparagine' OR cvterm.name = 'modified_L_aspartic_acid' OR cvterm.name = 'modified_L_cysteine' OR cvterm.name = 'modified_L_glutamic_acid' OR cvterm.name = 'modified_L_threonine' OR cvterm.name = 'modified_L_tryptophan' OR cvterm.name = 'modified_L_glutamine' OR cvterm.name = 'modified_L_methionine' OR cvterm.name = 'modified_L_isoleucine' OR cvterm.name = 'modified_L_phenylalanine' OR cvterm.name = 'modified_L_histidine' OR cvterm.name = 'modified_L_serine' OR cvterm.name = 'modified_L_lysine' OR cvterm.name = 'modified_L_leucine' OR cvterm.name = 'modified_L_selenocysteine' OR cvterm.name = 'modified_L_valine' OR cvterm.name = 'modified_L_proline' OR cvterm.name = 'modified_L_tyrosine' OR cvterm.name = 'modified_L_arginine' OR cvterm.name = 'modified_amino_acid_feature';

--- ************************************************
--- *** relation: modified_glycine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified glycine  ***
--- *** amino acid feature.                      ***
--- ************************************************
---

CREATE VIEW modified_glycine AS
  SELECT
    feature_id AS modified_glycine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_glycine';

--- ************************************************
--- *** relation: modified_l_alanine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified alanine  ***
--- *** amino acid feature.                      ***
--- ************************************************
---

CREATE VIEW modified_l_alanine AS
  SELECT
    feature_id AS modified_l_alanine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_L_alanine';

--- ************************************************
--- *** relation: modified_l_asparagine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified asparagi ***
--- *** ne amino acid feature.                   ***
--- ************************************************
---

CREATE VIEW modified_l_asparagine AS
  SELECT
    feature_id AS modified_l_asparagine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_L_asparagine';

--- ************************************************
--- *** relation: modified_l_aspartic_acid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified aspartic ***
--- ***  acid amino acid feature.                ***
--- ************************************************
---

CREATE VIEW modified_l_aspartic_acid AS
  SELECT
    feature_id AS modified_l_aspartic_acid_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_L_aspartic_acid';

--- ************************************************
--- *** relation: modified_l_cysteine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified cysteine ***
--- ***  amino acid feature.                     ***
--- ************************************************
---

CREATE VIEW modified_l_cysteine AS
  SELECT
    feature_id AS modified_l_cysteine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_L_cysteine';

--- ************************************************
--- *** relation: modified_l_glutamic_acid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW modified_l_glutamic_acid AS
  SELECT
    feature_id AS modified_l_glutamic_acid_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_L_glutamic_acid';

--- ************************************************
--- *** relation: modified_l_threonine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified threonin ***
--- *** e amino acid feature.                    ***
--- ************************************************
---

CREATE VIEW modified_l_threonine AS
  SELECT
    feature_id AS modified_l_threonine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_L_threonine';

--- ************************************************
--- *** relation: modified_l_tryptophan ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified tryptoph ***
--- *** an amino acid feature.                   ***
--- ************************************************
---

CREATE VIEW modified_l_tryptophan AS
  SELECT
    feature_id AS modified_l_tryptophan_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_L_tryptophan';

--- ************************************************
--- *** relation: modified_l_glutamine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified glutamin ***
--- *** e amino acid feature.                    ***
--- ************************************************
---

CREATE VIEW modified_l_glutamine AS
  SELECT
    feature_id AS modified_l_glutamine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_L_glutamine';

--- ************************************************
--- *** relation: modified_l_methionine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified methioni ***
--- *** ne amino acid feature.                   ***
--- ************************************************
---

CREATE VIEW modified_l_methionine AS
  SELECT
    feature_id AS modified_l_methionine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_L_methionine';

--- ************************************************
--- *** relation: modified_l_isoleucine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified isoleuci ***
--- *** ne amino acid feature.                   ***
--- ************************************************
---

CREATE VIEW modified_l_isoleucine AS
  SELECT
    feature_id AS modified_l_isoleucine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_L_isoleucine';

--- ************************************************
--- *** relation: modified_l_phenylalanine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified phenylal ***
--- *** anine amino acid feature.                ***
--- ************************************************
---

CREATE VIEW modified_l_phenylalanine AS
  SELECT
    feature_id AS modified_l_phenylalanine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_L_phenylalanine';

--- ************************************************
--- *** relation: modified_l_histidine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified histidie ***
--- ***  amino acid feature.                     ***
--- ************************************************
---

CREATE VIEW modified_l_histidine AS
  SELECT
    feature_id AS modified_l_histidine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_L_histidine';

--- ************************************************
--- *** relation: modified_l_serine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified serine a ***
--- *** mino acid feature.                       ***
--- ************************************************
---

CREATE VIEW modified_l_serine AS
  SELECT
    feature_id AS modified_l_serine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_L_serine';

--- ************************************************
--- *** relation: modified_l_lysine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified lysine a ***
--- *** mino acid feature.                       ***
--- ************************************************
---

CREATE VIEW modified_l_lysine AS
  SELECT
    feature_id AS modified_l_lysine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_L_lysine';

--- ************************************************
--- *** relation: modified_l_leucine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified leucine  ***
--- *** amino acid feature.                      ***
--- ************************************************
---

CREATE VIEW modified_l_leucine AS
  SELECT
    feature_id AS modified_l_leucine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_L_leucine';

--- ************************************************
--- *** relation: modified_l_selenocysteine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified selenocy ***
--- *** steine amino acid feature.               ***
--- ************************************************
---

CREATE VIEW modified_l_selenocysteine AS
  SELECT
    feature_id AS modified_l_selenocysteine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_L_selenocysteine';

--- ************************************************
--- *** relation: modified_l_valine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified valine a ***
--- *** mino acid feature.                       ***
--- ************************************************
---

CREATE VIEW modified_l_valine AS
  SELECT
    feature_id AS modified_l_valine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_L_valine';

--- ************************************************
--- *** relation: modified_l_proline ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified proline  ***
--- *** amino acid feature.                      ***
--- ************************************************
---

CREATE VIEW modified_l_proline AS
  SELECT
    feature_id AS modified_l_proline_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_L_proline';

--- ************************************************
--- *** relation: modified_l_tyrosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified tyrosine ***
--- ***  amino acid feature.                     ***
--- ************************************************
---

CREATE VIEW modified_l_tyrosine AS
  SELECT
    feature_id AS modified_l_tyrosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_L_tyrosine';

--- ************************************************
--- *** relation: modified_l_arginine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post translationally modified arginine ***
--- ***  amino acid feature.                     ***
--- ************************************************
---

CREATE VIEW modified_l_arginine AS
  SELECT
    feature_id AS modified_l_arginine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_L_arginine';

--- ************************************************
--- *** relation: peptidyl ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing the nature of a  ***
--- *** proteinaceous polymer, where by the amin ***
--- *** o acid units are joined by peptide bonds ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW peptidyl AS
  SELECT
    feature_id AS peptidyl_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'peptidyl';

--- ************************************************
--- *** relation: cleaved_for_gpi_anchor_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The C-terminal residues of a polypeptide ***
--- ***  which are exchanged for a GPI-anchor.   ***
--- ************************************************
---

CREATE VIEW cleaved_for_gpi_anchor_region AS
  SELECT
    feature_id AS cleaved_for_gpi_anchor_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'cleaved_for_gpi_anchor_region';

--- ************************************************
--- *** relation: biomaterial_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region which is intended for use in an ***
--- ***  experiment.                             ***
--- ************************************************
---

CREATE VIEW biomaterial_region AS
  SELECT
    feature_id AS biomaterial_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'reagent' OR cvterm.name = 'engineered_region' OR cvterm.name = 'PCR_product' OR cvterm.name = 'clone' OR cvterm.name = 'rescue_region' OR cvterm.name = 'oligo' OR cvterm.name = 'clone_insert' OR cvterm.name = 'cloned_region' OR cvterm.name = 'databank_entry' OR cvterm.name = 'RAPD' OR cvterm.name = 'genomic_clone' OR cvterm.name = 'cDNA_clone' OR cvterm.name = 'tiling_path_clone' OR cvterm.name = 'validated_cDNA_clone' OR cvterm.name = 'invalidated_cDNA_clone' OR cvterm.name = 'three_prime_RACE_clone' OR cvterm.name = 'chimeric_cDNA_clone' OR cvterm.name = 'genomically_contaminated_cDNA_clone' OR cvterm.name = 'polyA_primed_cDNA_clone' OR cvterm.name = 'partially_processed_cDNA_clone' OR cvterm.name = 'engineered_rescue_region' OR cvterm.name = 'aptamer' OR cvterm.name = 'probe' OR cvterm.name = 'tag' OR cvterm.name = 'ss_oligo' OR cvterm.name = 'ds_oligo' OR cvterm.name = 'DNAzyme' OR cvterm.name = 'synthetic_oligo' OR cvterm.name = 'DNA_aptamer' OR cvterm.name = 'RNA_aptamer' OR cvterm.name = 'microarray_oligo' OR cvterm.name = 'SAGE_tag' OR cvterm.name = 'STS' OR cvterm.name = 'EST' OR cvterm.name = 'engineered_tag' OR cvterm.name = 'five_prime_EST' OR cvterm.name = 'three_prime_EST' OR cvterm.name = 'UST' OR cvterm.name = 'RST' OR cvterm.name = 'three_prime_UST' OR cvterm.name = 'five_prime_UST' OR cvterm.name = 'three_prime_RST' OR cvterm.name = 'five_prime_RST' OR cvterm.name = 'primer' OR cvterm.name = 'sequencing_primer' OR cvterm.name = 'forward_primer' OR cvterm.name = 'reverse_primer' OR cvterm.name = 'RNAi_reagent' OR cvterm.name = 'DNA_constraint_sequence' OR cvterm.name = 'morpholino_oligo' OR cvterm.name = 'PNA_oligo' OR cvterm.name = 'LNA_oligo' OR cvterm.name = 'TNA_oligo' OR cvterm.name = 'GNA_oligo' OR cvterm.name = 'R_GNA_oligo' OR cvterm.name = 'S_GNA_oligo' OR cvterm.name = 'cloned_cDNA_insert' OR cvterm.name = 'cloned_genomic_insert' OR cvterm.name = 'engineered_insert' OR cvterm.name = 'BAC_cloned_genomic_insert' OR cvterm.name = 'engineered_gene' OR cvterm.name = 'engineered_plasmid' OR cvterm.name = 'engineered_rescue_region' OR cvterm.name = 'engineered_transposable_element' OR cvterm.name = 'engineered_foreign_region' OR cvterm.name = 'engineered_tag' OR cvterm.name = 'engineered_insert' OR cvterm.name = 'engineered_foreign_gene' OR cvterm.name = 'engineered_fusion_gene' OR cvterm.name = 'engineered_foreign_transposable_element_gene' OR cvterm.name = 'engineered_episome' OR cvterm.name = 'gene_trap_construct' OR cvterm.name = 'promoter_trap_construct' OR cvterm.name = 'enhancer_trap_construct' OR cvterm.name = 'engineered_foreign_transposable_element' OR cvterm.name = 'engineered_foreign_gene' OR cvterm.name = 'engineered_foreign_repetitive_element' OR cvterm.name = 'engineered_foreign_transposable_element' OR cvterm.name = 'engineered_foreign_transposable_element_gene' OR cvterm.name = 'biomaterial_region';

--- ************************************************
--- *** relation: experimental_feature ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region which is the result of some arb ***
--- *** itrary experimental procedure. The proce ***
--- *** dure may be carried out with biological  ***
--- *** material or inside a computer.           ***
--- ************************************************
---

CREATE VIEW experimental_feature AS
  SELECT
    feature_id AS experimental_feature_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'match_part' OR cvterm.name = 'assembly_component' OR cvterm.name = 'conserved_region' OR cvterm.name = 'match' OR cvterm.name = 'remark' OR cvterm.name = 'reading_frame' OR cvterm.name = 'QTL' OR cvterm.name = 'consensus_region' OR cvterm.name = 'low_complexity_region' OR cvterm.name = 'assembly' OR cvterm.name = 'transcribed_fragment' OR cvterm.name = 'transcribed_cluster' OR cvterm.name = 'read_pair' OR cvterm.name = 'contig' OR cvterm.name = 'read' OR cvterm.name = 'restriction_fragment' OR cvterm.name = 'golden_path_fragment' OR cvterm.name = 'tiling_path_fragment' OR cvterm.name = 'gap' OR cvterm.name = 'sonicate_fragment' OR cvterm.name = 'contig_read' OR cvterm.name = 'BAC_end' OR cvterm.name = 'dye_terminator_read' OR cvterm.name = 'pyrosequenced_read' OR cvterm.name = 'ligation_based_read' OR cvterm.name = 'polymerase_synthesis_read' OR cvterm.name = 'PAC_end' OR cvterm.name = 'RFLP_fragment' OR cvterm.name = 'tiling_path_clone' OR cvterm.name = 'coding_conserved_region' OR cvterm.name = 'nc_conserved_region' OR cvterm.name = 'homologous_region' OR cvterm.name = 'syntenic_region' OR cvterm.name = 'paralogous_region' OR cvterm.name = 'orthologous_region' OR cvterm.name = 'nucleotide_match' OR cvterm.name = 'protein_match' OR cvterm.name = 'expressed_sequence_match' OR cvterm.name = 'cross_genome_match' OR cvterm.name = 'translated_nucleotide_match' OR cvterm.name = 'primer_match' OR cvterm.name = 'EST_match' OR cvterm.name = 'cDNA_match' OR cvterm.name = 'UST_match' OR cvterm.name = 'RST_match' OR cvterm.name = 'sequence_difference' OR cvterm.name = 'experimental_result_region' OR cvterm.name = 'polypeptide_sequencing_information' OR cvterm.name = 'possible_base_call_error' OR cvterm.name = 'possible_assembly_error' OR cvterm.name = 'overlapping_feature_set' OR cvterm.name = 'no_output' OR cvterm.name = 'overlapping_EST_set' OR cvterm.name = 'non_adjacent_residues' OR cvterm.name = 'non_terminal_residue' OR cvterm.name = 'sequence_conflict' OR cvterm.name = 'sequence_uncertainty' OR cvterm.name = 'ORF' OR cvterm.name = 'blocked_reading_frame' OR cvterm.name = 'mini_gene' OR cvterm.name = 'rescue_mini_gene' OR cvterm.name = 'consensus_mRNA' OR cvterm.name = 'sequence_assembly' OR cvterm.name = 'fragment_assembly' OR cvterm.name = 'supercontig' OR cvterm.name = 'contig' OR cvterm.name = 'tiling_path' OR cvterm.name = 'virtual_sequence' OR cvterm.name = 'golden_path' OR cvterm.name = 'ultracontig' OR cvterm.name = 'expressed_sequence_assembly' OR cvterm.name = 'fingerprint_map' OR cvterm.name = 'STS_map' OR cvterm.name = 'RH_map' OR cvterm.name = 'unigene_cluster' OR cvterm.name = 'experimental_feature';

--- ************************************************
--- *** relation: biological_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region defined by its disposition to b ***
--- *** e involved in a biological process.      ***
--- ************************************************
---

CREATE VIEW biological_region AS
  SELECT
    feature_id AS biological_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_secondary_structure' OR cvterm.name = 'linkage_group' OR cvterm.name = 'polypeptide' OR cvterm.name = 'deletion' OR cvterm.name = 'origin_of_replication' OR cvterm.name = 'recombination_feature' OR cvterm.name = 'CpG_island' OR cvterm.name = 'binding_site' OR cvterm.name = 'pseudogenic_region' OR cvterm.name = 'cap' OR cvterm.name = 'intergenic_region' OR cvterm.name = 'oligo_U_tail' OR cvterm.name = 'polyA_sequence' OR cvterm.name = 'insertion' OR cvterm.name = 'gene' OR cvterm.name = 'nucleotide_motif' OR cvterm.name = 'chromosome_part' OR cvterm.name = 'gene_member_region' OR cvterm.name = 'transcript_region' OR cvterm.name = 'polypeptide_region' OR cvterm.name = 'gene_component_region' OR cvterm.name = 'mobile_genetic_element' OR cvterm.name = 'replicon' OR cvterm.name = 'base' OR cvterm.name = 'amino_acid' OR cvterm.name = 'gene_group' OR cvterm.name = 'substitution' OR cvterm.name = 'inversion' OR cvterm.name = 'retron' OR cvterm.name = 'G_quartet' OR cvterm.name = 'base_pair' OR cvterm.name = 'RNA_sequence_secondary_structure' OR cvterm.name = 'DNA_sequence_secondary_structure' OR cvterm.name = 'pseudoknot' OR cvterm.name = 'WC_base_pair' OR cvterm.name = 'sugar_edge_base_pair' OR cvterm.name = 'Hoogsteen_base_pair' OR cvterm.name = 'reverse_Hoogsteen_base_pair' OR cvterm.name = 'wobble_base_pair' OR cvterm.name = 'stem_loop' OR cvterm.name = 'tetraloop' OR cvterm.name = 'i_motif' OR cvterm.name = 'recoding_pseudoknot' OR cvterm.name = 'H_pseudoknot' OR cvterm.name = 'D_loop' OR cvterm.name = 'ARS' OR cvterm.name = 'oriT' OR cvterm.name = 'amplification_origin' OR cvterm.name = 'oriV' OR cvterm.name = 'oriC' OR cvterm.name = 'recombination_hotspot' OR cvterm.name = 'haplotype_block' OR cvterm.name = 'sequence_rearrangement_feature' OR cvterm.name = 'iDNA' OR cvterm.name = 'specific_recombination_site' OR cvterm.name = 'chromosome_breakage_sequence' OR cvterm.name = 'internal_eliminated_sequence' OR cvterm.name = 'macronucleus_destined_segment' OR cvterm.name = 'recombination_feature_of_rearranged_gene' OR cvterm.name = 'site_specific_recombination_target_region' OR cvterm.name = 'vertebrate_immune_system_gene_recombination_feature' OR cvterm.name = 'vertebrate_immunoglobulin_T_cell_receptor_segment' OR cvterm.name = 'vertebrate_immunoglobulin_T_cell_receptor_gene_cluster' OR cvterm.name = 'vertebrate_immune_system_gene_recombination_spacer' OR cvterm.name = 'vertebrate_immunoglobulin_T_cell_receptor_rearranged_segment' OR cvterm.name = 'vertebrate_immunoglobulin_T_cell_receptor_rearranged_gene_cluster' OR cvterm.name = 'vertebrate_immune_system_gene_recombination_signal_feature' OR cvterm.name = 'D_gene' OR cvterm.name = 'V_gene' OR cvterm.name = 'J_gene' OR cvterm.name = 'C_gene' OR cvterm.name = 'D_J_C_cluster' OR cvterm.name = 'J_C_cluster' OR cvterm.name = 'J_cluster' OR cvterm.name = 'V_cluster' OR cvterm.name = 'V_J_cluster' OR cvterm.name = 'V_J_C_cluster' OR cvterm.name = 'C_cluster' OR cvterm.name = 'D_cluster' OR cvterm.name = 'D_J_cluster' OR cvterm.name = 'three_prime_D_spacer' OR cvterm.name = 'five_prime_D_spacer' OR cvterm.name = 'J_spacer' OR cvterm.name = 'V_spacer' OR cvterm.name = 'VD_gene' OR cvterm.name = 'DJ_gene' OR cvterm.name = 'VDJ_gene' OR cvterm.name = 'VJ_gene' OR cvterm.name = 'DJ_J_cluster' OR cvterm.name = 'VDJ_J_C_cluster' OR cvterm.name = 'VDJ_J_cluster' OR cvterm.name = 'VJ_C_cluster' OR cvterm.name = 'VJ_J_C_cluster' OR cvterm.name = 'VJ_J_cluster' OR cvterm.name = 'D_DJ_C_cluster' OR cvterm.name = 'D_DJ_cluster' OR cvterm.name = 'D_DJ_J_C_cluster' OR cvterm.name = 'D_DJ_J_cluster' OR cvterm.name = 'V_DJ_cluster' OR cvterm.name = 'V_DJ_J_cluster' OR cvterm.name = 'V_VDJ_C_cluster' OR cvterm.name = 'V_VDJ_cluster' OR cvterm.name = 'V_VDJ_J_cluster' OR cvterm.name = 'V_VJ_C_cluster' OR cvterm.name = 'V_VJ_cluster' OR cvterm.name = 'V_VJ_J_cluster' OR cvterm.name = 'V_D_DJ_C_cluster' OR cvterm.name = 'V_D_DJ_cluster' OR cvterm.name = 'V_D_DJ_J_C_cluster' OR cvterm.name = 'V_D_DJ_J_cluster' OR cvterm.name = 'V_D_J_C_cluster' OR cvterm.name = 'V_D_J_cluster' OR cvterm.name = 'DJ_C_cluster' OR cvterm.name = 'DJ_J_C_cluster' OR cvterm.name = 'VDJ_C_cluster' OR cvterm.name = 'V_DJ_C_cluster' OR cvterm.name = 'V_DJ_J_C_cluster' OR cvterm.name = 'V_VDJ_J_C_cluster' OR cvterm.name = 'V_VJ_J_C_cluster' OR cvterm.name = 'J_gene_recombination_feature' OR cvterm.name = 'D_gene_recombination_feature' OR cvterm.name = 'V_gene_recombination_feature' OR cvterm.name = 'heptamer_of_recombination_feature_of_vertebrate_immune_system_gene' OR cvterm.name = 'nonamer_of_recombination_feature_of_vertebrate_immune_system_gene' OR cvterm.name = 'five_prime_D_recombination_signal_sequence' OR cvterm.name = 'three_prime_D_recombination_signal_sequence' OR cvterm.name = 'three_prime_D_heptamer' OR cvterm.name = 'five_prime_D_heptamer' OR cvterm.name = 'J_heptamer' OR cvterm.name = 'V_heptamer' OR cvterm.name = 'three_prime_D_nonamer' OR cvterm.name = 'five_prime_D_nonamer' OR cvterm.name = 'J_nonamer' OR cvterm.name = 'V_nonamer' OR cvterm.name = 'integration_excision_site' OR cvterm.name = 'resolution_site' OR cvterm.name = 'inversion_site' OR cvterm.name = 'inversion_site_part' OR cvterm.name = 'attI_site' OR cvterm.name = 'attP_site' OR cvterm.name = 'attB_site' OR cvterm.name = 'attL_site' OR cvterm.name = 'attR_site' OR cvterm.name = 'attC_site' OR cvterm.name = 'attCtn_site' OR cvterm.name = 'loxP_site' OR cvterm.name = 'dif_site' OR cvterm.name = 'FRT_site' OR cvterm.name = 'IRLinv_site' OR cvterm.name = 'IRRinv_site' OR cvterm.name = 'protein_binding_site' OR cvterm.name = 'miRNA_target_site' OR cvterm.name = 'epitope' OR cvterm.name = 'polypeptide_metal_contact' OR cvterm.name = 'protein_protein_contact' OR cvterm.name = 'polypeptide_ligand_contact' OR cvterm.name = 'DNA_binding_site' OR cvterm.name = 'primer_binding_site' OR cvterm.name = 'polypeptide_DNA_contact' OR cvterm.name = 'nuclease_binding_site' OR cvterm.name = 'TF_binding_site' OR cvterm.name = 'histone_binding_site' OR cvterm.name = 'insulator_binding_site' OR cvterm.name = 'enhancer_binding_site' OR cvterm.name = 'restriction_enzyme_binding_site' OR cvterm.name = 'nuclease_sensitive_site' OR cvterm.name = 'homing_endonuclease_binding_site' OR cvterm.name = 'nuclease_hypersensitive_site' OR cvterm.name = 'group_1_intron_homing_endonuclease_target_region' OR cvterm.name = 'DNAseI_hypersensitive_site' OR cvterm.name = 'INR_motif' OR cvterm.name = 'DPE_motif' OR cvterm.name = 'BRE_motif' OR cvterm.name = 'CAAT_signal' OR cvterm.name = 'TATA_box' OR cvterm.name = 'A_box' OR cvterm.name = 'B_box' OR cvterm.name = 'C_box' OR cvterm.name = 'DRE_motif' OR cvterm.name = 'E_box_motif' OR cvterm.name = 'MTE' OR cvterm.name = 'INR1_motif' OR cvterm.name = 'GAGA_motif' OR cvterm.name = 'octamer_motif' OR cvterm.name = 'polypeptide_calcium_ion_contact_site' OR cvterm.name = 'polypeptide_cobalt_ion_contact_site' OR cvterm.name = 'polypeptide_copper_ion_contact_site' OR cvterm.name = 'polypeptide_iron_ion_contact_site' OR cvterm.name = 'polypeptide_magnesium_ion_contact_site' OR cvterm.name = 'polypeptide_manganese_ion_contact_site' OR cvterm.name = 'polypeptide_molybdenum_ion_contact_site' OR cvterm.name = 'polypeptide_nickel_ion_contact_site' OR cvterm.name = 'polypeptide_tungsten_ion_contact_site' OR cvterm.name = 'polypeptide_zinc_ion_contact_site' OR cvterm.name = 'pseudogene' OR cvterm.name = 'decayed_exon' OR cvterm.name = 'pseudogenic_exon' OR cvterm.name = 'pseudogenic_transcript' OR cvterm.name = 'pseudogenic_rRNA' OR cvterm.name = 'pseudogenic_tRNA' OR cvterm.name = 'processed_pseudogene' OR cvterm.name = 'pseudogene_by_unequal_crossing_over' OR cvterm.name = 'nuclear_mt_pseudogene' OR cvterm.name = 'cassette_pseudogene' OR cvterm.name = 'transgenic_insertion' OR cvterm.name = 'nuclear_gene' OR cvterm.name = 'mt_gene' OR cvterm.name = 'plastid_gene' OR cvterm.name = 'nucleomorph_gene' OR cvterm.name = 'plasmid_gene' OR cvterm.name = 'proviral_gene' OR cvterm.name = 'transposable_element_gene' OR cvterm.name = 'silenced_gene' OR cvterm.name = 'engineered_gene' OR cvterm.name = 'foreign_gene' OR cvterm.name = 'fusion_gene' OR cvterm.name = 'recombinationally_rearranged_gene' OR cvterm.name = 'gene_with_trans_spliced_transcript' OR cvterm.name = 'gene_with_polycistronic_transcript' OR cvterm.name = 'rescue_gene' OR cvterm.name = 'post_translationally_regulated_gene' OR cvterm.name = 'negatively_autoregulated_gene' OR cvterm.name = 'positively_autoregulated_gene' OR cvterm.name = 'translationally_regulated_gene' OR cvterm.name = 'epigenetically_modified_gene' OR cvterm.name = 'transgene' OR cvterm.name = 'predicted_gene' OR cvterm.name = 'protein_coding_gene' OR cvterm.name = 'retrogene' OR cvterm.name = 'ncRNA_gene' OR cvterm.name = 'cryptic_gene' OR cvterm.name = 'gene_cassette' OR cvterm.name = 'kinetoplast_gene' OR cvterm.name = 'maxicircle_gene' OR cvterm.name = 'minicircle_gene' OR cvterm.name = 'cryptogene' OR cvterm.name = 'apicoplast_gene' OR cvterm.name = 'ct_gene' OR cvterm.name = 'chromoplast_gene' OR cvterm.name = 'cyanelle_gene' OR cvterm.name = 'leucoplast_gene' OR cvterm.name = 'proplastid_gene' OR cvterm.name = 'endogenous_retroviral_gene' OR cvterm.name = 'engineered_foreign_transposable_element_gene' OR cvterm.name = 'gene_silenced_by_DNA_modification' OR cvterm.name = 'gene_silenced_by_RNA_interference' OR cvterm.name = 'gene_silenced_by_histone_modification' OR cvterm.name = 'gene_silenced_by_DNA_methylation' OR cvterm.name = 'gene_silenced_by_histone_methylation' OR cvterm.name = 'gene_silenced_by_histone_deacetylation' OR cvterm.name = 'engineered_foreign_gene' OR cvterm.name = 'engineered_fusion_gene' OR cvterm.name = 'engineered_foreign_transposable_element_gene' OR cvterm.name = 'engineered_foreign_gene' OR cvterm.name = 'engineered_foreign_transposable_element_gene' OR cvterm.name = 'engineered_fusion_gene' OR cvterm.name = 'recombinationally_inverted_gene' OR cvterm.name = 'recombinationally_rearranged_vertebrate_immune_system_gene' OR cvterm.name = 'gene_with_dicistronic_transcript' OR cvterm.name = 'gene_with_dicistronic_primary_transcript' OR cvterm.name = 'gene_with_dicistronic_mRNA' OR cvterm.name = 'wild_type_rescue_gene' OR cvterm.name = 'gene_rearranged_at_DNA_level' OR cvterm.name = 'maternally_imprinted_gene' OR cvterm.name = 'paternally_imprinted_gene' OR cvterm.name = 'allelically_excluded_gene' OR cvterm.name = 'floxed_gene' OR cvterm.name = 'gene_with_polyadenylated_mRNA' OR cvterm.name = 'gene_with_mRNA_with_frameshift' OR cvterm.name = 'gene_with_edited_transcript' OR cvterm.name = 'gene_with_recoded_mRNA' OR cvterm.name = 'gene_with_stop_codon_read_through' OR cvterm.name = 'gene_with_mRNA_recoded_by_translational_bypass' OR cvterm.name = 'gene_with_transcript_with_translational_frameshift' OR cvterm.name = 'gene_with_stop_codon_redefined_as_pyrrolysine' OR cvterm.name = 'gene_with_stop_codon_redefined_as_selenocysteine' OR cvterm.name = 'gRNA_gene' OR cvterm.name = 'miRNA_gene' OR cvterm.name = 'scRNA_gene' OR cvterm.name = 'snoRNA_gene' OR cvterm.name = 'snRNA_gene' OR cvterm.name = 'SRP_RNA_gene' OR cvterm.name = 'stRNA_gene' OR cvterm.name = 'tmRNA_gene' OR cvterm.name = 'tRNA_gene' OR cvterm.name = 'cryptogene' OR cvterm.name = 'DNA_motif' OR cvterm.name = 'RNA_motif' OR cvterm.name = 'PSE_motif' OR cvterm.name = 'GC_rich_promoter_region' OR cvterm.name = 'minus_10_signal' OR cvterm.name = 'minus_35_signal' OR cvterm.name = 'DMv4_motif' OR cvterm.name = 'DMv5_motif' OR cvterm.name = 'DMv3_motif' OR cvterm.name = 'DMv2_motif' OR cvterm.name = 'DPE1_motif' OR cvterm.name = 'DMv1_motif' OR cvterm.name = 'NDM2_motif' OR cvterm.name = 'NDM3_motif' OR cvterm.name = 'RNA_internal_loop' OR cvterm.name = 'A_minor_RNA_motif' OR cvterm.name = 'RNA_junction_loop' OR cvterm.name = 'hammerhead_ribozyme' OR cvterm.name = 'asymmetric_RNA_internal_loop' OR cvterm.name = 'symmetric_RNA_internal_loop' OR cvterm.name = 'K_turn_RNA_motif' OR cvterm.name = 'sarcin_like_RNA_motif' OR cvterm.name = 'RNA_hook_turn' OR cvterm.name = 'chromosome_arm' OR cvterm.name = 'chromosome_band' OR cvterm.name = 'interband' OR cvterm.name = 'chromosomal_regulatory_element' OR cvterm.name = 'chromosomal_structural_element' OR cvterm.name = 'introgressed_chromosome_region' OR cvterm.name = 'matrix_attachment_site' OR cvterm.name = 'centromere' OR cvterm.name = 'telomere' OR cvterm.name = 'transcript' OR cvterm.name = 'regulatory_region' OR cvterm.name = 'polycistronic_transcript' OR cvterm.name = 'transcript_with_translational_frameshift' OR cvterm.name = 'primary_transcript' OR cvterm.name = 'mature_transcript' OR cvterm.name = 'transcript_bound_by_nucleic_acid' OR cvterm.name = 'transcript_bound_by_protein' OR cvterm.name = 'enzymatic_RNA' OR cvterm.name = 'trans_spliced_transcript' OR cvterm.name = 'monocistronic_transcript' OR cvterm.name = 'aberrant_processed_transcript' OR cvterm.name = 'edited_transcript' OR cvterm.name = 'alternatively_spliced_transcript' OR cvterm.name = 'dicistronic_transcript' OR cvterm.name = 'polycistronic_primary_transcript' OR cvterm.name = 'polycistronic_mRNA' OR cvterm.name = 'dicistronic_mRNA' OR cvterm.name = 'dicistronic_primary_transcript' OR cvterm.name = 'dicistronic_primary_transcript' OR cvterm.name = 'dicistronic_mRNA' OR cvterm.name = 'protein_coding_primary_transcript' OR cvterm.name = 'nc_primary_transcript' OR cvterm.name = 'polycistronic_primary_transcript' OR cvterm.name = 'monocistronic_primary_transcript' OR cvterm.name = 'mini_exon_donor_RNA' OR cvterm.name = 'antisense_primary_transcript' OR cvterm.name = 'capped_primary_transcript' OR cvterm.name = 'pre_edited_mRNA' OR cvterm.name = 'scRNA_primary_transcript' OR cvterm.name = 'rRNA_primary_transcript' OR cvterm.name = 'tRNA_primary_transcript' OR cvterm.name = 'snRNA_primary_transcript' OR cvterm.name = 'snoRNA_primary_transcript' OR cvterm.name = 'tmRNA_primary_transcript' OR cvterm.name = 'SRP_RNA_primary_transcript' OR cvterm.name = 'miRNA_primary_transcript' OR cvterm.name = 'rRNA_small_subunit_primary_transcript' OR cvterm.name = 'rRNA_large_subunit_primary_transcript' OR cvterm.name = 'alanine_tRNA_primary_transcript' OR cvterm.name = 'arginine_tRNA_primary_transcript' OR cvterm.name = 'asparagine_tRNA_primary_transcript' OR cvterm.name = 'aspartic_acid_tRNA_primary_transcript' OR cvterm.name = 'cysteine_tRNA_primary_transcript' OR cvterm.name = 'glutamic_acid_tRNA_primary_transcript' OR cvterm.name = 'glutamine_tRNA_primary_transcript' OR cvterm.name = 'glycine_tRNA_primary_transcript' OR cvterm.name = 'histidine_tRNA_primary_transcript' OR cvterm.name = 'isoleucine_tRNA_primary_transcript' OR cvterm.name = 'leucine_tRNA_primary_transcript' OR cvterm.name = 'lysine_tRNA_primary_transcript' OR cvterm.name = 'methionine_tRNA_primary_transcript' OR cvterm.name = 'phenylalanine_tRNA_primary_transcript' OR cvterm.name = 'proline_tRNA_primary_transcript' OR cvterm.name = 'serine_tRNA_primary_transcript' OR cvterm.name = 'threonine_tRNA_primary_transcript' OR cvterm.name = 'tryptophan_tRNA_primary_transcript' OR cvterm.name = 'tyrosine_tRNA_primary_transcript' OR cvterm.name = 'valine_tRNA_primary_transcript' OR cvterm.name = 'pyrrolysine_tRNA_primary_transcript' OR cvterm.name = 'selenocysteine_tRNA_primary_transcript' OR cvterm.name = 'methylation_guide_snoRNA_primary_transcript' OR cvterm.name = 'rRNA_cleavage_snoRNA_primary_transcript' OR cvterm.name = 'C_D_box_snoRNA_primary_transcript' OR cvterm.name = 'H_ACA_box_snoRNA_primary_transcript' OR cvterm.name = 'U14_snoRNA_primary_transcript' OR cvterm.name = 'stRNA_primary_transcript' OR cvterm.name = 'dicistronic_primary_transcript' OR cvterm.name = 'mRNA' OR cvterm.name = 'ncRNA' OR cvterm.name = 'mRNA_with_frameshift' OR cvterm.name = 'monocistronic_mRNA' OR cvterm.name = 'polycistronic_mRNA' OR cvterm.name = 'exemplar_mRNA' OR cvterm.name = 'capped_mRNA' OR cvterm.name = 'polyadenylated_mRNA' OR cvterm.name = 'trans_spliced_mRNA' OR cvterm.name = 'consensus_mRNA' OR cvterm.name = 'recoded_mRNA' OR cvterm.name = 'mRNA_with_minus_1_frameshift' OR cvterm.name = 'mRNA_with_plus_1_frameshift' OR cvterm.name = 'mRNA_with_plus_2_frameshift' OR cvterm.name = 'mRNA_with_minus_2_frameshift' OR cvterm.name = 'dicistronic_mRNA' OR cvterm.name = 'mRNA_recoded_by_translational_bypass' OR cvterm.name = 'mRNA_recoded_by_codon_redefinition' OR cvterm.name = 'scRNA' OR cvterm.name = 'rRNA' OR cvterm.name = 'tRNA' OR cvterm.name = 'snRNA' OR cvterm.name = 'snoRNA' OR cvterm.name = 'small_regulatory_ncRNA' OR cvterm.name = 'RNase_MRP_RNA' OR cvterm.name = 'RNase_P_RNA' OR cvterm.name = 'telomerase_RNA' OR cvterm.name = 'vault_RNA' OR cvterm.name = 'Y_RNA' OR cvterm.name = 'rasiRNA' OR cvterm.name = 'SRP_RNA' OR cvterm.name = 'guide_RNA' OR cvterm.name = 'antisense_RNA' OR cvterm.name = 'siRNA' OR cvterm.name = 'stRNA' OR cvterm.name = 'class_II_RNA' OR cvterm.name = 'class_I_RNA' OR cvterm.name = 'piRNA' OR cvterm.name = 'lincRNA' OR cvterm.name = 'rRNA_cleavage_RNA' OR cvterm.name = 'small_subunit_rRNA' OR cvterm.name = 'large_subunit_rRNA' OR cvterm.name = 'rRNA_18S' OR cvterm.name = 'rRNA_16S' OR cvterm.name = 'rRNA_5_8S' OR cvterm.name = 'rRNA_5S' OR cvterm.name = 'rRNA_28S' OR cvterm.name = 'rRNA_23S' OR cvterm.name = 'rRNA_25S' OR cvterm.name = 'rRNA_21S' OR cvterm.name = 'alanyl_tRNA' OR cvterm.name = 'asparaginyl_tRNA' OR cvterm.name = 'aspartyl_tRNA' OR cvterm.name = 'cysteinyl_tRNA' OR cvterm.name = 'glutaminyl_tRNA' OR cvterm.name = 'glutamyl_tRNA' OR cvterm.name = 'glycyl_tRNA' OR cvterm.name = 'histidyl_tRNA' OR cvterm.name = 'isoleucyl_tRNA' OR cvterm.name = 'leucyl_tRNA' OR cvterm.name = 'lysyl_tRNA' OR cvterm.name = 'methionyl_tRNA' OR cvterm.name = 'phenylalanyl_tRNA' OR cvterm.name = 'prolyl_tRNA' OR cvterm.name = 'seryl_tRNA' OR cvterm.name = 'threonyl_tRNA' OR cvterm.name = 'tryptophanyl_tRNA' OR cvterm.name = 'tyrosyl_tRNA' OR cvterm.name = 'valyl_tRNA' OR cvterm.name = 'pyrrolysyl_tRNA' OR cvterm.name = 'arginyl_tRNA' OR cvterm.name = 'selenocysteinyl_tRNA' OR cvterm.name = 'U1_snRNA' OR cvterm.name = 'U2_snRNA' OR cvterm.name = 'U4_snRNA' OR cvterm.name = 'U4atac_snRNA' OR cvterm.name = 'U5_snRNA' OR cvterm.name = 'U6_snRNA' OR cvterm.name = 'U6atac_snRNA' OR cvterm.name = 'U11_snRNA' OR cvterm.name = 'U12_snRNA' OR cvterm.name = 'C_D_box_snoRNA' OR cvterm.name = 'H_ACA_box_snoRNA' OR cvterm.name = 'U14_snoRNA' OR cvterm.name = 'U3_snoRNA' OR cvterm.name = 'methylation_guide_snoRNA' OR cvterm.name = 'pseudouridylation_guide_snoRNA' OR cvterm.name = 'miRNA' OR cvterm.name = 'RNA_6S' OR cvterm.name = 'CsrB_RsmB_RNA' OR cvterm.name = 'DsrA_RNA' OR cvterm.name = 'OxyS_RNA' OR cvterm.name = 'RprA_RNA' OR cvterm.name = 'RRE_RNA' OR cvterm.name = 'spot_42_RNA' OR cvterm.name = 'tmRNA' OR cvterm.name = 'GcvB_RNA' OR cvterm.name = 'MicF_RNA' OR cvterm.name = 'ribozyme' OR cvterm.name = 'trans_spliced_mRNA' OR cvterm.name = 'monocistronic_primary_transcript' OR cvterm.name = 'monocistronic_mRNA' OR cvterm.name = 'edited_transcript_by_A_to_I_substitution' OR cvterm.name = 'edited_mRNA' OR cvterm.name = 'edited_transcript_by_A_to_I_substitution' OR cvterm.name = 'attenuator' OR cvterm.name = 'terminator' OR cvterm.name = 'TF_binding_site' OR cvterm.name = 'polyA_signal_sequence' OR cvterm.name = 'gene_group_regulatory_region' OR cvterm.name = 'transcriptional_cis_regulatory_region' OR cvterm.name = 'splicing_regulatory_region' OR cvterm.name = 'cis_regulatory_frameshift_element' OR cvterm.name = 'bacterial_terminator' OR cvterm.name = 'eukaryotic_terminator' OR cvterm.name = 'rho_dependent_bacterial_terminator' OR cvterm.name = 'rho_independent_bacterial_terminator' OR cvterm.name = 'terminator_of_type_2_RNApol_III_promoter' OR cvterm.name = 'INR_motif' OR cvterm.name = 'DPE_motif' OR cvterm.name = 'BRE_motif' OR cvterm.name = 'CAAT_signal' OR cvterm.name = 'TATA_box' OR cvterm.name = 'A_box' OR cvterm.name = 'B_box' OR cvterm.name = 'C_box' OR cvterm.name = 'DRE_motif' OR cvterm.name = 'E_box_motif' OR cvterm.name = 'MTE' OR cvterm.name = 'INR1_motif' OR cvterm.name = 'GAGA_motif' OR cvterm.name = 'octamer_motif' OR cvterm.name = 'operator' OR cvterm.name = 'bacterial_RNApol_promoter' OR cvterm.name = 'bacterial_terminator' OR cvterm.name = 'rho_dependent_bacterial_terminator' OR cvterm.name = 'rho_independent_bacterial_terminator' OR cvterm.name = 'promoter' OR cvterm.name = 'insulator' OR cvterm.name = 'CRM' OR cvterm.name = 'promoter_targeting_sequence' OR cvterm.name = 'bidirectional_promoter' OR cvterm.name = 'RNA_polymerase_promoter' OR cvterm.name = 'RNApol_I_promoter' OR cvterm.name = 'RNApol_II_promoter' OR cvterm.name = 'RNApol_III_promoter' OR cvterm.name = 'bacterial_RNApol_promoter' OR cvterm.name = 'Phage_RNA_Polymerase_Promoter' OR cvterm.name = 'RNApol_III_promoter_type_1' OR cvterm.name = 'RNApol_III_promoter_type_2' OR cvterm.name = 'RNApol_III_promoter_type_3' OR cvterm.name = 'SP6_RNA_Polymerase_Promoter' OR cvterm.name = 'T3_RNA_Polymerase_Promoter' OR cvterm.name = 'T7_RNA_Polymerase_Promoter' OR cvterm.name = 'locus_control_region' OR cvterm.name = 'enhancer' OR cvterm.name = 'RNApol_II_promoter' OR cvterm.name = 'RNApol_III_promoter' OR cvterm.name = 'silencer' OR cvterm.name = 'enhancer_bound_by_factor' OR cvterm.name = 'shadow_enhancer' OR cvterm.name = 'RNApol_III_promoter_type_1' OR cvterm.name = 'RNApol_III_promoter_type_2' OR cvterm.name = 'RNApol_III_promoter_type_3' OR cvterm.name = 'splice_enhancer' OR cvterm.name = 'intronic_splice_enhancer' OR cvterm.name = 'exonic_splice_enhancer' OR cvterm.name = 'exon' OR cvterm.name = 'edited_transcript_feature' OR cvterm.name = 'mature_transcript_region' OR cvterm.name = 'primary_transcript_region' OR cvterm.name = 'exon_region' OR cvterm.name = 'anchor_binding_site' OR cvterm.name = 'coding_exon' OR cvterm.name = 'noncoding_exon' OR cvterm.name = 'interior_exon' OR cvterm.name = 'exon_of_single_exon_gene' OR cvterm.name = 'interior_coding_exon' OR cvterm.name = 'five_prime_coding_exon' OR cvterm.name = 'three_prime_coding_exon' OR cvterm.name = 'three_prime_noncoding_exon' OR cvterm.name = 'five_prime_noncoding_exon' OR cvterm.name = 'pre_edited_region' OR cvterm.name = 'editing_block' OR cvterm.name = 'editing_domain' OR cvterm.name = 'unedited_region' OR cvterm.name = 'mRNA_region' OR cvterm.name = 'tmRNA_region' OR cvterm.name = 'guide_RNA_region' OR cvterm.name = 'tRNA_region' OR cvterm.name = 'riboswitch' OR cvterm.name = 'UTR' OR cvterm.name = 'CDS' OR cvterm.name = 'codon' OR cvterm.name = 'five_prime_open_reading_frame' OR cvterm.name = 'UTR_region' OR cvterm.name = 'CDS_region' OR cvterm.name = 'translational_frameshift' OR cvterm.name = 'recoding_stimulatory_region' OR cvterm.name = 'five_prime_UTR' OR cvterm.name = 'three_prime_UTR' OR cvterm.name = 'internal_UTR' OR cvterm.name = 'untranslated_region_polycistronic_mRNA' OR cvterm.name = 'edited_CDS' OR cvterm.name = 'CDS_fragment' OR cvterm.name = 'CDS_independently_known' OR cvterm.name = 'CDS_predicted' OR cvterm.name = 'orphan_CDS' OR cvterm.name = 'CDS_supported_by_sequence_similarity_data' OR cvterm.name = 'CDS_supported_by_domain_match_data' OR cvterm.name = 'CDS_supported_by_EST_or_cDNA_data' OR cvterm.name = 'recoded_codon' OR cvterm.name = 'start_codon' OR cvterm.name = 'stop_codon' OR cvterm.name = 'stop_codon_read_through' OR cvterm.name = 'stop_codon_redefined_as_pyrrolysine' OR cvterm.name = 'stop_codon_redefined_as_selenocysteine' OR cvterm.name = 'non_canonical_start_codon' OR cvterm.name = 'four_bp_start_codon' OR cvterm.name = 'CTG_start_codon' OR cvterm.name = 'ribosome_entry_site' OR cvterm.name = 'polyA_site' OR cvterm.name = 'upstream_AUG_codon' OR cvterm.name = 'AU_rich_element' OR cvterm.name = 'Bruno_response_element' OR cvterm.name = 'iron_responsive_element' OR cvterm.name = 'internal_ribosome_entry_site' OR cvterm.name = 'Shine_Dalgarno_sequence' OR cvterm.name = 'internal_Shine_Dalgarno_sequence' OR cvterm.name = 'coding_start' OR cvterm.name = 'coding_end' OR cvterm.name = 'plus_1_translational_frameshift' OR cvterm.name = 'plus_2_translational_frameshift' OR cvterm.name = 'internal_Shine_Dalgarno_sequence' OR cvterm.name = 'SECIS_element' OR cvterm.name = 'three_prime_recoding_site' OR cvterm.name = 'five_prime_recoding_site' OR cvterm.name = 'stop_codon_signal' OR cvterm.name = 'three_prime_stem_loop_structure' OR cvterm.name = 'flanking_three_prime_quadruplet_recoding_signal' OR cvterm.name = 'three_prime_repeat_recoding_signal' OR cvterm.name = 'distant_three_prime_recoding_signal' OR cvterm.name = 'UAG_stop_codon_signal' OR cvterm.name = 'UAA_stop_codon_signal' OR cvterm.name = 'UGA_stop_codon_signal' OR cvterm.name = 'tmRNA_coding_piece' OR cvterm.name = 'tmRNA_acceptor_piece' OR cvterm.name = 'anchor_region' OR cvterm.name = 'template_region' OR cvterm.name = 'anticodon_loop' OR cvterm.name = 'anticodon' OR cvterm.name = 'CCA_tail' OR cvterm.name = 'DHU_loop' OR cvterm.name = 'T_loop' OR cvterm.name = 'splice_site' OR cvterm.name = 'intron' OR cvterm.name = 'clip' OR cvterm.name = 'TSS' OR cvterm.name = 'transcription_end_site' OR cvterm.name = 'spliced_leader_RNA' OR cvterm.name = 'rRNA_primary_transcript_region' OR cvterm.name = 'spliceosomal_intron_region' OR cvterm.name = 'intron_domain' OR cvterm.name = 'miRNA_primary_transcript_region' OR cvterm.name = 'outron' OR cvterm.name = 'cis_splice_site' OR cvterm.name = 'trans_splice_site' OR cvterm.name = 'five_prime_cis_splice_site' OR cvterm.name = 'three_prime_cis_splice_site' OR cvterm.name = 'recursive_splice_site' OR cvterm.name = 'canonical_five_prime_splice_site' OR cvterm.name = 'non_canonical_five_prime_splice_site' OR cvterm.name = 'canonical_three_prime_splice_site' OR cvterm.name = 'non_canonical_three_prime_splice_site' OR cvterm.name = 'trans_splice_acceptor_site' OR cvterm.name = 'trans_splice_donor_site' OR cvterm.name = 'SL1_acceptor_site' OR cvterm.name = 'SL2_acceptor_site' OR cvterm.name = 'five_prime_intron' OR cvterm.name = 'interior_intron' OR cvterm.name = 'three_prime_intron' OR cvterm.name = 'twintron' OR cvterm.name = 'UTR_intron' OR cvterm.name = 'autocatalytically_spliced_intron' OR cvterm.name = 'spliceosomal_intron' OR cvterm.name = 'mobile_intron' OR cvterm.name = 'endonuclease_spliced_intron' OR cvterm.name = 'five_prime_UTR_intron' OR cvterm.name = 'three_prime_UTR_intron' OR cvterm.name = 'group_I_intron' OR cvterm.name = 'group_II_intron' OR cvterm.name = 'group_III_intron' OR cvterm.name = 'group_IIA_intron' OR cvterm.name = 'group_IIB_intron' OR cvterm.name = 'U2_intron' OR cvterm.name = 'U12_intron' OR cvterm.name = 'archaeal_intron' OR cvterm.name = 'tRNA_intron' OR cvterm.name = 'five_prime_clip' OR cvterm.name = 'three_prime_clip' OR cvterm.name = 'major_TSS' OR cvterm.name = 'minor_TSS' OR cvterm.name = 'transcribed_spacer_region' OR cvterm.name = 'internal_transcribed_spacer_region' OR cvterm.name = 'external_transcribed_spacer_region' OR cvterm.name = 'intronic_splice_enhancer' OR cvterm.name = 'branch_site' OR cvterm.name = 'polypyrimidine_tract' OR cvterm.name = 'internal_guide_sequence' OR cvterm.name = 'mirtron' OR cvterm.name = 'pre_miRNA' OR cvterm.name = 'miRNA_stem' OR cvterm.name = 'miRNA_loop' OR cvterm.name = 'miRNA_antiguide' OR cvterm.name = 'noncoding_region_of_exon' OR cvterm.name = 'coding_region_of_exon' OR cvterm.name = 'three_prime_coding_exon_noncoding_region' OR cvterm.name = 'five_prime_coding_exon_noncoding_region' OR cvterm.name = 'five_prime_coding_exon_coding_region' OR cvterm.name = 'three_prime_coding exon_coding_region' OR cvterm.name = 'mature_protein_region' OR cvterm.name = 'immature_peptide_region' OR cvterm.name = 'compositionally_biased_region_of_peptide' OR cvterm.name = 'polypeptide_structural_region' OR cvterm.name = 'polypeptide_variation_site' OR cvterm.name = 'cleaved_peptide_region' OR cvterm.name = 'hydrophobic_region_of_peptide' OR cvterm.name = 'polypeptide_conserved_region' OR cvterm.name = 'active_peptide' OR cvterm.name = 'polypeptide_domain' OR cvterm.name = 'membrane_structure' OR cvterm.name = 'extramembrane_polypeptide_region' OR cvterm.name = 'intramembrane_polypeptide_region' OR cvterm.name = 'polypeptide_secondary_structure' OR cvterm.name = 'polypeptide_structural_motif' OR cvterm.name = 'intrinsically_unstructured_polypeptide_region' OR cvterm.name = 'cytoplasmic_polypeptide_region' OR cvterm.name = 'non_cytoplasmic_polypeptide_region' OR cvterm.name = 'membrane_peptide_loop' OR cvterm.name = 'transmembrane_polypeptide_region' OR cvterm.name = 'asx_motif' OR cvterm.name = 'beta_bulge' OR cvterm.name = 'beta_bulge_loop' OR cvterm.name = 'beta_strand' OR cvterm.name = 'peptide_helix' OR cvterm.name = 'polypeptide_nest_motif' OR cvterm.name = 'schellmann_loop' OR cvterm.name = 'serine_threonine_motif' OR cvterm.name = 'serine_threonine_staple_motif' OR cvterm.name = 'polypeptide_turn_motif' OR cvterm.name = 'catmat_left_handed_three' OR cvterm.name = 'catmat_left_handed_four' OR cvterm.name = 'catmat_right_handed_three' OR cvterm.name = 'catmat_right_handed_four' OR cvterm.name = 'alpha_beta_motif' OR cvterm.name = 'peptide_coil' OR cvterm.name = 'beta_bulge_loop_five' OR cvterm.name = 'beta_bulge_loop_six' OR cvterm.name = 'antiparallel_beta_strand' OR cvterm.name = 'parallel_beta_strand' OR cvterm.name = 'left_handed_peptide_helix' OR cvterm.name = 'right_handed_peptide_helix' OR cvterm.name = 'alpha_helix' OR cvterm.name = 'pi_helix' OR cvterm.name = 'three_ten_helix' OR cvterm.name = 'polypeptide_nest_left_right_motif' OR cvterm.name = 'polypeptide_nest_right_left_motif' OR cvterm.name = 'schellmann_loop_seven' OR cvterm.name = 'schellmann_loop_six' OR cvterm.name = 'asx_turn' OR cvterm.name = 'beta_turn' OR cvterm.name = 'gamma_turn' OR cvterm.name = 'serine_threonine_turn' OR cvterm.name = 'asx_turn_left_handed_type_one' OR cvterm.name = 'asx_turn_left_handed_type_two' OR cvterm.name = 'asx_turn_right_handed_type_two' OR cvterm.name = 'asx_turn_right_handed_type_one' OR cvterm.name = 'beta_turn_left_handed_type_one' OR cvterm.name = 'beta_turn_left_handed_type_two' OR cvterm.name = 'beta_turn_right_handed_type_one' OR cvterm.name = 'beta_turn_right_handed_type_two' OR cvterm.name = 'beta_turn_type_six' OR cvterm.name = 'beta_turn_type_eight' OR cvterm.name = 'beta_turn_type_six_a' OR cvterm.name = 'beta_turn_type_six_b' OR cvterm.name = 'beta_turn_type_six_a_one' OR cvterm.name = 'beta_turn_type_six_a_two' OR cvterm.name = 'gamma_turn_classic' OR cvterm.name = 'gamma_turn_inverse' OR cvterm.name = 'st_turn_left_handed_type_one' OR cvterm.name = 'st_turn_left_handed_type_two' OR cvterm.name = 'st_turn_right_handed_type_one' OR cvterm.name = 'st_turn_right_handed_type_two' OR cvterm.name = 'coiled_coil' OR cvterm.name = 'helix_turn_helix' OR cvterm.name = 'natural_variant_site' OR cvterm.name = 'mutated_variant_site' OR cvterm.name = 'alternate_sequence_site' OR cvterm.name = 'signal_peptide' OR cvterm.name = 'cleaved_initiator_methionine' OR cvterm.name = 'transit_peptide' OR cvterm.name = 'intein' OR cvterm.name = 'propeptide_cleavage_site' OR cvterm.name = 'propeptide' OR cvterm.name = 'cleaved_for_gpi_anchor_region' OR cvterm.name = 'lipoprotein_signal_peptide' OR cvterm.name = 'n_terminal_region' OR cvterm.name = 'c_terminal_region' OR cvterm.name = 'central_hydrophobic_region_of_signal_peptide' OR cvterm.name = 'polypeptide_domain' OR cvterm.name = 'polypeptide_motif' OR cvterm.name = 'polypeptide_repeat' OR cvterm.name = 'biochemical_region_of_peptide' OR cvterm.name = 'polypeptide_conserved_motif' OR cvterm.name = 'post_translationally_modified_region' OR cvterm.name = 'conformational_switch' OR cvterm.name = 'molecular_contact_region' OR cvterm.name = 'polypeptide_binding_motif' OR cvterm.name = 'polypeptide_catalytic_motif' OR cvterm.name = 'polypeptide_metal_contact' OR cvterm.name = 'protein_protein_contact' OR cvterm.name = 'polypeptide_ligand_contact' OR cvterm.name = 'polypeptide_DNA_contact' OR cvterm.name = 'polypeptide_calcium_ion_contact_site' OR cvterm.name = 'polypeptide_cobalt_ion_contact_site' OR cvterm.name = 'polypeptide_copper_ion_contact_site' OR cvterm.name = 'polypeptide_iron_ion_contact_site' OR cvterm.name = 'polypeptide_magnesium_ion_contact_site' OR cvterm.name = 'polypeptide_manganese_ion_contact_site' OR cvterm.name = 'polypeptide_molybdenum_ion_contact_site' OR cvterm.name = 'polypeptide_nickel_ion_contact_site' OR cvterm.name = 'polypeptide_tungsten_ion_contact_site' OR cvterm.name = 'polypeptide_zinc_ion_contact_site' OR cvterm.name = 'non_transcribed_region' OR cvterm.name = 'gene_fragment' OR cvterm.name = 'TSS_region' OR cvterm.name = 'gene_segment' OR cvterm.name = 'mobile_intron' OR cvterm.name = 'extrachromosomal_mobile_genetic_element' OR cvterm.name = 'integrated_mobile_genetic_element' OR cvterm.name = 'viral_sequence' OR cvterm.name = 'natural_plasmid' OR cvterm.name = 'phage_sequence' OR cvterm.name = 'ds_RNA_viral_sequence' OR cvterm.name = 'ds_DNA_viral_sequence' OR cvterm.name = 'ss_RNA_viral_sequence' OR cvterm.name = 'negative_sense_ssRNA_viral_sequence' OR cvterm.name = 'positive_sense_ssRNA_viral_sequence' OR cvterm.name = 'ambisense_ssRNA_viral_sequence' OR cvterm.name = 'natural_transposable_element' OR cvterm.name = 'transposable_element' OR cvterm.name = 'proviral_region' OR cvterm.name = 'integron' OR cvterm.name = 'genomic_island' OR cvterm.name = 'integrated_plasmid' OR cvterm.name = 'cointegrated_plasmid' OR cvterm.name = 'retrotransposon' OR cvterm.name = 'DNA_transposon' OR cvterm.name = 'foreign_transposable_element' OR cvterm.name = 'transgenic_transposable_element' OR cvterm.name = 'natural_transposable_element' OR cvterm.name = 'engineered_transposable_element' OR cvterm.name = 'transposon_fragment' OR cvterm.name = 'LTR_retrotransposon' OR cvterm.name = 'non_LTR_retrotransposon' OR cvterm.name = 'RR_tract' OR cvterm.name = 'LINE_element' OR cvterm.name = 'SINE_element' OR cvterm.name = 'terminal_inverted_repeat_element' OR cvterm.name = 'foldback_element' OR cvterm.name = 'conjugative_transposon' OR cvterm.name = 'helitron' OR cvterm.name = 'MITE' OR cvterm.name = 'insertion_sequence' OR cvterm.name = 'polinton' OR cvterm.name = 'engineered_foreign_transposable_element' OR cvterm.name = 'engineered_foreign_transposable_element' OR cvterm.name = 'prophage' OR cvterm.name = 'pathogenic_island' OR cvterm.name = 'metabolic_island' OR cvterm.name = 'adaptive_island' OR cvterm.name = 'symbiosis_island' OR cvterm.name = 'cryptic_prophage' OR cvterm.name = 'defective_conjugative_transposon' OR cvterm.name = 'plasmid' OR cvterm.name = 'chromosome' OR cvterm.name = 'vector_replicon' OR cvterm.name = 'maxicircle' OR cvterm.name = 'minicircle' OR cvterm.name = 'viral_sequence' OR cvterm.name = 'engineered_plasmid' OR cvterm.name = 'episome' OR cvterm.name = 'natural_plasmid' OR cvterm.name = 'engineered_episome' OR cvterm.name = 'gene_trap_construct' OR cvterm.name = 'promoter_trap_construct' OR cvterm.name = 'enhancer_trap_construct' OR cvterm.name = 'engineered_episome' OR cvterm.name = 'natural_transposable_element' OR cvterm.name = 'mitochondrial_chromosome' OR cvterm.name = 'chloroplast_chromosome' OR cvterm.name = 'chromoplast_chromosome' OR cvterm.name = 'cyanelle_chromosome' OR cvterm.name = 'leucoplast_chromosome' OR cvterm.name = 'macronuclear_chromosome' OR cvterm.name = 'micronuclear_chromosome' OR cvterm.name = 'nuclear_chromosome' OR cvterm.name = 'nucleomorphic_chromosome' OR cvterm.name = 'DNA_chromosome' OR cvterm.name = 'RNA_chromosome' OR cvterm.name = 'apicoplast_chromosome' OR cvterm.name = 'double_stranded_DNA_chromosome' OR cvterm.name = 'single_stranded_DNA_chromosome' OR cvterm.name = 'linear_double_stranded_DNA_chromosome' OR cvterm.name = 'circular_double_stranded_DNA_chromosome' OR cvterm.name = 'linear_single_stranded_DNA_chromosome' OR cvterm.name = 'circular_single_stranded_DNA_chromosome' OR cvterm.name = 'single_stranded_RNA_chromosome' OR cvterm.name = 'double_stranded_RNA_chromosome' OR cvterm.name = 'linear_single_stranded_RNA_chromosome' OR cvterm.name = 'circular_single_stranded_RNA_chromosome' OR cvterm.name = 'linear_double_stranded_RNA_chromosome' OR cvterm.name = 'circular_double_stranded_RNA_chromosome' OR cvterm.name = 'YAC' OR cvterm.name = 'BAC' OR cvterm.name = 'PAC' OR cvterm.name = 'cosmid' OR cvterm.name = 'phagemid' OR cvterm.name = 'fosmid' OR cvterm.name = 'lambda_vector' OR cvterm.name = 'plasmid_vector' OR cvterm.name = 'phage_sequence' OR cvterm.name = 'ds_RNA_viral_sequence' OR cvterm.name = 'ds_DNA_viral_sequence' OR cvterm.name = 'ss_RNA_viral_sequence' OR cvterm.name = 'negative_sense_ssRNA_viral_sequence' OR cvterm.name = 'positive_sense_ssRNA_viral_sequence' OR cvterm.name = 'ambisense_ssRNA_viral_sequence' OR cvterm.name = 'modified_RNA_base_feature' OR cvterm.name = 'modified_base_site' OR cvterm.name = 'inosine' OR cvterm.name = 'seven_methylguanine' OR cvterm.name = 'ribothymidine' OR cvterm.name = 'modified_adenosine' OR cvterm.name = 'modified_cytidine' OR cvterm.name = 'modified_guanosine' OR cvterm.name = 'modified_uridine' OR cvterm.name = 'modified_inosine' OR cvterm.name = 'methylinosine' OR cvterm.name = 'one_methylinosine' OR cvterm.name = 'one_two_prime_O_dimethylinosine' OR cvterm.name = 'two_prime_O_methylinosine' OR cvterm.name = 'one_methyladenosine' OR cvterm.name = 'two_methyladenosine' OR cvterm.name = 'N6_methyladenosine' OR cvterm.name = 'two_prime_O_methyladenosine' OR cvterm.name = 'two_methylthio_N6_methyladenosine' OR cvterm.name = 'N6_isopentenyladenosine' OR cvterm.name = 'two_methylthio_N6_isopentenyladenosine' OR cvterm.name = 'N6_cis_hydroxyisopentenyl_adenosine' OR cvterm.name = 'two_methylthio_N6_cis_hydroxyisopentenyl_adenosine' OR cvterm.name = 'N6_glycinylcarbamoyladenosine' OR cvterm.name = 'N6_threonylcarbamoyladenosine' OR cvterm.name = 'two_methylthio_N6_threonyl_carbamoyladenosine' OR cvterm.name = 'N6_methyl_N6_threonylcarbamoyladenosine' OR cvterm.name = 'N6_hydroxynorvalylcarbamoyladenosine' OR cvterm.name = 'two_methylthio_N6_hydroxynorvalyl_carbamoyladenosine' OR cvterm.name = 'two_prime_O_ribosyladenosine_phosphate' OR cvterm.name = 'N6_N6_dimethyladenosine' OR cvterm.name = 'N6_2_prime_O_dimethyladenosine' OR cvterm.name = 'N6_N6_2_prime_O_trimethyladenosine' OR cvterm.name = 'one_two_prime_O_dimethyladenosine' OR cvterm.name = 'N6_acetyladenosine' OR cvterm.name = 'three_methylcytidine' OR cvterm.name = 'five_methylcytidine' OR cvterm.name = 'two_prime_O_methylcytidine' OR cvterm.name = 'two_thiocytidine' OR cvterm.name = 'N4_acetylcytidine' OR cvterm.name = 'five_formylcytidine' OR cvterm.name = 'five_two_prime_O_dimethylcytidine' OR cvterm.name = 'N4_acetyl_2_prime_O_methylcytidine' OR cvterm.name = 'lysidine' OR cvterm.name = 'N4_methylcytidine' OR cvterm.name = 'N4_2_prime_O_dimethylcytidine' OR cvterm.name = 'five_hydroxymethylcytidine' OR cvterm.name = 'five_formyl_two_prime_O_methylcytidine' OR cvterm.name = 'N4_N4_2_prime_O_trimethylcytidine' OR cvterm.name = 'seven_deazaguanosine' OR cvterm.name = 'one_methylguanosine' OR cvterm.name = 'N2_methylguanosine' OR cvterm.name = 'seven_methylguanosine' OR cvterm.name = 'two_prime_O_methylguanosine' OR cvterm.name = 'N2_N2_dimethylguanosine' OR cvterm.name = 'N2_2_prime_O_dimethylguanosine' OR cvterm.name = 'N2_N2_2_prime_O_trimethylguanosine' OR cvterm.name = 'two_prime_O_ribosylguanosine_phosphate' OR cvterm.name = 'wybutosine' OR cvterm.name = 'peroxywybutosine' OR cvterm.name = 'hydroxywybutosine' OR cvterm.name = 'undermodified_hydroxywybutosine' OR cvterm.name = 'wyosine' OR cvterm.name = 'methylwyosine' OR cvterm.name = 'N2_7_dimethylguanosine' OR cvterm.name = 'N2_N2_7_trimethylguanosine' OR cvterm.name = 'one_two_prime_O_dimethylguanosine' OR cvterm.name = 'four_demethylwyosine' OR cvterm.name = 'isowyosine' OR cvterm.name = 'N2_7_2prirme_O_trimethylguanosine' OR cvterm.name = 'queuosine' OR cvterm.name = 'epoxyqueuosine' OR cvterm.name = 'galactosyl_queuosine' OR cvterm.name = 'mannosyl_queuosine' OR cvterm.name = 'seven_cyano_seven_deazaguanosine' OR cvterm.name = 'seven_aminomethyl_seven_deazaguanosine' OR cvterm.name = 'archaeosine' OR cvterm.name = 'dihydrouridine' OR cvterm.name = 'pseudouridine' OR cvterm.name = 'five_methyluridine' OR cvterm.name = 'two_prime_O_methyluridine' OR cvterm.name = 'five_two_prime_O_dimethyluridine' OR cvterm.name = 'one_methylpseudouridine' OR cvterm.name = 'two_prime_O_methylpseudouridine' OR cvterm.name = 'two_thiouridine' OR cvterm.name = 'four_thiouridine' OR cvterm.name = 'five_methyl_2_thiouridine' OR cvterm.name = 'two_thio_two_prime_O_methyluridine' OR cvterm.name = 'three_three_amino_three_carboxypropyl_uridine' OR cvterm.name = 'five_hydroxyuridine' OR cvterm.name = 'five_methoxyuridine' OR cvterm.name = 'uridine_five_oxyacetic_acid' OR cvterm.name = 'uridine_five_oxyacetic_acid_methyl_ester' OR cvterm.name = 'five_carboxyhydroxymethyl_uridine' OR cvterm.name = 'five_carboxyhydroxymethyl_uridine_methyl_ester' OR cvterm.name = 'five_methoxycarbonylmethyluridine' OR cvterm.name = 'five_methoxycarbonylmethyl_two_prime_O_methyluridine' OR cvterm.name = 'five_methoxycarbonylmethyl_two_thiouridine' OR cvterm.name = 'five_aminomethyl_two_thiouridine' OR cvterm.name = 'five_methylaminomethyluridine' OR cvterm.name = 'five_methylaminomethyl_two_thiouridine' OR cvterm.name = 'five_methylaminomethyl_two_selenouridine' OR cvterm.name = 'five_carbamoylmethyluridine' OR cvterm.name = 'five_carbamoylmethyl_two_prime_O_methyluridine' OR cvterm.name = 'five_carboxymethylaminomethyluridine' OR cvterm.name = 'five_carboxymethylaminomethyl_two_prime_O_methyluridine' OR cvterm.name = 'five_carboxymethylaminomethyl_two_thiouridine' OR cvterm.name = 'three_methyluridine' OR cvterm.name = 'one_methyl_three_three_amino_three_carboxypropyl_pseudouridine' OR cvterm.name = 'five_carboxymethyluridine' OR cvterm.name = 'three_two_prime_O_dimethyluridine' OR cvterm.name = 'five_methyldihydrouridine' OR cvterm.name = 'three_methylpseudouridine' OR cvterm.name = 'five_taurinomethyluridine' OR cvterm.name = 'five_taurinomethyl_two_thiouridine' OR cvterm.name = 'five_isopentenylaminomethyl_uridine' OR cvterm.name = 'five_isopentenylaminomethyl_two_thiouridine' OR cvterm.name = 'five_isopentenylaminomethyl_two_prime_O_methyluridine' OR cvterm.name = 'methylated_base_feature' OR cvterm.name = 'methylated_C' OR cvterm.name = 'methylated_A' OR cvterm.name = 'catalytic_residue' OR cvterm.name = 'modified_amino_acid_feature' OR cvterm.name = 'alanine' OR cvterm.name = 'valine' OR cvterm.name = 'leucine' OR cvterm.name = 'isoleucine' OR cvterm.name = 'proline' OR cvterm.name = 'tryptophan' OR cvterm.name = 'phenylalanine' OR cvterm.name = 'methionine' OR cvterm.name = 'glycine' OR cvterm.name = 'serine' OR cvterm.name = 'threonine' OR cvterm.name = 'tyrosine' OR cvterm.name = 'cysteine' OR cvterm.name = 'glutamine' OR cvterm.name = 'asparagine' OR cvterm.name = 'lysine' OR cvterm.name = 'argenine' OR cvterm.name = 'histidine' OR cvterm.name = 'aspartic_acid' OR cvterm.name = 'glutamic_acid' OR cvterm.name = 'selenocysteine' OR cvterm.name = 'pyrrolysine' OR cvterm.name = 'modified_glycine' OR cvterm.name = 'modified_L_alanine' OR cvterm.name = 'modified_L_asparagine' OR cvterm.name = 'modified_L_aspartic_acid' OR cvterm.name = 'modified_L_cysteine' OR cvterm.name = 'modified_L_glutamic_acid' OR cvterm.name = 'modified_L_threonine' OR cvterm.name = 'modified_L_tryptophan' OR cvterm.name = 'modified_L_glutamine' OR cvterm.name = 'modified_L_methionine' OR cvterm.name = 'modified_L_isoleucine' OR cvterm.name = 'modified_L_phenylalanine' OR cvterm.name = 'modified_L_histidine' OR cvterm.name = 'modified_L_serine' OR cvterm.name = 'modified_L_lysine' OR cvterm.name = 'modified_L_leucine' OR cvterm.name = 'modified_L_selenocysteine' OR cvterm.name = 'modified_L_valine' OR cvterm.name = 'modified_L_proline' OR cvterm.name = 'modified_L_tyrosine' OR cvterm.name = 'modified_L_arginine' OR cvterm.name = 'operon' OR cvterm.name = 'gene_array' OR cvterm.name = 'gene_subarray' OR cvterm.name = 'gene_cassette_array' OR cvterm.name = 'regulon' OR cvterm.name = 'sequence_length_variation' OR cvterm.name = 'SNP' OR cvterm.name = 'complex_substitution' OR cvterm.name = 'point_mutation' OR cvterm.name = 'simple_sequence_length_variation' OR cvterm.name = 'MNP' OR cvterm.name = 'transition' OR cvterm.name = 'transversion' OR cvterm.name = 'pyrimidine_transition' OR cvterm.name = 'purine_transition' OR cvterm.name = 'C_to_T_transition' OR cvterm.name = 'T_to_C_transition' OR cvterm.name = 'C_to_T_transition_at_pCpG_site' OR cvterm.name = 'A_to_G_transition' OR cvterm.name = 'G_to_A_transition' OR cvterm.name = 'pyrimidine_to_purine_transversion' OR cvterm.name = 'purine_to_pyrimidine_transversion' OR cvterm.name = 'C_to_A_transversion' OR cvterm.name = 'C_to_G_transversion' OR cvterm.name = 'T_to_A_transversion' OR cvterm.name = 'T_to_G_transversion' OR cvterm.name = 'A_to_C_transversion' OR cvterm.name = 'A_to_T_transversion' OR cvterm.name = 'G_to_C_transversion' OR cvterm.name = 'G_to_T_transversion' OR cvterm.name = 'biological_region';

--- ************************************************
--- *** relation: topologically_defined_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region that is defined according to it ***
--- *** s relations with other regions within th ***
--- *** e same sequence.                         ***
--- ************************************************
---

CREATE VIEW topologically_defined_region AS
  SELECT
    feature_id AS topologically_defined_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'flanking_region' OR cvterm.name = 'repeat_region' OR cvterm.name = 'repeat_unit' OR cvterm.name = 'repeat_component' OR cvterm.name = 'transposable_element_flanking_region' OR cvterm.name = 'five_prime_flanking_region' OR cvterm.name = 'three_prime_flanking_region' OR cvterm.name = 'long_terminal_repeat' OR cvterm.name = 'engineered_foreign_repetitive_element' OR cvterm.name = 'inverted_repeat' OR cvterm.name = 'direct_repeat' OR cvterm.name = 'non_LTR_retrotransposon_polymeric_tract' OR cvterm.name = 'dispersed_repeat' OR cvterm.name = 'tandem_repeat' OR cvterm.name = 'repeat_fragment' OR cvterm.name = 'five_prime_LTR' OR cvterm.name = 'three_prime_LTR' OR cvterm.name = 'solo_LTR' OR cvterm.name = 'terminal_inverted_repeat' OR cvterm.name = 'five_prime_terminal_inverted_repeat' OR cvterm.name = 'three_prime_terminal_inverted_repeat' OR cvterm.name = 'target_site_duplication' OR cvterm.name = 'CRISPR' OR cvterm.name = 'satellite_DNA' OR cvterm.name = 'microsatellite' OR cvterm.name = 'minisatellite' OR cvterm.name = 'dinucleotide_repeat_microsatellite_feature' OR cvterm.name = 'trinucleotide_repeat_microsatellite_feature' OR cvterm.name = 'tetranucleotide_repeat_microsatellite_feature' OR cvterm.name = 'non_LTR_retrotransposon_polymeric_tract' OR cvterm.name = 'LTR_component' OR cvterm.name = 'repeat_fragment' OR cvterm.name = 'U5_LTR_region' OR cvterm.name = 'R_LTR_region' OR cvterm.name = 'U3_LTR_region' OR cvterm.name = 'three_prime_LTR_component' OR cvterm.name = 'five_prime_LTR_component' OR cvterm.name = 'U5_five_prime_LTR_region' OR cvterm.name = 'R_five_prime_LTR_region' OR cvterm.name = 'U3_five_prime_LTR_region' OR cvterm.name = 'R_three_prime_LTR_region' OR cvterm.name = 'U3_three_prime_LTR_region' OR cvterm.name = 'U5_three_prime_LTR_region' OR cvterm.name = 'R_five_prime_LTR_region' OR cvterm.name = 'U5_five_prime_LTR_region' OR cvterm.name = 'U3_five_prime_LTR_region' OR cvterm.name = 'topologically_defined_region';

--- ************************************************
--- *** relation: translocation_breakpoint ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The point within a chromosome where a tr ***
--- *** anslocation begins or ends.              ***
--- ************************************************
---

CREATE VIEW translocation_breakpoint AS
  SELECT
    feature_id AS translocation_breakpoint_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'translocation_breakpoint';

--- ************************************************
--- *** relation: insertion_breakpoint ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The point within a chromosome where a in ***
--- *** sertion begins or ends.                  ***
--- ************************************************
---

CREATE VIEW insertion_breakpoint AS
  SELECT
    feature_id AS insertion_breakpoint_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'insertion_breakpoint';

--- ************************************************
--- *** relation: deletion_breakpoint ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The point within a chromosome where a de ***
--- *** letion begins or ends.                   ***
--- ************************************************
---

CREATE VIEW deletion_breakpoint AS
  SELECT
    feature_id AS deletion_breakpoint_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'deletion_breakpoint';

--- ************************************************
--- *** relation: five_prime_flanking_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A flanking region located five prime of  ***
--- *** a specific region.                       ***
--- ************************************************
---

CREATE VIEW five_prime_flanking_region AS
  SELECT
    feature_id AS five_prime_flanking_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_prime_flanking_region';

--- ************************************************
--- *** relation: three_prime_flanking_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A flanking region located three prime of ***
--- ***  a specific region.                      ***
--- ************************************************
---

CREATE VIEW three_prime_flanking_region AS
  SELECT
    feature_id AS three_prime_flanking_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'three_prime_flanking_region';

--- ************************************************
--- *** relation: transcribed_fragment ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An experimental region, defined by a til ***
--- *** ing array experiment to be transcribed a ***
--- *** t some level.                            ***
--- ************************************************
---

CREATE VIEW transcribed_fragment AS
  SELECT
    feature_id AS transcribed_fragment_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'transcribed_fragment';

--- ************************************************
--- *** relation: cis_splice_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Intronic 2 bp region bordering exon. A s ***
--- *** plice_site that adjacent_to exon and ove ***
--- *** rlaps intron.                            ***
--- ************************************************
---

CREATE VIEW cis_splice_site AS
  SELECT
    feature_id AS cis_splice_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_prime_cis_splice_site' OR cvterm.name = 'three_prime_cis_splice_site' OR cvterm.name = 'recursive_splice_site' OR cvterm.name = 'canonical_five_prime_splice_site' OR cvterm.name = 'non_canonical_five_prime_splice_site' OR cvterm.name = 'canonical_three_prime_splice_site' OR cvterm.name = 'non_canonical_three_prime_splice_site' OR cvterm.name = 'cis_splice_site';

--- ************************************************
--- *** relation: trans_splice_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Primary transcript region bordering tran ***
--- *** s-splice junction.                       ***
--- ************************************************
---

CREATE VIEW trans_splice_site AS
  SELECT
    feature_id AS trans_splice_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'trans_splice_acceptor_site' OR cvterm.name = 'trans_splice_donor_site' OR cvterm.name = 'SL1_acceptor_site' OR cvterm.name = 'SL2_acceptor_site' OR cvterm.name = 'trans_splice_site';

--- ************************************************
--- *** relation: splice_junction ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The boundary between an intron and an ex ***
--- *** on.                                      ***
--- ************************************************
---

CREATE VIEW splice_junction AS
  SELECT
    feature_id AS splice_junction_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'splice_junction';

--- ************************************************
--- *** relation: conformational_switch ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of a polypeptide, involved in t ***
--- *** he transition from one conformational st ***
--- *** ate to another.                          ***
--- ************************************************
---

CREATE VIEW conformational_switch AS
  SELECT
    feature_id AS conformational_switch_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'conformational_switch';

--- ************************************************
--- *** relation: dye_terminator_read ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A read produced by the dye terminator me ***
--- *** thod of sequencing.                      ***
--- ************************************************
---

CREATE VIEW dye_terminator_read AS
  SELECT
    feature_id AS dye_terminator_read_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'dye_terminator_read';

--- ************************************************
--- *** relation: pyrosequenced_read ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A read produced by pyrosequencing techno ***
--- *** logy.                                    ***
--- ************************************************
---

CREATE VIEW pyrosequenced_read AS
  SELECT
    feature_id AS pyrosequenced_read_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'pyrosequenced_read';

--- ************************************************
--- *** relation: ligation_based_read ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A read produced by ligation based sequen ***
--- *** cing technologies.                       ***
--- ************************************************
---

CREATE VIEW ligation_based_read AS
  SELECT
    feature_id AS ligation_based_read_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'ligation_based_read';

--- ************************************************
--- *** relation: polymerase_synthesis_read ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A read produced by the polymerase based  ***
--- *** sequence by synthesis method.            ***
--- ************************************************
---

CREATE VIEW polymerase_synthesis_read AS
  SELECT
    feature_id AS polymerase_synthesis_read_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polymerase_synthesis_read';

--- ************************************************
--- *** relation: cis_regulatory_frameshift_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A structural region in an RNA molecule w ***
--- *** hich promotes ribosomal frameshifting of ***
--- ***  cis coding sequence.                    ***
--- ************************************************
---

CREATE VIEW cis_regulatory_frameshift_element AS
  SELECT
    feature_id AS cis_regulatory_frameshift_element_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'cis_regulatory_frameshift_element';

--- ************************************************
--- *** relation: expressed_sequence_assembly ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence assembly derived from express ***
--- *** ed sequences.                            ***
--- ************************************************
---

CREATE VIEW expressed_sequence_assembly AS
  SELECT
    feature_id AS expressed_sequence_assembly_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'expressed_sequence_assembly';

--- ************************************************
--- *** relation: dna_binding_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of a molecule that binds to DNA ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW dna_binding_site AS
  SELECT
    feature_id AS dna_binding_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'DNA_binding_site';

--- ************************************************
--- *** relation: polya_junction ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The boundary between the UTR and the pol ***
--- *** yA sequence.                             ***
--- ************************************************
---

CREATE VIEW polya_junction AS
  SELECT
    feature_id AS polya_junction_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polyA_junction';

--- ************************************************
--- *** relation: cryptic_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is not transcribed under nor ***
--- *** mal conditions and is not critical to no ***
--- *** rmal cellular functioning.               ***
--- ************************************************
---

CREATE VIEW cryptic_gene AS
  SELECT
    feature_id AS cryptic_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'cryptogene' OR cvterm.name = 'cryptic_gene';

--- ************************************************
--- *** relation: sequence_variant_affecting_polyadenylation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_affecting_polyadenylation AS
  SELECT
    feature_id AS sequence_variant_affecting_polyadenylation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_affecting_polyadenylation';

--- ************************************************
--- *** relation: three_prime_race_clone ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A three prime RACE (Rapid Amplification  ***
--- *** of cDNA Ends) clone is a cDNA clone copi ***
--- *** ed from the 3' end of an mRNA (using a p ***
--- *** oly-dT primer to capture the polyA tail  ***
--- *** and a gene-specific or randomly primed 5 ***
--- *** ' primer), and spliced into a vector for ***
--- ***  propagation in a suitable host.         ***
--- ************************************************
---

CREATE VIEW three_prime_race_clone AS
  SELECT
    feature_id AS three_prime_race_clone_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'three_prime_RACE_clone';

--- ************************************************
--- *** relation: cassette_pseudogene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A cassette pseudogene is a kind of gene  ***
--- *** in an innactive form which may recombine ***
--- ***  at a telomeric locus to form a function ***
--- *** al copy.                                 ***
--- ************************************************
---

CREATE VIEW cassette_pseudogene AS
  SELECT
    feature_id AS cassette_pseudogene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'cassette_pseudogene';

--- ************************************************
--- *** relation: alanine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW alanine AS
  SELECT
    feature_id AS alanine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'alanine';

--- ************************************************
--- *** relation: valine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW valine AS
  SELECT
    feature_id AS valine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'valine';

--- ************************************************
--- *** relation: leucine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW leucine AS
  SELECT
    feature_id AS leucine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'leucine';

--- ************************************************
--- *** relation: isoleucine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW isoleucine AS
  SELECT
    feature_id AS isoleucine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'isoleucine';

--- ************************************************
--- *** relation: proline ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW proline AS
  SELECT
    feature_id AS proline_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'proline';

--- ************************************************
--- *** relation: tryptophan ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW tryptophan AS
  SELECT
    feature_id AS tryptophan_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'tryptophan';

--- ************************************************
--- *** relation: phenylalanine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW phenylalanine AS
  SELECT
    feature_id AS phenylalanine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'phenylalanine';

--- ************************************************
--- *** relation: methionine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW methionine AS
  SELECT
    feature_id AS methionine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'methionine';

--- ************************************************
--- *** relation: glycine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW glycine AS
  SELECT
    feature_id AS glycine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'glycine';

--- ************************************************
--- *** relation: serine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW serine AS
  SELECT
    feature_id AS serine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'serine';

--- ************************************************
--- *** relation: threonine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW threonine AS
  SELECT
    feature_id AS threonine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'threonine';

--- ************************************************
--- *** relation: tyrosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW tyrosine AS
  SELECT
    feature_id AS tyrosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'tyrosine';

--- ************************************************
--- *** relation: cysteine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW cysteine AS
  SELECT
    feature_id AS cysteine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'cysteine';

--- ************************************************
--- *** relation: glutamine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW glutamine AS
  SELECT
    feature_id AS glutamine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'glutamine';

--- ************************************************
--- *** relation: asparagine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW asparagine AS
  SELECT
    feature_id AS asparagine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'asparagine';

--- ************************************************
--- *** relation: lysine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW lysine AS
  SELECT
    feature_id AS lysine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'lysine';

--- ************************************************
--- *** relation: argenine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW argenine AS
  SELECT
    feature_id AS argenine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'argenine';

--- ************************************************
--- *** relation: histidine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW histidine AS
  SELECT
    feature_id AS histidine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'histidine';

--- ************************************************
--- *** relation: aspartic_acid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW aspartic_acid AS
  SELECT
    feature_id AS aspartic_acid_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'aspartic_acid';

--- ************************************************
--- *** relation: glutamic_acid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW glutamic_acid AS
  SELECT
    feature_id AS glutamic_acid_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'glutamic_acid';

--- ************************************************
--- *** relation: selenocysteine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW selenocysteine AS
  SELECT
    feature_id AS selenocysteine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'selenocysteine';

--- ************************************************
--- *** relation: pyrrolysine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW pyrrolysine AS
  SELECT
    feature_id AS pyrrolysine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'pyrrolysine';

--- ************************************************
--- *** relation: transcribed_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region defined by a set of transcribed ***
--- ***  sequences from the same gene or express ***
--- *** ed pseudogene.                           ***
--- ************************************************
---

CREATE VIEW transcribed_cluster AS
  SELECT
    feature_id AS transcribed_cluster_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'unigene_cluster' OR cvterm.name = 'transcribed_cluster';

--- ************************************************
--- *** relation: unigene_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of transcribed_cluster defined by ***
--- ***  a set of transcribed sequences from the ***
--- ***  a unique gene.                          ***
--- ************************************************
---

CREATE VIEW unigene_cluster AS
  SELECT
    feature_id AS unigene_cluster_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'unigene_cluster';

--- ************************************************
--- *** relation: crispr ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Clustered Palindromic Repeats interspers ***
--- *** ed with bacteriophage derived spacer seq ***
--- *** uences.                                  ***
--- ************************************************
---

CREATE VIEW crispr AS
  SELECT
    feature_id AS crispr_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'CRISPR';

--- ************************************************
--- *** relation: insulator_binding_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A protein_binding_site located within an ***
--- ***  insulator.                              ***
--- ************************************************
---

CREATE VIEW insulator_binding_site AS
  SELECT
    feature_id AS insulator_binding_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'insulator_binding_site';

--- ************************************************
--- *** relation: enhancer_binding_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A protein_binding_site located within an ***
--- ***  enhancer.                               ***
--- ************************************************
---

CREATE VIEW enhancer_binding_site AS
  SELECT
    feature_id AS enhancer_binding_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'enhancer_binding_site';

--- ************************************************
--- *** relation: contig_collection ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A collection of contigs.                 ***
--- ************************************************
---

CREATE VIEW contig_collection AS
  SELECT
    feature_id AS contig_collection_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'contig_collection';

--- ************************************************
--- *** relation: lincrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A multiexonic non-coding RNA transcribed ***
--- ***  by RNA polymerase II.                   ***
--- ************************************************
---

CREATE VIEW lincrna AS
  SELECT
    feature_id AS lincrna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'lincRNA';

--- ************************************************
--- *** relation: ust ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An EST spanning part or all of the untra ***
--- *** nslated regions of a protein-coding tran ***
--- *** script.                                  ***
--- ************************************************
---

CREATE VIEW ust AS
  SELECT
    feature_id AS ust_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'three_prime_UST' OR cvterm.name = 'five_prime_UST' OR cvterm.name = 'UST';

--- ************************************************
--- *** relation: three_prime_ust ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A UST located in the 3'UTR of a protein- ***
--- *** coding transcript.                       ***
--- ************************************************
---

CREATE VIEW three_prime_ust AS
  SELECT
    feature_id AS three_prime_ust_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'three_prime_UST';

--- ************************************************
--- *** relation: five_prime_ust ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An UST located in the 5'UTR of a protein ***
--- *** -coding transcript.                      ***
--- ************************************************
---

CREATE VIEW five_prime_ust AS
  SELECT
    feature_id AS five_prime_ust_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_prime_UST';

--- ************************************************
--- *** relation: rst ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tag produced from a single sequencing  ***
--- *** read from a RACE product; typically a fe ***
--- *** w hundred base pairs long.               ***
--- ************************************************
---

CREATE VIEW rst AS
  SELECT
    feature_id AS rst_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'three_prime_RST' OR cvterm.name = 'five_prime_RST' OR cvterm.name = 'RST';

--- ************************************************
--- *** relation: three_prime_rst ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tag produced from a single sequencing  ***
--- *** read from a 3'-RACE product; typically a ***
--- ***  few hundred base pairs long.            ***
--- ************************************************
---

CREATE VIEW three_prime_rst AS
  SELECT
    feature_id AS three_prime_rst_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'three_prime_RST';

--- ************************************************
--- *** relation: five_prime_rst ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tag produced from a single sequencing  ***
--- *** read from a 5'-RACE product; typically a ***
--- ***  few hundred base pairs long.            ***
--- ************************************************
---

CREATE VIEW five_prime_rst AS
  SELECT
    feature_id AS five_prime_rst_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_prime_RST';

--- ************************************************
--- *** relation: ust_match ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A match against an UST sequence.         ***
--- ************************************************
---

CREATE VIEW ust_match AS
  SELECT
    feature_id AS ust_match_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'UST_match';

--- ************************************************
--- *** relation: rst_match ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A match against an RST sequence.         ***
--- ************************************************
---

CREATE VIEW rst_match AS
  SELECT
    feature_id AS rst_match_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'RST_match';

--- ************************************************
--- *** relation: primer_match ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A nucleotide match to a primer sequence. ***
--- ************************************************
---

CREATE VIEW primer_match AS
  SELECT
    feature_id AS primer_match_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'primer_match';

--- ************************************************
--- *** relation: mirna_antiguide ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of the pri miRNA that basepairs ***
--- ***  with the guide to form the hairpin.     ***
--- ************************************************
---

CREATE VIEW mirna_antiguide AS
  SELECT
    feature_id AS mirna_antiguide_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'miRNA_antiguide';

--- ************************************************
--- *** relation: trans_splice_junction ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The boundary between the spliced leader  ***
--- *** and the first exon of the mRNA.          ***
--- ************************************************
---

CREATE VIEW trans_splice_junction AS
  SELECT
    feature_id AS trans_splice_junction_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'trans_splice_junction';

--- ************************************************
--- *** relation: outron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of a primary transcript, that i ***
--- *** s removed via trans splicing.            ***
--- ************************************************
---

CREATE VIEW outron AS
  SELECT
    feature_id AS outron_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'outron';

--- ************************************************
--- *** relation: natural_plasmid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A plasmid that occurs naturally.         ***
--- ************************************************
---

CREATE VIEW natural_plasmid AS
  SELECT
    feature_id AS natural_plasmid_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'natural_transposable_element' OR cvterm.name = 'natural_plasmid';

--- ************************************************
--- *** relation: gene_trap_construct ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene trap construct is a type of engin ***
--- *** eered plasmid which is designed to integ ***
--- *** rate into a genome and produce a fusion  ***
--- *** transcript between exons of the gene int ***
--- *** o which it inserts and a reporter elemen ***
--- *** t in the construct. Gene traps contain a ***
--- ***  splice acceptor, do not contain promote ***
--- *** r elements for the reporter, and are mut ***
--- *** agenic. Gene traps may be bicistronic wi ***
--- *** th the second cassette containing a prom ***
--- *** oter driving an a selectable marker.     ***
--- ************************************************
---

CREATE VIEW gene_trap_construct AS
  SELECT
    feature_id AS gene_trap_construct_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gene_trap_construct';

--- ************************************************
--- *** relation: promoter_trap_construct ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A promoter trap construct is a type of e ***
--- *** ngineered plasmid which is designed to i ***
--- *** ntegrate into a genome and express a rep ***
--- *** orter when inserted in close proximity t ***
--- *** o a promoter element. Promoter traps typ ***
--- *** ically do not contain promoter elements  ***
--- *** and are mutagenic.                       ***
--- ************************************************
---

CREATE VIEW promoter_trap_construct AS
  SELECT
    feature_id AS promoter_trap_construct_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'promoter_trap_construct';

--- ************************************************
--- *** relation: enhancer_trap_construct ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An enhancer trap construct is a type of  ***
--- *** engineered plasmid which is designed to  ***
--- *** integrate into a genome and express a re ***
--- *** porter when the expression from a basic  ***
--- *** minimal promoter is enhanced by genomic  ***
--- *** enhancer elements. Enhancer traps contai ***
--- *** n promoter elements and are not usually  ***
--- *** mutagenic.                               ***
--- ************************************************
---

CREATE VIEW enhancer_trap_construct AS
  SELECT
    feature_id AS enhancer_trap_construct_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'enhancer_trap_construct';

--- ************************************************
--- *** relation: pac_end ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of sequence from the end of a P ***
--- *** AC clone that may provide anhighly speci ***
--- *** fic marker.                              ***
--- ************************************************
---

CREATE VIEW pac_end AS
  SELECT
    feature_id AS pac_end_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'PAC_end';

--- ************************************************
--- *** relation: rapd ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** RAPD is a 'PCR product' where a sequence ***
--- ***  variant is identified through the use o ***
--- *** f PCR with random primers.               ***
--- ************************************************
---

CREATE VIEW rapd AS
  SELECT
    feature_id AS rapd_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'RAPD';

--- ************************************************
--- *** relation: shadow_enhancer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW shadow_enhancer AS
  SELECT
    feature_id AS shadow_enhancer_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'shadow_enhancer';

--- ************************************************
--- *** relation: regulatory_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A DNA sequence that controls the express ***
--- *** ion of a gene.                           ***
--- ************************************************
---

CREATE VIEW regulatory_region AS
  SELECT
    feature_id AS regulatory_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'attenuator' OR cvterm.name = 'terminator' OR cvterm.name = 'TF_binding_site' OR cvterm.name = 'polyA_signal_sequence' OR cvterm.name = 'gene_group_regulatory_region' OR cvterm.name = 'transcriptional_cis_regulatory_region' OR cvterm.name = 'splicing_regulatory_region' OR cvterm.name = 'cis_regulatory_frameshift_element' OR cvterm.name = 'bacterial_terminator' OR cvterm.name = 'eukaryotic_terminator' OR cvterm.name = 'rho_dependent_bacterial_terminator' OR cvterm.name = 'rho_independent_bacterial_terminator' OR cvterm.name = 'terminator_of_type_2_RNApol_III_promoter' OR cvterm.name = 'INR_motif' OR cvterm.name = 'DPE_motif' OR cvterm.name = 'BRE_motif' OR cvterm.name = 'CAAT_signal' OR cvterm.name = 'TATA_box' OR cvterm.name = 'A_box' OR cvterm.name = 'B_box' OR cvterm.name = 'C_box' OR cvterm.name = 'DRE_motif' OR cvterm.name = 'E_box_motif' OR cvterm.name = 'MTE' OR cvterm.name = 'INR1_motif' OR cvterm.name = 'GAGA_motif' OR cvterm.name = 'octamer_motif' OR cvterm.name = 'operator' OR cvterm.name = 'bacterial_RNApol_promoter' OR cvterm.name = 'bacterial_terminator' OR cvterm.name = 'rho_dependent_bacterial_terminator' OR cvterm.name = 'rho_independent_bacterial_terminator' OR cvterm.name = 'promoter' OR cvterm.name = 'insulator' OR cvterm.name = 'CRM' OR cvterm.name = 'promoter_targeting_sequence' OR cvterm.name = 'bidirectional_promoter' OR cvterm.name = 'RNA_polymerase_promoter' OR cvterm.name = 'RNApol_I_promoter' OR cvterm.name = 'RNApol_II_promoter' OR cvterm.name = 'RNApol_III_promoter' OR cvterm.name = 'bacterial_RNApol_promoter' OR cvterm.name = 'Phage_RNA_Polymerase_Promoter' OR cvterm.name = 'RNApol_III_promoter_type_1' OR cvterm.name = 'RNApol_III_promoter_type_2' OR cvterm.name = 'RNApol_III_promoter_type_3' OR cvterm.name = 'SP6_RNA_Polymerase_Promoter' OR cvterm.name = 'T3_RNA_Polymerase_Promoter' OR cvterm.name = 'T7_RNA_Polymerase_Promoter' OR cvterm.name = 'locus_control_region' OR cvterm.name = 'enhancer' OR cvterm.name = 'RNApol_II_promoter' OR cvterm.name = 'RNApol_III_promoter' OR cvterm.name = 'silencer' OR cvterm.name = 'enhancer_bound_by_factor' OR cvterm.name = 'shadow_enhancer' OR cvterm.name = 'RNApol_III_promoter_type_1' OR cvterm.name = 'RNApol_III_promoter_type_2' OR cvterm.name = 'RNApol_III_promoter_type_3' OR cvterm.name = 'splice_enhancer' OR cvterm.name = 'intronic_splice_enhancer' OR cvterm.name = 'exonic_splice_enhancer' OR cvterm.name = 'regulatory_region';

--- ************************************************
--- *** relation: u14_snorna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The primary transcript of an evolutionar ***
--- *** ily conserved eukaryotic low molecular w ***
--- *** eight RNA capable of intermolecular hybr ***
--- *** idization with both homologous and heter ***
--- *** ologous 18S rRNA.                        ***
--- ************************************************
---

CREATE VIEW u14_snorna_primary_transcript AS
  SELECT
    feature_id AS u14_snorna_primary_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'U14_snoRNA_primary_transcript';

--- ************************************************
--- *** relation: methylation_guide_snorna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A snoRNA that specifies the site of 2'-O ***
--- *** -ribose methylation in an RNA molecule b ***
--- *** y base pairing with a short sequence aro ***
--- *** und the target residue.                  ***
--- ************************************************
---

CREATE VIEW methylation_guide_snorna AS
  SELECT
    feature_id AS methylation_guide_snorna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'methylation_guide_snoRNA';

--- ************************************************
--- *** relation: rrna_cleavage_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An ncRNA that is part of a ribonucleopro ***
--- *** tein that cleaves the primary pre-rRNA t ***
--- *** ranscript in the process of producing ma ***
--- *** ture rRNA molecules.                     ***
--- ************************************************
---

CREATE VIEW rrna_cleavage_rna AS
  SELECT
    feature_id AS rrna_cleavage_rna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'rRNA_cleavage_RNA';

--- ************************************************
--- *** relation: exon_of_single_exon_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An exon that is the only exon in a gene. ***
--- ************************************************
---

CREATE VIEW exon_of_single_exon_gene AS
  SELECT
    feature_id AS exon_of_single_exon_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'exon_of_single_exon_gene';

--- ************************************************
--- *** relation: cassette_array_member ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW cassette_array_member AS
  SELECT
    feature_id AS cassette_array_member_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'cassette_array_member';

--- ************************************************
--- *** relation: gene_cassette_member ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW gene_cassette_member AS
  SELECT
    feature_id AS gene_cassette_member_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'cassette_array_member' OR cvterm.name = 'gene_cassette_member';

--- ************************************************
--- *** relation: gene_subarray_member ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW gene_subarray_member AS
  SELECT
    feature_id AS gene_subarray_member_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gene_subarray_member';

--- ************************************************
--- *** relation: primer_binding_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Non-covalent primer binding site for ini ***
--- *** tiation of replication, transcription, o ***
--- *** r reverse transcription.                 ***
--- ************************************************
---

CREATE VIEW primer_binding_site AS
  SELECT
    feature_id AS primer_binding_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'primer_binding_site';

--- ************************************************
--- *** relation: gene_array ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An array includes two or more genes, or  ***
--- *** two or more gene subarrays, contiguously ***
--- ***  arranged where the individual genes, or ***
--- ***  subarrays, are either identical in sequ ***
--- *** ence, or essentially so.                 ***
--- ************************************************
---

CREATE VIEW gene_array AS
  SELECT
    feature_id AS gene_array_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gene_array';

--- ************************************************
--- *** relation: gene_subarray ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A subarray is, by defintition, a member  ***
--- *** of a gene array (SO:0005851); the member ***
--- *** s of a subarray may differ substantially ***
--- ***  in sequence, but are closely related in ***
--- ***  function.                               ***
--- ************************************************
---

CREATE VIEW gene_subarray AS
  SELECT
    feature_id AS gene_subarray_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gene_subarray';

--- ************************************************
--- *** relation: gene_cassette ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that can be substituted for a rel ***
--- *** ated gene at a different site in the gen ***
--- *** ome.                                     ***
--- ************************************************
---

CREATE VIEW gene_cassette AS
  SELECT
    feature_id AS gene_cassette_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gene_cassette';

--- ************************************************
--- *** relation: gene_cassette_array ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An array of non-functional genes whose m ***
--- *** embers, when captured by recombination f ***
--- *** orm functional genes.                    ***
--- ************************************************
---

CREATE VIEW gene_cassette_array AS
  SELECT
    feature_id AS gene_cassette_array_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gene_cassette_array';

--- ************************************************
--- *** relation: gene_group ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A collection of related genes.           ***
--- ************************************************
---

CREATE VIEW gene_group AS
  SELECT
    feature_id AS gene_group_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'operon' OR cvterm.name = 'gene_array' OR cvterm.name = 'gene_subarray' OR cvterm.name = 'gene_cassette_array' OR cvterm.name = 'regulon' OR cvterm.name = 'gene_group';

--- ************************************************
--- *** relation: selenocysteine_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding seryl tRNA ***
--- ***  (SO:000269).                            ***
--- ************************************************
---

CREATE VIEW selenocysteine_trna_primary_transcript AS
  SELECT
    feature_id AS selenocysteine_trna_primary_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'selenocysteine_tRNA_primary_transcript';

--- ************************************************
--- *** relation: selenocysteinyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has a selenocystein ***
--- *** e anticodon, and a 3' selenocysteine bin ***
--- *** ding region.                             ***
--- ************************************************
---

CREATE VIEW selenocysteinyl_trna AS
  SELECT
    feature_id AS selenocysteinyl_trna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'selenocysteinyl_tRNA';

--- ************************************************
--- *** relation: syntenic_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region in which two or more pairs of h ***
--- *** omologous markers occur on the same chro ***
--- *** mosome in two or more species.           ***
--- ************************************************
---

CREATE VIEW syntenic_region AS
  SELECT
    feature_id AS syntenic_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'syntenic_region';

--- ************************************************
--- *** relation: biochemical_region_of_peptide ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of a peptide that is involved i ***
--- *** n a biochemical function.                ***
--- ************************************************
---

CREATE VIEW biochemical_region_of_peptide AS
  SELECT
    feature_id AS biochemical_region_of_peptide_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'post_translationally_modified_region' OR cvterm.name = 'conformational_switch' OR cvterm.name = 'molecular_contact_region' OR cvterm.name = 'polypeptide_binding_motif' OR cvterm.name = 'polypeptide_catalytic_motif' OR cvterm.name = 'polypeptide_metal_contact' OR cvterm.name = 'protein_protein_contact' OR cvterm.name = 'polypeptide_ligand_contact' OR cvterm.name = 'polypeptide_DNA_contact' OR cvterm.name = 'polypeptide_calcium_ion_contact_site' OR cvterm.name = 'polypeptide_cobalt_ion_contact_site' OR cvterm.name = 'polypeptide_copper_ion_contact_site' OR cvterm.name = 'polypeptide_iron_ion_contact_site' OR cvterm.name = 'polypeptide_magnesium_ion_contact_site' OR cvterm.name = 'polypeptide_manganese_ion_contact_site' OR cvterm.name = 'polypeptide_molybdenum_ion_contact_site' OR cvterm.name = 'polypeptide_nickel_ion_contact_site' OR cvterm.name = 'polypeptide_tungsten_ion_contact_site' OR cvterm.name = 'polypeptide_zinc_ion_contact_site' OR cvterm.name = 'biochemical_region_of_peptide';

--- ************************************************
--- *** relation: molecular_contact_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region that is involved a contact with ***
--- ***  another molecule.                       ***
--- ************************************************
---

CREATE VIEW molecular_contact_region AS
  SELECT
    feature_id AS molecular_contact_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polypeptide_metal_contact' OR cvterm.name = 'protein_protein_contact' OR cvterm.name = 'polypeptide_ligand_contact' OR cvterm.name = 'polypeptide_DNA_contact' OR cvterm.name = 'polypeptide_calcium_ion_contact_site' OR cvterm.name = 'polypeptide_cobalt_ion_contact_site' OR cvterm.name = 'polypeptide_copper_ion_contact_site' OR cvterm.name = 'polypeptide_iron_ion_contact_site' OR cvterm.name = 'polypeptide_magnesium_ion_contact_site' OR cvterm.name = 'polypeptide_manganese_ion_contact_site' OR cvterm.name = 'polypeptide_molybdenum_ion_contact_site' OR cvterm.name = 'polypeptide_nickel_ion_contact_site' OR cvterm.name = 'polypeptide_tungsten_ion_contact_site' OR cvterm.name = 'polypeptide_zinc_ion_contact_site' OR cvterm.name = 'molecular_contact_region';

--- ************************************************
--- *** relation: intrinsically_unstructured_polypeptide_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of polypeptide chain with high  ***
--- *** conformational flexibility.              ***
--- ************************************************
---

CREATE VIEW intrinsically_unstructured_polypeptide_region AS
  SELECT
    feature_id AS intrinsically_unstructured_polypeptide_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'intrinsically_unstructured_polypeptide_region';

--- ************************************************
--- *** relation: catmat_left_handed_three ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of 3 consecutive residues with d ***
--- *** ihedral angles as follows: res i: phi -9 ***
--- *** 0 bounds -120 to -60, res i: psi -10 bou ***
--- *** nds -50 to 30, res i+1: phi -75 bounds - ***
--- *** 100 to -50, res i+1: psi 140 bounds 110  ***
--- *** to 170. An extra restriction of the leng ***
--- *** th of the O to O distance would be usefu ***
--- *** l, that it be less than 5 Angstrom. More ***
--- ***  precisely these two oxygens are the mai ***
--- *** n chain carbonyl oxygen atoms of residue ***
--- *** s i-1 and i+1.                           ***
--- ************************************************
---

CREATE VIEW catmat_left_handed_three AS
  SELECT
    feature_id AS catmat_left_handed_three_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'catmat_left_handed_three';

--- ************************************************
--- *** relation: catmat_left_handed_four ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of 4 consecutive residues with d ***
--- *** ihedral angles as follows: res i: phi -9 ***
--- *** 0 bounds -120 to -60, res i psi -10 boun ***
--- *** ds -50 to 30, res i+1: phi -90 bounds -1 ***
--- *** 20 to -60, res i+1: psi -10 bounds -50 t ***
--- *** o 30, res i+2: phi -75 bounds -100 to -5 ***
--- *** 0, res i+2: psi 140 bounds 110 to 170.   ***
--- *** The extra restriction of the length of t ***
--- *** he O to O distance is similar, that it b ***
--- *** e less than 5 Angstrom. In this case the ***
--- *** se two Oxygen atoms are the main chain c ***
--- *** arbonyl oxygen atoms of residues i-1 and ***
--- ***  i+2.                                    ***
--- ************************************************
---

CREATE VIEW catmat_left_handed_four AS
  SELECT
    feature_id AS catmat_left_handed_four_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'catmat_left_handed_four';

--- ************************************************
--- *** relation: catmat_right_handed_three ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of 3 consecutive residues with d ***
--- *** ihedral angles as follows: res i: phi -9 ***
--- *** 0 bounds -120 to -60, res i: psi -10 bou ***
--- *** nds -50 to 30, res i+1: phi -75 bounds - ***
--- *** 100 to -50, res i+1: psi 140 bounds 110  ***
--- *** to 170. An extra restriction of the leng ***
--- *** th of the O to O distance would be usefu ***
--- *** l, that it be less than 5 Angstrom. More ***
--- ***  precisely these two oxygens are the mai ***
--- *** n chain carbonyl oxygen atoms of residue ***
--- *** s i-1 and i+1.                           ***
--- ************************************************
---

CREATE VIEW catmat_right_handed_three AS
  SELECT
    feature_id AS catmat_right_handed_three_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'catmat_right_handed_three';

--- ************************************************
--- *** relation: catmat_right_handed_four ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of 4 consecutive residues with d ***
--- *** ihedral angles as follows: res i: phi -9 ***
--- *** 0 bounds -120 to -60, res i: psi -10 bou ***
--- *** nds -50 to 30, res i+1: phi -90 bounds - ***
--- *** 120 to -60, res i+1: psi -10 bounds -50  ***
--- *** to 30, res i+2: phi -75 bounds -100 to - ***
--- *** 50, res i+2: psi 140 bounds 110 to 170.  ***
--- *** The extra restriction of the length of t ***
--- *** he O to O distance is similar, that it b ***
--- *** e less than 5 Angstrom. In this case the ***
--- *** se two Oxygen atoms are the main chain c ***
--- *** arbonyl oxygen atoms of residues i-1 and ***
--- ***  i+2.                                    ***
--- ************************************************
---

CREATE VIEW catmat_right_handed_four AS
  SELECT
    feature_id AS catmat_right_handed_four_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'catmat_right_handed_four';

--- ************************************************
--- *** relation: alpha_beta_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of five consecutive residues and ***
--- ***  two H-bonds in which: H-bond between CO ***
--- ***  of residue(i) and NH of residue(i+4), H ***
--- *** -bond between CO of residue(i) and NH of ***
--- ***  residue(i+3),Phi angles of residues(i+1 ***
--- *** ), (i+2) and (i+3) are negative.         ***
--- ************************************************
---

CREATE VIEW alpha_beta_motif AS
  SELECT
    feature_id AS alpha_beta_motif_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'alpha_beta_motif';

--- ************************************************
--- *** relation: lipoprotein_signal_peptide ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A peptide that acts as a signal for both ***
--- ***  membrane translocation and lipid attach ***
--- *** ment in prokaryotes.                     ***
--- ************************************************
---

CREATE VIEW lipoprotein_signal_peptide AS
  SELECT
    feature_id AS lipoprotein_signal_peptide_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'lipoprotein_signal_peptide';

--- ************************************************
--- *** relation: no_output ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An experimental region wherean analysis  ***
--- *** has been run and not produced any annota ***
--- *** tion.                                    ***
--- ************************************************
---

CREATE VIEW no_output AS
  SELECT
    feature_id AS no_output_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'no_output';

--- ************************************************
--- *** relation: cleaved_peptide_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The cleaved_peptide_regon is the a regio ***
--- *** n of peptide sequence that is cleaved du ***
--- *** ring maturation.                         ***
--- ************************************************
---

CREATE VIEW cleaved_peptide_region AS
  SELECT
    feature_id AS cleaved_peptide_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'signal_peptide' OR cvterm.name = 'cleaved_initiator_methionine' OR cvterm.name = 'transit_peptide' OR cvterm.name = 'intein' OR cvterm.name = 'propeptide_cleavage_site' OR cvterm.name = 'propeptide' OR cvterm.name = 'cleaved_for_gpi_anchor_region' OR cvterm.name = 'lipoprotein_signal_peptide' OR cvterm.name = 'n_terminal_region' OR cvterm.name = 'c_terminal_region' OR cvterm.name = 'central_hydrophobic_region_of_signal_peptide' OR cvterm.name = 'cleaved_peptide_region';

--- ************************************************
--- *** relation: peptide_coil ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Irregular, unstructured regions of a pro ***
--- *** tein's backbone, as distinct from the re ***
--- *** gular region (namely alpha helix and bet ***
--- *** a strand - characterised by specific pat ***
--- *** terns of main-chain hydrogen bonds).     ***
--- ************************************************
---

CREATE VIEW peptide_coil AS
  SELECT
    feature_id AS peptide_coil_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'peptide_coil';

--- ************************************************
--- *** relation: hydrophobic_region_of_peptide ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Hydrophobic regions are regions with a l ***
--- *** ow affinity for water.                   ***
--- ************************************************
---

CREATE VIEW hydrophobic_region_of_peptide AS
  SELECT
    feature_id AS hydrophobic_region_of_peptide_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'hydrophobic_region_of_peptide';

--- ************************************************
--- *** relation: n_terminal_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The amino-terminal positively-charged re ***
--- *** gion of a signal peptide (approx 1-5 aa) ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW n_terminal_region AS
  SELECT
    feature_id AS n_terminal_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'n_terminal_region';

--- ************************************************
--- *** relation: c_terminal_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The more polar, carboxy-terminal region  ***
--- *** of the signal peptide (approx 3-7 aa).   ***
--- ************************************************
---

CREATE VIEW c_terminal_region AS
  SELECT
    feature_id AS c_terminal_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'c_terminal_region';

--- ************************************************
--- *** relation: central_hydrophobic_region_of_signal_peptide ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The central, hydrophobic region of the s ***
--- *** ignal peptide (approx 7-15 aa).          ***
--- ************************************************
---

CREATE VIEW central_hydrophobic_region_of_signal_peptide AS
  SELECT
    feature_id AS central_hydrophobic_region_of_signal_peptide_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'central_hydrophobic_region_of_signal_peptide';

--- ************************************************
--- *** relation: polypeptide_conserved_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A conserved motif is a short (up to 20 a ***
--- *** mino acids) region of biological interes ***
--- *** t that is conserved in different protein ***
--- *** s. They may or may not have functional o ***
--- *** r structural significance within the pro ***
--- *** teins in which they are found.           ***
--- ************************************************
---

CREATE VIEW polypeptide_conserved_motif AS
  SELECT
    feature_id AS polypeptide_conserved_motif_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polypeptide_conserved_motif';

--- ************************************************
--- *** relation: polypeptide_binding_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A polypeptide binding motif is a short ( ***
--- *** up to 20 amino acids) polypeptide region ***
--- ***  of biological interest that contains on ***
--- *** e or more amino acids experimentally sho ***
--- *** wn to bind to a ligand.                  ***
--- ************************************************
---

CREATE VIEW polypeptide_binding_motif AS
  SELECT
    feature_id AS polypeptide_binding_motif_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polypeptide_binding_motif';

--- ************************************************
--- *** relation: polypeptide_catalytic_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A polypeptide catalytic motif is a short ***
--- ***  (up to 20 amino acids) polypeptide regi ***
--- *** on that contains one or more active site ***
--- ***  residues.                               ***
--- ************************************************
---

CREATE VIEW polypeptide_catalytic_motif AS
  SELECT
    feature_id AS polypeptide_catalytic_motif_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polypeptide_catalytic_motif';

--- ************************************************
--- *** relation: polypeptide_dna_contact ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Residues involved in interactions with D ***
--- *** NA.                                      ***
--- ************************************************
---

CREATE VIEW polypeptide_dna_contact AS
  SELECT
    feature_id AS polypeptide_dna_contact_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polypeptide_DNA_contact';

--- ************************************************
--- *** relation: polypeptide_conserved_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A subsection of sequence with biological ***
--- ***  interest that is conserved in different ***
--- ***  proteins. They may or may not have func ***
--- *** tional or structural significance within ***
--- ***  the proteins in which they are found.   ***
--- ************************************************
---

CREATE VIEW polypeptide_conserved_region AS
  SELECT
    feature_id AS polypeptide_conserved_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polypeptide_domain' OR cvterm.name = 'polypeptide_motif' OR cvterm.name = 'polypeptide_repeat' OR cvterm.name = 'biochemical_region_of_peptide' OR cvterm.name = 'polypeptide_conserved_motif' OR cvterm.name = 'post_translationally_modified_region' OR cvterm.name = 'conformational_switch' OR cvterm.name = 'molecular_contact_region' OR cvterm.name = 'polypeptide_binding_motif' OR cvterm.name = 'polypeptide_catalytic_motif' OR cvterm.name = 'polypeptide_metal_contact' OR cvterm.name = 'protein_protein_contact' OR cvterm.name = 'polypeptide_ligand_contact' OR cvterm.name = 'polypeptide_DNA_contact' OR cvterm.name = 'polypeptide_calcium_ion_contact_site' OR cvterm.name = 'polypeptide_cobalt_ion_contact_site' OR cvterm.name = 'polypeptide_copper_ion_contact_site' OR cvterm.name = 'polypeptide_iron_ion_contact_site' OR cvterm.name = 'polypeptide_magnesium_ion_contact_site' OR cvterm.name = 'polypeptide_manganese_ion_contact_site' OR cvterm.name = 'polypeptide_molybdenum_ion_contact_site' OR cvterm.name = 'polypeptide_nickel_ion_contact_site' OR cvterm.name = 'polypeptide_tungsten_ion_contact_site' OR cvterm.name = 'polypeptide_zinc_ion_contact_site' OR cvterm.name = 'polypeptide_conserved_region';

--- ************************************************
--- *** relation: substitution ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Any change in genomic DNA caused by a si ***
--- *** ngle event.                              ***
--- ************************************************
---

CREATE VIEW substitution AS
  SELECT
    feature_id AS substitution_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_length_variation' OR cvterm.name = 'SNP' OR cvterm.name = 'complex_substitution' OR cvterm.name = 'point_mutation' OR cvterm.name = 'simple_sequence_length_variation' OR cvterm.name = 'MNP' OR cvterm.name = 'transition' OR cvterm.name = 'transversion' OR cvterm.name = 'pyrimidine_transition' OR cvterm.name = 'purine_transition' OR cvterm.name = 'C_to_T_transition' OR cvterm.name = 'T_to_C_transition' OR cvterm.name = 'C_to_T_transition_at_pCpG_site' OR cvterm.name = 'A_to_G_transition' OR cvterm.name = 'G_to_A_transition' OR cvterm.name = 'pyrimidine_to_purine_transversion' OR cvterm.name = 'purine_to_pyrimidine_transversion' OR cvterm.name = 'C_to_A_transversion' OR cvterm.name = 'C_to_G_transversion' OR cvterm.name = 'T_to_A_transversion' OR cvterm.name = 'T_to_G_transversion' OR cvterm.name = 'A_to_C_transversion' OR cvterm.name = 'A_to_T_transversion' OR cvterm.name = 'G_to_C_transversion' OR cvterm.name = 'G_to_T_transversion' OR cvterm.name = 'substitution';

--- ************************************************
--- *** relation: partially_characterised_change_in_dna_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The nature of the mutation event is only ***
--- ***  partially characterised.                ***
--- ************************************************
---

CREATE VIEW partially_characterised_change_in_dna_sequence AS
  SELECT
    feature_id AS partially_characterised_change_in_dna_sequence_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'partially_characterised_change_in_DNA_sequence';

--- ************************************************
--- *** relation: complex_substitution ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** When no simple or well defined DNA mutat ***
--- *** ion event describes the observed DNA cha ***
--- *** nge, the keyword "complex" should be use ***
--- *** d. Usually there are multiple equally pl ***
--- *** ausible explanations for the change.     ***
--- ************************************************
---

CREATE VIEW complex_substitution AS
  SELECT
    feature_id AS complex_substitution_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'MNP' OR cvterm.name = 'complex_substitution';

--- ************************************************
--- *** relation: uncharacterised_change_in_nucleotide_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The nature of the mutation event is eith ***
--- *** er uncharacterised or only partially cha ***
--- *** racterised.                              ***
--- ************************************************
---

CREATE VIEW uncharacterised_change_in_nucleotide_sequence AS
  SELECT
    feature_id AS uncharacterised_change_in_nucleotide_sequence_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'partially_characterised_change_in_DNA_sequence' OR cvterm.name = 'uncharacterised_change_in_nucleotide_sequence';

--- ************************************************
--- *** relation: point_mutation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A single nucleotide change which has occ ***
--- *** urred at the same position of a correspo ***
--- *** nding nucleotide in a reference sequence ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW point_mutation AS
  SELECT
    feature_id AS point_mutation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'transition' OR cvterm.name = 'transversion' OR cvterm.name = 'pyrimidine_transition' OR cvterm.name = 'purine_transition' OR cvterm.name = 'C_to_T_transition' OR cvterm.name = 'T_to_C_transition' OR cvterm.name = 'C_to_T_transition_at_pCpG_site' OR cvterm.name = 'A_to_G_transition' OR cvterm.name = 'G_to_A_transition' OR cvterm.name = 'pyrimidine_to_purine_transversion' OR cvterm.name = 'purine_to_pyrimidine_transversion' OR cvterm.name = 'C_to_A_transversion' OR cvterm.name = 'C_to_G_transversion' OR cvterm.name = 'T_to_A_transversion' OR cvterm.name = 'T_to_G_transversion' OR cvterm.name = 'A_to_C_transversion' OR cvterm.name = 'A_to_T_transversion' OR cvterm.name = 'G_to_C_transversion' OR cvterm.name = 'G_to_T_transversion' OR cvterm.name = 'point_mutation';

--- ************************************************
--- *** relation: transition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Change of a pyrimidine nucleotide, C or  ***
--- *** T, into an other pyrimidine nucleotide,  ***
--- *** or change of a purine nucleotide, A or G ***
--- *** , into an other purine nucleotide.       ***
--- ************************************************
---

CREATE VIEW transition AS
  SELECT
    feature_id AS transition_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'pyrimidine_transition' OR cvterm.name = 'purine_transition' OR cvterm.name = 'C_to_T_transition' OR cvterm.name = 'T_to_C_transition' OR cvterm.name = 'C_to_T_transition_at_pCpG_site' OR cvterm.name = 'A_to_G_transition' OR cvterm.name = 'G_to_A_transition' OR cvterm.name = 'transition';

--- ************************************************
--- *** relation: pyrimidine_transition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A substitution of a pyrimidine, C or T,  ***
--- *** for another pyrimidine.                  ***
--- ************************************************
---

CREATE VIEW pyrimidine_transition AS
  SELECT
    feature_id AS pyrimidine_transition_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'C_to_T_transition' OR cvterm.name = 'T_to_C_transition' OR cvterm.name = 'C_to_T_transition_at_pCpG_site' OR cvterm.name = 'pyrimidine_transition';

--- ************************************************
--- *** relation: c_to_t_transition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transition of a cytidine to a thymine. ***
--- ************************************************
---

CREATE VIEW c_to_t_transition AS
  SELECT
    feature_id AS c_to_t_transition_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'C_to_T_transition_at_pCpG_site' OR cvterm.name = 'C_to_T_transition';

--- ************************************************
--- *** relation: c_to_t_transition_at_pcpg_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The transition of cytidine to thymine oc ***
--- *** curring at a pCpG site as a consequence  ***
--- *** of the spontaneous deamination of 5'-met ***
--- *** hylcytidine.                             ***
--- ************************************************
---

CREATE VIEW c_to_t_transition_at_pcpg_site AS
  SELECT
    feature_id AS c_to_t_transition_at_pcpg_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'C_to_T_transition_at_pCpG_site';

--- ************************************************
--- *** relation: t_to_c_transition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW t_to_c_transition AS
  SELECT
    feature_id AS t_to_c_transition_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'T_to_C_transition';

--- ************************************************
--- *** relation: purine_transition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A substitution of a purine, A or G, for  ***
--- *** another purine.                          ***
--- ************************************************
---

CREATE VIEW purine_transition AS
  SELECT
    feature_id AS purine_transition_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'A_to_G_transition' OR cvterm.name = 'G_to_A_transition' OR cvterm.name = 'purine_transition';

--- ************************************************
--- *** relation: a_to_g_transition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transition of an adenine to a guanine. ***
--- ************************************************
---

CREATE VIEW a_to_g_transition AS
  SELECT
    feature_id AS a_to_g_transition_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'A_to_G_transition';

--- ************************************************
--- *** relation: g_to_a_transition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transition of a guanine to an adenine. ***
--- ************************************************
---

CREATE VIEW g_to_a_transition AS
  SELECT
    feature_id AS g_to_a_transition_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'G_to_A_transition';

--- ************************************************
--- *** relation: transversion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Change of a pyrimidine nucleotide, C or  ***
--- *** T, into a purine nucleotide, A or G, or  ***
--- *** vice versa.                              ***
--- ************************************************
---

CREATE VIEW transversion AS
  SELECT
    feature_id AS transversion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'pyrimidine_to_purine_transversion' OR cvterm.name = 'purine_to_pyrimidine_transversion' OR cvterm.name = 'C_to_A_transversion' OR cvterm.name = 'C_to_G_transversion' OR cvterm.name = 'T_to_A_transversion' OR cvterm.name = 'T_to_G_transversion' OR cvterm.name = 'A_to_C_transversion' OR cvterm.name = 'A_to_T_transversion' OR cvterm.name = 'G_to_C_transversion' OR cvterm.name = 'G_to_T_transversion' OR cvterm.name = 'transversion';

--- ************************************************
--- *** relation: pyrimidine_to_purine_transversion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Change of a pyrimidine nucleotide, C or  ***
--- *** T, into a purine nucleotide, A or G.     ***
--- ************************************************
---

CREATE VIEW pyrimidine_to_purine_transversion AS
  SELECT
    feature_id AS pyrimidine_to_purine_transversion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'C_to_A_transversion' OR cvterm.name = 'C_to_G_transversion' OR cvterm.name = 'T_to_A_transversion' OR cvterm.name = 'T_to_G_transversion' OR cvterm.name = 'pyrimidine_to_purine_transversion';

--- ************************************************
--- *** relation: c_to_a_transversion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transversion from cytidine to adenine. ***
--- ************************************************
---

CREATE VIEW c_to_a_transversion AS
  SELECT
    feature_id AS c_to_a_transversion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'C_to_A_transversion';

--- ************************************************
--- *** relation: c_to_g_transversion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW c_to_g_transversion AS
  SELECT
    feature_id AS c_to_g_transversion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'C_to_G_transversion';

--- ************************************************
--- *** relation: t_to_a_transversion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transversion from T to A.              ***
--- ************************************************
---

CREATE VIEW t_to_a_transversion AS
  SELECT
    feature_id AS t_to_a_transversion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'T_to_A_transversion';

--- ************************************************
--- *** relation: t_to_g_transversion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transversion from T to G.              ***
--- ************************************************
---

CREATE VIEW t_to_g_transversion AS
  SELECT
    feature_id AS t_to_g_transversion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'T_to_G_transversion';

--- ************************************************
--- *** relation: purine_to_pyrimidine_transversion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Change of a purine nucleotide, A or G ,  ***
--- *** into a pyrimidine nucleotide C or T.     ***
--- ************************************************
---

CREATE VIEW purine_to_pyrimidine_transversion AS
  SELECT
    feature_id AS purine_to_pyrimidine_transversion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'A_to_C_transversion' OR cvterm.name = 'A_to_T_transversion' OR cvterm.name = 'G_to_C_transversion' OR cvterm.name = 'G_to_T_transversion' OR cvterm.name = 'purine_to_pyrimidine_transversion';

--- ************************************************
--- *** relation: a_to_c_transversion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transversion from adenine to cytidine. ***
--- ************************************************
---

CREATE VIEW a_to_c_transversion AS
  SELECT
    feature_id AS a_to_c_transversion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'A_to_C_transversion';

--- ************************************************
--- *** relation: a_to_t_transversion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transversion from adenine to thymine.  ***
--- ************************************************
---

CREATE VIEW a_to_t_transversion AS
  SELECT
    feature_id AS a_to_t_transversion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'A_to_T_transversion';

--- ************************************************
--- *** relation: g_to_c_transversion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transversion from guanine to cytidine. ***
--- ************************************************
---

CREATE VIEW g_to_c_transversion AS
  SELECT
    feature_id AS g_to_c_transversion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'G_to_C_transversion';

--- ************************************************
--- *** relation: g_to_t_transversion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transversion from guanine to thymine.  ***
--- ************************************************
---

CREATE VIEW g_to_t_transversion AS
  SELECT
    feature_id AS g_to_t_transversion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'G_to_T_transversion';

--- ************************************************
--- *** relation: intrachromosomal_mutation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW intrachromosomal_mutation AS
  SELECT
    feature_id AS intrachromosomal_mutation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'chromosomal_deletion' OR cvterm.name = 'chromosomal_inversion' OR cvterm.name = 'intrachromosomal_duplication' OR cvterm.name = 'ring_chromosome' OR cvterm.name = 'chromosome_fission' OR cvterm.name = 'inversion_derived_bipartite_deficiency' OR cvterm.name = 'inversion_derived_deficiency_plus_duplication' OR cvterm.name = 'inversion_derived_deficiency_plus_aneuploid' OR cvterm.name = 'deficient_translocation' OR cvterm.name = 'deficient_inversion' OR cvterm.name = 'inverted_ring_chromosome' OR cvterm.name = 'pericentric_inversion' OR cvterm.name = 'paracentric_inversion' OR cvterm.name = 'inversion_cum_translocation' OR cvterm.name = 'bipartite_inversion' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'deficient_inversion' OR cvterm.name = 'inversion_derived_deficiency_plus_duplication' OR cvterm.name = 'inversion_derived_bipartite_duplication' OR cvterm.name = 'inversion_derived_duplication_plus_aneuploid' OR cvterm.name = 'intrachromosomal_transposition' OR cvterm.name = 'tandem_duplication' OR cvterm.name = 'deficient_intrachromosomal_transposition' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'uninverted_intrachromosomal_transposition' OR cvterm.name = 'unorientated_intrachromosomal_transposition' OR cvterm.name = 'direct_tandem_duplication' OR cvterm.name = 'inverted_tandem_duplication' OR cvterm.name = 'inverted_ring_chromosome' OR cvterm.name = 'free_ring_duplication' OR cvterm.name = 'intrachromosomal_mutation';

--- ************************************************
--- *** relation: chromosomal_deletion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An incomplete chromosome.                ***
--- ************************************************
---

CREATE VIEW chromosomal_deletion AS
  SELECT
    feature_id AS chromosomal_deletion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'inversion_derived_bipartite_deficiency' OR cvterm.name = 'inversion_derived_deficiency_plus_duplication' OR cvterm.name = 'inversion_derived_deficiency_plus_aneuploid' OR cvterm.name = 'deficient_translocation' OR cvterm.name = 'deficient_inversion' OR cvterm.name = 'chromosomal_deletion';

--- ************************************************
--- *** relation: chromosomal_inversion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW chromosomal_inversion AS
  SELECT
    feature_id AS chromosomal_inversion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'inverted_ring_chromosome' OR cvterm.name = 'pericentric_inversion' OR cvterm.name = 'paracentric_inversion' OR cvterm.name = 'inversion_cum_translocation' OR cvterm.name = 'bipartite_inversion' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'deficient_inversion' OR cvterm.name = 'chromosomal_inversion';

--- ************************************************
--- *** relation: interchromosomal_mutation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW interchromosomal_mutation AS
  SELECT
    feature_id AS interchromosomal_mutation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'chromosomal_translocation' OR cvterm.name = 'bipartite_duplication' OR cvterm.name = 'interchromosomal_transposition' OR cvterm.name = 'translocation_element' OR cvterm.name = 'Robertsonian_fusion' OR cvterm.name = 'reciprocal_chromosomal_translocation' OR cvterm.name = 'deficient_translocation' OR cvterm.name = 'inversion_cum_translocation' OR cvterm.name = 'cyclic_translocation' OR cvterm.name = 'deficient_interchromosomal_transposition' OR cvterm.name = 'inverted_interchromosomal_transposition' OR cvterm.name = 'uninverted_interchromosomal_transposition' OR cvterm.name = 'unorientated_interchromosomal_transposition' OR cvterm.name = 'interchromosomal_mutation';

--- ************************************************
--- *** relation: indel ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A hybrid term (insertion/deletion) to de ***
--- *** scribe sequence length change when the d ***
--- *** irection of the change is unspecified.   ***
--- ************************************************
---

CREATE VIEW indel AS
  SELECT
    feature_id AS indel_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'nucleotide_deletion' OR cvterm.name = 'nucleotide_insertion' OR cvterm.name = 'nucleotide_duplication' OR cvterm.name = 'indel';

--- ************************************************
--- *** relation: nucleotide_deletion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** One or more continuous nucleotides are e ***
--- *** xcised from the sequence.                ***
--- ************************************************
---

CREATE VIEW nucleotide_deletion AS
  SELECT
    feature_id AS nucleotide_deletion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'nucleotide_deletion';

--- ************************************************
--- *** relation: nucleotide_insertion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** One or more nucleotides are added betwee ***
--- *** n two adjacent nucleotides in the sequen ***
--- *** ce.                                      ***
--- ************************************************
---

CREATE VIEW nucleotide_insertion AS
  SELECT
    feature_id AS nucleotide_insertion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'nucleotide_duplication' OR cvterm.name = 'nucleotide_insertion';

--- ************************************************
--- *** relation: nucleotide_duplication ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** One or more nucleotides are added betwee ***
--- *** n two adjacent nucleotides in the sequen ***
--- *** ce; the inserted sequence derives from,  ***
--- *** or is identical in sequence to, nucleoti ***
--- *** des adjacent to insertion point.         ***
--- ************************************************
---

CREATE VIEW nucleotide_duplication AS
  SELECT
    feature_id AS nucleotide_duplication_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'nucleotide_duplication';

--- ************************************************
--- *** relation: inversion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A continuous nucleotide sequence is inve ***
--- *** rted in the same position.               ***
--- ************************************************
---

CREATE VIEW inversion AS
  SELECT
    feature_id AS inversion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'inversion';

--- ************************************************
--- *** relation: chromosomal_duplication ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An extra chromosome.                     ***
--- ************************************************
---

CREATE VIEW chromosomal_duplication AS
  SELECT
    feature_id AS chromosomal_duplication_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'interchromosomal_duplication' OR cvterm.name = 'intrachromosomal_duplication' OR cvterm.name = 'free_duplication' OR cvterm.name = 'insertional_duplication' OR cvterm.name = 'inversion_derived_deficiency_plus_duplication' OR cvterm.name = 'inversion_derived_bipartite_duplication' OR cvterm.name = 'inversion_derived_duplication_plus_aneuploid' OR cvterm.name = 'intrachromosomal_transposition' OR cvterm.name = 'tandem_duplication' OR cvterm.name = 'deficient_intrachromosomal_transposition' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'uninverted_intrachromosomal_transposition' OR cvterm.name = 'unorientated_intrachromosomal_transposition' OR cvterm.name = 'direct_tandem_duplication' OR cvterm.name = 'inverted_tandem_duplication' OR cvterm.name = 'free_ring_duplication' OR cvterm.name = 'uninverted_insertional_duplication' OR cvterm.name = 'inverted_insertional_duplication' OR cvterm.name = 'unoriented_insertional_duplication' OR cvterm.name = 'chromosomal_duplication';

--- ************************************************
--- *** relation: intrachromosomal_duplication ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW intrachromosomal_duplication AS
  SELECT
    feature_id AS intrachromosomal_duplication_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'inversion_derived_deficiency_plus_duplication' OR cvterm.name = 'inversion_derived_bipartite_duplication' OR cvterm.name = 'inversion_derived_duplication_plus_aneuploid' OR cvterm.name = 'intrachromosomal_transposition' OR cvterm.name = 'tandem_duplication' OR cvterm.name = 'deficient_intrachromosomal_transposition' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'uninverted_intrachromosomal_transposition' OR cvterm.name = 'unorientated_intrachromosomal_transposition' OR cvterm.name = 'direct_tandem_duplication' OR cvterm.name = 'inverted_tandem_duplication' OR cvterm.name = 'intrachromosomal_duplication';

--- ************************************************
--- *** relation: direct_tandem_duplication ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW direct_tandem_duplication AS
  SELECT
    feature_id AS direct_tandem_duplication_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'direct_tandem_duplication';

--- ************************************************
--- *** relation: inverted_tandem_duplication ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW inverted_tandem_duplication AS
  SELECT
    feature_id AS inverted_tandem_duplication_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'inverted_tandem_duplication';

--- ************************************************
--- *** relation: intrachromosomal_transposition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW intrachromosomal_transposition AS
  SELECT
    feature_id AS intrachromosomal_transposition_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'deficient_intrachromosomal_transposition' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'uninverted_intrachromosomal_transposition' OR cvterm.name = 'unorientated_intrachromosomal_transposition' OR cvterm.name = 'intrachromosomal_transposition';

--- ************************************************
--- *** relation: compound_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW compound_chromosome AS
  SELECT
    feature_id AS compound_chromosome_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'compound_chromosome_arm' OR cvterm.name = 'homo_compound_chromosome' OR cvterm.name = 'hetero_compound_chromosome' OR cvterm.name = 'compound_chromosome';

--- ************************************************
--- *** relation: robertsonian_fusion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW robertsonian_fusion AS
  SELECT
    feature_id AS robertsonian_fusion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'Robertsonian_fusion';

--- ************************************************
--- *** relation: chromosomal_translocation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW chromosomal_translocation AS
  SELECT
    feature_id AS chromosomal_translocation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'translocation_element' OR cvterm.name = 'Robertsonian_fusion' OR cvterm.name = 'reciprocal_chromosomal_translocation' OR cvterm.name = 'deficient_translocation' OR cvterm.name = 'inversion_cum_translocation' OR cvterm.name = 'cyclic_translocation' OR cvterm.name = 'chromosomal_translocation';

--- ************************************************
--- *** relation: ring_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW ring_chromosome AS
  SELECT
    feature_id AS ring_chromosome_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'inverted_ring_chromosome' OR cvterm.name = 'free_ring_duplication' OR cvterm.name = 'ring_chromosome';

--- ************************************************
--- *** relation: pericentric_inversion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW pericentric_inversion AS
  SELECT
    feature_id AS pericentric_inversion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'pericentric_inversion';

--- ************************************************
--- *** relation: paracentric_inversion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW paracentric_inversion AS
  SELECT
    feature_id AS paracentric_inversion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'paracentric_inversion';

--- ************************************************
--- *** relation: reciprocal_chromosomal_translocation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW reciprocal_chromosomal_translocation AS
  SELECT
    feature_id AS reciprocal_chromosomal_translocation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'reciprocal_chromosomal_translocation';

--- ************************************************
--- *** relation: sequence_variation_affecting_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Any change in mature, spliced and proces ***
--- *** sed, RNA that results from a change in t ***
--- *** he corresponding DNA sequence.           ***
--- ************************************************
---

CREATE VIEW sequence_variation_affecting_transcript AS
  SELECT
    feature_id AS sequence_variation_affecting_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_no_change_in_transcript' OR cvterm.name = 'sequence_variation_affecting_complex_change_in_transcript' OR cvterm.name = 'sequence_variant_affecting_transcription' OR cvterm.name = 'sequence_variation_affecting_transcript_sequence' OR cvterm.name = 'sequence_variation_affecting_level_of_transcript' OR cvterm.name = 'sequence_variant_causing_uncharacterised_change_in_transcript' OR cvterm.name = 'sequence_variant_affecting_rate_of_transcription' OR cvterm.name = 'sequence_variant_decreasing_rate_of_transcription' OR cvterm.name = 'sequence_variant_increasing_rate_of_transcription' OR cvterm.name = 'sequence_variation_affecting_coding_sequence' OR cvterm.name = 'sequence_variant_affecting_transcript_processing' OR cvterm.name = 'sequence variant_affecting_transcript_stability' OR cvterm.name = 'sequence_variant_affecting_transcript_secondary_structure' OR cvterm.name = 'sequence_variant_causing_amino_acid_coding_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_terminator_codon_change_in_transcript' OR cvterm.name = 'sequence_variation_affecting_reading_frame' OR cvterm.name = 'sequence_variant_causing_initiator_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_synonymous_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_non_synonymous_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_nonsense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_missense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_conservative_missense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_nonconservative_missense_codon_change_in_transcript' OR cvterm.name = 'frameshift_sequence_variation' OR cvterm.name = 'sequence_variant_causing_plus_1_frameshift_mutation' OR cvterm.name = 'sequence_variant_causing_minus_1_frameshift' OR cvterm.name = 'sequence_variant_causing_plus_2_frameshift' OR cvterm.name = 'sequence_variant_causing_minus_2_frameshift' OR cvterm.name = 'frame_restoring_sequence_variant' OR cvterm.name = 'sequence_variant_affecting_polyadenylation' OR cvterm.name = 'sequence_variant_affecting_editing' OR cvterm.name = 'sequence_variant_increasing_transcript_stability' OR cvterm.name = 'sequence_variant_decreasing_transcript_stability' OR cvterm.name = 'sequence_variant_causing_compensatory_transcript_secondary_structure_mutation' OR cvterm.name = 'sequence_variation_decreasing_level_of_transcript' OR cvterm.name = 'sequence_variation_increasing_level_of_transcript' OR cvterm.name = 'sequence_variant_causing_partially_characterised_change_in_transcript' OR cvterm.name = 'sequence_variation_affecting_transcript';

--- ************************************************
--- *** relation: sequence_variant_causing_no_change_in_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** No effect on the state of the RNA.       ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_no_change_in_transcript AS
  SELECT
    feature_id AS sequence_variant_causing_no_change_in_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_no_change_in_transcript';

--- ************************************************
--- *** relation: sequence_variation_affecting_complex_change_in_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variation_affecting_complex_change_in_transcript AS
  SELECT
    feature_id AS sequence_variation_affecting_complex_change_in_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variation_affecting_complex_change_in_transcript';

--- ************************************************
--- *** relation: sequence_variation_affecting_coding_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Any of the amino acid coding triplets of ***
--- ***  a gene are affected by the DNA mutation ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW sequence_variation_affecting_coding_sequence AS
  SELECT
    feature_id AS sequence_variation_affecting_coding_sequence_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_amino_acid_coding_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_terminator_codon_change_in_transcript' OR cvterm.name = 'sequence_variation_affecting_reading_frame' OR cvterm.name = 'sequence_variant_causing_initiator_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_synonymous_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_non_synonymous_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_nonsense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_missense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_conservative_missense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_nonconservative_missense_codon_change_in_transcript' OR cvterm.name = 'frameshift_sequence_variation' OR cvterm.name = 'sequence_variant_causing_plus_1_frameshift_mutation' OR cvterm.name = 'sequence_variant_causing_minus_1_frameshift' OR cvterm.name = 'sequence_variant_causing_plus_2_frameshift' OR cvterm.name = 'sequence_variant_causing_minus_2_frameshift' OR cvterm.name = 'frame_restoring_sequence_variant' OR cvterm.name = 'sequence_variation_affecting_coding_sequence';

--- ************************************************
--- *** relation: sequence_variant_causing_initiator_codon_change_in_trans ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The DNA mutation changes, usually destro ***
--- *** ys, the first coding triplet of a gene.  ***
--- *** Usually prevents translation although an ***
--- *** other initiator codon may be used.       ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_initiator_codon_change_in_trans AS
  SELECT
    feature_id AS sequence_variant_causing_initiator_codon_change_in_trans_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_initiator_codon_change_in_transcript';

--- ************************************************
--- *** relation: seq_variant_causing_amino_acid_coding_codon_change_in_trans ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The DNA mutation affects the amino acid  ***
--- *** coding sequence of a gene; this region i ***
--- *** ncludes both the initiator and terminato ***
--- *** r codons.                                ***
--- ************************************************
---

CREATE VIEW seq_variant_causing_amino_acid_coding_codon_change_in_trans AS
  SELECT
    feature_id AS seq_variant_causing_amino_acid_coding_codon_change_in_trans_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_initiator_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_synonymous_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_non_synonymous_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_nonsense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_missense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_conservative_missense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_nonconservative_missense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_amino_acid_coding_codon_change_in_transcript';

--- ************************************************
--- *** relation: seq_variant_causing_synonymous_codon_change_in_trans ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The changed codon has the same translati ***
--- *** on product as the original codon.        ***
--- ************************************************
---

CREATE VIEW seq_variant_causing_synonymous_codon_change_in_trans AS
  SELECT
    feature_id AS seq_variant_causing_synonymous_codon_change_in_trans_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_synonymous_codon_change_in_transcript';

--- ************************************************
--- *** relation: seq_variant_causing_non_synonymous_codon_change_in_trans ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A DNA point mutation that causes a subst ***
--- *** itution of an amino acid by an other.    ***
--- ************************************************
---

CREATE VIEW seq_variant_causing_non_synonymous_codon_change_in_trans AS
  SELECT
    feature_id AS seq_variant_causing_non_synonymous_codon_change_in_trans_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_missense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_conservative_missense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_nonconservative_missense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_non_synonymous_codon_change_in_transcript';

--- ************************************************
--- *** relation: sequence_variant_causing_missense_codon_change_in_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The nucleotide change in the codon leads ***
--- ***  to a new codon coding for a new amino a ***
--- *** cid.                                     ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_missense_codon_change_in_transcript AS
  SELECT
    feature_id AS sequence_variant_causing_missense_codon_change_in_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_conservative_missense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_nonconservative_missense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_missense_codon_change_in_transcript';

--- ************************************************
--- *** relation: seq_var_causing_conservative_missense_codon_change_in_trans ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The amino acid change following from the ***
--- ***  codon change does not change the gross  ***
--- *** properties (size, charge, hydrophobicity ***
--- *** ) of the amino acid at that position.    ***
--- ************************************************
---

CREATE VIEW seq_var_causing_conservative_missense_codon_change_in_trans AS
  SELECT
    feature_id AS seq_var_causing_conservative_missense_codon_change_in_trans_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_conservative_missense_codon_change_in_transcript';

--- ************************************************
--- *** relation: seq_var_causing_nonconserv_missense_codon_change_in_trans ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The amino acid change following from the ***
--- ***  codon change changes the gross properti ***
--- *** es (size, charge, hydrophobicity) of the ***
--- ***  amino acid in that position.            ***
--- ************************************************
---

CREATE VIEW seq_var_causing_nonconserv_missense_codon_change_in_trans AS
  SELECT
    feature_id AS seq_var_causing_nonconserv_missense_codon_change_in_trans_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_nonconservative_missense_codon_change_in_transcript';

--- ************************************************
--- *** relation: sequence_variant_causing_nonsense_codon_change_in_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The nucleotide change in the codon tripl ***
--- *** et creates a terminator codon.           ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_nonsense_codon_change_in_transcript AS
  SELECT
    feature_id AS sequence_variant_causing_nonsense_codon_change_in_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_nonsense_codon_change_in_transcript';

--- ************************************************
--- *** relation: sequence_variant_causing_terminator_codon_change_in_trans ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The nucleotide change in the codon tripl ***
--- *** et changes the stop codon, causing an el ***
--- *** ongated transcript sequence.             ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_terminator_codon_change_in_trans AS
  SELECT
    feature_id AS sequence_variant_causing_terminator_codon_change_in_trans_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_terminator_codon_change_in_transcript';

--- ************************************************
--- *** relation: sequence_variation_affecting_reading_frame ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An umbrella term for terms describing an ***
--- ***  effect of a sequence variation on the f ***
--- *** rame of translation.                     ***
--- ************************************************
---

CREATE VIEW sequence_variation_affecting_reading_frame AS
  SELECT
    feature_id AS sequence_variation_affecting_reading_frame_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'frameshift_sequence_variation' OR cvterm.name = 'sequence_variant_causing_plus_1_frameshift_mutation' OR cvterm.name = 'sequence_variant_causing_minus_1_frameshift' OR cvterm.name = 'sequence_variant_causing_plus_2_frameshift' OR cvterm.name = 'sequence_variant_causing_minus_2_frameshift' OR cvterm.name = 'frame_restoring_sequence_variant' OR cvterm.name = 'sequence_variation_affecting_reading_frame';

--- ************************************************
--- *** relation: frameshift_sequence_variation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A mutation causing a disruption of the t ***
--- *** ranslational reading frame, because the  ***
--- *** number of nucleotides inserted or delete ***
--- *** d is not a multiple of three.            ***
--- ************************************************
---

CREATE VIEW frameshift_sequence_variation AS
  SELECT
    feature_id AS frameshift_sequence_variation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_plus_1_frameshift_mutation' OR cvterm.name = 'sequence_variant_causing_minus_1_frameshift' OR cvterm.name = 'sequence_variant_causing_plus_2_frameshift' OR cvterm.name = 'sequence_variant_causing_minus_2_frameshift' OR cvterm.name = 'frame_restoring_sequence_variant' OR cvterm.name = 'frameshift_sequence_variation';

--- ************************************************
--- *** relation: sequence_variant_causing_plus_1_frameshift_mutation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A mutation causing a disruption of the t ***
--- *** ranslational reading frame, due to the i ***
--- *** nsertion of a nucleotide.                ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_plus_1_frameshift_mutation AS
  SELECT
    feature_id AS sequence_variant_causing_plus_1_frameshift_mutation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_plus_1_frameshift_mutation';

--- ************************************************
--- *** relation: sequence_variant_causing_minus_1_frameshift ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A mutation causing a disruption of the t ***
--- *** ranslational reading frame, due to the d ***
--- *** eletion of a nucleotide.                 ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_minus_1_frameshift AS
  SELECT
    feature_id AS sequence_variant_causing_minus_1_frameshift_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_minus_1_frameshift';

--- ************************************************
--- *** relation: sequence_variant_causing_plus_2_frameshift ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A mutation causing a disruption of the t ***
--- *** ranslational reading frame, due to the i ***
--- *** nsertion of two nucleotides.             ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_plus_2_frameshift AS
  SELECT
    feature_id AS sequence_variant_causing_plus_2_frameshift_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_plus_2_frameshift';

--- ************************************************
--- *** relation: sequence_variant_causing_minus_2_frameshift ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A mutation causing a disruption of the t ***
--- *** ranslational reading frame, due to the d ***
--- *** eletion of two nucleotides.              ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_minus_2_frameshift AS
  SELECT
    feature_id AS sequence_variant_causing_minus_2_frameshift_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_minus_2_frameshift';

--- ************************************************
--- *** relation: sequence_variant_affecting_transcript_processing ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Sequence variant affects the way in whic ***
--- *** h the primary transcriptional product is ***
--- ***  processed to form the mature transcript ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW sequence_variant_affecting_transcript_processing AS
  SELECT
    feature_id AS sequence_variant_affecting_transcript_processing_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_affecting_polyadenylation' OR cvterm.name = 'sequence_variant_affecting_editing' OR cvterm.name = 'sequence_variant_affecting_transcript_processing';

--- ************************************************
--- *** relation: sequence_variant_affecting_splicing ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence_variant_effect where the way  ***
--- *** in which the primary transcriptional pro ***
--- *** duct is processed to form the mature tra ***
--- *** nscript, specifically by the removal (sp ***
--- *** licing) of intron sequences is changed.  ***
--- ************************************************
---

CREATE VIEW sequence_variant_affecting_splicing AS
  SELECT
    feature_id AS sequence_variant_affecting_splicing_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_affecting_splice_donor' OR cvterm.name = 'sequence_variant_affecting_splice_acceptor' OR cvterm.name = 'sequence_variant_causing_cryptic_splice_activation' OR cvterm.name = 'sequence_variant_causes_exon_loss' OR cvterm.name = 'sequence_variant_causes_intron_gain' OR cvterm.name = 'sequence_variant_causing_cryptic_splice_donor_activation' OR cvterm.name = 'sequence_variant_causing_cryptic_splice_acceptor_activation' OR cvterm.name = 'sequence_variant_affecting_splicing';

--- ************************************************
--- *** relation: sequence_variant_affecting_splice_donor ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence_variant_effect that changes t ***
--- *** he splice donor sequence.                ***
--- ************************************************
---

CREATE VIEW sequence_variant_affecting_splice_donor AS
  SELECT
    feature_id AS sequence_variant_affecting_splice_donor_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_affecting_splice_donor';

--- ************************************************
--- *** relation: sequence_variant_affecting_splice_acceptor ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence_variant_effect that changes t ***
--- *** he splice acceptor sequence.             ***
--- ************************************************
---

CREATE VIEW sequence_variant_affecting_splice_acceptor AS
  SELECT
    feature_id AS sequence_variant_affecting_splice_acceptor_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_affecting_splice_acceptor';

--- ************************************************
--- *** relation: sequence_variant_causing_cryptic_splice_activation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant causing a new (functi ***
--- *** onal) splice site.                       ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_cryptic_splice_activation AS
  SELECT
    feature_id AS sequence_variant_causing_cryptic_splice_activation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_cryptic_splice_donor_activation' OR cvterm.name = 'sequence_variant_causing_cryptic_splice_acceptor_activation' OR cvterm.name = 'sequence_variant_causing_cryptic_splice_activation';

--- ************************************************
--- *** relation: sequence_variant_affecting_editing ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Sequence variant affects the editing of  ***
--- *** the transcript.                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_affecting_editing AS
  SELECT
    feature_id AS sequence_variant_affecting_editing_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_affecting_editing';

--- ************************************************
--- *** relation: sequence_variant_affecting_transcription ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Mutation affects the process of transcri ***
--- *** ption, its initiation, progression or te ***
--- *** rmination.                               ***
--- ************************************************
---

CREATE VIEW sequence_variant_affecting_transcription AS
  SELECT
    feature_id AS sequence_variant_affecting_transcription_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_affecting_rate_of_transcription' OR cvterm.name = 'sequence_variant_decreasing_rate_of_transcription' OR cvterm.name = 'sequence_variant_increasing_rate_of_transcription' OR cvterm.name = 'sequence_variant_affecting_transcription';

--- ************************************************
--- *** relation: sequence_variant_decreasing_rate_of_transcription ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variation that decreases the  ***
--- *** rate a which transcription of the sequen ***
--- *** ce occurs.                               ***
--- ************************************************
---

CREATE VIEW sequence_variant_decreasing_rate_of_transcription AS
  SELECT
    feature_id AS sequence_variant_decreasing_rate_of_transcription_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_decreasing_rate_of_transcription';

--- ************************************************
--- *** relation: sequence_variation_affecting_transcript_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variation_affecting_transcript_sequence AS
  SELECT
    feature_id AS sequence_variation_affecting_transcript_sequence_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variation_affecting_coding_sequence' OR cvterm.name = 'sequence_variant_affecting_transcript_processing' OR cvterm.name = 'sequence variant_affecting_transcript_stability' OR cvterm.name = 'sequence_variant_affecting_transcript_secondary_structure' OR cvterm.name = 'sequence_variant_causing_amino_acid_coding_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_terminator_codon_change_in_transcript' OR cvterm.name = 'sequence_variation_affecting_reading_frame' OR cvterm.name = 'sequence_variant_causing_initiator_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_synonymous_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_non_synonymous_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_nonsense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_missense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_conservative_missense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_nonconservative_missense_codon_change_in_transcript' OR cvterm.name = 'frameshift_sequence_variation' OR cvterm.name = 'sequence_variant_causing_plus_1_frameshift_mutation' OR cvterm.name = 'sequence_variant_causing_minus_1_frameshift' OR cvterm.name = 'sequence_variant_causing_plus_2_frameshift' OR cvterm.name = 'sequence_variant_causing_minus_2_frameshift' OR cvterm.name = 'frame_restoring_sequence_variant' OR cvterm.name = 'sequence_variant_affecting_polyadenylation' OR cvterm.name = 'sequence_variant_affecting_editing' OR cvterm.name = 'sequence_variant_increasing_transcript_stability' OR cvterm.name = 'sequence_variant_decreasing_transcript_stability' OR cvterm.name = 'sequence_variant_causing_compensatory_transcript_secondary_structure_mutation' OR cvterm.name = 'sequence_variation_affecting_transcript_sequence';

--- ************************************************
--- *** relation: sequence_variant_increasing_rate_of_transcription ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_increasing_rate_of_transcription AS
  SELECT
    feature_id AS sequence_variant_increasing_rate_of_transcription_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_increasing_rate_of_transcription';

--- ************************************************
--- *** relation: sequence_variant_affecting_rate_of_transcription ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A mutation that alters the rate a which  ***
--- *** transcription of the sequence occurs.    ***
--- ************************************************
---

CREATE VIEW sequence_variant_affecting_rate_of_transcription AS
  SELECT
    feature_id AS sequence_variant_affecting_rate_of_transcription_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_decreasing_rate_of_transcription' OR cvterm.name = 'sequence_variant_increasing_rate_of_transcription' OR cvterm.name = 'sequence_variant_affecting_rate_of_transcription';

--- ************************************************
--- *** relation: sequence_variant_affecting_transcript_stability ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Sequence variant affects the stability o ***
--- *** f the transcript.                        ***
--- ************************************************
---

CREATE VIEW sequence_variant_affecting_transcript_stability AS
  SELECT
    feature_id AS sequence_variant_affecting_transcript_stability_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_increasing_transcript_stability' OR cvterm.name = 'sequence_variant_decreasing_transcript_stability' OR cvterm.name = 'sequence variant_affecting_transcript_stability';

--- ************************************************
--- *** relation: sequence_variant_increasing_transcript_stability ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Sequence variant increases the stability ***
--- ***  (half-life) of the transcript.          ***
--- ************************************************
---

CREATE VIEW sequence_variant_increasing_transcript_stability AS
  SELECT
    feature_id AS sequence_variant_increasing_transcript_stability_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_increasing_transcript_stability';

--- ************************************************
--- *** relation: sequence_variant_decreasing_transcript_stability ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Sequence variant decreases the stability ***
--- ***  (half-life) of the transcript.          ***
--- ************************************************
---

CREATE VIEW sequence_variant_decreasing_transcript_stability AS
  SELECT
    feature_id AS sequence_variant_decreasing_transcript_stability_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_decreasing_transcript_stability';

--- ************************************************
--- *** relation: sequence_variation_affecting_level_of_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variation that causes a chang ***
--- *** e in the level of mature, spliced and pr ***
--- *** ocessed RNA, resulting from a change in  ***
--- *** the corresponding DNA sequence.          ***
--- ************************************************
---

CREATE VIEW sequence_variation_affecting_level_of_transcript AS
  SELECT
    feature_id AS sequence_variation_affecting_level_of_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variation_decreasing_level_of_transcript' OR cvterm.name = 'sequence_variation_increasing_level_of_transcript' OR cvterm.name = 'sequence_variation_affecting_level_of_transcript';

--- ************************************************
--- *** relation: sequence_variation_decreasing_level_of_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variation that causes a decre ***
--- *** ase in the level of mature, spliced and  ***
--- *** processed RNA, resulting from a change i ***
--- *** n the corresponding DNA sequence.        ***
--- ************************************************
---

CREATE VIEW sequence_variation_decreasing_level_of_transcript AS
  SELECT
    feature_id AS sequence_variation_decreasing_level_of_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variation_decreasing_level_of_transcript';

--- ************************************************
--- *** relation: sequence_variation_increasing_level_of_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence_variation that causes an incr ***
--- *** ease in the level of mature, spliced and ***
--- ***  processed RNA, resulting from a change  ***
--- *** in the corresponding DNA sequence.       ***
--- ************************************************
---

CREATE VIEW sequence_variation_increasing_level_of_transcript AS
  SELECT
    feature_id AS sequence_variation_increasing_level_of_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variation_increasing_level_of_transcript';

--- ************************************************
--- *** relation: sequence_variant_affecting_translational_product ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Mutation causes a change in primary tran ***
--- *** slation product of a transcript.         ***
--- ************************************************
---

CREATE VIEW sequence_variant_affecting_translational_product AS
  SELECT
    feature_id AS sequence_variant_affecting_translational_product_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_no_change_of_translational_product' OR cvterm.name = 'sequence_variant_causing_uncharacterised_change_of_translational_product' OR cvterm.name = 'sequence_variant_causing_complex_change_of_translational_product' OR cvterm.name = 'sequence_variant_affecting_level_of_translational_product' OR cvterm.name = 'sequence_variant_affecting_polypeptide_amino_acid_sequence' OR cvterm.name = 'sequence_variant_affecting_3D_structure_of_polypeptide' OR cvterm.name = 'sequence_variant_affecting_polypeptide_function' OR cvterm.name = 'sequence_variant_causing_partially_characterised_change_of_translational_product' OR cvterm.name = 'sequence_variant_decreasing_level_of_translation_product' OR cvterm.name = 'sequence_variant_increasing_level_of_translation_product' OR cvterm.name = 'sequence_variant_causing_amino_acid_substitution' OR cvterm.name = 'sequence_variant_causing_amino_acid_insertion' OR cvterm.name = 'sequence_variant_causing_amino_acid_deletion' OR cvterm.name = 'sequence_variant_causing_polypeptide_truncation' OR cvterm.name = 'sequence_variant_causing_polypeptide_elongation' OR cvterm.name = 'sequence_variant_causing_polypeptide_fusion' OR cvterm.name = 'sequence_variant_causing_conservative_amino_acid_substitution' OR cvterm.name = 'sequence_variant_causing_nonconservative_amino_acid_substitution' OR cvterm.name = 'mutation_causing_polypeptide_N_terminal_elongation' OR cvterm.name = 'mutation_causing_polypeptide_C_terminal_elongation' OR cvterm.name = 'mutation_causing_inframe_polypeptide_N_terminal_elongation' OR cvterm.name = 'mutation_causing_out_of_frame_polypeptide_N_terminal_elongation' OR cvterm.name = 'mutaton_causing_inframe_polypeptide_C_terminal_elongation' OR cvterm.name = 'mutation_causing_out_of_frame_polypeptide_C_terminal_elongation' OR cvterm.name = 'sequence_variant_causing_no_3D_structural_change' OR cvterm.name = 'sequence_variant_causing_uncharacterised_3D_structural_change' OR cvterm.name = 'sequence_variant_causing_complex_3D_structural_change' OR cvterm.name = 'sequence_variant_causing_conformational_change' OR cvterm.name = 'sequence_variant_causing_partially_characterised_3D_structural_change' OR cvterm.name = 'sequence_variant_causing_loss_of_function_of_polypeptide' OR cvterm.name = 'sequence_variant_causing_polypeptide_localization_change' OR cvterm.name = 'sequence_variant_causing_polypeptide_post_translational_processing_change' OR cvterm.name = 'sequence_variant_causing_gain_of_function_of_polypeptide' OR cvterm.name = 'sequence_variant_causing_inactive_ligand_binding_site' OR cvterm.name = 'sequence_variant_causing_polypeptide_post_translational_processing_change' OR cvterm.name = 'sequence_variant_causing_partial_loss_of_function_of_polypeptide' OR cvterm.name = 'sequence_variant_causing_inactive_catalytic_site' OR cvterm.name = 'sequence_variant_affecting_translational_product';

--- ************************************************
--- *** relation: sequence_variant_causing_no_change_of_translational_product ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The sequence variant at RNA level does n ***
--- *** ot lead to any change in polypeptide.    ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_no_change_of_translational_product AS
  SELECT
    feature_id AS sequence_variant_causing_no_change_of_translational_product_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_no_change_of_translational_product';

--- ************************************************
--- *** relation: sequence_variant_causing_uncharacterised_change_of_product ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant causing an uncharacte ***
--- *** rized change of translational product.   ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_uncharacterised_change_of_product AS
  SELECT
    feature_id AS sequence_variant_causing_uncharacterised_change_of_product_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_partially_characterised_change_of_translational_product' OR cvterm.name = 'sequence_variant_causing_uncharacterised_change_of_translational_product';

--- ************************************************
--- *** relation: seq_variant_causing_partly_characterised_change_of_product ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant causing a partially u ***
--- *** ncharacterised change in translational p ***
--- *** roduct.                                  ***
--- ************************************************
---

CREATE VIEW seq_variant_causing_partly_characterised_change_of_product AS
  SELECT
    feature_id AS seq_variant_causing_partly_characterised_change_of_product_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_partially_characterised_change_of_translational_product';

--- ************************************************
--- *** relation: sequence_variant_causing_complex_change_of_product ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Any sequence variant effect that is know ***
--- *** n at nucleotide level but cannot be expl ***
--- *** ained by using other key terms.          ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_complex_change_of_product AS
  SELECT
    feature_id AS sequence_variant_causing_complex_change_of_product_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_complex_change_of_translational_product';

--- ************************************************
--- *** relation: sequence_variant_causing_amino_acid_substitution ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The replacement of a single amino acid b ***
--- *** y another.                               ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_amino_acid_substitution AS
  SELECT
    feature_id AS sequence_variant_causing_amino_acid_substitution_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_conservative_amino_acid_substitution' OR cvterm.name = 'sequence_variant_causing_nonconservative_amino_acid_substitution' OR cvterm.name = 'sequence_variant_causing_amino_acid_substitution';

--- ************************************************
--- *** relation: sequence_variant_causing_conservative_amino_acid_sub ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_conservative_amino_acid_sub AS
  SELECT
    feature_id AS sequence_variant_causing_conservative_amino_acid_sub_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_conservative_amino_acid_substitution';

--- ************************************************
--- *** relation: sequence_variant_causing_nonconservative_amino_acid_sub ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_nonconservative_amino_acid_sub AS
  SELECT
    feature_id AS sequence_variant_causing_nonconservative_amino_acid_sub_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_nonconservative_amino_acid_substitution';

--- ************************************************
--- *** relation: sequence_variant_causing_amino_acid_insertion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The insertion of one or more amino acids ***
--- ***  from the polypeptide, without affecting ***
--- ***  the surrounding sequence.               ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_amino_acid_insertion AS
  SELECT
    feature_id AS sequence_variant_causing_amino_acid_insertion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_amino_acid_insertion';

--- ************************************************
--- *** relation: sequence_variant_causing_amino_acid_deletion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The deletion of one or more amino acids  ***
--- *** from the polypeptide, without affecting  ***
--- *** the surrounding sequence.                ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_amino_acid_deletion AS
  SELECT
    feature_id AS sequence_variant_causing_amino_acid_deletion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_amino_acid_deletion';

--- ************************************************
--- *** relation: sequence_variant_causing_polypeptide_truncation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The translational product is truncated a ***
--- *** t its C-terminus, usually a result of a  ***
--- *** nonsense codon change in transcript (SO: ***
--- *** 1000062).                                ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_polypeptide_truncation AS
  SELECT
    feature_id AS sequence_variant_causing_polypeptide_truncation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_polypeptide_truncation';

--- ************************************************
--- *** relation: sequence_variant_causing_polypeptide_elongation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The extension of the translational produ ***
--- *** ct at either (or both) the N-terminus an ***
--- *** d/or the C-terminus.                     ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_polypeptide_elongation AS
  SELECT
    feature_id AS sequence_variant_causing_polypeptide_elongation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'mutation_causing_polypeptide_N_terminal_elongation' OR cvterm.name = 'mutation_causing_polypeptide_C_terminal_elongation' OR cvterm.name = 'mutation_causing_inframe_polypeptide_N_terminal_elongation' OR cvterm.name = 'mutation_causing_out_of_frame_polypeptide_N_terminal_elongation' OR cvterm.name = 'mutaton_causing_inframe_polypeptide_C_terminal_elongation' OR cvterm.name = 'mutation_causing_out_of_frame_polypeptide_C_terminal_elongation' OR cvterm.name = 'sequence_variant_causing_polypeptide_elongation';

--- ************************************************
--- *** relation: mutation_causing_polypeptide_n_terminal_elongation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW mutation_causing_polypeptide_n_terminal_elongation AS
  SELECT
    feature_id AS mutation_causing_polypeptide_n_terminal_elongation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'mutation_causing_inframe_polypeptide_N_terminal_elongation' OR cvterm.name = 'mutation_causing_out_of_frame_polypeptide_N_terminal_elongation' OR cvterm.name = 'mutation_causing_polypeptide_N_terminal_elongation';

--- ************************************************
--- *** relation: mutation_causing_polypeptide_c_terminal_elongation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW mutation_causing_polypeptide_c_terminal_elongation AS
  SELECT
    feature_id AS mutation_causing_polypeptide_c_terminal_elongation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'mutaton_causing_inframe_polypeptide_C_terminal_elongation' OR cvterm.name = 'mutation_causing_out_of_frame_polypeptide_C_terminal_elongation' OR cvterm.name = 'mutation_causing_polypeptide_C_terminal_elongation';

--- ************************************************
--- *** relation: sequence_variant_affecting_level_of_translational_product ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_affecting_level_of_translational_product AS
  SELECT
    feature_id AS sequence_variant_affecting_level_of_translational_product_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_decreasing_level_of_translation_product' OR cvterm.name = 'sequence_variant_increasing_level_of_translation_product' OR cvterm.name = 'sequence_variant_affecting_level_of_translational_product';

--- ************************************************
--- *** relation: sequence_variant_decreasing_level_of_translation_product ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_decreasing_level_of_translation_product AS
  SELECT
    feature_id AS sequence_variant_decreasing_level_of_translation_product_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_decreasing_level_of_translation_product';

--- ************************************************
--- *** relation: sequence_variant_increasing_level_of_translation_product ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_increasing_level_of_translation_product AS
  SELECT
    feature_id AS sequence_variant_increasing_level_of_translation_product_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_increasing_level_of_translation_product';

--- ************************************************
--- *** relation: sequence_variant_affecting_polypeptide_amino_acid_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_affecting_polypeptide_amino_acid_sequence AS
  SELECT
    feature_id AS sequence_variant_affecting_polypeptide_amino_acid_sequence_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_amino_acid_substitution' OR cvterm.name = 'sequence_variant_causing_amino_acid_insertion' OR cvterm.name = 'sequence_variant_causing_amino_acid_deletion' OR cvterm.name = 'sequence_variant_causing_polypeptide_truncation' OR cvterm.name = 'sequence_variant_causing_polypeptide_elongation' OR cvterm.name = 'sequence_variant_causing_polypeptide_fusion' OR cvterm.name = 'sequence_variant_causing_conservative_amino_acid_substitution' OR cvterm.name = 'sequence_variant_causing_nonconservative_amino_acid_substitution' OR cvterm.name = 'mutation_causing_polypeptide_N_terminal_elongation' OR cvterm.name = 'mutation_causing_polypeptide_C_terminal_elongation' OR cvterm.name = 'mutation_causing_inframe_polypeptide_N_terminal_elongation' OR cvterm.name = 'mutation_causing_out_of_frame_polypeptide_N_terminal_elongation' OR cvterm.name = 'mutaton_causing_inframe_polypeptide_C_terminal_elongation' OR cvterm.name = 'mutation_causing_out_of_frame_polypeptide_C_terminal_elongation' OR cvterm.name = 'sequence_variant_affecting_polypeptide_amino_acid_sequence';

--- ************************************************
--- *** relation: mutation_causing_inframe_polypeptide_n_terminal_elongation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW mutation_causing_inframe_polypeptide_n_terminal_elongation AS
  SELECT
    feature_id AS mutation_causing_inframe_polypeptide_n_terminal_elongation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'mutation_causing_inframe_polypeptide_N_terminal_elongation';

--- ************************************************
--- *** relation: mutation_causing_out_of_frame_polypeptide_n_terminal_elong ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW mutation_causing_out_of_frame_polypeptide_n_terminal_elong AS
  SELECT
    feature_id AS mutation_causing_out_of_frame_polypeptide_n_terminal_elong_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'mutation_causing_out_of_frame_polypeptide_N_terminal_elongation';

--- ************************************************
--- *** relation: mutaton_causing_inframe_polypeptide_c_terminal_elongation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW mutaton_causing_inframe_polypeptide_c_terminal_elongation AS
  SELECT
    feature_id AS mutaton_causing_inframe_polypeptide_c_terminal_elongation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'mutaton_causing_inframe_polypeptide_C_terminal_elongation';

--- ************************************************
--- *** relation: mutation_causing_out_of_frame_polypeptide_c_terminal_elong ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW mutation_causing_out_of_frame_polypeptide_c_terminal_elong AS
  SELECT
    feature_id AS mutation_causing_out_of_frame_polypeptide_c_terminal_elong_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'mutation_causing_out_of_frame_polypeptide_C_terminal_elongation';

--- ************************************************
--- *** relation: frame_restoring_sequence_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A mutation that reverts the sequence of  ***
--- *** a previous frameshift mutation back to t ***
--- *** he initial frame.                        ***
--- ************************************************
---

CREATE VIEW frame_restoring_sequence_variant AS
  SELECT
    feature_id AS frame_restoring_sequence_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'frame_restoring_sequence_variant';

--- ************************************************
--- *** relation: sequence_variant_affecting_3d_structure_of_polypeptide ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A mutation that changes the amino acid s ***
--- *** equence of the peptide in such a way tha ***
--- *** t it changes the 3D structure of the mol ***
--- *** ecule.                                   ***
--- ************************************************
---

CREATE VIEW sequence_variant_affecting_3d_structure_of_polypeptide AS
  SELECT
    feature_id AS sequence_variant_affecting_3d_structure_of_polypeptide_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_no_3D_structural_change' OR cvterm.name = 'sequence_variant_causing_uncharacterised_3D_structural_change' OR cvterm.name = 'sequence_variant_causing_complex_3D_structural_change' OR cvterm.name = 'sequence_variant_causing_conformational_change' OR cvterm.name = 'sequence_variant_causing_partially_characterised_3D_structural_change' OR cvterm.name = 'sequence_variant_affecting_3D_structure_of_polypeptide';

--- ************************************************
--- *** relation: sequence_variant_causing_no_3d_structural_change ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_no_3d_structural_change AS
  SELECT
    feature_id AS sequence_variant_causing_no_3d_structural_change_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_no_3D_structural_change';

--- ************************************************
--- *** relation: seq_variant_causing_uncharacterised_3d_structural_change ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW seq_variant_causing_uncharacterised_3d_structural_change AS
  SELECT
    feature_id AS seq_variant_causing_uncharacterised_3d_structural_change_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_partially_characterised_3D_structural_change' OR cvterm.name = 'sequence_variant_causing_uncharacterised_3D_structural_change';

--- ************************************************
--- *** relation: seq_var_causing_partly_characterised_3d_structural_change ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW seq_var_causing_partly_characterised_3d_structural_change AS
  SELECT
    feature_id AS seq_var_causing_partly_characterised_3d_structural_change_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_partially_characterised_3D_structural_change';

--- ************************************************
--- *** relation: sequence_variant_causing_complex_3d_structural_change ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_complex_3d_structural_change AS
  SELECT
    feature_id AS sequence_variant_causing_complex_3d_structural_change_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_complex_3D_structural_change';

--- ************************************************
--- *** relation: sequence_variant_causing_conformational_change ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_conformational_change AS
  SELECT
    feature_id AS sequence_variant_causing_conformational_change_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_conformational_change';

--- ************************************************
--- *** relation: sequence_variant_affecting_polypeptide_function ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_affecting_polypeptide_function AS
  SELECT
    feature_id AS sequence_variant_affecting_polypeptide_function_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_loss_of_function_of_polypeptide' OR cvterm.name = 'sequence_variant_causing_polypeptide_localization_change' OR cvterm.name = 'sequence_variant_causing_polypeptide_post_translational_processing_change' OR cvterm.name = 'sequence_variant_causing_gain_of_function_of_polypeptide' OR cvterm.name = 'sequence_variant_causing_inactive_ligand_binding_site' OR cvterm.name = 'sequence_variant_causing_polypeptide_post_translational_processing_change' OR cvterm.name = 'sequence_variant_causing_partial_loss_of_function_of_polypeptide' OR cvterm.name = 'sequence_variant_causing_inactive_catalytic_site' OR cvterm.name = 'sequence_variant_affecting_polypeptide_function';

--- ************************************************
--- *** relation: sequence_variant_causing_loss_of_function_of_polypeptide ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_loss_of_function_of_polypeptide AS
  SELECT
    feature_id AS sequence_variant_causing_loss_of_function_of_polypeptide_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_inactive_ligand_binding_site' OR cvterm.name = 'sequence_variant_causing_polypeptide_post_translational_processing_change' OR cvterm.name = 'sequence_variant_causing_partial_loss_of_function_of_polypeptide' OR cvterm.name = 'sequence_variant_causing_inactive_catalytic_site' OR cvterm.name = 'sequence_variant_causing_loss_of_function_of_polypeptide';

--- ************************************************
--- *** relation: sequence_variant_causing_inactive_ligand_binding_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_inactive_ligand_binding_site AS
  SELECT
    feature_id AS sequence_variant_causing_inactive_ligand_binding_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_inactive_catalytic_site' OR cvterm.name = 'sequence_variant_causing_inactive_ligand_binding_site';

--- ************************************************
--- *** relation: sequence_variant_causing_inactive_catalytic_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_inactive_catalytic_site AS
  SELECT
    feature_id AS sequence_variant_causing_inactive_catalytic_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_inactive_catalytic_site';

--- ************************************************
--- *** relation: sequence_variant_causing_polypeptide_localization_change ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_polypeptide_localization_change AS
  SELECT
    feature_id AS sequence_variant_causing_polypeptide_localization_change_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_polypeptide_localization_change';

--- ************************************************
--- *** relation: seq_variant_causing_polypeptide_post_trans_processing_change ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW seq_variant_causing_polypeptide_post_trans_processing_change AS
  SELECT
    feature_id AS seq_variant_causing_polypeptide_post_trans_processing_change_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_polypeptide_post_translational_processing_change';

--- ************************************************
--- *** relation: seq_variant_causing_part_loss_of_function_of_polypeptide ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW seq_variant_causing_part_loss_of_function_of_polypeptide AS
  SELECT
    feature_id AS seq_variant_causing_part_loss_of_function_of_polypeptide_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_partial_loss_of_function_of_polypeptide';

--- ************************************************
--- *** relation: sequence_variant_causing_gain_of_function_of_polypeptide ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_gain_of_function_of_polypeptide AS
  SELECT
    feature_id AS sequence_variant_causing_gain_of_function_of_polypeptide_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_gain_of_function_of_polypeptide';

--- ************************************************
--- *** relation: sequence_variant_affecting_transcript_secondary_structure ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that affects the seco ***
--- *** ndary structure (folding) of the RNA tra ***
--- *** nscript molecule.                        ***
--- ************************************************
---

CREATE VIEW sequence_variant_affecting_transcript_secondary_structure AS
  SELECT
    feature_id AS sequence_variant_affecting_transcript_secondary_structure_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_compensatory_transcript_secondary_structure_mutation' OR cvterm.name = 'sequence_variant_affecting_transcript_secondary_structure';

--- ************************************************
--- *** relation: seq_variant_caus_compensatory_trans_secondary_structure_mut ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW seq_variant_caus_compensatory_trans_secondary_structure_mut AS
  SELECT
    feature_id AS seq_variant_caus_compensatory_trans_secondary_structure_mut_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_compensatory_transcript_secondary_structure_mutation';

--- ************************************************
--- *** relation: sequence_variant_effect ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The effect of a change in nucleotide seq ***
--- *** uence.                                   ***
--- ************************************************
---

CREATE VIEW sequence_variant_effect AS
  SELECT
    feature_id AS sequence_variant_effect_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_affecting_regulatory_region' OR cvterm.name = 'silent_mutation' OR cvterm.name = 'sequence_variant_affecting_copy_number' OR cvterm.name = 'sequence_variation_affecting_transcript' OR cvterm.name = 'sequence_variant_affecting_splicing' OR cvterm.name = 'sequence_variant_affecting_translational_product' OR cvterm.name = 'sequence_variant_affecting_gene_structure' OR cvterm.name = 'sequence_variant_causing_no_change_in_transcript' OR cvterm.name = 'sequence_variation_affecting_complex_change_in_transcript' OR cvterm.name = 'sequence_variant_affecting_transcription' OR cvterm.name = 'sequence_variation_affecting_transcript_sequence' OR cvterm.name = 'sequence_variation_affecting_level_of_transcript' OR cvterm.name = 'sequence_variant_causing_uncharacterised_change_in_transcript' OR cvterm.name = 'sequence_variant_affecting_rate_of_transcription' OR cvterm.name = 'sequence_variant_decreasing_rate_of_transcription' OR cvterm.name = 'sequence_variant_increasing_rate_of_transcription' OR cvterm.name = 'sequence_variation_affecting_coding_sequence' OR cvterm.name = 'sequence_variant_affecting_transcript_processing' OR cvterm.name = 'sequence variant_affecting_transcript_stability' OR cvterm.name = 'sequence_variant_affecting_transcript_secondary_structure' OR cvterm.name = 'sequence_variant_causing_amino_acid_coding_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_terminator_codon_change_in_transcript' OR cvterm.name = 'sequence_variation_affecting_reading_frame' OR cvterm.name = 'sequence_variant_causing_initiator_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_synonymous_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_non_synonymous_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_nonsense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_missense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_conservative_missense_codon_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_nonconservative_missense_codon_change_in_transcript' OR cvterm.name = 'frameshift_sequence_variation' OR cvterm.name = 'sequence_variant_causing_plus_1_frameshift_mutation' OR cvterm.name = 'sequence_variant_causing_minus_1_frameshift' OR cvterm.name = 'sequence_variant_causing_plus_2_frameshift' OR cvterm.name = 'sequence_variant_causing_minus_2_frameshift' OR cvterm.name = 'frame_restoring_sequence_variant' OR cvterm.name = 'sequence_variant_affecting_polyadenylation' OR cvterm.name = 'sequence_variant_affecting_editing' OR cvterm.name = 'sequence_variant_increasing_transcript_stability' OR cvterm.name = 'sequence_variant_decreasing_transcript_stability' OR cvterm.name = 'sequence_variant_causing_compensatory_transcript_secondary_structure_mutation' OR cvterm.name = 'sequence_variation_decreasing_level_of_transcript' OR cvterm.name = 'sequence_variation_increasing_level_of_transcript' OR cvterm.name = 'sequence_variant_causing_partially_characterised_change_in_transcript' OR cvterm.name = 'sequence_variant_affecting_splice_donor' OR cvterm.name = 'sequence_variant_affecting_splice_acceptor' OR cvterm.name = 'sequence_variant_causing_cryptic_splice_activation' OR cvterm.name = 'sequence_variant_causes_exon_loss' OR cvterm.name = 'sequence_variant_causes_intron_gain' OR cvterm.name = 'sequence_variant_causing_cryptic_splice_donor_activation' OR cvterm.name = 'sequence_variant_causing_cryptic_splice_acceptor_activation' OR cvterm.name = 'sequence_variant_causing_no_change_of_translational_product' OR cvterm.name = 'sequence_variant_causing_uncharacterised_change_of_translational_product' OR cvterm.name = 'sequence_variant_causing_complex_change_of_translational_product' OR cvterm.name = 'sequence_variant_affecting_level_of_translational_product' OR cvterm.name = 'sequence_variant_affecting_polypeptide_amino_acid_sequence' OR cvterm.name = 'sequence_variant_affecting_3D_structure_of_polypeptide' OR cvterm.name = 'sequence_variant_affecting_polypeptide_function' OR cvterm.name = 'sequence_variant_causing_partially_characterised_change_of_translational_product' OR cvterm.name = 'sequence_variant_decreasing_level_of_translation_product' OR cvterm.name = 'sequence_variant_increasing_level_of_translation_product' OR cvterm.name = 'sequence_variant_causing_amino_acid_substitution' OR cvterm.name = 'sequence_variant_causing_amino_acid_insertion' OR cvterm.name = 'sequence_variant_causing_amino_acid_deletion' OR cvterm.name = 'sequence_variant_causing_polypeptide_truncation' OR cvterm.name = 'sequence_variant_causing_polypeptide_elongation' OR cvterm.name = 'sequence_variant_causing_polypeptide_fusion' OR cvterm.name = 'sequence_variant_causing_conservative_amino_acid_substitution' OR cvterm.name = 'sequence_variant_causing_nonconservative_amino_acid_substitution' OR cvterm.name = 'mutation_causing_polypeptide_N_terminal_elongation' OR cvterm.name = 'mutation_causing_polypeptide_C_terminal_elongation' OR cvterm.name = 'mutation_causing_inframe_polypeptide_N_terminal_elongation' OR cvterm.name = 'mutation_causing_out_of_frame_polypeptide_N_terminal_elongation' OR cvterm.name = 'mutaton_causing_inframe_polypeptide_C_terminal_elongation' OR cvterm.name = 'mutation_causing_out_of_frame_polypeptide_C_terminal_elongation' OR cvterm.name = 'sequence_variant_causing_no_3D_structural_change' OR cvterm.name = 'sequence_variant_causing_uncharacterised_3D_structural_change' OR cvterm.name = 'sequence_variant_causing_complex_3D_structural_change' OR cvterm.name = 'sequence_variant_causing_conformational_change' OR cvterm.name = 'sequence_variant_causing_partially_characterised_3D_structural_change' OR cvterm.name = 'sequence_variant_causing_loss_of_function_of_polypeptide' OR cvterm.name = 'sequence_variant_causing_polypeptide_localization_change' OR cvterm.name = 'sequence_variant_causing_polypeptide_post_translational_processing_change' OR cvterm.name = 'sequence_variant_causing_gain_of_function_of_polypeptide' OR cvterm.name = 'sequence_variant_causing_inactive_ligand_binding_site' OR cvterm.name = 'sequence_variant_causing_polypeptide_post_translational_processing_change' OR cvterm.name = 'sequence_variant_causing_partial_loss_of_function_of_polypeptide' OR cvterm.name = 'sequence_variant_causing_inactive_catalytic_site' OR cvterm.name = 'sequence_variant_causing_gene_fusion' OR cvterm.name = 'sequence_variant_effect';

--- ************************************************
--- *** relation: sequence_variant_causing_polypeptide_fusion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_polypeptide_fusion AS
  SELECT
    feature_id AS sequence_variant_causing_polypeptide_fusion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_polypeptide_fusion';

--- ************************************************
--- *** relation: autosynaptic_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW autosynaptic_chromosome AS
  SELECT
    feature_id AS autosynaptic_chromosome_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'dexstrosynaptic_chromosome' OR cvterm.name = 'laevosynaptic_chromosome' OR cvterm.name = 'autosynaptic_chromosome';

--- ************************************************
--- *** relation: homo_compound_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW homo_compound_chromosome AS
  SELECT
    feature_id AS homo_compound_chromosome_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'homo_compound_chromosome';

--- ************************************************
--- *** relation: hetero_compound_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW hetero_compound_chromosome AS
  SELECT
    feature_id AS hetero_compound_chromosome_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'hetero_compound_chromosome';

--- ************************************************
--- *** relation: chromosome_fission ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW chromosome_fission AS
  SELECT
    feature_id AS chromosome_fission_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'chromosome_fission';

--- ************************************************
--- *** relation: dexstrosynaptic_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW dexstrosynaptic_chromosome AS
  SELECT
    feature_id AS dexstrosynaptic_chromosome_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'dexstrosynaptic_chromosome';

--- ************************************************
--- *** relation: laevosynaptic_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW laevosynaptic_chromosome AS
  SELECT
    feature_id AS laevosynaptic_chromosome_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'laevosynaptic_chromosome';

--- ************************************************
--- *** relation: free_duplication ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW free_duplication AS
  SELECT
    feature_id AS free_duplication_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'free_ring_duplication' OR cvterm.name = 'free_duplication';

--- ************************************************
--- *** relation: free_ring_duplication ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW free_ring_duplication AS
  SELECT
    feature_id AS free_ring_duplication_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'free_ring_duplication';

--- ************************************************
--- *** relation: complex_chromosomal_mutation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW complex_chromosomal_mutation AS
  SELECT
    feature_id AS complex_chromosomal_mutation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'complex_chromosomal_mutation';

--- ************************************************
--- *** relation: deficient_translocation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A translocation in which one of the four ***
--- ***  broken ends loses a segment before re-j ***
--- *** oining.                                  ***
--- ************************************************
---

CREATE VIEW deficient_translocation AS
  SELECT
    feature_id AS deficient_translocation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'deficient_translocation';

--- ************************************************
--- *** relation: inversion_cum_translocation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The first two breaks are in the same chr ***
--- *** omosome, and the region between them is  ***
--- *** rejoined in inverted order to the other  ***
--- *** side of the first break, such that both  ***
--- *** sides of break one are present on the sa ***
--- *** me chromosome. The remaining free ends a ***
--- *** re joined as a translocation with those  ***
--- *** resulting from the third break.          ***
--- ************************************************
---

CREATE VIEW inversion_cum_translocation AS
  SELECT
    feature_id AS inversion_cum_translocation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'inversion_cum_translocation';

--- ************************************************
--- *** relation: bipartite_duplication ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The (large) region between the first two ***
--- ***  breaks listed is lost, and the two flan ***
--- *** king segments (one of them centric) are  ***
--- *** joined as a translocation to the free en ***
--- *** ds resulting from the third break.       ***
--- ************************************************
---

CREATE VIEW bipartite_duplication AS
  SELECT
    feature_id AS bipartite_duplication_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'bipartite_duplication';

--- ************************************************
--- *** relation: cyclic_translocation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Three breaks in three different chromoso ***
--- *** mes. The centric segment resulting from  ***
--- *** the first break listed is joined to the  ***
--- *** acentric segment resulting from the seco ***
--- *** nd, rather than the third.               ***
--- ************************************************
---

CREATE VIEW cyclic_translocation AS
  SELECT
    feature_id AS cyclic_translocation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'cyclic_translocation';

--- ************************************************
--- *** relation: bipartite_inversion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Three breaks in the same chromosome; bot ***
--- *** h central segments are inverted in place ***
--- ***  (i.e., they are not transposed).        ***
--- ************************************************
---

CREATE VIEW bipartite_inversion AS
  SELECT
    feature_id AS bipartite_inversion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'bipartite_inversion';

--- ************************************************
--- *** relation: uninvert_insert_dup ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A copy of the segment between the first  ***
--- *** two breaks listed is inserted at the thi ***
--- *** rd break; the insertion is in cytologica ***
--- *** lly the same orientation as its flanking ***
--- ***  segments.                               ***
--- ************************************************
---

CREATE VIEW uninvert_insert_dup AS
  SELECT
    feature_id AS uninvert_insert_dup_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'uninverted_insertional_duplication';

--- ************************************************
--- *** relation: inverted_insertional_duplication ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A copy of the segment between the first  ***
--- *** two breaks listed is inserted at the thi ***
--- *** rd break; the insertion is in cytologica ***
--- *** lly inverted orientation with respect to ***
--- ***  its flanking segments.                  ***
--- ************************************************
---

CREATE VIEW inverted_insertional_duplication AS
  SELECT
    feature_id AS inverted_insertional_duplication_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'inverted_insertional_duplication';

--- ************************************************
--- *** relation: insertional_duplication ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome duplication involving the i ***
--- *** nsertion of a duplicated region.         ***
--- ************************************************
---

CREATE VIEW insertional_duplication AS
  SELECT
    feature_id AS insertional_duplication_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'uninverted_insertional_duplication' OR cvterm.name = 'inverted_insertional_duplication' OR cvterm.name = 'unoriented_insertional_duplication' OR cvterm.name = 'insertional_duplication';

--- ************************************************
--- *** relation: interchromosomal_transposition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW interchromosomal_transposition AS
  SELECT
    feature_id AS interchromosomal_transposition_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'deficient_interchromosomal_transposition' OR cvterm.name = 'inverted_interchromosomal_transposition' OR cvterm.name = 'uninverted_interchromosomal_transposition' OR cvterm.name = 'unorientated_interchromosomal_transposition' OR cvterm.name = 'interchromosomal_transposition';

--- ************************************************
--- *** relation: invert_inter_transposition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW invert_inter_transposition AS
  SELECT
    feature_id AS invert_inter_transposition_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'inverted_interchromosomal_transposition';

--- ************************************************
--- *** relation: uninvert_inter_transposition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW uninvert_inter_transposition AS
  SELECT
    feature_id AS uninvert_inter_transposition_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'uninverted_interchromosomal_transposition';

--- ************************************************
--- *** relation: invert_intra_transposition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The segment between the first two breaks ***
--- ***  listed is removed and inserted at the t ***
--- *** hird break; the insertion is in cytologi ***
--- *** cally inverted orientation with respect  ***
--- *** to its flanking segments.                ***
--- ************************************************
---

CREATE VIEW invert_intra_transposition AS
  SELECT
    feature_id AS invert_intra_transposition_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'inverted_intrachromosomal_transposition';

--- ************************************************
--- *** relation: uninvert_intra_transposition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The segment between the first two breaks ***
--- ***  listed is removed and inserted at the t ***
--- *** hird break; the insertion is in cytologi ***
--- *** cally the same orientation as its flanki ***
--- *** ng segments.                             ***
--- ************************************************
---

CREATE VIEW uninvert_intra_transposition AS
  SELECT
    feature_id AS uninvert_intra_transposition_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'uninverted_intrachromosomal_transposition';

--- ************************************************
--- *** relation: unorient_insert_dup ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A copy of the segment between the first  ***
--- *** two breaks listed is inserted at the thi ***
--- *** rd break; the orientation of the inserti ***
--- *** on with respect to its flanking segments ***
--- ***  is not recorded.                        ***
--- ************************************************
---

CREATE VIEW unorient_insert_dup AS
  SELECT
    feature_id AS unorient_insert_dup_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'unoriented_insertional_duplication';

--- ************************************************
--- *** relation: unorient_inter_transposition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW unorient_inter_transposition AS
  SELECT
    feature_id AS unorient_inter_transposition_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'unorientated_interchromosomal_transposition';

--- ************************************************
--- *** relation: unorient_intra_transposition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The segment between the first two breaks ***
--- ***  listed is removed and inserted at the t ***
--- *** hird break; the orientation of the inser ***
--- *** tion with respect to its flanking segmen ***
--- *** ts is not recorded.                      ***
--- ************************************************
---

CREATE VIEW unorient_intra_transposition AS
  SELECT
    feature_id AS unorient_intra_transposition_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'unorientated_intrachromosomal_transposition';

--- ************************************************
--- *** relation: uncharacterised_chromosomal_mutation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW uncharacterised_chromosomal_mutation AS
  SELECT
    feature_id AS uncharacterised_chromosomal_mutation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'partially_characterised_chromosomal_mutation' OR cvterm.name = 'uncharacterised_chromosomal_mutation';

--- ************************************************
--- *** relation: deficient_inversion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Three breaks in the same chromosome; one ***
--- ***  central region lost, the other inverted ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW deficient_inversion AS
  SELECT
    feature_id AS deficient_inversion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'deficient_inversion';

--- ************************************************
--- *** relation: tandem_duplication ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW tandem_duplication AS
  SELECT
    feature_id AS tandem_duplication_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'direct_tandem_duplication' OR cvterm.name = 'inverted_tandem_duplication' OR cvterm.name = 'tandem_duplication';

--- ************************************************
--- *** relation: partially_characterised_chromosomal_mutation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW partially_characterised_chromosomal_mutation AS
  SELECT
    feature_id AS partially_characterised_chromosomal_mutation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'partially_characterised_chromosomal_mutation';

--- ************************************************
--- *** relation: seq_variant_causing_uncharacterised_change_in_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The nature of the mutation event is eith ***
--- *** er uncharacterised or only partially cha ***
--- *** racterised.                              ***
--- ************************************************
---

CREATE VIEW seq_variant_causing_uncharacterised_change_in_transcript AS
  SELECT
    feature_id AS seq_variant_causing_uncharacterised_change_in_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_partially_characterised_change_in_transcript' OR cvterm.name = 'sequence_variant_causing_uncharacterised_change_in_transcript';

--- ************************************************
--- *** relation: seq_variant_causing_partly_characterised_change_in_trans ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The nature of the mutation event is only ***
--- ***  partially characterised.                ***
--- ************************************************
---

CREATE VIEW seq_variant_causing_partly_characterised_change_in_trans AS
  SELECT
    feature_id AS seq_variant_causing_partly_characterised_change_in_trans_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_partially_characterised_change_in_transcript';

--- ************************************************
--- *** relation: sequence_variant_affecting_gene_structure ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence_variant_effect that changes t ***
--- *** he gene structure.                       ***
--- ************************************************
---

CREATE VIEW sequence_variant_affecting_gene_structure AS
  SELECT
    feature_id AS sequence_variant_affecting_gene_structure_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_gene_fusion' OR cvterm.name = 'sequence_variant_affecting_gene_structure';

--- ************************************************
--- *** relation: sequence_variant_causing_gene_fusion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence_variant_effect that changes t ***
--- *** he gene structure by causing a fusion to ***
--- ***  another gene.                           ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_gene_fusion AS
  SELECT
    feature_id AS sequence_variant_causing_gene_fusion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_gene_fusion';

--- ************************************************
--- *** relation: chromosome_number_variation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of chromosome variation where the ***
--- ***  chromosome complement is not an exact m ***
--- *** ultiple of the haploid number.           ***
--- ************************************************
---

CREATE VIEW chromosome_number_variation AS
  SELECT
    feature_id AS chromosome_number_variation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'aneuploid' OR cvterm.name = 'polyploid' OR cvterm.name = 'hyperploid' OR cvterm.name = 'hypoploid' OR cvterm.name = 'autopolyploid' OR cvterm.name = 'allopolyploid' OR cvterm.name = 'chromosome_number_variation';

--- ************************************************
--- *** relation: chromosome_structure_variation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW chromosome_structure_variation AS
  SELECT
    feature_id AS chromosome_structure_variation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'free_chromosome_arm' OR cvterm.name = 'transposition' OR cvterm.name = 'aneuploid_chromosome' OR cvterm.name = 'intrachromosomal_mutation' OR cvterm.name = 'interchromosomal_mutation' OR cvterm.name = 'compound_chromosome' OR cvterm.name = 'autosynaptic_chromosome' OR cvterm.name = 'complex_chromosomal_mutation' OR cvterm.name = 'uncharacterised_chromosomal_mutation' OR cvterm.name = 'intrachromosomal_transposition' OR cvterm.name = 'interchromosomal_transposition' OR cvterm.name = 'deficient_intrachromosomal_transposition' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'uninverted_intrachromosomal_transposition' OR cvterm.name = 'unorientated_intrachromosomal_transposition' OR cvterm.name = 'deficient_interchromosomal_transposition' OR cvterm.name = 'inverted_interchromosomal_transposition' OR cvterm.name = 'uninverted_interchromosomal_transposition' OR cvterm.name = 'unorientated_interchromosomal_transposition' OR cvterm.name = 'inversion_derived_aneuploid_chromosome' OR cvterm.name = 'chromosomal_deletion' OR cvterm.name = 'chromosomal_duplication' OR cvterm.name = 'inversion_derived_bipartite_deficiency' OR cvterm.name = 'inversion_derived_deficiency_plus_duplication' OR cvterm.name = 'inversion_derived_deficiency_plus_aneuploid' OR cvterm.name = 'deficient_translocation' OR cvterm.name = 'deficient_inversion' OR cvterm.name = 'interchromosomal_duplication' OR cvterm.name = 'intrachromosomal_duplication' OR cvterm.name = 'free_duplication' OR cvterm.name = 'insertional_duplication' OR cvterm.name = 'inversion_derived_deficiency_plus_duplication' OR cvterm.name = 'inversion_derived_bipartite_duplication' OR cvterm.name = 'inversion_derived_duplication_plus_aneuploid' OR cvterm.name = 'intrachromosomal_transposition' OR cvterm.name = 'tandem_duplication' OR cvterm.name = 'deficient_intrachromosomal_transposition' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'uninverted_intrachromosomal_transposition' OR cvterm.name = 'unorientated_intrachromosomal_transposition' OR cvterm.name = 'direct_tandem_duplication' OR cvterm.name = 'inverted_tandem_duplication' OR cvterm.name = 'free_ring_duplication' OR cvterm.name = 'uninverted_insertional_duplication' OR cvterm.name = 'inverted_insertional_duplication' OR cvterm.name = 'unoriented_insertional_duplication' OR cvterm.name = 'chromosomal_deletion' OR cvterm.name = 'chromosomal_inversion' OR cvterm.name = 'intrachromosomal_duplication' OR cvterm.name = 'ring_chromosome' OR cvterm.name = 'chromosome_fission' OR cvterm.name = 'inversion_derived_bipartite_deficiency' OR cvterm.name = 'inversion_derived_deficiency_plus_duplication' OR cvterm.name = 'inversion_derived_deficiency_plus_aneuploid' OR cvterm.name = 'deficient_translocation' OR cvterm.name = 'deficient_inversion' OR cvterm.name = 'inverted_ring_chromosome' OR cvterm.name = 'pericentric_inversion' OR cvterm.name = 'paracentric_inversion' OR cvterm.name = 'inversion_cum_translocation' OR cvterm.name = 'bipartite_inversion' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'deficient_inversion' OR cvterm.name = 'inversion_derived_deficiency_plus_duplication' OR cvterm.name = 'inversion_derived_bipartite_duplication' OR cvterm.name = 'inversion_derived_duplication_plus_aneuploid' OR cvterm.name = 'intrachromosomal_transposition' OR cvterm.name = 'tandem_duplication' OR cvterm.name = 'deficient_intrachromosomal_transposition' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'uninverted_intrachromosomal_transposition' OR cvterm.name = 'unorientated_intrachromosomal_transposition' OR cvterm.name = 'direct_tandem_duplication' OR cvterm.name = 'inverted_tandem_duplication' OR cvterm.name = 'inverted_ring_chromosome' OR cvterm.name = 'free_ring_duplication' OR cvterm.name = 'chromosomal_translocation' OR cvterm.name = 'bipartite_duplication' OR cvterm.name = 'interchromosomal_transposition' OR cvterm.name = 'translocation_element' OR cvterm.name = 'Robertsonian_fusion' OR cvterm.name = 'reciprocal_chromosomal_translocation' OR cvterm.name = 'deficient_translocation' OR cvterm.name = 'inversion_cum_translocation' OR cvterm.name = 'cyclic_translocation' OR cvterm.name = 'deficient_interchromosomal_transposition' OR cvterm.name = 'inverted_interchromosomal_transposition' OR cvterm.name = 'uninverted_interchromosomal_transposition' OR cvterm.name = 'unorientated_interchromosomal_transposition' OR cvterm.name = 'compound_chromosome_arm' OR cvterm.name = 'homo_compound_chromosome' OR cvterm.name = 'hetero_compound_chromosome' OR cvterm.name = 'dexstrosynaptic_chromosome' OR cvterm.name = 'laevosynaptic_chromosome' OR cvterm.name = 'partially_characterised_chromosomal_mutation' OR cvterm.name = 'chromosome_structure_variation';

--- ************************************************
--- *** relation: sequence_variant_causes_exon_loss ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant affecting splicing an ***
--- *** d causes an exon loss.                   ***
--- ************************************************
---

CREATE VIEW sequence_variant_causes_exon_loss AS
  SELECT
    feature_id AS sequence_variant_causes_exon_loss_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causes_exon_loss';

--- ************************************************
--- *** relation: sequence_variant_causes_intron_gain ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant effect, causing an in ***
--- *** tron to be gained by the processed trans ***
--- *** cript; usually a result of a donor accep ***
--- *** tor mutation (SO:1000072).               ***
--- ************************************************
---

CREATE VIEW sequence_variant_causes_intron_gain AS
  SELECT
    feature_id AS sequence_variant_causes_intron_gain_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causes_intron_gain';

--- ************************************************
--- *** relation: sequence_variant_causing_cryptic_splice_donor_activation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_cryptic_splice_donor_activation AS
  SELECT
    feature_id AS sequence_variant_causing_cryptic_splice_donor_activation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_cryptic_splice_donor_activation';

--- ************************************************
--- *** relation: sequence_variant_causing_cryptic_splice_acceptor_activation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_variant_causing_cryptic_splice_acceptor_activation AS
  SELECT
    feature_id AS sequence_variant_causing_cryptic_splice_acceptor_activation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequence_variant_causing_cryptic_splice_acceptor_activation';

--- ************************************************
--- *** relation: alternatively_spliced_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript that is alternatively splic ***
--- *** ed.                                      ***
--- ************************************************
---

CREATE VIEW alternatively_spliced_transcript AS
  SELECT
    feature_id AS alternatively_spliced_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'alternatively_spliced_transcript';

--- ************************************************
--- *** relation: encodes_1_polypeptide ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is alternately spliced, but  ***
--- *** encodes only one polypeptide.            ***
--- ************************************************
---

CREATE VIEW encodes_1_polypeptide AS
  SELECT
    feature_id AS encodes_1_polypeptide_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'encodes_1_polypeptide';

--- ************************************************
--- *** relation: encodes_greater_than_1_polypeptide ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is alternately spliced, and  ***
--- *** encodes more than one polypeptide.       ***
--- ************************************************
---

CREATE VIEW encodes_greater_than_1_polypeptide AS
  SELECT
    feature_id AS encodes_greater_than_1_polypeptide_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'encodes_disjoint_polypeptides' OR cvterm.name = 'encodes_overlapping_peptides' OR cvterm.name = 'encodes_different_polypeptides_different_stop' OR cvterm.name = 'encodes_overlapping_peptides_different_start' OR cvterm.name = 'encodes_overlapping_polypeptides_different_start_and_stop' OR cvterm.name = 'encodes_greater_than_1_polypeptide';

--- ************************************************
--- *** relation: encodes_different_polypeptides_different_stop ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is alternately spliced, and  ***
--- *** encodes more than one polypeptide, that  ***
--- *** have overlapping peptide sequences, but  ***
--- *** use different stop codons.               ***
--- ************************************************
---

CREATE VIEW encodes_different_polypeptides_different_stop AS
  SELECT
    feature_id AS encodes_different_polypeptides_different_stop_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'encodes_different_polypeptides_different_stop';

--- ************************************************
--- *** relation: encodes_overlapping_peptides_different_start ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is alternately spliced, and  ***
--- *** encodes more than one polypeptide, that  ***
--- *** have overlapping peptide sequences, but  ***
--- *** use different start codons.              ***
--- ************************************************
---

CREATE VIEW encodes_overlapping_peptides_different_start AS
  SELECT
    feature_id AS encodes_overlapping_peptides_different_start_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'encodes_overlapping_peptides_different_start';

--- ************************************************
--- *** relation: encodes_disjoint_polypeptides ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is alternately spliced, and  ***
--- *** encodes more than one polypeptide, that  ***
--- *** do not have overlapping peptide sequence ***
--- *** s.                                       ***
--- ************************************************
---

CREATE VIEW encodes_disjoint_polypeptides AS
  SELECT
    feature_id AS encodes_disjoint_polypeptides_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'encodes_disjoint_polypeptides';

--- ************************************************
--- *** relation: encodes_overlapping_polypeptides_different_start_and_stop ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is alternately spliced, and  ***
--- *** encodes more than one polypeptide, that  ***
--- *** have overlapping peptide sequences, but  ***
--- *** use different start and stop codons.     ***
--- ************************************************
---

CREATE VIEW encodes_overlapping_polypeptides_different_start_and_stop AS
  SELECT
    feature_id AS encodes_overlapping_polypeptides_different_start_and_stop_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'encodes_overlapping_polypeptides_different_start_and_stop';

--- ************************************************
--- *** relation: encodes_overlapping_peptides ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is alternately spliced, and  ***
--- *** encodes more than one polypeptide, that  ***
--- *** have overlapping peptide sequences.      ***
--- ************************************************
---

CREATE VIEW encodes_overlapping_peptides AS
  SELECT
    feature_id AS encodes_overlapping_peptides_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'encodes_different_polypeptides_different_stop' OR cvterm.name = 'encodes_overlapping_peptides_different_start' OR cvterm.name = 'encodes_overlapping_polypeptides_different_start_and_stop' OR cvterm.name = 'encodes_overlapping_peptides';

--- ************************************************
--- *** relation: cryptogene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A maxicircle gene so extensively edited  ***
--- *** that it cannot be matched to its edited  ***
--- *** mRNA sequence.                           ***
--- ************************************************
---

CREATE VIEW cryptogene AS
  SELECT
    feature_id AS cryptogene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'cryptogene';

--- ************************************************
--- *** relation: dicistronic_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript that has the qualit ***
--- *** y dicistronic.                           ***
--- ************************************************
---

CREATE VIEW dicistronic_primary_transcript AS
  SELECT
    feature_id AS dicistronic_primary_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'dicistronic_primary_transcript';

--- ************************************************
--- *** relation: member_of_regulon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW member_of_regulon AS
  SELECT
    feature_id AS member_of_regulon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'member_of_regulon';

--- ************************************************
--- *** relation: cds_independently_known ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A CDS with the evidence status of being  ***
--- *** independently known.                     ***
--- ************************************************
---

CREATE VIEW cds_independently_known AS
  SELECT
    feature_id AS cds_independently_known_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'CDS_independently_known';

--- ************************************************
--- *** relation: orphan_cds ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A CDS whose predicted amino acid sequenc ***
--- *** e is unsupported by any experimental evi ***
--- *** dence or by any match with any other kno ***
--- *** wn sequence.                             ***
--- ************************************************
---

CREATE VIEW orphan_cds AS
  SELECT
    feature_id AS orphan_cds_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'orphan_CDS';

--- ************************************************
--- *** relation: cds_supported_by_domain_match_data ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A CDS that is supported by domain simila ***
--- *** rity.                                    ***
--- ************************************************
---

CREATE VIEW cds_supported_by_domain_match_data AS
  SELECT
    feature_id AS cds_supported_by_domain_match_data_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'CDS_supported_by_domain_match_data';

--- ************************************************
--- *** relation: cds_supported_by_sequence_similarity_data ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A CDS that is supported by sequence simi ***
--- *** larity data.                             ***
--- ************************************************
---

CREATE VIEW cds_supported_by_sequence_similarity_data AS
  SELECT
    feature_id AS cds_supported_by_sequence_similarity_data_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'CDS_supported_by_domain_match_data' OR cvterm.name = 'CDS_supported_by_EST_or_cDNA_data' OR cvterm.name = 'CDS_supported_by_sequence_similarity_data';

--- ************************************************
--- *** relation: cds_predicted ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A CDS that is predicted.                 ***
--- ************************************************
---

CREATE VIEW cds_predicted AS
  SELECT
    feature_id AS cds_predicted_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'orphan_CDS' OR cvterm.name = 'CDS_supported_by_sequence_similarity_data' OR cvterm.name = 'CDS_supported_by_domain_match_data' OR cvterm.name = 'CDS_supported_by_EST_or_cDNA_data' OR cvterm.name = 'CDS_predicted';

--- ************************************************
--- *** relation: cds_supported_by_est_or_cdna_data ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A CDS that is supported by similarity to ***
--- ***  EST or cDNA data.                       ***
--- ************************************************
---

CREATE VIEW cds_supported_by_est_or_cdna_data AS
  SELECT
    feature_id AS cds_supported_by_est_or_cdna_data_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'CDS_supported_by_EST_or_cDNA_data';

--- ************************************************
--- *** relation: internal_shine_dalgarno_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A Shine-Dalgarno sequence that stimulate ***
--- *** s recoding through interactions with the ***
--- ***  anti-Shine-Dalgarno in the RNA of small ***
--- ***  ribosomal subunits of translating ribos ***
--- *** omes. The signal is only operative in Ba ***
--- *** cteria.                                  ***
--- ************************************************
---

CREATE VIEW internal_shine_dalgarno_sequence AS
  SELECT
    feature_id AS internal_shine_dalgarno_sequence_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'internal_Shine_Dalgarno_sequence';

--- ************************************************
--- *** relation: recoded_mrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The sequence of a mature mRNA transcript ***
--- *** , modified before translation or during  ***
--- *** translation, usually by special cis-acti ***
--- *** ng signals.                              ***
--- ************************************************
---

CREATE VIEW recoded_mrna AS
  SELECT
    feature_id AS recoded_mrna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'mRNA_recoded_by_translational_bypass' OR cvterm.name = 'mRNA_recoded_by_codon_redefinition' OR cvterm.name = 'recoded_mRNA';

--- ************************************************
--- *** relation: minus_1_translationally_frameshifted ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a translational  ***
--- *** frameshift of -1.                        ***
--- ************************************************
---

CREATE VIEW minus_1_translationally_frameshifted AS
  SELECT
    feature_id AS minus_1_translationally_frameshifted_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'minus_1_translationally_frameshifted';

--- ************************************************
--- *** relation: plus_1_translationally_frameshifted ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a translational  ***
--- *** frameshift of +1.                        ***
--- ************************************************
---

CREATE VIEW plus_1_translationally_frameshifted AS
  SELECT
    feature_id AS plus_1_translationally_frameshifted_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'plus_1_translationally_frameshifted';

--- ************************************************
--- *** relation: mrna_recoded_by_translational_bypass ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A recoded_mRNA where translation was sus ***
--- *** pended at a particular codon and resumed ***
--- ***  at a particular non-overlapping downstr ***
--- *** eam codon.                               ***
--- ************************************************
---

CREATE VIEW mrna_recoded_by_translational_bypass AS
  SELECT
    feature_id AS mrna_recoded_by_translational_bypass_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'mRNA_recoded_by_translational_bypass';

--- ************************************************
--- *** relation: mrna_recoded_by_codon_redefinition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A recoded_mRNA that was modified by an a ***
--- *** lteration of codon meaning.              ***
--- ************************************************
---

CREATE VIEW mrna_recoded_by_codon_redefinition AS
  SELECT
    feature_id AS mrna_recoded_by_codon_redefinition_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'mRNA_recoded_by_codon_redefinition';

--- ************************************************
--- *** relation: recoding_stimulatory_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A site in an mRNA sequence that stimulat ***
--- *** es the recoding of a region in the same  ***
--- *** mRNA.                                    ***
--- ************************************************
---

CREATE VIEW recoding_stimulatory_region AS
  SELECT
    feature_id AS recoding_stimulatory_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'internal_Shine_Dalgarno_sequence' OR cvterm.name = 'SECIS_element' OR cvterm.name = 'three_prime_recoding_site' OR cvterm.name = 'five_prime_recoding_site' OR cvterm.name = 'stop_codon_signal' OR cvterm.name = 'three_prime_stem_loop_structure' OR cvterm.name = 'flanking_three_prime_quadruplet_recoding_signal' OR cvterm.name = 'three_prime_repeat_recoding_signal' OR cvterm.name = 'distant_three_prime_recoding_signal' OR cvterm.name = 'UAG_stop_codon_signal' OR cvterm.name = 'UAA_stop_codon_signal' OR cvterm.name = 'UGA_stop_codon_signal' OR cvterm.name = 'recoding_stimulatory_region';

--- ************************************************
--- *** relation: four_bp_start_codon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A non-canonical start codon with 4 base  ***
--- *** pairs.                                   ***
--- ************************************************
---

CREATE VIEW four_bp_start_codon AS
  SELECT
    feature_id AS four_bp_start_codon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'four_bp_start_codon';

--- ************************************************
--- *** relation: archaeal_intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An intron characteristic of Archaeal tRN ***
--- *** A and rRNA genes, where intron transcrip ***
--- *** t generates a bulge-helix-bulge motif th ***
--- *** at is recognised by a splicing endoribon ***
--- *** uclease.                                 ***
--- ************************************************
---

CREATE VIEW archaeal_intron AS
  SELECT
    feature_id AS archaeal_intron_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'archaeal_intron';

--- ************************************************
--- *** relation: trna_intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An intron found in tRNA that is spliced  ***
--- *** via endonucleolytic cleavage and ligatio ***
--- *** n rather than transesterification.       ***
--- ************************************************
---

CREATE VIEW trna_intron AS
  SELECT
    feature_id AS trna_intron_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'tRNA_intron';

--- ************************************************
--- *** relation: ctg_start_codon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A non-canonical start codon of sequence  ***
--- *** CTG.                                     ***
--- ************************************************
---

CREATE VIEW ctg_start_codon AS
  SELECT
    feature_id AS ctg_start_codon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'CTG_start_codon';

--- ************************************************
--- *** relation: secis_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The incorporation of selenocysteine into ***
--- ***  a protein sequence is directed by an in ***
--- *** -frame UGA codon (usually a stop codon)  ***
--- *** within the coding region of the mRNA. Se ***
--- *** lenoprotein mRNAs contain a conserved se ***
--- *** condary structure in the 3' UTR that is  ***
--- *** required for the distinction of UGA stop ***
--- ***  from UGA selenocysteine. The selenocyst ***
--- *** eine insertion sequence (SECIS) is aroun ***
--- *** d 60 nt in length and adopts a hairpin s ***
--- *** tructure which is sufficiently well-defi ***
--- *** ned and conserved to act as a computatio ***
--- *** nal screen for selenoprotein genes.      ***
--- ************************************************
---

CREATE VIEW secis_element AS
  SELECT
    feature_id AS secis_element_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'SECIS_element';

--- ************************************************
--- *** relation: retron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Sequence coding for a short, single-stra ***
--- *** nded, DNA sequence via a retrotransposed ***
--- ***  RNA intermediate; characteristic of som ***
--- *** e microbial genomes.                     ***
--- ************************************************
---

CREATE VIEW retron AS
  SELECT
    feature_id AS retron_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'retron';

--- ************************************************
--- *** relation: three_prime_recoding_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The recoding stimulatory signal located  ***
--- *** downstream of the recoding site.         ***
--- ************************************************
---

CREATE VIEW three_prime_recoding_site AS
  SELECT
    feature_id AS three_prime_recoding_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'three_prime_stem_loop_structure' OR cvterm.name = 'flanking_three_prime_quadruplet_recoding_signal' OR cvterm.name = 'three_prime_repeat_recoding_signal' OR cvterm.name = 'distant_three_prime_recoding_signal' OR cvterm.name = 'three_prime_recoding_site';

--- ************************************************
--- *** relation: three_prime_stem_loop_structure ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A recoding stimulatory region, the stem- ***
--- *** loop secondary structural element is dow ***
--- *** nstream of the redefined region.         ***
--- ************************************************
---

CREATE VIEW three_prime_stem_loop_structure AS
  SELECT
    feature_id AS three_prime_stem_loop_structure_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'three_prime_stem_loop_structure';

--- ************************************************
--- *** relation: five_prime_recoding_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The recoding stimulatory signal located  ***
--- *** upstream of the recoding site.           ***
--- ************************************************
---

CREATE VIEW five_prime_recoding_site AS
  SELECT
    feature_id AS five_prime_recoding_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_prime_recoding_site';

--- ************************************************
--- *** relation: flanking_three_prime_quadruplet_recoding_signal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Four base pair sequence immediately down ***
--- *** stream of the redefined region. The rede ***
--- *** fined region is a frameshift site. The q ***
--- *** uadruplet is 2 overlapping codons.       ***
--- ************************************************
---

CREATE VIEW flanking_three_prime_quadruplet_recoding_signal AS
  SELECT
    feature_id AS flanking_three_prime_quadruplet_recoding_signal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'flanking_three_prime_quadruplet_recoding_signal';

--- ************************************************
--- *** relation: uag_stop_codon_signal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A stop codon signal for a UAG stop codon ***
--- ***  redefinition.                           ***
--- ************************************************
---

CREATE VIEW uag_stop_codon_signal AS
  SELECT
    feature_id AS uag_stop_codon_signal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'UAG_stop_codon_signal';

--- ************************************************
--- *** relation: uaa_stop_codon_signal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A stop codon signal for a UAA stop codon ***
--- ***  redefinition.                           ***
--- ************************************************
---

CREATE VIEW uaa_stop_codon_signal AS
  SELECT
    feature_id AS uaa_stop_codon_signal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'UAA_stop_codon_signal';

--- ************************************************
--- *** relation: regulon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A group of genes, whether linked as a cl ***
--- *** uster or not, that respond to a common r ***
--- *** egulatory signal.                        ***
--- ************************************************
---

CREATE VIEW regulon AS
  SELECT
    feature_id AS regulon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'regulon';

--- ************************************************
--- *** relation: uga_stop_codon_signal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A stop codon signal for a UGA stop codon ***
--- ***  redefinition.                           ***
--- ************************************************
---

CREATE VIEW uga_stop_codon_signal AS
  SELECT
    feature_id AS uga_stop_codon_signal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'UGA_stop_codon_signal';

--- ************************************************
--- *** relation: three_prime_repeat_recoding_signal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A recoding stimulatory signal, downstrea ***
--- *** m sequence important for recoding that c ***
--- *** ontains repetitive elements.             ***
--- ************************************************
---

CREATE VIEW three_prime_repeat_recoding_signal AS
  SELECT
    feature_id AS three_prime_repeat_recoding_signal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'three_prime_repeat_recoding_signal';

--- ************************************************
--- *** relation: distant_three_prime_recoding_signal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A recoding signal that is found many hun ***
--- *** dreds of nucleotides 3' of a redefined s ***
--- *** top codon.                               ***
--- ************************************************
---

CREATE VIEW distant_three_prime_recoding_signal AS
  SELECT
    feature_id AS distant_three_prime_recoding_signal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'distant_three_prime_recoding_signal';

--- ************************************************
--- *** relation: stop_codon_signal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A recoding stimulatory signal that is a  ***
--- *** stop codon and has effect on efficiency  ***
--- *** of recoding.                             ***
--- ************************************************
---

CREATE VIEW stop_codon_signal AS
  SELECT
    feature_id AS stop_codon_signal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'UAG_stop_codon_signal' OR cvterm.name = 'UAA_stop_codon_signal' OR cvterm.name = 'UGA_stop_codon_signal' OR cvterm.name = 'stop_codon_signal';

--- ************************************************
--- *** relation: databank_entry ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The sequence referred to by an entry in  ***
--- *** a databank such as Genbank or SwissProt. ***
--- ************************************************
---

CREATE VIEW databank_entry AS
  SELECT
    feature_id AS databank_entry_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'databank_entry';

--- ************************************************
--- *** relation: gene_segment ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene component region which acts as a  ***
--- *** recombinational unit of a gene whose fun ***
--- *** ctional form is generated through somati ***
--- *** c recombination.                         ***
--- ************************************************
---

CREATE VIEW gene_segment AS
  SELECT
    feature_id AS gene_segment_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gene_segment';

