This file is indexed.

/usr/share/gmod/chado/modules/complete.sql is in libchado-perl 1.31-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
  118
  119
  120
  121
  122
  123
  124
  125
  126
  127
  128
  129
  130
  131
  132
  133
  134
  135
  136
  137
  138
  139
  140
  141
  142
  143
  144
  145
  146
  147
  148
  149
  150
  151
  152
  153
  154
  155
  156
  157
  158
  159
  160
  161
  162
  163
  164
  165
  166
  167
  168
  169
  170
  171
  172
  173
  174
  175
  176
  177
  178
  179
  180
  181
  182
  183
  184
  185
  186
  187
  188
  189
  190
  191
  192
  193
  194
  195
  196
  197
  198
  199
  200
  201
  202
  203
  204
  205
  206
  207
  208
  209
  210
  211
  212
  213
  214
  215
  216
  217
  218
  219
  220
  221
  222
  223
  224
  225
  226
  227
  228
  229
  230
  231
  232
  233
  234
  235
  236
  237
  238
  239
  240
  241
  242
  243
  244
  245
  246
  247
  248
  249
  250
  251
  252
  253
  254
  255
  256
  257
  258
  259
  260
  261
  262
  263
  264
  265
  266
  267
  268
  269
  270
  271
  272
  273
  274
  275
  276
  277
  278
  279
  280
  281
  282
  283
  284
  285
  286
  287
  288
  289
  290
  291
  292
  293
  294
  295
  296
  297
  298
  299
  300
  301
  302
  303
  304
  305
  306
  307
  308
  309
  310
  311
  312
  313
  314
  315
  316
  317
  318
  319
  320
  321
  322
  323
  324
  325
  326
  327
  328
  329
  330
  331
  332
  333
  334
  335
  336
  337
  338
  339
  340
  341
  342
  343
  344
  345
  346
  347
  348
  349
  350
  351
  352
  353
  354
  355
  356
  357
  358
  359
  360
  361
  362
  363
  364
  365
  366
  367
  368
  369
  370
  371
  372
  373
  374
  375
  376
  377
  378
  379
  380
  381
  382
  383
  384
  385
  386
  387
  388
  389
  390
  391
  392
  393
  394
  395
  396
  397
  398
  399
  400
  401
  402
  403
  404
  405
  406
  407
  408
  409
  410
  411
  412
  413
  414
  415
  416
  417
  418
  419
  420
  421
  422
  423
  424
  425
  426
  427
  428
  429
  430
  431
  432
  433
  434
  435
  436
  437
  438
  439
  440
  441
  442
  443
  444
  445
  446
  447
  448
  449
  450
  451
  452
  453
  454
  455
  456
  457
  458
  459
  460
  461
  462
  463
  464
  465
  466
  467
  468
  469
  470
  471
  472
  473
  474
  475
  476
  477
  478
  479
  480
  481
  482
  483
  484
  485
  486
  487
  488
  489
  490
  491
  492
  493
  494
  495
  496
  497
  498
  499
  500
  501
  502
  503
  504
  505
  506
  507
  508
  509
  510
  511
  512
  513
  514
  515
  516
  517
  518
  519
  520
  521
  522
  523
  524
  525
  526
  527
  528
  529
  530
  531
  532
  533
  534
  535
  536
  537
  538
  539
  540
  541
  542
  543
  544
  545
  546
  547
  548
  549
  550
  551
  552
  553
  554
  555
  556
  557
  558
  559
  560
  561
  562
  563
  564
  565
  566
  567
  568
  569
  570
  571
  572
  573
  574
  575
  576
  577
  578
  579
  580
  581
  582
  583
  584
  585
  586
  587
  588
  589
  590
  591
  592
  593
  594
  595
  596
  597
  598
  599
  600
  601
  602
  603
  604
  605
  606
  607
  608
  609
  610
  611
  612
  613
  614
  615
  616
  617
  618
  619
  620
  621
  622
  623
  624
  625
  626
  627
  628
  629
  630
  631
  632
  633
  634
  635
  636
  637
  638
  639
  640
  641
  642
  643
  644
  645
  646
  647
  648
  649
  650
  651
  652
  653
  654
  655
  656
  657
  658
  659
  660
  661
  662
  663
  664
  665
  666
  667
  668
  669
  670
  671
  672
  673
  674
  675
  676
  677
  678
  679
  680
  681
  682
  683
  684
  685
  686
  687
  688
  689
  690
  691
  692
  693
  694
  695
  696
  697
  698
  699
  700
  701
  702
  703
  704
  705
  706
  707
  708
  709
  710
  711
  712
  713
  714
  715
  716
  717
  718
  719
  720
  721
  722
  723
  724
  725
  726
  727
  728
  729
  730
  731
  732
  733
  734
  735
  736
  737
  738
  739
  740
  741
  742
  743
  744
  745
  746
  747
  748
  749
  750
  751
  752
  753
  754
  755
  756
  757
  758
  759
  760
  761
  762
  763
  764
  765
  766
  767
  768
  769
  770
  771
  772
  773
  774
  775
  776
  777
  778
  779
  780
  781
  782
  783
  784
  785
  786
  787
  788
  789
  790
  791
  792
  793
  794
  795
  796
  797
  798
  799
  800
  801
  802
  803
  804
  805
  806
  807
  808
  809
  810
  811
  812
  813
  814
  815
  816
  817
  818
  819
  820
  821
  822
  823
  824
  825
  826
  827
  828
  829
  830
  831
  832
  833
  834
  835
  836
  837
  838
  839
  840
  841
  842
  843
  844
  845
  846
  847
  848
  849
  850
  851
  852
  853
  854
  855
  856
  857
  858
  859
  860
  861
  862
  863
  864
  865
  866
  867
  868
  869
  870
  871
  872
  873
  874
  875
  876
  877
  878
  879
  880
  881
  882
  883
  884
  885
  886
  887
  888
  889
  890
  891
  892
  893
  894
  895
  896
  897
  898
  899
  900
  901
  902
  903
  904
  905
  906
  907
  908
  909
  910
  911
  912
  913
  914
  915
  916
  917
  918
  919
  920
  921
  922
  923
  924
  925
  926
  927
  928
  929
  930
  931
  932
  933
  934
  935
  936
  937
  938
  939
  940
  941
  942
  943
  944
  945
  946
  947
  948
  949
  950
  951
  952
  953
  954
  955
  956
  957
  958
  959
  960
  961
  962
  963
  964
  965
  966
  967
  968
  969
  970
  971
  972
  973
  974
  975
  976
  977
  978
  979
  980
  981
  982
  983
  984
  985
  986
  987
  988
  989
  990
  991
  992
  993
  994
  995
  996
  997
  998
  999
 1000
 1001
 1002
 1003
 1004
 1005
 1006
 1007
 1008
 1009
 1010
 1011
 1012
 1013
 1014
 1015
 1016
 1017
 1018
 1019
 1020
 1021
 1022
 1023
 1024
 1025
 1026
 1027
 1028
 1029
 1030
 1031
 1032
 1033
 1034
 1035
 1036
 1037
 1038
 1039
 1040
 1041
 1042
 1043
 1044
 1045
 1046
 1047
 1048
 1049
 1050
 1051
 1052
 1053
 1054
 1055
 1056
 1057
 1058
 1059
 1060
 1061
 1062
 1063
 1064
 1065
 1066
 1067
 1068
 1069
 1070
 1071
 1072
 1073
 1074
 1075
 1076
 1077
 1078
 1079
 1080
 1081
 1082
 1083
 1084
 1085
 1086
 1087
 1088
 1089
 1090
 1091
 1092
 1093
 1094
 1095
 1096
 1097
 1098
 1099
 1100
 1101
 1102
 1103
 1104
 1105
 1106
 1107
 1108
 1109
 1110
 1111
 1112
 1113
 1114
 1115
 1116
 1117
 1118
 1119
 1120
 1121
 1122
 1123
 1124
 1125
 1126
 1127
 1128
 1129
 1130
 1131
 1132
 1133
 1134
 1135
 1136
 1137
 1138
 1139
 1140
 1141
 1142
 1143
 1144
 1145
 1146
 1147
 1148
 1149
 1150
 1151
 1152
 1153
 1154
 1155
 1156
 1157
 1158
 1159
 1160
 1161
 1162
 1163
 1164
 1165
 1166
 1167
 1168
 1169
 1170
 1171
 1172
 1173
 1174
 1175
 1176
 1177
 1178
 1179
 1180
 1181
 1182
 1183
 1184
 1185
 1186
 1187
 1188
 1189
 1190
 1191
 1192
 1193
 1194
 1195
 1196
 1197
 1198
 1199
 1200
 1201
 1202
 1203
 1204
 1205
 1206
 1207
 1208
 1209
 1210
 1211
 1212
 1213
 1214
 1215
 1216
 1217
 1218
 1219
 1220
 1221
 1222
 1223
 1224
 1225
 1226
 1227
 1228
 1229
 1230
 1231
 1232
 1233
 1234
 1235
 1236
 1237
 1238
 1239
 1240
 1241
 1242
 1243
 1244
 1245
 1246
 1247
 1248
 1249
 1250
 1251
 1252
 1253
 1254
 1255
 1256
 1257
 1258
 1259
 1260
 1261
 1262
 1263
 1264
 1265
 1266
 1267
 1268
 1269
 1270
 1271
 1272
 1273
 1274
 1275
 1276
 1277
 1278
 1279
 1280
 1281
 1282
 1283
 1284
 1285
 1286
 1287
 1288
 1289
 1290
 1291
 1292
 1293
 1294
 1295
 1296
 1297
 1298
 1299
 1300
 1301
 1302
 1303
 1304
 1305
 1306
 1307
 1308
 1309
 1310
 1311
 1312
 1313
 1314
 1315
 1316
 1317
 1318
 1319
 1320
 1321
 1322
 1323
 1324
 1325
 1326
 1327
 1328
 1329
 1330
 1331
 1332
 1333
 1334
 1335
 1336
 1337
 1338
 1339
 1340
 1341
 1342
 1343
 1344
 1345
 1346
 1347
 1348
 1349
 1350
 1351
 1352
 1353
 1354
 1355
 1356
 1357
 1358
 1359
 1360
 1361
 1362
 1363
 1364
 1365
 1366
 1367
 1368
 1369
 1370
 1371
 1372
 1373
 1374
 1375
 1376
 1377
 1378
 1379
 1380
 1381
 1382
 1383
 1384
 1385
 1386
 1387
 1388
 1389
 1390
 1391
 1392
 1393
 1394
 1395
 1396
 1397
 1398
 1399
 1400
 1401
 1402
 1403
 1404
 1405
 1406
 1407
 1408
 1409
 1410
 1411
 1412
 1413
 1414
 1415
 1416
 1417
 1418
 1419
 1420
 1421
 1422
 1423
 1424
 1425
 1426
 1427
 1428
 1429
 1430
 1431
 1432
 1433
 1434
 1435
 1436
 1437
 1438
 1439
 1440
 1441
 1442
 1443
 1444
 1445
 1446
 1447
 1448
 1449
 1450
 1451
 1452
 1453
 1454
 1455
 1456
 1457
 1458
 1459
 1460
 1461
 1462
 1463
 1464
 1465
 1466
 1467
 1468
 1469
 1470
 1471
 1472
 1473
 1474
 1475
 1476
 1477
 1478
 1479
 1480
 1481
 1482
 1483
 1484
 1485
 1486
 1487
 1488
 1489
 1490
 1491
 1492
 1493
 1494
 1495
 1496
 1497
 1498
 1499
 1500
 1501
 1502
 1503
 1504
 1505
 1506
 1507
 1508
 1509
 1510
 1511
 1512
 1513
 1514
 1515
 1516
 1517
 1518
 1519
 1520
 1521
 1522
 1523
 1524
 1525
 1526
 1527
 1528
 1529
 1530
 1531
 1532
 1533
 1534
 1535
 1536
 1537
 1538
 1539
 1540
 1541
 1542
 1543
 1544
 1545
 1546
 1547
 1548
 1549
 1550
 1551
 1552
 1553
 1554
 1555
 1556
 1557
 1558
 1559
 1560
 1561
 1562
 1563
 1564
 1565
 1566
 1567
 1568
 1569
 1570
 1571
 1572
 1573
 1574
 1575
 1576
 1577
 1578
 1579
 1580
 1581
 1582
 1583
 1584
 1585
 1586
 1587
 1588
 1589
 1590
 1591
 1592
 1593
 1594
 1595
 1596
 1597
 1598
 1599
 1600
 1601
 1602
 1603
 1604
 1605
 1606
 1607
 1608
 1609
 1610
 1611
 1612
 1613
 1614
 1615
 1616
 1617
 1618
 1619
 1620
 1621
 1622
 1623
 1624
 1625
 1626
 1627
 1628
 1629
 1630
 1631
 1632
 1633
 1634
 1635
 1636
 1637
 1638
 1639
 1640
 1641
 1642
 1643
 1644
 1645
 1646
 1647
 1648
 1649
 1650
 1651
 1652
 1653
 1654
 1655
 1656
 1657
 1658
 1659
 1660
 1661
 1662
 1663
 1664
 1665
 1666
 1667
 1668
 1669
 1670
 1671
 1672
 1673
 1674
 1675
 1676
 1677
 1678
 1679
 1680
 1681
 1682
 1683
 1684
 1685
 1686
 1687
 1688
 1689
 1690
 1691
 1692
 1693
 1694
 1695
 1696
 1697
 1698
 1699
 1700
 1701
 1702
 1703
 1704
 1705
 1706
 1707
 1708
 1709
 1710
 1711
 1712
 1713
 1714
 1715
 1716
 1717
 1718
 1719
 1720
 1721
 1722
 1723
 1724
 1725
 1726
 1727
 1728
 1729
 1730
 1731
 1732
 1733
 1734
 1735
 1736
 1737
 1738
 1739
 1740
 1741
 1742
 1743
 1744
 1745
 1746
 1747
 1748
 1749
 1750
 1751
 1752
 1753
 1754
 1755
 1756
 1757
 1758
 1759
 1760
 1761
 1762
 1763
 1764
 1765
 1766
 1767
 1768
 1769
 1770
 1771
 1772
 1773
 1774
 1775
 1776
 1777
 1778
 1779
 1780
 1781
 1782
 1783
 1784
 1785
 1786
 1787
 1788
 1789
 1790
 1791
 1792
 1793
 1794
 1795
 1796
 1797
 1798
 1799
 1800
 1801
 1802
 1803
 1804
 1805
 1806
 1807
 1808
 1809
 1810
 1811
 1812
 1813
 1814
 1815
 1816
 1817
 1818
 1819
 1820
 1821
 1822
 1823
 1824
 1825
 1826
 1827
 1828
 1829
 1830
 1831
 1832
 1833
 1834
 1835
 1836
 1837
 1838
 1839
 1840
 1841
 1842
 1843
 1844
 1845
 1846
 1847
 1848
 1849
 1850
 1851
 1852
 1853
 1854
 1855
 1856
 1857
 1858
 1859
 1860
 1861
 1862
 1863
 1864
 1865
 1866
 1867
 1868
 1869
 1870
 1871
 1872
 1873
 1874
 1875
 1876
 1877
 1878
 1879
 1880
 1881
 1882
 1883
 1884
 1885
 1886
 1887
 1888
 1889
 1890
 1891
 1892
 1893
 1894
 1895
 1896
 1897
 1898
 1899
 1900
 1901
 1902
 1903
 1904
 1905
 1906
 1907
 1908
 1909
 1910
 1911
 1912
 1913
 1914
 1915
 1916
 1917
 1918
 1919
 1920
 1921
 1922
 1923
 1924
 1925
 1926
 1927
 1928
 1929
 1930
 1931
 1932
 1933
 1934
 1935
 1936
 1937
 1938
 1939
 1940
 1941
 1942
 1943
 1944
 1945
 1946
 1947
 1948
 1949
 1950
 1951
 1952
 1953
 1954
 1955
 1956
 1957
 1958
 1959
 1960
 1961
 1962
 1963
 1964
 1965
 1966
 1967
 1968
 1969
 1970
 1971
 1972
 1973
 1974
 1975
 1976
 1977
 1978
 1979
 1980
 1981
 1982
 1983
 1984
 1985
 1986
 1987
 1988
 1989
 1990
 1991
 1992
 1993
 1994
 1995
 1996
 1997
 1998
 1999
 2000
 2001
 2002
 2003
 2004
 2005
 2006
 2007
 2008
 2009
 2010
 2011
 2012
 2013
 2014
 2015
 2016
 2017
 2018
 2019
 2020
 2021
 2022
 2023
 2024
 2025
 2026
 2027
 2028
 2029
 2030
 2031
 2032
 2033
 2034
 2035
 2036
 2037
 2038
 2039
 2040
 2041
 2042
 2043
 2044
 2045
 2046
 2047
 2048
 2049
 2050
 2051
 2052
 2053
 2054
 2055
 2056
 2057
 2058
 2059
 2060
 2061
 2062
 2063
 2064
 2065
 2066
 2067
 2068
 2069
 2070
 2071
 2072
 2073
 2074
 2075
 2076
 2077
 2078
 2079
 2080
 2081
 2082
 2083
 2084
 2085
 2086
 2087
 2088
 2089
 2090
 2091
 2092
 2093
 2094
 2095
 2096
 2097
 2098
 2099
 2100
 2101
 2102
 2103
 2104
 2105
 2106
 2107
 2108
 2109
 2110
 2111
 2112
 2113
 2114
 2115
 2116
 2117
 2118
 2119
 2120
 2121
 2122
 2123
 2124
 2125
 2126
 2127
 2128
 2129
 2130
 2131
 2132
 2133
 2134
 2135
 2136
 2137
 2138
 2139
 2140
 2141
 2142
 2143
 2144
 2145
 2146
 2147
 2148
 2149
 2150
 2151
 2152
 2153
 2154
 2155
 2156
 2157
 2158
 2159
 2160
 2161
 2162
 2163
 2164
 2165
 2166
 2167
 2168
 2169
 2170
 2171
 2172
 2173
 2174
 2175
 2176
 2177
 2178
 2179
 2180
 2181
 2182
 2183
 2184
 2185
 2186
 2187
 2188
 2189
 2190
 2191
 2192
 2193
 2194
 2195
 2196
 2197
 2198
 2199
 2200
 2201
 2202
 2203
 2204
 2205
 2206
 2207
 2208
 2209
 2210
 2211
 2212
 2213
 2214
 2215
 2216
 2217
 2218
 2219
 2220
 2221
 2222
 2223
 2224
 2225
 2226
 2227
 2228
 2229
 2230
 2231
 2232
 2233
 2234
 2235
 2236
 2237
 2238
 2239
 2240
 2241
 2242
 2243
 2244
 2245
 2246
 2247
 2248
 2249
 2250
 2251
 2252
 2253
 2254
 2255
 2256
 2257
 2258
 2259
 2260
 2261
 2262
 2263
 2264
 2265
 2266
 2267
 2268
 2269
 2270
 2271
 2272
 2273
 2274
 2275
 2276
 2277
 2278
 2279
 2280
 2281
 2282
 2283
 2284
 2285
 2286
 2287
 2288
 2289
 2290
 2291
 2292
 2293
 2294
 2295
 2296
 2297
 2298
 2299
 2300
 2301
 2302
 2303
 2304
 2305
 2306
 2307
 2308
 2309
 2310
 2311
 2312
 2313
 2314
 2315
 2316
 2317
 2318
 2319
 2320
 2321
 2322
 2323
 2324
 2325
 2326
 2327
 2328
 2329
 2330
 2331
 2332
 2333
 2334
 2335
 2336
 2337
 2338
 2339
 2340
 2341
 2342
 2343
 2344
 2345
 2346
 2347
 2348
 2349
 2350
 2351
 2352
 2353
 2354
 2355
 2356
 2357
 2358
 2359
 2360
 2361
 2362
 2363
 2364
 2365
 2366
 2367
 2368
 2369
 2370
 2371
 2372
 2373
 2374
 2375
 2376
 2377
 2378
 2379
 2380
 2381
 2382
 2383
 2384
 2385
 2386
 2387
 2388
 2389
 2390
 2391
 2392
 2393
 2394
 2395
 2396
 2397
 2398
 2399
 2400
 2401
 2402
 2403
 2404
 2405
 2406
 2407
 2408
 2409
 2410
 2411
 2412
 2413
 2414
 2415
 2416
 2417
 2418
 2419
 2420
 2421
 2422
 2423
 2424
 2425
 2426
 2427
 2428
 2429
 2430
 2431
 2432
 2433
 2434
 2435
 2436
 2437
 2438
 2439
 2440
 2441
 2442
 2443
 2444
 2445
 2446
 2447
 2448
 2449
 2450
 2451
 2452
 2453
 2454
 2455
 2456
 2457
 2458
 2459
 2460
 2461
 2462
 2463
 2464
 2465
 2466
 2467
 2468
 2469
 2470
 2471
 2472
 2473
 2474
 2475
 2476
 2477
 2478
 2479
 2480
 2481
 2482
 2483
 2484
 2485
 2486
 2487
 2488
 2489
 2490
 2491
 2492
 2493
 2494
 2495
 2496
 2497
 2498
 2499
 2500
 2501
 2502
 2503
 2504
 2505
 2506
 2507
 2508
 2509
 2510
 2511
 2512
 2513
 2514
 2515
 2516
 2517
 2518
 2519
 2520
 2521
 2522
 2523
 2524
 2525
 2526
 2527
 2528
 2529
 2530
 2531
 2532
 2533
 2534
 2535
 2536
 2537
 2538
 2539
 2540
 2541
 2542
 2543
 2544
 2545
 2546
 2547
 2548
 2549
 2550
 2551
 2552
 2553
 2554
 2555
 2556
 2557
 2558
 2559
 2560
 2561
 2562
 2563
 2564
 2565
 2566
 2567
 2568
 2569
 2570
 2571
 2572
 2573
 2574
 2575
 2576
 2577
 2578
 2579
 2580
 2581
 2582
 2583
 2584
 2585
 2586
 2587
 2588
 2589
 2590
 2591
 2592
 2593
 2594
 2595
 2596
 2597
 2598
 2599
 2600
 2601
 2602
 2603
 2604
 2605
 2606
 2607
 2608
 2609
 2610
 2611
 2612
 2613
 2614
 2615
 2616
 2617
 2618
 2619
 2620
 2621
 2622
 2623
 2624
 2625
 2626
 2627
 2628
 2629
 2630
 2631
 2632
 2633
 2634
 2635
 2636
 2637
 2638
 2639
 2640
 2641
 2642
 2643
 2644
 2645
 2646
 2647
 2648
 2649
 2650
 2651
 2652
 2653
 2654
 2655
 2656
 2657
 2658
 2659
 2660
 2661
 2662
 2663
 2664
 2665
 2666
 2667
 2668
 2669
 2670
 2671
 2672
 2673
 2674
 2675
 2676
 2677
 2678
 2679
 2680
 2681
 2682
 2683
 2684
 2685
 2686
 2687
 2688
 2689
 2690
 2691
 2692
 2693
 2694
 2695
 2696
 2697
 2698
 2699
 2700
 2701
 2702
 2703
 2704
 2705
 2706
 2707
 2708
 2709
 2710
 2711
 2712
 2713
 2714
 2715
 2716
 2717
 2718
 2719
 2720
 2721
 2722
 2723
 2724
 2725
 2726
 2727
 2728
 2729
 2730
 2731
 2732
 2733
 2734
 2735
 2736
 2737
 2738
 2739
 2740
 2741
 2742
 2743
 2744
 2745
 2746
 2747
 2748
 2749
 2750
 2751
 2752
 2753
 2754
 2755
 2756
 2757
 2758
 2759
 2760
 2761
 2762
 2763
 2764
 2765
 2766
 2767
 2768
 2769
 2770
 2771
 2772
 2773
 2774
 2775
 2776
 2777
 2778
 2779
 2780
 2781
 2782
 2783
 2784
 2785
 2786
 2787
 2788
 2789
 2790
 2791
 2792
 2793
 2794
 2795
 2796
 2797
 2798
 2799
 2800
 2801
 2802
 2803
 2804
 2805
 2806
 2807
 2808
 2809
 2810
 2811
 2812
 2813
 2814
 2815
 2816
 2817
 2818
 2819
 2820
 2821
 2822
 2823
 2824
 2825
 2826
 2827
 2828
 2829
 2830
 2831
 2832
 2833
 2834
 2835
 2836
 2837
 2838
 2839
 2840
 2841
 2842
 2843
 2844
 2845
 2846
 2847
 2848
 2849
 2850
 2851
 2852
 2853
 2854
 2855
 2856
 2857
 2858
 2859
 2860
 2861
 2862
 2863
 2864
 2865
 2866
 2867
 2868
 2869
 2870
 2871
 2872
 2873
 2874
 2875
 2876
 2877
 2878
 2879
 2880
 2881
 2882
 2883
 2884
 2885
 2886
 2887
 2888
 2889
 2890
 2891
 2892
 2893
 2894
 2895
 2896
 2897
 2898
 2899
 2900
 2901
 2902
 2903
 2904
 2905
 2906
 2907
 2908
 2909
 2910
 2911
 2912
 2913
 2914
 2915
 2916
 2917
 2918
 2919
 2920
 2921
 2922
 2923
 2924
 2925
 2926
 2927
 2928
 2929
 2930
 2931
 2932
 2933
 2934
 2935
 2936
 2937
 2938
 2939
 2940
 2941
 2942
 2943
 2944
 2945
 2946
 2947
 2948
 2949
 2950
 2951
 2952
 2953
 2954
 2955
 2956
 2957
 2958
 2959
 2960
 2961
 2962
 2963
 2964
 2965
 2966
 2967
 2968
 2969
 2970
 2971
 2972
 2973
 2974
 2975
 2976
 2977
 2978
 2979
 2980
 2981
 2982
 2983
 2984
 2985
 2986
 2987
 2988
 2989
 2990
 2991
 2992
 2993
 2994
 2995
 2996
 2997
 2998
 2999
 3000
 3001
 3002
 3003
 3004
 3005
 3006
 3007
 3008
 3009
 3010
 3011
 3012
 3013
 3014
 3015
 3016
 3017
 3018
 3019
 3020
 3021
 3022
 3023
 3024
 3025
 3026
 3027
 3028
 3029
 3030
 3031
 3032
 3033
 3034
 3035
 3036
 3037
 3038
 3039
 3040
 3041
 3042
 3043
 3044
 3045
 3046
 3047
 3048
 3049
 3050
 3051
 3052
 3053
 3054
 3055
 3056
 3057
 3058
 3059
 3060
 3061
 3062
 3063
 3064
 3065
 3066
 3067
 3068
 3069
 3070
 3071
 3072
 3073
 3074
 3075
 3076
 3077
 3078
 3079
 3080
 3081
 3082
 3083
 3084
 3085
 3086
 3087
 3088
 3089
 3090
 3091
 3092
 3093
 3094
 3095
 3096
 3097
 3098
 3099
 3100
 3101
 3102
 3103
 3104
 3105
 3106
 3107
 3108
 3109
 3110
 3111
 3112
 3113
 3114
 3115
 3116
 3117
 3118
 3119
 3120
 3121
 3122
 3123
 3124
 3125
 3126
 3127
 3128
 3129
 3130
 3131
 3132
 3133
 3134
 3135
 3136
 3137
 3138
 3139
 3140
 3141
 3142
 3143
 3144
 3145
 3146
 3147
 3148
 3149
 3150
 3151
 3152
 3153
 3154
 3155
 3156
 3157
 3158
 3159
 3160
 3161
 3162
 3163
 3164
 3165
 3166
 3167
 3168
 3169
 3170
 3171
 3172
 3173
 3174
 3175
 3176
 3177
 3178
 3179
 3180
 3181
 3182
 3183
 3184
 3185
 3186
 3187
 3188
 3189
 3190
 3191
 3192
 3193
 3194
 3195
 3196
 3197
 3198
 3199
 3200
 3201
 3202
 3203
 3204
 3205
 3206
 3207
 3208
 3209
 3210
 3211
 3212
 3213
 3214
 3215
 3216
 3217
 3218
 3219
 3220
 3221
 3222
 3223
 3224
 3225
 3226
 3227
 3228
 3229
 3230
 3231
 3232
 3233
 3234
 3235
 3236
 3237
 3238
 3239
 3240
 3241
 3242
 3243
 3244
 3245
 3246
 3247
 3248
 3249
 3250
 3251
 3252
 3253
 3254
 3255
 3256
 3257
 3258
 3259
 3260
 3261
 3262
 3263
 3264
 3265
 3266
 3267
 3268
 3269
 3270
 3271
 3272
 3273
 3274
 3275
 3276
 3277
 3278
 3279
 3280
 3281
 3282
 3283
 3284
 3285
 3286
 3287
 3288
 3289
 3290
 3291
 3292
 3293
 3294
 3295
 3296
 3297
 3298
 3299
 3300
 3301
 3302
 3303
 3304
 3305
 3306
 3307
 3308
 3309
 3310
 3311
 3312
 3313
 3314
 3315
 3316
 3317
 3318
 3319
 3320
 3321
 3322
 3323
 3324
 3325
 3326
 3327
 3328
 3329
 3330
 3331
 3332
 3333
 3334
 3335
 3336
 3337
 3338
 3339
 3340
 3341
 3342
 3343
 3344
 3345
 3346
 3347
 3348
 3349
 3350
 3351
 3352
 3353
 3354
 3355
 3356
 3357
 3358
 3359
 3360
 3361
 3362
 3363
 3364
 3365
 3366
 3367
 3368
 3369
 3370
 3371
 3372
 3373
 3374
 3375
 3376
 3377
 3378
 3379
 3380
 3381
 3382
 3383
 3384
 3385
 3386
 3387
 3388
 3389
 3390
 3391
 3392
 3393
 3394
 3395
 3396
 3397
 3398
 3399
 3400
 3401
 3402
 3403
 3404
 3405
 3406
 3407
 3408
 3409
 3410
 3411
 3412
 3413
 3414
 3415
 3416
 3417
 3418
 3419
 3420
 3421
 3422
 3423
 3424
 3425
 3426
 3427
 3428
 3429
 3430
 3431
 3432
 3433
 3434
 3435
 3436
 3437
 3438
 3439
 3440
 3441
 3442
 3443
 3444
 3445
 3446
 3447
 3448
 3449
 3450
 3451
 3452
 3453
 3454
 3455
 3456
 3457
 3458
 3459
 3460
 3461
 3462
 3463
 3464
 3465
 3466
 3467
 3468
 3469
 3470
 3471
 3472
 3473
 3474
 3475
 3476
 3477
 3478
 3479
 3480
 3481
 3482
 3483
 3484
 3485
 3486
 3487
 3488
 3489
 3490
 3491
 3492
 3493
 3494
 3495
 3496
 3497
 3498
 3499
 3500
 3501
 3502
 3503
 3504
 3505
 3506
 3507
 3508
 3509
 3510
 3511
 3512
 3513
 3514
 3515
 3516
 3517
 3518
 3519
 3520
 3521
 3522
 3523
 3524
 3525
 3526
 3527
 3528
 3529
 3530
 3531
 3532
 3533
 3534
 3535
 3536
 3537
 3538
 3539
 3540
 3541
 3542
 3543
 3544
 3545
 3546
 3547
 3548
 3549
 3550
 3551
 3552
 3553
 3554
 3555
 3556
 3557
 3558
 3559
 3560
 3561
 3562
 3563
 3564
 3565
 3566
 3567
 3568
 3569
 3570
 3571
 3572
 3573
 3574
 3575
 3576
 3577
 3578
 3579
 3580
 3581
 3582
 3583
 3584
 3585
 3586
 3587
 3588
 3589
 3590
 3591
 3592
 3593
 3594
 3595
 3596
 3597
 3598
 3599
 3600
 3601
 3602
 3603
 3604
 3605
 3606
 3607
 3608
 3609
 3610
 3611
 3612
 3613
 3614
 3615
 3616
 3617
 3618
 3619
 3620
 3621
 3622
 3623
 3624
 3625
 3626
 3627
 3628
 3629
 3630
 3631
 3632
 3633
 3634
 3635
 3636
 3637
 3638
 3639
 3640
 3641
 3642
 3643
 3644
 3645
 3646
 3647
 3648
 3649
 3650
 3651
 3652
 3653
 3654
 3655
 3656
 3657
 3658
 3659
 3660
 3661
 3662
 3663
 3664
 3665
 3666
 3667
 3668
 3669
 3670
 3671
 3672
 3673
 3674
 3675
 3676
 3677
 3678
 3679
 3680
 3681
 3682
 3683
 3684
 3685
 3686
 3687
 3688
 3689
 3690
 3691
 3692
 3693
 3694
 3695
 3696
 3697
 3698
 3699
 3700
 3701
 3702
 3703
 3704
 3705
 3706
 3707
 3708
 3709
 3710
 3711
 3712
 3713
 3714
 3715
 3716
 3717
 3718
 3719
 3720
 3721
 3722
 3723
 3724
 3725
 3726
 3727
 3728
 3729
 3730
 3731
 3732
 3733
 3734
 3735
 3736
 3737
 3738
 3739
 3740
 3741
 3742
 3743
 3744
 3745
 3746
 3747
 3748
 3749
 3750
 3751
 3752
 3753
 3754
 3755
 3756
 3757
 3758
 3759
 3760
 3761
 3762
 3763
 3764
 3765
 3766
 3767
 3768
 3769
 3770
 3771
 3772
 3773
 3774
 3775
 3776
 3777
 3778
 3779
 3780
 3781
 3782
 3783
 3784
 3785
 3786
 3787
 3788
 3789
 3790
 3791
 3792
 3793
 3794
 3795
 3796
 3797
 3798
 3799
 3800
 3801
 3802
 3803
 3804
 3805
 3806
 3807
 3808
 3809
 3810
 3811
 3812
 3813
 3814
 3815
 3816
 3817
 3818
 3819
 3820
 3821
 3822
 3823
 3824
 3825
 3826
 3827
 3828
 3829
 3830
 3831
 3832
 3833
 3834
 3835
 3836
 3837
 3838
 3839
 3840
 3841
 3842
 3843
 3844
 3845
 3846
 3847
 3848
 3849
 3850
 3851
 3852
 3853
 3854
 3855
 3856
 3857
 3858
 3859
 3860
 3861
 3862
 3863
 3864
 3865
 3866
 3867
 3868
 3869
 3870
 3871
 3872
 3873
 3874
 3875
 3876
 3877
 3878
 3879
 3880
 3881
 3882
 3883
 3884
 3885
 3886
 3887
 3888
 3889
 3890
 3891
 3892
 3893
 3894
 3895
 3896
 3897
 3898
 3899
 3900
 3901
 3902
 3903
 3904
 3905
 3906
 3907
 3908
 3909
 3910
 3911
 3912
 3913
 3914
 3915
 3916
 3917
 3918
 3919
 3920
 3921
 3922
 3923
 3924
 3925
 3926
 3927
 3928
 3929
 3930
 3931
 3932
 3933
 3934
 3935
 3936
 3937
 3938
 3939
 3940
 3941
 3942
 3943
 3944
 3945
 3946
 3947
 3948
 3949
 3950
 3951
 3952
 3953
 3954
 3955
 3956
 3957
 3958
 3959
 3960
 3961
 3962
 3963
 3964
 3965
 3966
 3967
 3968
 3969
 3970
 3971
 3972
 3973
 3974
 3975
 3976
 3977
 3978
 3979
 3980
 3981
 3982
 3983
 3984
 3985
 3986
 3987
 3988
 3989
 3990
 3991
 3992
 3993
 3994
 3995
 3996
 3997
 3998
 3999
 4000
 4001
 4002
 4003
 4004
 4005
 4006
 4007
 4008
 4009
 4010
 4011
 4012
 4013
 4014
 4015
 4016
 4017
 4018
 4019
 4020
 4021
 4022
 4023
 4024
 4025
 4026
 4027
 4028
 4029
 4030
 4031
 4032
 4033
 4034
 4035
 4036
 4037
 4038
 4039
 4040
 4041
 4042
 4043
 4044
 4045
 4046
 4047
 4048
 4049
 4050
 4051
 4052
 4053
 4054
 4055
 4056
 4057
 4058
 4059
 4060
 4061
 4062
 4063
 4064
 4065
 4066
 4067
 4068
 4069
 4070
 4071
 4072
 4073
 4074
 4075
 4076
 4077
 4078
 4079
 4080
 4081
 4082
 4083
 4084
 4085
 4086
 4087
 4088
 4089
 4090
 4091
 4092
 4093
 4094
 4095
 4096
 4097
 4098
 4099
 4100
 4101
 4102
 4103
 4104
 4105
 4106
 4107
 4108
 4109
 4110
 4111
 4112
 4113
 4114
 4115
 4116
 4117
 4118
 4119
 4120
 4121
 4122
 4123
 4124
 4125
 4126
 4127
 4128
 4129
 4130
 4131
 4132
 4133
 4134
 4135
 4136
 4137
 4138
 4139
 4140
 4141
 4142
 4143
 4144
 4145
 4146
 4147
 4148
 4149
 4150
 4151
 4152
 4153
 4154
 4155
 4156
 4157
 4158
 4159
 4160
 4161
 4162
 4163
 4164
 4165
 4166
 4167
 4168
 4169
 4170
 4171
 4172
 4173
 4174
 4175
 4176
 4177
 4178
 4179
 4180
 4181
 4182
 4183
 4184
 4185
 4186
 4187
 4188
 4189
 4190
 4191
 4192
 4193
 4194
 4195
 4196
 4197
 4198
 4199
 4200
 4201
 4202
 4203
 4204
 4205
 4206
 4207
 4208
 4209
 4210
 4211
 4212
 4213
 4214
 4215
 4216
 4217
 4218
 4219
 4220
 4221
 4222
 4223
 4224
 4225
 4226
 4227
 4228
 4229
 4230
 4231
 4232
 4233
 4234
 4235
 4236
 4237
 4238
 4239
 4240
 4241
 4242
 4243
 4244
 4245
 4246
 4247
 4248
 4249
 4250
 4251
 4252
 4253
 4254
 4255
 4256
 4257
 4258
 4259
 4260
 4261
 4262
 4263
 4264
 4265
 4266
 4267
 4268
 4269
 4270
 4271
 4272
 4273
 4274
 4275
 4276
 4277
 4278
 4279
 4280
 4281
 4282
 4283
 4284
 4285
 4286
 4287
 4288
 4289
 4290
 4291
 4292
 4293
 4294
 4295
 4296
 4297
 4298
 4299
 4300
 4301
 4302
 4303
 4304
 4305
 4306
 4307
 4308
 4309
 4310
 4311
 4312
 4313
 4314
 4315
 4316
 4317
 4318
 4319
 4320
 4321
 4322
 4323
 4324
 4325
 4326
 4327
 4328
 4329
 4330
 4331
 4332
 4333
 4334
 4335
 4336
 4337
 4338
 4339
 4340
 4341
 4342
 4343
 4344
 4345
 4346
 4347
 4348
 4349
 4350
 4351
 4352
 4353
 4354
 4355
 4356
 4357
 4358
 4359
 4360
 4361
 4362
 4363
 4364
 4365
 4366
 4367
 4368
 4369
 4370
 4371
 4372
 4373
 4374
 4375
 4376
 4377
 4378
 4379
 4380
 4381
 4382
 4383
 4384
 4385
 4386
 4387
 4388
 4389
 4390
 4391
 4392
 4393
 4394
 4395
 4396
 4397
 4398
 4399
 4400
 4401
 4402
 4403
 4404
 4405
 4406
 4407
 4408
 4409
 4410
 4411
 4412
 4413
 4414
 4415
 4416
 4417
 4418
 4419
 4420
 4421
 4422
 4423
 4424
 4425
 4426
 4427
 4428
 4429
 4430
 4431
 4432
 4433
 4434
 4435
 4436
 4437
 4438
 4439
 4440
 4441
 4442
 4443
 4444
 4445
 4446
 4447
 4448
 4449
 4450
 4451
 4452
 4453
 4454
 4455
 4456
 4457
 4458
 4459
 4460
 4461
 4462
 4463
 4464
 4465
 4466
 4467
 4468
 4469
 4470
 4471
 4472
 4473
 4474
 4475
 4476
 4477
 4478
 4479
 4480
 4481
 4482
 4483
 4484
 4485
 4486
 4487
 4488
 4489
 4490
 4491
 4492
 4493
 4494
 4495
 4496
 4497
 4498
 4499
 4500
 4501
 4502
 4503
 4504
 4505
 4506
 4507
 4508
 4509
 4510
 4511
 4512
 4513
 4514
 4515
 4516
 4517
 4518
 4519
 4520
 4521
 4522
 4523
 4524
 4525
 4526
 4527
 4528
 4529
 4530
 4531
 4532
 4533
 4534
 4535
 4536
 4537
 4538
 4539
 4540
 4541
 4542
 4543
 4544
 4545
 4546
 4547
 4548
 4549
 4550
 4551
 4552
 4553
 4554
 4555
 4556
 4557
 4558
 4559
 4560
 4561
 4562
 4563
 4564
 4565
 4566
 4567
 4568
 4569
 4570
 4571
 4572
 4573
 4574
 4575
 4576
 4577
 4578
 4579
 4580
 4581
 4582
 4583
 4584
 4585
 4586
 4587
 4588
 4589
 4590
 4591
 4592
 4593
 4594
 4595
 4596
 4597
 4598
 4599
 4600
 4601
 4602
 4603
 4604
 4605
 4606
 4607
 4608
 4609
 4610
 4611
 4612
 4613
 4614
 4615
 4616
 4617
 4618
 4619
 4620
 4621
 4622
 4623
 4624
 4625
 4626
 4627
 4628
 4629
 4630
 4631
 4632
 4633
 4634
 4635
 4636
 4637
 4638
 4639
 4640
 4641
 4642
 4643
 4644
 4645
 4646
 4647
 4648
 4649
 4650
 4651
 4652
 4653
 4654
 4655
 4656
 4657
 4658
 4659
 4660
 4661
 4662
 4663
 4664
 4665
 4666
 4667
 4668
 4669
 4670
 4671
 4672
 4673
 4674
 4675
 4676
 4677
 4678
 4679
 4680
 4681
 4682
 4683
 4684
 4685
 4686
 4687
 4688
 4689
 4690
 4691
 4692
 4693
 4694
 4695
 4696
 4697
 4698
 4699
 4700
 4701
 4702
 4703
 4704
 4705
 4706
 4707
 4708
 4709
 4710
 4711
 4712
 4713
 4714
 4715
 4716
 4717
 4718
 4719
 4720
 4721
 4722
 4723
 4724
 4725
 4726
 4727
 4728
 4729
 4730
 4731
 4732
 4733
 4734
 4735
 4736
 4737
 4738
 4739
 4740
 4741
 4742
 4743
 4744
 4745
 4746
 4747
 4748
 4749
 4750
 4751
 4752
 4753
 4754
 4755
 4756
 4757
 4758
 4759
 4760
 4761
 4762
 4763
 4764
 4765
 4766
 4767
 4768
 4769
 4770
 4771
 4772
 4773
 4774
 4775
 4776
 4777
 4778
 4779
 4780
 4781
 4782
 4783
 4784
 4785
 4786
 4787
 4788
 4789
 4790
 4791
 4792
 4793
 4794
 4795
 4796
 4797
 4798
 4799
 4800
 4801
 4802
 4803
 4804
 4805
 4806
 4807
 4808
 4809
 4810
 4811
 4812
 4813
 4814
 4815
 4816
 4817
 4818
 4819
 4820
 4821
 4822
 4823
 4824
 4825
 4826
 4827
 4828
 4829
 4830
 4831
 4832
 4833
 4834
 4835
 4836
 4837
 4838
 4839
 4840
 4841
 4842
 4843
 4844
 4845
 4846
 4847
 4848
 4849
 4850
 4851
 4852
 4853
 4854
 4855
 4856
 4857
 4858
 4859
 4860
 4861
 4862
 4863
 4864
 4865
 4866
 4867
 4868
 4869
 4870
 4871
 4872
 4873
 4874
 4875
 4876
 4877
 4878
 4879
 4880
 4881
 4882
 4883
 4884
 4885
 4886
 4887
 4888
 4889
 4890
 4891
 4892
 4893
 4894
 4895
 4896
 4897
 4898
 4899
 4900
 4901
 4902
 4903
 4904
 4905
 4906
 4907
 4908
 4909
 4910
 4911
 4912
 4913
 4914
 4915
 4916
 4917
 4918
 4919
 4920
 4921
 4922
 4923
 4924
 4925
 4926
 4927
 4928
 4929
 4930
 4931
 4932
 4933
 4934
 4935
 4936
 4937
 4938
 4939
 4940
 4941
 4942
 4943
 4944
 4945
 4946
 4947
 4948
 4949
 4950
 4951
 4952
 4953
 4954
 4955
 4956
 4957
 4958
 4959
 4960
 4961
 4962
 4963
 4964
 4965
 4966
 4967
 4968
 4969
 4970
 4971
 4972
 4973
 4974
 4975
 4976
 4977
 4978
 4979
 4980
 4981
 4982
 4983
 4984
 4985
 4986
 4987
 4988
 4989
 4990
 4991
 4992
 4993
 4994
 4995
 4996
 4997
 4998
 4999
 5000
 5001
 5002
 5003
 5004
 5005
 5006
 5007
 5008
 5009
 5010
 5011
 5012
 5013
 5014
 5015
 5016
 5017
 5018
 5019
 5020
 5021
 5022
 5023
 5024
 5025
 5026
 5027
 5028
 5029
 5030
 5031
 5032
 5033
 5034
 5035
 5036
 5037
 5038
 5039
 5040
 5041
 5042
 5043
 5044
 5045
 5046
 5047
 5048
 5049
 5050
 5051
 5052
 5053
 5054
 5055
 5056
 5057
 5058
 5059
 5060
 5061
 5062
 5063
 5064
 5065
 5066
 5067
 5068
 5069
 5070
 5071
 5072
 5073
 5074
 5075
 5076
 5077
 5078
 5079
 5080
 5081
 5082
 5083
 5084
 5085
 5086
 5087
 5088
 5089
 5090
 5091
 5092
 5093
 5094
 5095
 5096
 5097
 5098
 5099
 5100
 5101
 5102
 5103
 5104
 5105
 5106
 5107
 5108
 5109
 5110
 5111
 5112
 5113
 5114
 5115
 5116
 5117
 5118
 5119
 5120
 5121
 5122
 5123
 5124
 5125
 5126
 5127
 5128
 5129
 5130
 5131
 5132
 5133
 5134
 5135
 5136
 5137
 5138
 5139
 5140
 5141
 5142
 5143
 5144
 5145
 5146
 5147
 5148
 5149
 5150
 5151
 5152
 5153
 5154
 5155
 5156
 5157
 5158
 5159
 5160
 5161
 5162
 5163
 5164
 5165
 5166
 5167
 5168
 5169
 5170
 5171
 5172
 5173
 5174
 5175
 5176
 5177
 5178
 5179
 5180
 5181
 5182
 5183
 5184
 5185
 5186
 5187
 5188
 5189
 5190
 5191
 5192
 5193
 5194
 5195
 5196
 5197
 5198
 5199
 5200
 5201
 5202
 5203
 5204
 5205
 5206
 5207
 5208
 5209
 5210
 5211
 5212
 5213
 5214
 5215
 5216
 5217
 5218
 5219
 5220
 5221
 5222
 5223
 5224
 5225
 5226
 5227
 5228
 5229
 5230
 5231
 5232
 5233
 5234
 5235
 5236
 5237
 5238
 5239
 5240
 5241
 5242
 5243
 5244
 5245
 5246
 5247
 5248
 5249
 5250
 5251
 5252
 5253
 5254
 5255
 5256
 5257
 5258
 5259
 5260
 5261
 5262
 5263
 5264
 5265
 5266
 5267
 5268
 5269
 5270
 5271
 5272
 5273
 5274
 5275
 5276
 5277
 5278
 5279
 5280
 5281
 5282
 5283
 5284
 5285
 5286
 5287
 5288
 5289
 5290
 5291
 5292
 5293
 5294
 5295
 5296
 5297
 5298
 5299
 5300
 5301
 5302
 5303
 5304
 5305
 5306
 5307
 5308
 5309
 5310
 5311
 5312
 5313
 5314
 5315
 5316
 5317
 5318
 5319
 5320
 5321
 5322
 5323
 5324
 5325
 5326
 5327
 5328
 5329
 5330
 5331
 5332
 5333
 5334
 5335
 5336
 5337
 5338
 5339
 5340
 5341
 5342
 5343
 5344
 5345
 5346
 5347
 5348
 5349
 5350
 5351
 5352
 5353
 5354
 5355
 5356
 5357
 5358
 5359
 5360
 5361
 5362
 5363
 5364
 5365
 5366
 5367
 5368
 5369
 5370
 5371
 5372
 5373
 5374
 5375
 5376
 5377
 5378
 5379
 5380
 5381
 5382
 5383
 5384
 5385
 5386
 5387
 5388
 5389
 5390
 5391
 5392
 5393
 5394
 5395
 5396
 5397
 5398
 5399
 5400
 5401
 5402
 5403
 5404
 5405
 5406
 5407
 5408
 5409
 5410
 5411
 5412
 5413
 5414
 5415
 5416
 5417
 5418
 5419
 5420
 5421
 5422
 5423
 5424
 5425
 5426
 5427
 5428
 5429
 5430
 5431
 5432
 5433
 5434
 5435
 5436
 5437
 5438
 5439
 5440
 5441
 5442
 5443
 5444
 5445
 5446
 5447
 5448
 5449
 5450
 5451
 5452
 5453
 5454
 5455
 5456
 5457
 5458
 5459
 5460
 5461
 5462
 5463
 5464
 5465
 5466
 5467
 5468
 5469
 5470
 5471
 5472
 5473
 5474
 5475
 5476
 5477
 5478
 5479
 5480
 5481
 5482
 5483
 5484
 5485
 5486
 5487
 5488
 5489
 5490
 5491
 5492
 5493
 5494
 5495
 5496
 5497
 5498
 5499
 5500
 5501
 5502
 5503
 5504
 5505
 5506
 5507
 5508
 5509
 5510
 5511
 5512
 5513
 5514
 5515
 5516
 5517
 5518
 5519
 5520
 5521
 5522
 5523
 5524
 5525
 5526
 5527
 5528
 5529
 5530
 5531
 5532
 5533
 5534
 5535
 5536
 5537
 5538
 5539
 5540
 5541
 5542
 5543
 5544
 5545
 5546
 5547
 5548
 5549
 5550
 5551
 5552
 5553
 5554
 5555
 5556
 5557
 5558
 5559
 5560
 5561
 5562
 5563
 5564
 5565
 5566
 5567
 5568
 5569
 5570
 5571
 5572
 5573
 5574
 5575
 5576
 5577
 5578
 5579
 5580
 5581
 5582
 5583
 5584
 5585
 5586
 5587
 5588
 5589
 5590
 5591
 5592
 5593
 5594
 5595
 5596
 5597
 5598
 5599
 5600
 5601
 5602
 5603
 5604
 5605
 5606
 5607
 5608
 5609
 5610
 5611
 5612
 5613
 5614
 5615
 5616
 5617
 5618
 5619
 5620
 5621
 5622
 5623
 5624
 5625
 5626
 5627
 5628
 5629
 5630
 5631
 5632
 5633
 5634
 5635
 5636
 5637
 5638
 5639
 5640
 5641
 5642
 5643
 5644
 5645
 5646
 5647
 5648
 5649
 5650
 5651
 5652
 5653
 5654
 5655
 5656
 5657
 5658
 5659
 5660
 5661
 5662
 5663
 5664
 5665
 5666
 5667
 5668
 5669
 5670
 5671
 5672
 5673
 5674
 5675
 5676
 5677
 5678
 5679
 5680
 5681
 5682
 5683
 5684
 5685
 5686
 5687
 5688
 5689
 5690
 5691
 5692
 5693
 5694
 5695
 5696
 5697
 5698
 5699
 5700
 5701
 5702
 5703
 5704
 5705
 5706
 5707
 5708
 5709
 5710
 5711
 5712
 5713
 5714
 5715
 5716
 5717
 5718
 5719
 5720
 5721
 5722
 5723
 5724
 5725
 5726
 5727
 5728
 5729
 5730
 5731
 5732
 5733
 5734
 5735
 5736
 5737
 5738
 5739
 5740
 5741
 5742
 5743
 5744
 5745
 5746
 5747
 5748
 5749
 5750
 5751
 5752
 5753
 5754
 5755
 5756
 5757
 5758
 5759
 5760
 5761
 5762
 5763
 5764
 5765
 5766
 5767
 5768
 5769
 5770
 5771
 5772
 5773
 5774
 5775
 5776
 5777
 5778
 5779
 5780
 5781
 5782
 5783
 5784
 5785
 5786
 5787
 5788
 5789
 5790
 5791
 5792
 5793
 5794
 5795
 5796
 5797
 5798
 5799
 5800
 5801
 5802
 5803
 5804
 5805
 5806
 5807
 5808
 5809
 5810
 5811
 5812
 5813
 5814
 5815
 5816
 5817
 5818
 5819
 5820
 5821
 5822
 5823
 5824
 5825
 5826
 5827
 5828
 5829
 5830
 5831
 5832
 5833
 5834
 5835
 5836
 5837
 5838
 5839
 5840
 5841
 5842
 5843
 5844
 5845
 5846
 5847
 5848
 5849
 5850
 5851
 5852
 5853
 5854
 5855
 5856
 5857
 5858
 5859
 5860
 5861
 5862
 5863
 5864
 5865
 5866
 5867
 5868
 5869
 5870
 5871
 5872
 5873
 5874
 5875
 5876
 5877
 5878
 5879
 5880
 5881
 5882
 5883
 5884
 5885
 5886
 5887
 5888
 5889
 5890
 5891
 5892
 5893
 5894
 5895
 5896
 5897
 5898
 5899
 5900
 5901
 5902
 5903
 5904
 5905
 5906
 5907
 5908
 5909
 5910
 5911
 5912
 5913
 5914
 5915
 5916
 5917
 5918
 5919
 5920
 5921
 5922
 5923
 5924
 5925
 5926
 5927
 5928
 5929
 5930
 5931
 5932
 5933
 5934
 5935
 5936
 5937
 5938
 5939
 5940
 5941
 5942
 5943
 5944
 5945
 5946
 5947
 5948
 5949
 5950
 5951
 5952
 5953
 5954
 5955
 5956
 5957
 5958
 5959
 5960
 5961
 5962
 5963
 5964
 5965
 5966
 5967
 5968
 5969
 5970
 5971
 5972
 5973
 5974
 5975
 5976
 5977
 5978
 5979
 5980
 5981
 5982
 5983
 5984
 5985
 5986
 5987
 5988
 5989
 5990
 5991
 5992
 5993
 5994
 5995
 5996
 5997
 5998
 5999
 6000
 6001
 6002
 6003
 6004
 6005
 6006
 6007
 6008
 6009
 6010
 6011
 6012
 6013
 6014
 6015
 6016
 6017
 6018
 6019
 6020
 6021
 6022
 6023
 6024
 6025
 6026
 6027
 6028
 6029
 6030
 6031
 6032
 6033
 6034
 6035
 6036
 6037
 6038
 6039
 6040
 6041
 6042
 6043
 6044
 6045
 6046
 6047
 6048
 6049
 6050
 6051
 6052
 6053
 6054
 6055
 6056
 6057
 6058
 6059
 6060
 6061
 6062
 6063
 6064
 6065
 6066
 6067
 6068
 6069
 6070
 6071
 6072
 6073
 6074
 6075
 6076
 6077
 6078
 6079
 6080
 6081
 6082
 6083
 6084
 6085
 6086
 6087
 6088
 6089
 6090
 6091
 6092
 6093
 6094
 6095
 6096
 6097
 6098
 6099
 6100
 6101
 6102
 6103
 6104
 6105
 6106
 6107
 6108
 6109
 6110
 6111
 6112
 6113
 6114
 6115
 6116
 6117
 6118
 6119
 6120
 6121
 6122
 6123
 6124
 6125
 6126
 6127
 6128
 6129
 6130
 6131
 6132
 6133
 6134
 6135
 6136
 6137
 6138
 6139
 6140
 6141
 6142
 6143
 6144
 6145
 6146
 6147
 6148
 6149
 6150
 6151
 6152
 6153
 6154
 6155
 6156
 6157
 6158
 6159
 6160
 6161
 6162
 6163
 6164
 6165
 6166
 6167
 6168
 6169
 6170
 6171
 6172
 6173
 6174
 6175
 6176
 6177
 6178
 6179
 6180
 6181
 6182
 6183
 6184
 6185
 6186
 6187
 6188
 6189
 6190
 6191
 6192
 6193
 6194
 6195
 6196
 6197
 6198
 6199
 6200
 6201
 6202
 6203
 6204
 6205
 6206
 6207
 6208
 6209
 6210
 6211
 6212
 6213
 6214
 6215
 6216
 6217
 6218
 6219
 6220
 6221
 6222
 6223
 6224
 6225
 6226
 6227
 6228
 6229
 6230
 6231
 6232
 6233
 6234
 6235
 6236
 6237
 6238
 6239
 6240
 6241
 6242
 6243
 6244
 6245
 6246
 6247
 6248
 6249
 6250
 6251
 6252
 6253
 6254
 6255
 6256
 6257
 6258
 6259
 6260
 6261
 6262
 6263
 6264
 6265
 6266
 6267
 6268
 6269
 6270
 6271
 6272
 6273
 6274
 6275
 6276
 6277
 6278
 6279
 6280
 6281
 6282
 6283
 6284
 6285
 6286
 6287
 6288
 6289
 6290
 6291
 6292
 6293
 6294
 6295
 6296
 6297
 6298
 6299
 6300
 6301
 6302
 6303
 6304
 6305
 6306
 6307
 6308
 6309
 6310
 6311
 6312
 6313
 6314
 6315
 6316
 6317
 6318
 6319
 6320
 6321
 6322
 6323
 6324
 6325
 6326
 6327
 6328
 6329
 6330
 6331
 6332
 6333
 6334
 6335
 6336
 6337
 6338
 6339
 6340
 6341
 6342
 6343
 6344
 6345
 6346
 6347
 6348
 6349
 6350
 6351
 6352
 6353
 6354
 6355
 6356
 6357
 6358
 6359
 6360
 6361
 6362
 6363
 6364
 6365
 6366
 6367
 6368
 6369
 6370
 6371
 6372
 6373
 6374
 6375
 6376
 6377
 6378
 6379
 6380
 6381
 6382
 6383
 6384
 6385
 6386
 6387
 6388
 6389
 6390
 6391
 6392
 6393
 6394
 6395
 6396
 6397
 6398
 6399
 6400
 6401
 6402
 6403
 6404
 6405
 6406
 6407
 6408
 6409
 6410
 6411
 6412
 6413
 6414
 6415
 6416
 6417
 6418
 6419
 6420
 6421
 6422
 6423
 6424
 6425
 6426
 6427
 6428
 6429
 6430
 6431
 6432
 6433
 6434
 6435
 6436
 6437
 6438
 6439
 6440
 6441
 6442
 6443
 6444
 6445
 6446
 6447
 6448
 6449
 6450
 6451
 6452
 6453
 6454
 6455
 6456
 6457
 6458
 6459
 6460
 6461
 6462
 6463
 6464
 6465
 6466
 6467
 6468
 6469
 6470
 6471
 6472
 6473
 6474
 6475
 6476
 6477
 6478
 6479
 6480
 6481
 6482
 6483
 6484
 6485
 6486
 6487
 6488
 6489
 6490
 6491
 6492
 6493
 6494
 6495
 6496
 6497
 6498
 6499
 6500
 6501
 6502
 6503
 6504
 6505
 6506
 6507
 6508
 6509
 6510
 6511
 6512
 6513
 6514
 6515
 6516
 6517
 6518
 6519
 6520
 6521
 6522
 6523
 6524
 6525
 6526
 6527
 6528
 6529
 6530
 6531
 6532
 6533
 6534
 6535
 6536
 6537
 6538
 6539
 6540
 6541
 6542
 6543
 6544
 6545
 6546
 6547
 6548
 6549
 6550
 6551
 6552
 6553
 6554
 6555
 6556
 6557
 6558
 6559
 6560
 6561
 6562
 6563
 6564
 6565
 6566
 6567
 6568
 6569
 6570
 6571
 6572
 6573
 6574
 6575
 6576
 6577
 6578
 6579
 6580
 6581
 6582
 6583
 6584
 6585
 6586
 6587
 6588
 6589
 6590
 6591
 6592
 6593
 6594
 6595
 6596
 6597
 6598
 6599
 6600
 6601
 6602
 6603
 6604
 6605
 6606
 6607
 6608
 6609
 6610
 6611
 6612
 6613
 6614
 6615
 6616
 6617
 6618
 6619
 6620
 6621
 6622
 6623
 6624
 6625
 6626
 6627
 6628
 6629
 6630
 6631
 6632
 6633
 6634
 6635
 6636
 6637
 6638
 6639
 6640
 6641
 6642
 6643
 6644
 6645
 6646
 6647
 6648
 6649
 6650
 6651
 6652
 6653
 6654
 6655
 6656
 6657
 6658
 6659
 6660
 6661
 6662
 6663
 6664
 6665
 6666
 6667
 6668
 6669
 6670
 6671
 6672
 6673
 6674
 6675
 6676
 6677
 6678
 6679
 6680
 6681
 6682
 6683
 6684
 6685
 6686
 6687
 6688
 6689
 6690
 6691
 6692
 6693
 6694
 6695
 6696
 6697
 6698
 6699
 6700
 6701
 6702
 6703
 6704
 6705
 6706
 6707
 6708
 6709
 6710
 6711
 6712
 6713
 6714
 6715
 6716
 6717
 6718
 6719
 6720
 6721
 6722
 6723
 6724
 6725
 6726
 6727
 6728
 6729
 6730
 6731
 6732
 6733
 6734
 6735
 6736
 6737
 6738
 6739
 6740
 6741
 6742
 6743
 6744
 6745
 6746
 6747
 6748
 6749
 6750
 6751
 6752
 6753
 6754
 6755
 6756
 6757
 6758
 6759
 6760
 6761
 6762
 6763
 6764
 6765
 6766
 6767
 6768
 6769
 6770
 6771
 6772
 6773
 6774
 6775
 6776
 6777
 6778
 6779
 6780
 6781
 6782
 6783
 6784
 6785
 6786
 6787
 6788
 6789
 6790
 6791
 6792
 6793
 6794
 6795
 6796
 6797
 6798
 6799
 6800
 6801
 6802
 6803
 6804
 6805
 6806
 6807
 6808
 6809
 6810
 6811
 6812
 6813
 6814
 6815
 6816
 6817
 6818
 6819
 6820
 6821
 6822
 6823
 6824
 6825
 6826
 6827
 6828
 6829
 6830
 6831
 6832
 6833
 6834
 6835
 6836
 6837
 6838
 6839
 6840
 6841
 6842
 6843
 6844
 6845
 6846
 6847
 6848
 6849
 6850
 6851
 6852
 6853
 6854
 6855
 6856
 6857
 6858
 6859
 6860
 6861
 6862
 6863
 6864
 6865
 6866
 6867
 6868
 6869
 6870
 6871
 6872
 6873
 6874
 6875
 6876
 6877
 6878
 6879
 6880
 6881
 6882
 6883
 6884
 6885
 6886
 6887
 6888
 6889
 6890
 6891
 6892
 6893
 6894
 6895
 6896
 6897
 6898
 6899
 6900
 6901
 6902
 6903
 6904
 6905
 6906
 6907
 6908
 6909
 6910
 6911
 6912
 6913
 6914
 6915
 6916
 6917
 6918
 6919
 6920
 6921
 6922
 6923
 6924
 6925
 6926
 6927
 6928
 6929
 6930
 6931
 6932
 6933
 6934
 6935
 6936
 6937
 6938
 6939
 6940
 6941
 6942
 6943
 6944
 6945
 6946
 6947
 6948
 6949
 6950
 6951
 6952
 6953
 6954
 6955
 6956
 6957
 6958
 6959
 6960
 6961
 6962
 6963
 6964
 6965
 6966
 6967
 6968
 6969
 6970
 6971
 6972
 6973
 6974
 6975
 6976
 6977
 6978
 6979
 6980
 6981
 6982
 6983
 6984
 6985
 6986
 6987
 6988
 6989
 6990
 6991
 6992
 6993
 6994
 6995
 6996
 6997
 6998
 6999
 7000
 7001
 7002
 7003
 7004
 7005
 7006
 7007
 7008
 7009
 7010
 7011
 7012
 7013
 7014
 7015
 7016
 7017
 7018
 7019
 7020
 7021
 7022
 7023
 7024
 7025
 7026
 7027
 7028
 7029
 7030
 7031
 7032
 7033
 7034
 7035
 7036
 7037
 7038
 7039
 7040
 7041
 7042
 7043
 7044
 7045
 7046
 7047
 7048
 7049
 7050
 7051
 7052
 7053
 7054
 7055
 7056
 7057
 7058
 7059
 7060
 7061
 7062
 7063
 7064
 7065
 7066
 7067
 7068
 7069
 7070
 7071
 7072
 7073
 7074
 7075
 7076
 7077
 7078
 7079
 7080
 7081
 7082
 7083
 7084
 7085
 7086
 7087
 7088
 7089
 7090
 7091
 7092
 7093
 7094
 7095
 7096
 7097
 7098
 7099
 7100
 7101
 7102
 7103
 7104
 7105
 7106
 7107
 7108
 7109
 7110
 7111
 7112
 7113
 7114
 7115
 7116
 7117
 7118
 7119
 7120
 7121
 7122
 7123
 7124
 7125
 7126
 7127
 7128
 7129
 7130
 7131
 7132
 7133
 7134
 7135
 7136
 7137
 7138
 7139
 7140
 7141
 7142
 7143
 7144
 7145
 7146
 7147
 7148
 7149
 7150
 7151
 7152
 7153
 7154
 7155
 7156
 7157
 7158
 7159
 7160
 7161
 7162
 7163
 7164
 7165
 7166
 7167
 7168
 7169
 7170
 7171
 7172
 7173
 7174
 7175
 7176
 7177
 7178
 7179
 7180
 7181
 7182
 7183
 7184
 7185
 7186
 7187
 7188
 7189
 7190
 7191
 7192
 7193
 7194
 7195
 7196
 7197
 7198
 7199
 7200
 7201
 7202
 7203
 7204
 7205
 7206
 7207
 7208
 7209
 7210
 7211
 7212
 7213
 7214
 7215
 7216
 7217
 7218
 7219
 7220
 7221
 7222
 7223
 7224
 7225
 7226
 7227
 7228
 7229
 7230
 7231
 7232
 7233
 7234
 7235
 7236
 7237
 7238
 7239
 7240
 7241
 7242
 7243
 7244
 7245
 7246
 7247
 7248
 7249
 7250
 7251
 7252
 7253
 7254
 7255
 7256
 7257
 7258
 7259
 7260
 7261
 7262
 7263
 7264
 7265
 7266
 7267
 7268
 7269
 7270
 7271
 7272
 7273
 7274
 7275
 7276
 7277
 7278
 7279
 7280
 7281
 7282
 7283
 7284
 7285
 7286
 7287
 7288
 7289
 7290
 7291
 7292
 7293
 7294
 7295
 7296
 7297
 7298
 7299
 7300
 7301
 7302
 7303
 7304
 7305
 7306
 7307
 7308
 7309
 7310
 7311
 7312
 7313
 7314
 7315
 7316
 7317
 7318
 7319
 7320
 7321
 7322
 7323
 7324
 7325
 7326
 7327
 7328
 7329
 7330
 7331
 7332
 7333
 7334
 7335
 7336
 7337
 7338
 7339
 7340
 7341
 7342
 7343
 7344
 7345
 7346
 7347
 7348
 7349
 7350
 7351
 7352
 7353
 7354
 7355
 7356
 7357
 7358
 7359
 7360
 7361
 7362
 7363
 7364
 7365
 7366
 7367
 7368
 7369
 7370
 7371
 7372
 7373
 7374
 7375
 7376
 7377
 7378
 7379
 7380
 7381
 7382
 7383
 7384
 7385
 7386
 7387
 7388
 7389
 7390
 7391
 7392
 7393
 7394
 7395
 7396
 7397
 7398
 7399
 7400
 7401
 7402
 7403
 7404
 7405
 7406
 7407
 7408
 7409
 7410
 7411
 7412
 7413
 7414
 7415
 7416
 7417
 7418
 7419
 7420
 7421
 7422
 7423
 7424
 7425
 7426
 7427
 7428
 7429
 7430
 7431
 7432
 7433
 7434
 7435
 7436
 7437
 7438
 7439
 7440
 7441
 7442
 7443
 7444
 7445
 7446
 7447
 7448
 7449
 7450
 7451
 7452
 7453
 7454
 7455
 7456
 7457
 7458
 7459
 7460
 7461
 7462
 7463
 7464
 7465
 7466
 7467
 7468
 7469
 7470
 7471
 7472
 7473
 7474
 7475
 7476
 7477
 7478
 7479
 7480
 7481
 7482
 7483
 7484
 7485
 7486
 7487
 7488
 7489
 7490
 7491
 7492
 7493
 7494
 7495
 7496
 7497
 7498
 7499
 7500
 7501
 7502
 7503
 7504
 7505
 7506
 7507
 7508
 7509
 7510
 7511
 7512
 7513
 7514
 7515
 7516
 7517
 7518
 7519
 7520
 7521
 7522
 7523
 7524
 7525
 7526
 7527
 7528
 7529
 7530
 7531
 7532
 7533
 7534
 7535
 7536
 7537
 7538
 7539
 7540
 7541
 7542
 7543
 7544
 7545
 7546
 7547
 7548
 7549
 7550
 7551
 7552
 7553
 7554
 7555
 7556
 7557
 7558
 7559
 7560
 7561
 7562
 7563
 7564
 7565
 7566
 7567
 7568
 7569
 7570
 7571
 7572
 7573
 7574
 7575
 7576
 7577
 7578
 7579
 7580
 7581
 7582
 7583
 7584
 7585
 7586
 7587
 7588
 7589
 7590
 7591
 7592
 7593
 7594
 7595
 7596
 7597
 7598
 7599
 7600
 7601
 7602
 7603
 7604
 7605
 7606
 7607
 7608
 7609
 7610
 7611
 7612
 7613
 7614
 7615
 7616
 7617
 7618
 7619
 7620
 7621
 7622
 7623
 7624
 7625
 7626
 7627
 7628
 7629
 7630
 7631
 7632
 7633
 7634
 7635
 7636
 7637
 7638
 7639
 7640
 7641
 7642
 7643
 7644
 7645
 7646
 7647
 7648
 7649
 7650
 7651
 7652
 7653
 7654
 7655
 7656
 7657
 7658
 7659
 7660
 7661
 7662
 7663
 7664
 7665
 7666
 7667
 7668
 7669
 7670
 7671
 7672
 7673
 7674
 7675
 7676
 7677
 7678
 7679
 7680
 7681
 7682
 7683
 7684
 7685
 7686
 7687
 7688
 7689
 7690
 7691
 7692
 7693
 7694
 7695
 7696
 7697
 7698
 7699
 7700
 7701
 7702
 7703
 7704
 7705
 7706
 7707
 7708
 7709
 7710
 7711
 7712
 7713
 7714
 7715
 7716
 7717
 7718
 7719
 7720
 7721
 7722
 7723
 7724
 7725
 7726
 7727
 7728
 7729
 7730
 7731
 7732
 7733
 7734
 7735
 7736
 7737
 7738
 7739
 7740
 7741
 7742
 7743
 7744
 7745
 7746
 7747
 7748
 7749
 7750
 7751
 7752
 7753
 7754
 7755
 7756
 7757
 7758
 7759
 7760
 7761
 7762
 7763
 7764
 7765
 7766
 7767
 7768
 7769
 7770
 7771
 7772
 7773
 7774
 7775
 7776
 7777
 7778
 7779
 7780
 7781
 7782
 7783
 7784
 7785
 7786
 7787
 7788
 7789
 7790
 7791
 7792
 7793
 7794
 7795
 7796
 7797
 7798
 7799
 7800
 7801
 7802
 7803
 7804
 7805
 7806
 7807
 7808
 7809
 7810
 7811
 7812
 7813
 7814
 7815
 7816
 7817
 7818
 7819
 7820
 7821
 7822
 7823
 7824
 7825
 7826
 7827
 7828
 7829
 7830
 7831
 7832
 7833
 7834
 7835
 7836
 7837
 7838
 7839
 7840
 7841
 7842
 7843
 7844
 7845
 7846
 7847
 7848
 7849
 7850
 7851
 7852
 7853
 7854
 7855
 7856
 7857
 7858
 7859
 7860
 7861
 7862
 7863
 7864
 7865
 7866
 7867
 7868
 7869
 7870
 7871
 7872
 7873
 7874
 7875
 7876
 7877
 7878
 7879
 7880
 7881
 7882
 7883
 7884
 7885
 7886
 7887
 7888
 7889
 7890
 7891
 7892
 7893
 7894
 7895
 7896
 7897
 7898
 7899
 7900
 7901
 7902
 7903
 7904
 7905
 7906
 7907
 7908
 7909
 7910
 7911
 7912
 7913
 7914
 7915
 7916
 7917
 7918
 7919
 7920
 7921
 7922
 7923
 7924
 7925
 7926
 7927
 7928
 7929
 7930
 7931
 7932
 7933
 7934
 7935
 7936
 7937
 7938
 7939
 7940
 7941
 7942
 7943
 7944
 7945
 7946
 7947
 7948
 7949
 7950
 7951
 7952
 7953
 7954
 7955
 7956
 7957
 7958
 7959
 7960
 7961
 7962
 7963
 7964
 7965
 7966
 7967
 7968
 7969
 7970
 7971
 7972
 7973
 7974
 7975
 7976
 7977
 7978
 7979
 7980
 7981
 7982
 7983
 7984
 7985
 7986
 7987
 7988
 7989
 7990
 7991
 7992
 7993
 7994
 7995
 7996
 7997
 7998
 7999
 8000
 8001
 8002
 8003
 8004
 8005
 8006
 8007
 8008
 8009
 8010
 8011
 8012
 8013
 8014
 8015
 8016
 8017
 8018
 8019
 8020
 8021
 8022
 8023
 8024
 8025
 8026
 8027
 8028
 8029
 8030
 8031
 8032
 8033
 8034
 8035
 8036
 8037
 8038
 8039
 8040
 8041
 8042
 8043
 8044
 8045
 8046
 8047
 8048
 8049
 8050
 8051
 8052
 8053
 8054
 8055
 8056
 8057
 8058
 8059
 8060
 8061
 8062
 8063
 8064
 8065
 8066
 8067
 8068
 8069
 8070
 8071
 8072
 8073
 8074
 8075
 8076
 8077
 8078
 8079
 8080
 8081
 8082
 8083
 8084
 8085
 8086
 8087
 8088
 8089
 8090
 8091
 8092
 8093
 8094
 8095
 8096
 8097
 8098
 8099
 8100
 8101
 8102
 8103
 8104
 8105
 8106
 8107
 8108
 8109
 8110
 8111
 8112
 8113
 8114
 8115
 8116
 8117
 8118
 8119
 8120
 8121
 8122
 8123
 8124
 8125
 8126
 8127
 8128
 8129
 8130
 8131
 8132
 8133
 8134
 8135
 8136
 8137
 8138
 8139
 8140
 8141
 8142
 8143
 8144
 8145
 8146
 8147
 8148
 8149
 8150
 8151
 8152
 8153
 8154
 8155
 8156
 8157
 8158
 8159
 8160
 8161
 8162
 8163
 8164
 8165
 8166
 8167
 8168
 8169
 8170
 8171
 8172
 8173
 8174
 8175
 8176
 8177
 8178
 8179
 8180
 8181
 8182
 8183
 8184
 8185
 8186
 8187
 8188
 8189
 8190
 8191
 8192
 8193
 8194
 8195
 8196
 8197
 8198
 8199
 8200
 8201
 8202
 8203
 8204
 8205
 8206
 8207
 8208
 8209
 8210
 8211
 8212
 8213
 8214
 8215
 8216
 8217
 8218
 8219
 8220
 8221
 8222
 8223
 8224
 8225
 8226
 8227
 8228
 8229
 8230
 8231
 8232
 8233
 8234
 8235
 8236
 8237
 8238
 8239
 8240
 8241
 8242
 8243
 8244
 8245
 8246
 8247
 8248
 8249
 8250
 8251
 8252
 8253
 8254
 8255
 8256
 8257
 8258
 8259
 8260
 8261
 8262
 8263
 8264
 8265
 8266
 8267
 8268
 8269
 8270
 8271
 8272
 8273
 8274
 8275
 8276
 8277
 8278
 8279
 8280
 8281
 8282
 8283
 8284
 8285
 8286
 8287
 8288
 8289
 8290
 8291
 8292
 8293
 8294
 8295
 8296
 8297
 8298
 8299
 8300
 8301
 8302
 8303
 8304
 8305
 8306
 8307
 8308
 8309
 8310
 8311
 8312
 8313
 8314
 8315
 8316
 8317
 8318
 8319
 8320
 8321
 8322
 8323
 8324
 8325
 8326
 8327
 8328
 8329
 8330
 8331
 8332
 8333
 8334
 8335
 8336
 8337
 8338
 8339
 8340
 8341
 8342
 8343
 8344
 8345
 8346
 8347
 8348
 8349
 8350
 8351
 8352
 8353
 8354
 8355
 8356
 8357
 8358
 8359
 8360
 8361
 8362
 8363
 8364
 8365
 8366
 8367
 8368
 8369
 8370
 8371
 8372
 8373
 8374
 8375
 8376
 8377
 8378
 8379
 8380
 8381
 8382
 8383
 8384
 8385
 8386
 8387
 8388
 8389
 8390
 8391
 8392
 8393
 8394
 8395
 8396
 8397
 8398
 8399
 8400
 8401
 8402
 8403
 8404
 8405
 8406
 8407
 8408
 8409
 8410
 8411
 8412
 8413
 8414
 8415
 8416
 8417
 8418
 8419
 8420
 8421
 8422
 8423
 8424
 8425
 8426
 8427
 8428
 8429
 8430
 8431
 8432
 8433
 8434
 8435
 8436
 8437
 8438
 8439
 8440
 8441
 8442
 8443
 8444
 8445
 8446
 8447
 8448
 8449
 8450
 8451
 8452
 8453
 8454
 8455
 8456
 8457
 8458
 8459
 8460
 8461
 8462
 8463
 8464
 8465
 8466
 8467
 8468
 8469
 8470
 8471
 8472
 8473
 8474
 8475
 8476
 8477
 8478
 8479
 8480
 8481
 8482
 8483
 8484
 8485
 8486
 8487
 8488
 8489
 8490
 8491
 8492
 8493
 8494
 8495
 8496
 8497
 8498
 8499
 8500
 8501
 8502
 8503
 8504
 8505
 8506
 8507
 8508
 8509
 8510
 8511
 8512
 8513
 8514
 8515
 8516
 8517
 8518
 8519
 8520
 8521
 8522
 8523
 8524
 8525
 8526
 8527
 8528
 8529
 8530
 8531
 8532
 8533
 8534
 8535
 8536
 8537
 8538
 8539
 8540
 8541
 8542
 8543
 8544
 8545
 8546
 8547
 8548
 8549
 8550
 8551
 8552
 8553
 8554
 8555
 8556
 8557
 8558
 8559
 8560
 8561
 8562
 8563
 8564
 8565
 8566
 8567
 8568
 8569
 8570
 8571
 8572
 8573
 8574
 8575
 8576
 8577
 8578
 8579
 8580
 8581
 8582
 8583
 8584
 8585
 8586
 8587
 8588
 8589
 8590
 8591
 8592
 8593
 8594
 8595
 8596
 8597
 8598
 8599
 8600
 8601
 8602
 8603
 8604
 8605
 8606
 8607
 8608
 8609
 8610
 8611
 8612
 8613
 8614
 8615
 8616
 8617
 8618
 8619
 8620
 8621
 8622
 8623
 8624
 8625
 8626
 8627
 8628
 8629
 8630
 8631
 8632
 8633
 8634
 8635
 8636
 8637
 8638
 8639
 8640
 8641
 8642
 8643
 8644
 8645
 8646
 8647
 8648
 8649
 8650
 8651
 8652
 8653
 8654
 8655
 8656
 8657
 8658
 8659
 8660
 8661
 8662
 8663
 8664
 8665
 8666
 8667
 8668
 8669
 8670
 8671
 8672
 8673
 8674
 8675
 8676
 8677
 8678
 8679
 8680
 8681
 8682
 8683
 8684
 8685
 8686
 8687
 8688
 8689
 8690
 8691
 8692
 8693
 8694
 8695
 8696
 8697
 8698
 8699
 8700
 8701
 8702
 8703
 8704
 8705
 8706
 8707
 8708
 8709
 8710
 8711
 8712
 8713
 8714
 8715
 8716
 8717
 8718
 8719
 8720
 8721
 8722
 8723
 8724
 8725
 8726
 8727
 8728
 8729
 8730
 8731
 8732
 8733
 8734
 8735
 8736
 8737
 8738
 8739
 8740
 8741
 8742
 8743
 8744
 8745
 8746
 8747
 8748
 8749
 8750
 8751
 8752
 8753
 8754
 8755
 8756
 8757
 8758
 8759
 8760
 8761
 8762
 8763
 8764
 8765
 8766
 8767
 8768
 8769
 8770
 8771
 8772
 8773
 8774
 8775
 8776
 8777
 8778
 8779
 8780
 8781
 8782
 8783
 8784
 8785
 8786
 8787
 8788
 8789
 8790
 8791
 8792
 8793
 8794
 8795
 8796
 8797
 8798
 8799
 8800
 8801
 8802
 8803
 8804
 8805
 8806
 8807
 8808
 8809
 8810
 8811
 8812
 8813
 8814
 8815
 8816
 8817
 8818
 8819
 8820
 8821
 8822
 8823
 8824
 8825
 8826
 8827
 8828
 8829
 8830
 8831
 8832
 8833
 8834
 8835
 8836
 8837
 8838
 8839
 8840
 8841
 8842
 8843
 8844
 8845
 8846
 8847
 8848
 8849
 8850
 8851
 8852
 8853
 8854
 8855
 8856
 8857
 8858
 8859
 8860
 8861
 8862
 8863
 8864
 8865
 8866
 8867
 8868
 8869
 8870
 8871
 8872
 8873
 8874
 8875
 8876
 8877
 8878
 8879
 8880
 8881
 8882
 8883
 8884
 8885
 8886
 8887
 8888
 8889
 8890
 8891
 8892
 8893
 8894
 8895
 8896
 8897
 8898
 8899
 8900
 8901
 8902
 8903
 8904
 8905
 8906
 8907
 8908
 8909
 8910
 8911
 8912
 8913
 8914
 8915
 8916
 8917
 8918
 8919
 8920
 8921
 8922
 8923
 8924
 8925
 8926
 8927
 8928
 8929
 8930
 8931
 8932
 8933
 8934
 8935
 8936
 8937
 8938
 8939
 8940
 8941
 8942
 8943
 8944
 8945
 8946
 8947
 8948
 8949
 8950
 8951
 8952
 8953
 8954
 8955
 8956
 8957
 8958
 8959
 8960
 8961
 8962
 8963
 8964
 8965
 8966
 8967
 8968
 8969
 8970
 8971
 8972
 8973
 8974
 8975
 8976
 8977
 8978
 8979
 8980
 8981
 8982
 8983
 8984
 8985
 8986
 8987
 8988
 8989
 8990
 8991
 8992
 8993
 8994
 8995
 8996
 8997
 8998
 8999
 9000
 9001
 9002
 9003
 9004
 9005
 9006
 9007
 9008
 9009
 9010
 9011
 9012
 9013
 9014
 9015
 9016
 9017
 9018
 9019
 9020
 9021
 9022
 9023
 9024
 9025
 9026
 9027
 9028
 9029
 9030
 9031
 9032
 9033
 9034
 9035
 9036
 9037
 9038
 9039
 9040
 9041
 9042
 9043
 9044
 9045
 9046
 9047
 9048
 9049
 9050
 9051
 9052
 9053
 9054
 9055
 9056
 9057
 9058
 9059
 9060
 9061
 9062
 9063
 9064
 9065
 9066
 9067
 9068
 9069
 9070
 9071
 9072
 9073
 9074
 9075
 9076
 9077
 9078
 9079
 9080
 9081
 9082
 9083
 9084
 9085
 9086
 9087
 9088
 9089
 9090
 9091
 9092
 9093
 9094
 9095
 9096
 9097
 9098
 9099
 9100
 9101
 9102
 9103
 9104
 9105
 9106
 9107
 9108
 9109
 9110
 9111
 9112
 9113
 9114
 9115
 9116
 9117
 9118
 9119
 9120
 9121
 9122
 9123
 9124
 9125
 9126
 9127
 9128
 9129
 9130
 9131
 9132
 9133
 9134
 9135
 9136
 9137
 9138
 9139
 9140
 9141
 9142
 9143
 9144
 9145
 9146
 9147
 9148
 9149
 9150
 9151
 9152
 9153
 9154
 9155
 9156
 9157
 9158
 9159
 9160
 9161
 9162
 9163
 9164
 9165
 9166
 9167
 9168
 9169
 9170
 9171
 9172
 9173
 9174
 9175
 9176
 9177
 9178
 9179
 9180
 9181
 9182
 9183
 9184
 9185
 9186
 9187
 9188
 9189
 9190
 9191
 9192
 9193
 9194
 9195
 9196
 9197
 9198
 9199
 9200
 9201
 9202
 9203
 9204
 9205
 9206
 9207
 9208
 9209
 9210
 9211
 9212
 9213
 9214
 9215
 9216
 9217
 9218
 9219
 9220
 9221
 9222
 9223
 9224
 9225
 9226
 9227
 9228
 9229
 9230
 9231
 9232
 9233
 9234
 9235
 9236
 9237
 9238
 9239
 9240
 9241
 9242
 9243
 9244
 9245
 9246
 9247
 9248
 9249
 9250
 9251
 9252
 9253
 9254
 9255
 9256
 9257
 9258
 9259
 9260
 9261
 9262
 9263
 9264
 9265
 9266
 9267
 9268
 9269
 9270
 9271
 9272
 9273
 9274
 9275
 9276
 9277
 9278
 9279
 9280
 9281
 9282
 9283
 9284
 9285
 9286
 9287
 9288
 9289
 9290
 9291
 9292
 9293
 9294
 9295
 9296
 9297
 9298
 9299
 9300
 9301
 9302
 9303
 9304
 9305
 9306
 9307
 9308
 9309
 9310
 9311
 9312
 9313
 9314
 9315
 9316
 9317
 9318
 9319
 9320
 9321
 9322
 9323
 9324
 9325
 9326
 9327
 9328
 9329
 9330
 9331
 9332
 9333
 9334
 9335
 9336
 9337
 9338
 9339
 9340
 9341
 9342
 9343
 9344
 9345
 9346
 9347
 9348
 9349
 9350
 9351
 9352
 9353
 9354
 9355
 9356
 9357
 9358
 9359
 9360
 9361
 9362
 9363
 9364
 9365
 9366
 9367
 9368
 9369
 9370
 9371
 9372
 9373
 9374
 9375
 9376
 9377
 9378
 9379
 9380
 9381
 9382
 9383
 9384
 9385
 9386
 9387
 9388
 9389
 9390
 9391
 9392
 9393
 9394
 9395
 9396
 9397
 9398
 9399
 9400
 9401
 9402
 9403
 9404
 9405
 9406
 9407
 9408
 9409
 9410
 9411
 9412
 9413
 9414
 9415
 9416
 9417
 9418
 9419
 9420
 9421
 9422
 9423
 9424
 9425
 9426
 9427
 9428
 9429
 9430
 9431
 9432
 9433
 9434
 9435
 9436
 9437
 9438
 9439
 9440
 9441
 9442
 9443
 9444
 9445
 9446
 9447
 9448
 9449
 9450
 9451
 9452
 9453
 9454
 9455
 9456
 9457
 9458
 9459
 9460
 9461
 9462
 9463
 9464
 9465
 9466
 9467
 9468
 9469
 9470
 9471
 9472
 9473
 9474
 9475
 9476
 9477
 9478
 9479
 9480
 9481
 9482
 9483
 9484
 9485
 9486
 9487
 9488
 9489
 9490
 9491
 9492
 9493
 9494
 9495
 9496
 9497
 9498
 9499
 9500
 9501
 9502
 9503
 9504
 9505
 9506
 9507
 9508
 9509
 9510
 9511
 9512
 9513
 9514
 9515
 9516
 9517
 9518
 9519
 9520
 9521
 9522
 9523
 9524
 9525
 9526
 9527
 9528
 9529
 9530
 9531
 9532
 9533
 9534
 9535
 9536
 9537
 9538
 9539
 9540
 9541
 9542
 9543
 9544
 9545
 9546
 9547
 9548
 9549
 9550
 9551
 9552
 9553
 9554
 9555
 9556
 9557
 9558
 9559
 9560
 9561
 9562
 9563
 9564
 9565
 9566
 9567
 9568
 9569
 9570
 9571
 9572
 9573
 9574
 9575
 9576
 9577
 9578
 9579
 9580
 9581
 9582
 9583
 9584
 9585
 9586
 9587
 9588
 9589
 9590
 9591
 9592
 9593
 9594
 9595
 9596
 9597
 9598
 9599
 9600
 9601
 9602
 9603
 9604
 9605
 9606
 9607
 9608
 9609
 9610
 9611
 9612
 9613
 9614
 9615
 9616
 9617
 9618
 9619
 9620
 9621
 9622
 9623
 9624
 9625
 9626
 9627
 9628
 9629
 9630
 9631
 9632
 9633
 9634
 9635
 9636
 9637
 9638
 9639
 9640
 9641
 9642
 9643
 9644
 9645
 9646
 9647
 9648
 9649
 9650
 9651
 9652
 9653
 9654
 9655
 9656
 9657
 9658
 9659
 9660
 9661
 9662
 9663
 9664
 9665
 9666
 9667
 9668
 9669
 9670
 9671
 9672
 9673
 9674
 9675
 9676
 9677
 9678
 9679
 9680
 9681
 9682
 9683
 9684
 9685
 9686
 9687
 9688
 9689
 9690
 9691
 9692
 9693
 9694
 9695
 9696
 9697
 9698
 9699
 9700
 9701
 9702
 9703
 9704
 9705
 9706
 9707
 9708
 9709
 9710
 9711
 9712
 9713
 9714
 9715
 9716
 9717
 9718
 9719
 9720
 9721
 9722
 9723
 9724
 9725
 9726
 9727
 9728
 9729
 9730
 9731
 9732
 9733
 9734
 9735
 9736
 9737
 9738
 9739
 9740
 9741
 9742
 9743
 9744
 9745
 9746
 9747
 9748
 9749
 9750
 9751
 9752
 9753
 9754
 9755
 9756
 9757
 9758
 9759
 9760
 9761
 9762
 9763
 9764
 9765
 9766
 9767
 9768
 9769
 9770
 9771
 9772
 9773
 9774
 9775
 9776
 9777
 9778
 9779
 9780
 9781
 9782
 9783
 9784
 9785
 9786
 9787
 9788
 9789
 9790
 9791
 9792
 9793
 9794
 9795
 9796
 9797
 9798
 9799
 9800
 9801
 9802
 9803
 9804
 9805
 9806
 9807
 9808
 9809
 9810
 9811
 9812
 9813
 9814
 9815
 9816
 9817
 9818
 9819
 9820
 9821
 9822
 9823
 9824
 9825
 9826
 9827
 9828
 9829
 9830
 9831
 9832
 9833
 9834
 9835
 9836
 9837
 9838
 9839
 9840
 9841
 9842
 9843
 9844
 9845
 9846
 9847
 9848
 9849
 9850
 9851
 9852
 9853
 9854
 9855
 9856
 9857
 9858
 9859
 9860
 9861
 9862
 9863
 9864
 9865
 9866
 9867
 9868
 9869
 9870
 9871
 9872
 9873
 9874
 9875
 9876
 9877
 9878
 9879
 9880
 9881
 9882
 9883
 9884
 9885
 9886
 9887
 9888
 9889
 9890
 9891
 9892
 9893
 9894
 9895
 9896
 9897
 9898
 9899
 9900
 9901
 9902
 9903
 9904
 9905
 9906
 9907
 9908
 9909
 9910
 9911
 9912
 9913
 9914
 9915
 9916
 9917
 9918
 9919
 9920
 9921
 9922
 9923
 9924
 9925
 9926
 9927
 9928
 9929
 9930
 9931
 9932
 9933
 9934
 9935
 9936
 9937
 9938
 9939
 9940
 9941
 9942
 9943
 9944
 9945
 9946
 9947
 9948
 9949
 9950
 9951
 9952
 9953
 9954
 9955
 9956
 9957
 9958
 9959
 9960
 9961
 9962
 9963
 9964
 9965
 9966
 9967
 9968
 9969
 9970
 9971
 9972
 9973
 9974
 9975
 9976
 9977
 9978
 9979
 9980
 9981
 9982
 9983
 9984
 9985
 9986
 9987
 9988
 9989
 9990
 9991
 9992
 9993
 9994
 9995
 9996
 9997
 9998
 9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
18386
18387
18388
18389
18390
18391
18392
18393
18394
18395
18396
18397
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437
18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528
18529
18530
18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
18763
18764
18765
18766
18767
18768
18769
18770
18771
18772
18773
18774
18775
18776
18777
18778
18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860
18861
18862
18863
18864
18865
18866
18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
19027
19028
19029
19030
19031
19032
19033
19034
19035
19036
19037
19038
19039
19040
19041
19042
19043
19044
19045
19046
19047
19048
19049
19050
19051
19052
19053
19054
19055
19056
19057
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082
19083
19084
19085
19086
19087
19088
19089
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
19100
19101
19102
19103
19104
19105
19106
19107
19108
19109
19110
19111
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150
19151
19152
19153
19154
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165
19166
19167
19168
19169
19170
19171
19172
19173
19174
19175
19176
19177
19178
19179
19180
19181
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194
19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205
19206
19207
19208
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233
19234
19235
19236
19237
19238
19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
19249
19250
19251
19252
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262
19263
19264
19265
19266
19267
19268
19269
19270
19271
19272
19273
19274
19275
19276
19277
19278
19279
19280
19281
19282
19283
19284
19285
19286
19287
19288
19289
19290
19291
19292
19293
19294
19295
19296
19297
19298
19299
19300
19301
19302
19303
19304
19305
19306
19307
19308
19309
19310
19311
19312
19313
19314
19315
19316
19317
19318
19319
19320
19321
19322
19323
19324
19325
19326
19327
19328
19329
19330
19331
19332
19333
19334
19335
19336
19337
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348
19349
19350
19351
19352
19353
19354
19355
19356
19357
19358
19359
19360
19361
19362
19363
19364
19365
19366
19367
19368
19369
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
19388
19389
19390
19391
19392
19393
19394
19395
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421
19422
19423
19424
19425
19426
19427
19428
19429
19430
19431
19432
19433
19434
19435
19436
19437
19438
19439
19440
19441
19442
19443
19444
19445
19446
19447
19448
19449
19450
19451
19452
19453
19454
19455
19456
19457
19458
19459
19460
19461
19462
19463
19464
19465
19466
19467
19468
19469
19470
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484
19485
19486
19487
19488
19489
19490
19491
19492
19493
19494
19495
19496
19497
19498
19499
19500
19501
19502
19503
19504
19505
19506
19507
19508
19509
19510
19511
19512
19513
19514
19515
19516
19517
19518
19519
19520
19521
19522
19523
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534
19535
19536
19537
19538
19539
19540
19541
19542
19543
19544
19545
19546
19547
19548
19549
19550
19551
19552
19553
19554
19555
19556
19557
19558
19559
19560
19561
19562
19563
19564
19565
19566
19567
19568
19569
19570
19571
19572
19573
19574
19575
19576
19577
19578
19579
19580
19581
19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
19596
19597
19598
19599
19600
19601
19602
19603
19604
19605
19606
19607
19608
19609
19610
19611
19612
19613
19614
19615
19616
19617
19618
19619
19620
19621
19622
19623
19624
19625
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637
19638
19639
19640
19641
19642
19643
19644
19645
19646
19647
19648
19649
19650
19651
19652
19653
19654
19655
19656
19657
19658
19659
19660
19661
19662
19663
19664
19665
19666
19667
19668
19669
19670
19671
19672
19673
19674
19675
19676
19677
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736
19737
19738
19739
19740
19741
19742
19743
19744
19745
19746
19747
19748
19749
19750
19751
19752
19753
19754
19755
19756
19757
19758
19759
19760
19761
19762
19763
19764
19765
19766
19767
19768
19769
19770
19771
19772
19773
19774
19775
19776
19777
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787
19788
19789
19790
19791
19792
19793
19794
19795
19796
19797
19798
19799
19800
19801
19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
19813
19814
19815
19816
19817
19818
19819
19820
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
19848
19849
19850
19851
19852
19853
19854
19855
19856
19857
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891
19892
19893
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
19910
19911
19912
19913
19914
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924
19925
19926
19927
19928
19929
19930
19931
19932
19933
19934
19935
19936
19937
19938
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
19951
19952
19953
19954
19955
19956
19957
19958
19959
19960
19961
19962
19963
19964
19965
19966
19967
19968
19969
19970
19971
19972
19973
19974
19975
19976
19977
19978
19979
19980
19981
19982
19983
19984
19985
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033
20034
20035
20036
20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047
20048
20049
20050
20051
20052
20053
20054
20055
20056
20057
20058
20059
20060
20061
20062
20063
20064
20065
20066
20067
20068
20069
20070
20071
20072
20073
20074
20075
20076
20077
20078
20079
20080
20081
20082
20083
20084
20085
20086
20087
20088
20089
20090
20091
20092
20093
20094
20095
20096
20097
20098
20099
20100
20101
20102
20103
20104
20105
20106
20107
20108
20109
20110
20111
20112
20113
20114
20115
20116
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131
20132
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161
20162
20163
20164
20165
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
20189
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203
20204
20205
20206
20207
20208
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
20220
20221
20222
20223
20224
20225
20226
20227
20228
20229
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
20251
20252
20253
20254
20255
20256
20257
20258
20259
20260
20261
20262
20263
20264
20265
20266
20267
20268
20269
20270
20271
20272
20273
20274
20275
20276
20277
20278
20279
20280
20281
20282
20283
20284
20285
20286
20287
20288
20289
20290
20291
20292
20293
20294
20295
20296
20297
20298
20299
20300
20301
20302
20303
20304
20305
20306
20307
20308
20309
20310
20311
20312
20313
20314
20315
20316
20317
20318
20319
20320
20321
20322
20323
20324
20325
20326
20327
20328
20329
20330
20331
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
20344
20345
20346
20347
20348
20349
20350
20351
20352
20353
20354
20355
20356
20357
20358
20359
20360
20361
20362
20363
20364
20365
20366
20367
20368
20369
20370
20371
20372
20373
20374
20375
20376
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386
20387
20388
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
20404
20405
20406
20407
20408
20409
20410
20411
20412
20413
20414
20415
20416
20417
20418
20419
20420
20421
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
20437
20438
20439
20440
20441
20442
20443
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
20468
20469
20470
20471
20472
20473
20474
20475
20476
20477
20478
20479
20480
20481
20482
20483
20484
20485
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
20499
20500
20501
20502
20503
20504
20505
20506
20507
20508
20509
20510
20511
20512
20513
20514
20515
20516
20517
20518
20519
20520
20521
20522
20523
20524
20525
20526
20527
20528
20529
20530
20531
20532
20533
20534
20535
20536
20537
20538
20539
20540
20541
20542
20543
20544
20545
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567
20568
20569
20570
20571
20572
20573
20574
20575
20576
20577
20578
20579
20580
20581
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602
20603
20604
20605
20606
20607
20608
20609
20610
20611
20612
20613
20614
20615
20616
20617
20618
20619
20620
20621
20622
20623
20624
20625
20626
20627
20628
20629
20630
20631
20632
20633
20634
20635
20636
20637
20638
20639
20640
20641
20642
20643
20644
20645
20646
20647
20648
20649
20650
20651
20652
20653
20654
20655
20656
20657
20658
20659
20660
20661
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
20685
20686
20687
20688
20689
20690
20691
20692
20693
20694
20695
20696
20697
20698
20699
20700
20701
20702
20703
20704
20705
20706
20707
20708
20709
20710
20711
20712
20713
20714
20715
20716
20717
20718
20719
20720
20721
20722
20723
20724
20725
20726
20727
20728
20729
20730
20731
20732
20733
20734
20735
20736
20737
20738
20739
20740
20741
20742
20743
20744
20745
20746
20747
20748
20749
20750
20751
20752
20753
20754
20755
20756
20757
20758
20759
20760
20761
20762
20763
20764
20765
20766
20767
20768
20769
20770
20771
20772
20773
20774
20775
20776
20777
20778
20779
20780
20781
20782
20783
20784
20785
20786
20787
20788
20789
20790
20791
20792
20793
20794
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804
20805
20806
20807
20808
20809
20810
20811
20812
20813
20814
20815
20816
20817
20818
20819
20820
20821
20822
20823
20824
20825
20826
20827
20828
20829
20830
20831
20832
20833
20834
20835
20836
20837
20838
20839
20840
20841
20842
20843
20844
20845
20846
20847
20848
20849
20850
20851
20852
20853
20854
20855
20856
20857
20858
20859
20860
20861
20862
20863
20864
20865
20866
20867
20868
20869
20870
20871
20872
20873
20874
20875
20876
20877
20878
20879
20880
20881
20882
20883
20884
20885
20886
20887
20888
20889
20890
20891
20892
20893
20894
20895
20896
20897
20898
20899
20900
20901
20902
20903
20904
20905
20906
20907
20908
20909
20910
20911
20912
20913
20914
20915
20916
20917
20918
20919
20920
20921
20922
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
20933
20934
20935
20936
20937
20938
20939
20940
20941
20942
20943
20944
20945
20946
20947
20948
20949
20950
20951
20952
20953
20954
20955
20956
20957
20958
20959
20960
20961
20962
20963
20964
20965
20966
20967
20968
20969
20970
20971
20972
20973
20974
20975
20976
20977
20978
20979
20980
20981
20982
20983
20984
20985
20986
20987
20988
20989
20990
20991
20992
20993
20994
20995
20996
20997
20998
20999
21000
21001
21002
21003
21004
21005
21006
21007
21008
21009
21010
21011
21012
21013
21014
21015
21016
21017
21018
21019
21020
21021
21022
21023
21024
21025
21026
21027
21028
21029
21030
21031
21032
21033
21034
21035
21036
21037
21038
21039
21040
21041
21042
21043
21044
21045
21046
21047
21048
21049
21050
21051
21052
21053
21054
21055
21056
21057
21058
21059
21060
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070
21071
21072
21073
21074
21075
21076
21077
21078
21079
21080
21081
21082
21083
21084
21085
21086
21087
21088
21089
21090
21091
21092
21093
21094
21095
21096
21097
21098
21099
21100
21101
21102
21103
21104
21105
21106
21107
21108
21109
21110
21111
21112
21113
21114
21115
21116
21117
21118
21119
21120
21121
21122
21123
21124
21125
21126
21127
21128
21129
21130
21131
21132
21133
21134
21135
21136
21137
21138
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156
21157
21158
21159
21160
21161
21162
21163
21164
21165
21166
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176
21177
21178
21179
21180
21181
21182
21183
21184
21185
21186
21187
21188
21189
21190
21191
21192
21193
21194
21195
21196
21197
21198
21199
21200
21201
21202
21203
21204
21205
21206
21207
21208
21209
21210
21211
21212
21213
21214
21215
21216
21217
21218
21219
21220
21221
21222
21223
21224
21225
21226
21227
21228
21229
21230
21231
21232
21233
21234
21235
21236
21237
21238
21239
21240
21241
21242
21243
21244
21245
21246
21247
21248
21249
21250
21251
21252
21253
21254
21255
21256
21257
21258
21259
21260
21261
21262
21263
21264
21265
21266
21267
21268
21269
21270
21271
21272
21273
21274
21275
21276
21277
21278
21279
21280
21281
21282
21283
21284
21285
21286
21287
21288
21289
21290
21291
21292
21293
21294
21295
21296
21297
21298
21299
21300
21301
21302
21303
21304
21305
21306
21307
21308
21309
21310
21311
21312
21313
21314
21315
21316
21317
21318
21319
21320
21321
21322
21323
21324
21325
21326
21327
21328
21329
21330
21331
21332
21333
21334
21335
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349
21350
21351
21352
21353
21354
21355
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366
21367
21368
21369
21370
21371
21372
21373
21374
21375
21376
21377
21378
21379
21380
21381
21382
21383
21384
21385
21386
21387
21388
21389
21390
21391
21392
21393
21394
21395
21396
21397
21398
21399
21400
21401
21402
21403
21404
21405
21406
21407
21408
21409
21410
21411
21412
21413
21414
21415
21416
21417
21418
21419
21420
21421
21422
21423
21424
21425
21426
21427
21428
21429
21430
21431
21432
21433
21434
21435
21436
21437
21438
21439
21440
21441
21442
21443
21444
21445
21446
21447
21448
21449
21450
21451
21452
21453
21454
21455
21456
21457
21458
21459
21460
21461
21462
21463
21464
21465
21466
21467
21468
21469
21470
21471
21472
21473
21474
21475
21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486
21487
21488
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507
21508
21509
21510
21511
21512
21513
21514
21515
21516
21517
21518
21519
21520
21521
21522
21523
21524
21525
21526
21527
21528
21529
21530
21531
21532
21533
21534
21535
21536
21537
21538
21539
21540
21541
21542
21543
21544
21545
21546
21547
21548
21549
21550
21551
21552
21553
21554
21555
21556
21557
21558
21559
21560
21561
21562
21563
21564
21565
21566
21567
21568
21569
21570
21571
21572
21573
21574
21575
21576
21577
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
21612
21613
21614
21615
21616
21617
21618
21619
21620
21621
21622
21623
21624
21625
21626
21627
21628
21629
21630
21631
21632
21633
21634
21635
21636
21637
21638
21639
21640
21641
21642
21643
21644
21645
21646
21647
21648
21649
21650
21651
21652
21653
21654
21655
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
21677
21678
21679
21680
21681
21682
21683
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730
21731
21732
21733
21734
21735
21736
21737
21738
21739
21740
21741
21742
21743
21744
21745
21746
21747
21748
21749
21750
21751
21752
21753
21754
21755
21756
21757
21758
21759
21760
21761
21762
21763
21764
21765
21766
21767
21768
21769
21770
21771
21772
21773
21774
21775
21776
21777
21778
21779
21780
21781
21782
21783
21784
21785
21786
21787
21788
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798
21799
21800
21801
21802
21803
21804
21805
21806
21807
21808
21809
21810
21811
21812
21813
21814
21815
21816
21817
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839
21840
21841
21842
21843
21844
21845
21846
21847
21848
21849
21850
21851
21852
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
21863
21864
21865
21866
21867
21868
21869
21870
21871
21872
21873
21874
21875
21876
21877
21878
21879
21880
21881
21882
21883
21884
21885
21886
21887
21888
21889
21890
21891
21892
21893
21894
21895
21896
21897
21898
21899
21900
21901
21902
21903
21904
21905
21906
21907
21908
21909
21910
21911
21912
21913
21914
21915
21916
21917
21918
21919
21920
21921
21922
21923
21924
21925
21926
21927
21928
21929
21930
21931
21932
21933
21934
21935
21936
21937
21938
21939
21940
21941
21942
21943
21944
21945
21946
21947
21948
21949
21950
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962
21963
21964
21965
21966
21967
21968
21969
21970
21971
21972
21973
21974
21975
21976
21977
21978
21979
21980
21981
21982
21983
21984
21985
21986
21987
21988
21989
21990
21991
21992
21993
21994
21995
21996
21997
21998
21999
22000
22001
22002
22003
22004
22005
22006
22007
22008
22009
22010
22011
22012
22013
22014
22015
22016
22017
22018
22019
22020
22021
22022
22023
22024
22025
22026
22027
22028
22029
22030
22031
22032
22033
22034
22035
22036
22037
22038
22039
22040
22041
22042
22043
22044
22045
22046
22047
22048
22049
22050
22051
22052
22053
22054
22055
22056
22057
22058
22059
22060
22061
22062
22063
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074
22075
22076
22077
22078
22079
22080
22081
22082
22083
22084
22085
22086
22087
22088
22089
22090
22091
22092
22093
22094
22095
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114
22115
22116
22117
22118
22119
22120
22121
22122
22123
22124
22125
22126
22127
22128
22129
22130
22131
22132
22133
22134
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158
22159
22160
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170
22171
22172
22173
22174
22175
22176
22177
22178
22179
22180
22181
22182
22183
22184
22185
22186
22187
22188
22189
22190
22191
22192
22193
22194
22195
22196
22197
22198
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
22218
22219
22220
22221
22222
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238
22239
22240
22241
22242
22243
22244
22245
22246
22247
22248
22249
22250
22251
22252
22253
22254
22255
22256
22257
22258
22259
22260
22261
22262
22263
22264
22265
22266
22267
22268
22269
22270
22271
22272
22273
22274
22275
22276
22277
22278
22279
22280
22281
22282
22283
22284
22285
22286
22287
22288
22289
22290
22291
22292
22293
22294
22295
22296
22297
22298
22299
22300
22301
22302
22303
22304
22305
22306
22307
22308
22309
22310
22311
22312
22313
22314
22315
22316
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326
22327
22328
22329
22330
22331
22332
22333
22334
22335
22336
22337
22338
22339
22340
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354
22355
22356
22357
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367
22368
22369
22370
22371
22372
22373
22374
22375
22376
22377
22378
22379
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
22390
22391
22392
22393
22394
22395
22396
22397
22398
22399
22400
22401
22402
22403
22404
22405
22406
22407
22408
22409
22410
22411
22412
22413
22414
22415
22416
22417
22418
22419
22420
22421
22422
22423
22424
22425
22426
22427
22428
22429
22430
22431
22432
22433
22434
22435
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
22452
22453
22454
22455
22456
22457
22458
22459
22460
22461
22462
22463
22464
22465
22466
22467
22468
22469
22470
22471
22472
22473
22474
22475
22476
22477
22478
22479
22480
22481
22482
22483
22484
22485
22486
22487
22488
22489
22490
22491
22492
22493
22494
22495
22496
22497
22498
22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
22515
22516
22517
22518
22519
22520
22521
22522
22523
22524
22525
22526
22527
22528
22529
22530
22531
22532
22533
22534
22535
22536
22537
22538
22539
22540
22541
22542
22543
22544
22545
22546
22547
22548
22549
22550
22551
22552
22553
22554
22555
22556
22557
22558
22559
22560
22561
22562
22563
22564
22565
22566
22567
22568
22569
22570
22571
22572
22573
22574
22575
22576
22577
22578
22579
22580
22581
22582
22583
22584
22585
22586
22587
22588
22589
22590
22591
22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
22607
22608
22609
22610
22611
22612
22613
22614
22615
22616
22617
22618
22619
22620
22621
22622
22623
22624
22625
22626
22627
22628
22629
22630
22631
22632
22633
22634
22635
22636
22637
22638
22639
22640
22641
22642
22643
22644
22645
22646
22647
22648
22649
22650
22651
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668
22669
22670
22671
22672
22673
22674
22675
22676
22677
22678
22679
22680
22681
22682
22683
22684
22685
22686
22687
22688
22689
22690
22691
22692
22693
22694
22695
22696
22697
22698
22699
22700
22701
22702
22703
22704
22705
22706
22707
22708
22709
22710
22711
22712
22713
22714
22715
22716
22717
22718
22719
22720
22721
22722
22723
22724
22725
22726
22727
22728
22729
22730
22731
22732
22733
22734
22735
22736
22737
22738
22739
22740
22741
22742
22743
22744
22745
22746
22747
22748
22749
22750
22751
22752
22753
22754
22755
22756
22757
22758
22759
22760
22761
22762
22763
22764
22765
22766
22767
22768
22769
22770
22771
22772
22773
22774
22775
22776
22777
22778
22779
22780
22781
22782
22783
22784
22785
22786
22787
22788
22789
22790
22791
22792
22793
22794
22795
22796
22797
22798
22799
22800
22801
22802
22803
22804
22805
22806
22807
22808
22809
22810
22811
22812
22813
22814
22815
22816
22817
22818
22819
22820
22821
22822
22823
22824
22825
22826
22827
22828
22829
22830
22831
22832
22833
22834
22835
22836
22837
22838
22839
22840
22841
22842
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
22854
22855
22856
22857
22858
22859
22860
22861
22862
22863
22864
22865
22866
22867
22868
22869
22870
22871
22872
22873
22874
22875
22876
22877
22878
22879
22880
22881
22882
22883
22884
22885
22886
22887
22888
22889
22890
22891
22892
22893
22894
22895
22896
22897
22898
22899
22900
22901
22902
22903
22904
22905
22906
22907
22908
22909
22910
22911
22912
22913
22914
22915
22916
22917
22918
22919
22920
22921
22922
22923
22924
22925
22926
22927
22928
22929
22930
22931
22932
22933
22934
22935
22936
22937
22938
22939
22940
22941
22942
22943
22944
22945
22946
22947
22948
22949
22950
22951
22952
22953
22954
22955
22956
22957
22958
22959
22960
22961
22962
22963
22964
22965
22966
22967
22968
22969
22970
22971
22972
22973
22974
22975
22976
22977
22978
22979
22980
22981
22982
22983
22984
22985
22986
22987
22988
22989
22990
22991
22992
22993
22994
22995
22996
22997
22998
22999
23000
23001
23002
23003
23004
23005
23006
23007
23008
23009
23010
23011
23012
23013
23014
23015
23016
23017
23018
23019
23020
23021
23022
23023
23024
23025
23026
23027
23028
23029
23030
23031
23032
23033
23034
23035
23036
23037
23038
23039
23040
23041
23042
23043
23044
23045
23046
23047
23048
23049
23050
23051
23052
23053
23054
23055
23056
23057
23058
23059
23060
23061
23062
23063
23064
23065
23066
23067
23068
23069
23070
23071
23072
23073
23074
23075
23076
23077
23078
23079
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089
23090
23091
23092
23093
23094
23095
23096
23097
23098
23099
23100
23101
23102
23103
23104
23105
23106
23107
23108
23109
23110
23111
23112
23113
23114
23115
23116
23117
23118
23119
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
23133
23134
23135
23136
23137
23138
23139
23140
23141
23142
23143
23144
23145
23146
23147
23148
23149
23150
23151
23152
23153
23154
23155
23156
23157
23158
23159
23160
23161
23162
23163
23164
23165
23166
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179
23180
23181
23182
23183
23184
23185
23186
23187
23188
23189
23190
23191
23192
23193
23194
23195
23196
23197
23198
23199
23200
23201
23202
23203
23204
23205
23206
23207
23208
23209
23210
23211
23212
23213
23214
23215
23216
23217
23218
23219
23220
23221
23222
23223
23224
23225
23226
23227
23228
23229
23230
23231
23232
23233
23234
23235
23236
23237
23238
23239
23240
23241
23242
23243
23244
23245
23246
23247
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257
23258
23259
23260
23261
23262
23263
23264
23265
23266
23267
23268
23269
23270
23271
23272
23273
23274
23275
23276
23277
23278
23279
23280
23281
23282
23283
23284
23285
23286
23287
23288
23289
23290
23291
23292
23293
23294
23295
23296
23297
23298
23299
23300
23301
23302
23303
23304
23305
23306
23307
23308
23309
23310
23311
23312
23313
23314
23315
23316
23317
23318
23319
23320
23321
23322
23323
23324
23325
23326
23327
23328
23329
23330
23331
23332
23333
23334
23335
23336
23337
23338
23339
23340
23341
23342
23343
23344
23345
23346
23347
23348
23349
23350
23351
23352
23353
23354
23355
23356
23357
23358
23359
23360
23361
23362
23363
23364
23365
23366
23367
23368
23369
23370
23371
23372
23373
23374
23375
23376
23377
23378
23379
23380
23381
23382
23383
23384
23385
23386
23387
23388
23389
23390
23391
23392
23393
23394
23395
23396
23397
23398
23399
23400
23401
23402
23403
23404
23405
23406
23407
23408
23409
23410
23411
23412
23413
23414
23415
23416
23417
23418
23419
23420
23421
23422
23423
23424
23425
23426
23427
23428
23429
23430
23431
23432
23433
23434
23435
23436
23437
23438
23439
23440
23441
23442
23443
23444
23445
23446
23447
23448
23449
23450
23451
23452
23453
23454
23455
23456
23457
23458
23459
23460
23461
23462
23463
23464
23465
23466
23467
23468
23469
23470
23471
23472
23473
23474
23475
23476
23477
23478
23479
23480
23481
23482
23483
23484
23485
23486
23487
23488
23489
23490
23491
23492
23493
23494
23495
23496
23497
23498
23499
23500
23501
23502
23503
23504
23505
23506
23507
23508
23509
23510
23511
23512
23513
23514
23515
23516
23517
23518
23519
23520
23521
23522
23523
23524
23525
23526
23527
23528
23529
23530
23531
23532
23533
23534
23535
23536
23537
23538
23539
23540
23541
23542
23543
23544
23545
23546
23547
23548
23549
23550
23551
23552
23553
23554
23555
23556
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566
23567
23568
23569
23570
23571
23572
23573
23574
23575
23576
23577
23578
23579
23580
23581
23582
23583
23584
23585
23586
23587
23588
23589
23590
23591
23592
23593
23594
23595
23596
23597
23598
23599
23600
23601
23602
23603
23604
23605
23606
23607
23608
23609
23610
23611
23612
23613
23614
23615
23616
23617
23618
23619
23620
23621
23622
23623
23624
23625
23626
23627
23628
23629
23630
23631
23632
23633
23634
23635
23636
23637
23638
23639
23640
23641
23642
23643
23644
23645
23646
23647
23648
23649
23650
23651
23652
23653
23654
23655
23656
23657
23658
23659
23660
23661
23662
23663
23664
23665
23666
23667
23668
23669
23670
23671
23672
23673
23674
23675
23676
23677
23678
23679
23680
23681
23682
23683
23684
23685
23686
23687
23688
23689
23690
23691
23692
23693
23694
23695
23696
23697
23698
23699
23700
23701
23702
23703
23704
23705
23706
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722
23723
23724
23725
23726
23727
23728
23729
23730
23731
23732
23733
23734
23735
23736
23737
23738
23739
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750
23751
23752
23753
23754
23755
23756
23757
23758
23759
23760
23761
23762
23763
23764
23765
23766
23767
23768
23769
23770
23771
23772
23773
23774
23775
23776
23777
23778
23779
23780
23781
23782
23783
23784
23785
23786
23787
23788
23789
23790
23791
23792
23793
23794
23795
23796
23797
23798
23799
23800
23801
23802
23803
23804
23805
23806
23807
23808
23809
23810
23811
23812
23813
23814
23815
23816
23817
23818
23819
23820
23821
23822
23823
23824
23825
23826
23827
23828
23829
23830
23831
23832
23833
23834
23835
23836
23837
23838
23839
23840
23841
23842
23843
23844
23845
23846
23847
23848
23849
23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
23860
23861
23862
23863
23864
23865
23866
23867
23868
23869
23870
23871
23872
23873
23874
23875
23876
23877
23878
23879
23880
23881
23882
23883
23884
23885
23886
23887
23888
23889
23890
23891
23892
23893
23894
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
23909
23910
23911
23912
23913
23914
23915
23916
23917
23918
23919
23920
23921
23922
23923
23924
23925
23926
23927
23928
23929
23930
23931
23932
23933
23934
23935
23936
23937
23938
23939
23940
23941
23942
23943
23944
23945
23946
23947
23948
23949
23950
23951
23952
23953
23954
23955
23956
23957
23958
23959
23960
23961
23962
23963
23964
23965
23966
23967
23968
23969
23970
23971
23972
23973
23974
23975
23976
23977
23978
23979
23980
23981
23982
23983
23984
23985
23986
23987
23988
23989
23990
23991
23992
23993
23994
23995
23996
23997
23998
23999
24000
24001
24002
24003
24004
24005
24006
24007
24008
24009
24010
24011
24012
24013
24014
24015
24016
24017
24018
24019
24020
24021
24022
24023
24024
24025
24026
24027
24028
24029
24030
24031
24032
24033
24034
24035
24036
24037
24038
24039
24040
24041
24042
24043
24044
24045
24046
24047
24048
24049
24050
24051
24052
24053
24054
24055
24056
24057
24058
24059
24060
24061
24062
24063
24064
24065
24066
24067
24068
24069
24070
24071
24072
24073
24074
24075
24076
24077
24078
24079
24080
24081
24082
24083
24084
24085
24086
24087
24088
24089
24090
24091
24092
24093
24094
24095
24096
24097
24098
24099
24100
24101
24102
24103
24104
24105
24106
24107
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128
24129
24130
24131
24132
24133
24134
24135
24136
24137
24138
24139
24140
24141
24142
24143
24144
24145
24146
24147
24148
24149
24150
24151
24152
24153
24154
24155
24156
24157
24158
24159
24160
24161
24162
24163
24164
24165
24166
24167
24168
24169
24170
24171
24172
24173
24174
24175
24176
24177
24178
24179
24180
24181
24182
24183
24184
24185
24186
24187
24188
24189
24190
24191
24192
24193
24194
24195
24196
24197
24198
24199
24200
24201
24202
24203
24204
24205
24206
24207
24208
24209
24210
24211
24212
24213
24214
24215
24216
24217
24218
24219
24220
24221
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231
24232
24233
24234
24235
24236
24237
24238
24239
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249
24250
24251
24252
24253
24254
24255
24256
24257
24258
24259
24260
24261
24262
24263
24264
24265
24266
24267
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
24281
24282
24283
24284
24285
24286
24287
24288
24289
24290
24291
24292
24293
24294
24295
24296
24297
24298
24299
24300
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311
24312
24313
24314
24315
24316
24317
24318
24319
24320
24321
24322
24323
24324
24325
24326
24327
24328
24329
24330
24331
24332
24333
24334
24335
24336
24337
24338
24339
24340
24341
24342
24343
24344
24345
24346
24347
24348
24349
24350
24351
24352
24353
24354
24355
24356
24357
24358
24359
24360
24361
24362
24363
24364
24365
24366
24367
24368
24369
24370
24371
24372
24373
24374
24375
24376
24377
24378
24379
24380
24381
24382
24383
24384
24385
24386
24387
24388
24389
24390
24391
24392
24393
24394
24395
24396
24397
24398
24399
24400
24401
24402
24403
24404
24405
24406
24407
24408
24409
24410
24411
24412
24413
24414
24415
24416
24417
24418
24419
24420
24421
24422
24423
24424
24425
24426
24427
24428
24429
24430
24431
24432
24433
24434
24435
24436
24437
24438
24439
24440
24441
24442
24443
24444
24445
24446
24447
24448
24449
24450
24451
24452
24453
24454
24455
24456
24457
24458
24459
24460
24461
24462
24463
24464
24465
24466
24467
24468
24469
24470
24471
24472
24473
24474
24475
24476
24477
24478
24479
24480
24481
24482
24483
24484
24485
24486
24487
24488
24489
24490
24491
24492
24493
24494
24495
24496
24497
24498
24499
24500
24501
24502
24503
24504
24505
24506
24507
24508
24509
24510
24511
24512
24513
24514
24515
24516
24517
24518
24519
24520
24521
24522
24523
24524
24525
24526
24527
24528
24529
24530
24531
24532
24533
24534
24535
24536
24537
24538
24539
24540
24541
24542
24543
24544
24545
24546
24547
24548
24549
24550
24551
24552
24553
24554
24555
24556
24557
24558
24559
24560
24561
24562
24563
24564
24565
24566
24567
24568
24569
24570
24571
24572
24573
24574
24575
24576
24577
24578
24579
24580
24581
24582
24583
24584
24585
24586
24587
24588
24589
24590
24591
24592
24593
24594
24595
24596
24597
24598
24599
24600
24601
24602
24603
24604
24605
24606
24607
24608
24609
24610
24611
24612
24613
24614
24615
24616
24617
24618
24619
24620
24621
24622
24623
24624
24625
24626
24627
24628
24629
24630
24631
24632
24633
24634
24635
24636
24637
24638
24639
24640
24641
24642
24643
24644
24645
24646
24647
24648
24649
24650
24651
24652
24653
24654
24655
24656
24657
24658
24659
24660
24661
24662
24663
24664
24665
24666
24667
24668
24669
24670
24671
24672
24673
24674
24675
24676
24677
24678
24679
24680
24681
24682
24683
24684
24685
24686
24687
24688
24689
24690
24691
24692
24693
24694
24695
24696
24697
24698
24699
24700
24701
24702
24703
24704
24705
24706
24707
24708
24709
24710
24711
24712
24713
24714
24715
24716
24717
24718
24719
24720
24721
24722
24723
24724
24725
24726
24727
24728
24729
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
24777
24778
24779
24780
24781
24782
24783
24784
24785
24786
24787
24788
24789
24790
24791
24792
24793
24794
24795
24796
24797
24798
24799
24800
24801
24802
24803
24804
24805
24806
24807
24808
24809
24810
24811
24812
24813
24814
24815
24816
24817
24818
24819
24820
24821
24822
24823
24824
24825
24826
24827
24828
24829
24830
24831
24832
24833
24834
24835
24836
24837
24838
24839
24840
24841
24842
24843
24844
24845
24846
24847
24848
24849
24850
24851
24852
24853
24854
24855
24856
24857
24858
24859
24860
24861
24862
24863
24864
24865
24866
24867
24868
24869
24870
24871
24872
24873
24874
24875
24876
24877
24878
24879
24880
24881
24882
24883
24884
24885
24886
24887
24888
24889
24890
24891
24892
24893
24894
24895
24896
24897
24898
24899
24900
24901
24902
24903
24904
24905
24906
24907
24908
24909
24910
24911
24912
24913
24914
24915
24916
24917
24918
24919
24920
24921
24922
24923
24924
24925
24926
24927
24928
24929
24930
24931
24932
24933
24934
24935
24936
24937
24938
24939
24940
24941
24942
24943
24944
24945
24946
24947
24948
24949
24950
24951
24952
24953
24954
24955
24956
24957
24958
24959
24960
24961
24962
24963
24964
24965
24966
24967
24968
24969
24970
24971
24972
24973
24974
24975
24976
24977
24978
24979
24980
24981
24982
24983
24984
24985
24986
24987
24988
24989
24990
24991
24992
24993
24994
24995
24996
24997
24998
24999
25000
25001
25002
25003
25004
25005
25006
25007
25008
25009
25010
25011
25012
25013
25014
25015
25016
25017
25018
25019
25020
25021
25022
25023
25024
25025
25026
25027
25028
25029
25030
25031
25032
25033
25034
25035
25036
25037
25038
25039
25040
25041
25042
25043
25044
25045
25046
25047
25048
25049
25050
25051
25052
25053
25054
25055
25056
25057
25058
25059
25060
25061
25062
25063
25064
25065
25066
25067
25068
25069
25070
25071
25072
25073
25074
25075
25076
25077
25078
25079
25080
25081
25082
25083
25084
25085
25086
25087
25088
25089
25090
25091
25092
25093
25094
25095
25096
25097
25098
25099
25100
25101
25102
25103
25104
25105
25106
25107
25108
25109
25110
25111
25112
25113
25114
25115
25116
25117
25118
25119
25120
25121
25122
25123
25124
25125
25126
25127
25128
25129
25130
25131
25132
25133
25134
25135
25136
25137
25138
25139
25140
25141
25142
25143
25144
25145
25146
25147
25148
25149
25150
25151
25152
25153
25154
25155
25156
25157
25158
25159
25160
25161
25162
25163
25164
25165
25166
25167
25168
25169
25170
25171
25172
25173
25174
25175
25176
25177
25178
25179
25180
25181
25182
25183
25184
25185
25186
25187
25188
25189
25190
25191
25192
25193
25194
25195
25196
25197
25198
25199
25200
25201
25202
25203
25204
25205
25206
25207
25208
25209
25210
25211
25212
25213
25214
25215
25216
25217
25218
25219
25220
25221
25222
25223
25224
25225
25226
25227
25228
25229
25230
25231
25232
25233
25234
25235
25236
25237
25238
25239
25240
25241
25242
25243
25244
25245
25246
25247
25248
25249
25250
25251
25252
25253
25254
25255
25256
25257
25258
25259
25260
25261
25262
25263
25264
25265
25266
25267
25268
25269
25270
25271
25272
25273
25274
25275
25276
25277
25278
25279
25280
25281
25282
25283
25284
25285
25286
25287
25288
25289
25290
25291
25292
25293
25294
25295
25296
25297
25298
25299
25300
25301
25302
25303
25304
25305
25306
25307
25308
25309
25310
25311
25312
25313
25314
25315
25316
25317
25318
25319
25320
25321
25322
25323
25324
25325
25326
25327
25328
25329
25330
25331
25332
25333
25334
25335
25336
25337
25338
25339
25340
25341
25342
25343
25344
25345
25346
25347
25348
25349
25350
25351
25352
25353
25354
25355
25356
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367
25368
25369
25370
25371
25372
25373
25374
25375
25376
25377
25378
25379
25380
25381
25382
25383
25384
25385
25386
25387
25388
25389
25390
25391
25392
25393
25394
25395
25396
25397
25398
25399
25400
25401
25402
25403
25404
25405
25406
25407
25408
25409
25410
25411
25412
25413
25414
25415
25416
25417
25418
25419
25420
25421
25422
25423
25424
25425
25426
25427
25428
25429
25430
25431
25432
25433
25434
25435
25436
25437
25438
25439
25440
25441
25442
25443
25444
25445
25446
25447
25448
25449
25450
25451
25452
25453
25454
25455
25456
25457
25458
25459
25460
25461
25462
25463
25464
25465
25466
25467
25468
25469
25470
25471
25472
25473
25474
25475
25476
25477
25478
25479
25480
25481
25482
25483
25484
25485
25486
25487
25488
25489
25490
25491
25492
25493
25494
25495
25496
25497
25498
25499
25500
25501
25502
25503
25504
25505
25506
25507
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
25520
25521
25522
25523
25524
25525
25526
25527
25528
25529
25530
25531
25532
25533
25534
25535
25536
25537
25538
25539
25540
25541
25542
25543
25544
25545
25546
25547
25548
25549
25550
25551
25552
25553
25554
25555
25556
25557
25558
25559
25560
25561
25562
25563
25564
25565
25566
25567
25568
25569
25570
25571
25572
25573
25574
25575
25576
25577
25578
25579
25580
25581
25582
25583
25584
25585
25586
25587
25588
25589
25590
25591
25592
25593
25594
25595
25596
25597
25598
25599
25600
25601
25602
25603
25604
25605
25606
25607
25608
25609
25610
25611
25612
25613
25614
25615
25616
25617
25618
25619
25620
25621
25622
25623
25624
25625
25626
25627
25628
25629
25630
25631
25632
25633
25634
25635
25636
25637
25638
25639
25640
25641
25642
25643
25644
25645
25646
25647
25648
25649
25650
25651
25652
25653
25654
25655
25656
25657
25658
25659
25660
25661
25662
25663
25664
25665
25666
25667
25668
25669
25670
25671
25672
25673
25674
25675
25676
25677
25678
25679
25680
25681
25682
25683
25684
25685
25686
25687
25688
25689
25690
25691
25692
25693
25694
25695
25696
25697
25698
25699
25700
25701
25702
25703
25704
25705
25706
25707
25708
25709
25710
25711
25712
25713
25714
25715
25716
25717
25718
25719
25720
25721
25722
25723
25724
25725
25726
25727
25728
25729
25730
25731
25732
25733
25734
25735
25736
25737
25738
25739
25740
25741
25742
25743
25744
25745
25746
25747
25748
25749
25750
25751
25752
25753
25754
25755
25756
25757
25758
25759
25760
25761
25762
25763
25764
25765
25766
25767
25768
25769
25770
25771
25772
25773
25774
25775
25776
25777
25778
25779
25780
25781
25782
25783
25784
25785
25786
25787
25788
25789
25790
25791
25792
25793
25794
25795
25796
25797
25798
25799
25800
25801
25802
25803
25804
25805
25806
25807
25808
25809
25810
25811
25812
25813
25814
25815
25816
25817
25818
25819
25820
25821
25822
25823
25824
25825
25826
25827
25828
25829
25830
25831
25832
25833
25834
25835
25836
25837
25838
25839
25840
25841
25842
25843
25844
25845
25846
25847
25848
25849
25850
25851
25852
25853
25854
25855
25856
25857
25858
25859
25860
25861
25862
25863
25864
25865
25866
25867
25868
25869
25870
25871
25872
25873
25874
25875
25876
25877
25878
25879
25880
25881
25882
25883
25884
25885
25886
25887
25888
25889
25890
25891
25892
25893
25894
25895
25896
25897
25898
25899
25900
25901
25902
25903
25904
25905
25906
25907
25908
25909
25910
25911
25912
25913
25914
25915
25916
25917
25918
25919
25920
25921
25922
25923
25924
25925
25926
25927
25928
25929
25930
25931
25932
25933
25934
25935
25936
25937
25938
25939
25940
25941
25942
25943
25944
25945
25946
25947
25948
25949
25950
25951
25952
25953
25954
25955
25956
25957
25958
25959
25960
25961
25962
25963
25964
25965
25966
25967
25968
25969
25970
25971
25972
25973
25974
25975
25976
25977
25978
25979
25980
25981
25982
25983
25984
25985
25986
25987
25988
25989
25990
25991
25992
25993
25994
25995
25996
25997
25998
25999
26000
26001
26002
26003
26004
26005
26006
26007
26008
26009
26010
26011
26012
26013
26014
26015
26016
26017
26018
26019
26020
26021
26022
26023
26024
26025
26026
26027
26028
26029
26030
26031
26032
26033
26034
26035
26036
26037
26038
26039
26040
26041
26042
26043
26044
26045
26046
26047
26048
26049
26050
26051
26052
26053
26054
26055
26056
26057
26058
26059
26060
26061
26062
26063
26064
26065
26066
26067
26068
26069
26070
26071
26072
26073
26074
26075
26076
26077
26078
26079
26080
26081
26082
26083
26084
26085
26086
26087
26088
26089
26090
26091
26092
26093
26094
26095
26096
26097
26098
26099
26100
26101
26102
26103
26104
26105
26106
26107
26108
26109
26110
26111
26112
26113
26114
26115
26116
26117
26118
26119
26120
26121
26122
26123
26124
26125
26126
26127
26128
26129
26130
26131
26132
26133
26134
26135
26136
26137
26138
26139
26140
26141
26142
26143
26144
26145
26146
26147
26148
26149
26150
26151
26152
26153
26154
26155
26156
26157
26158
26159
26160
26161
26162
26163
26164
26165
26166
26167
26168
26169
26170
26171
26172
26173
26174
26175
26176
26177
26178
26179
26180
26181
26182
26183
26184
26185
26186
26187
26188
26189
26190
26191
26192
26193
26194
26195
26196
26197
26198
26199
26200
26201
26202
26203
26204
26205
26206
26207
26208
26209
26210
26211
26212
26213
26214
26215
26216
26217
26218
26219
26220
26221
26222
26223
26224
26225
26226
26227
26228
26229
26230
26231
26232
26233
26234
26235
26236
26237
26238
26239
26240
26241
26242
26243
26244
26245
26246
26247
26248
26249
26250
26251
26252
26253
26254
26255
26256
26257
26258
26259
26260
26261
26262
26263
26264
26265
26266
26267
26268
26269
26270
26271
26272
26273
26274
26275
26276
26277
26278
26279
26280
26281
26282
26283
26284
26285
26286
26287
26288
26289
26290
26291
26292
26293
26294
26295
26296
26297
26298
26299
26300
26301
26302
26303
26304
26305
26306
26307
26308
26309
26310
26311
26312
26313
26314
26315
26316
26317
26318
26319
26320
26321
26322
26323
26324
26325
26326
26327
26328
26329
26330
26331
26332
26333
26334
26335
26336
26337
26338
26339
26340
26341
26342
26343
26344
26345
26346
26347
26348
26349
26350
26351
26352
26353
26354
26355
26356
26357
26358
26359
26360
26361
26362
26363
26364
26365
26366
26367
26368
26369
26370
26371
26372
26373
26374
26375
26376
26377
26378
26379
26380
26381
26382
26383
26384
26385
26386
26387
26388
26389
26390
26391
26392
26393
26394
26395
26396
26397
26398
26399
26400
26401
26402
26403
26404
26405
26406
26407
26408
26409
26410
26411
26412
26413
26414
26415
26416
26417
26418
26419
26420
26421
26422
26423
26424
26425
26426
26427
26428
26429
26430
26431
26432
26433
26434
26435
26436
26437
26438
26439
26440
26441
26442
26443
26444
26445
26446
26447
26448
26449
26450
26451
26452
26453
26454
26455
26456
26457
26458
26459
26460
26461
26462
26463
26464
26465
26466
26467
26468
26469
26470
26471
26472
26473
26474
26475
26476
26477
26478
26479
26480
26481
26482
26483
26484
26485
26486
26487
26488
26489
26490
26491
26492
26493
26494
26495
26496
26497
26498
26499
26500
26501
26502
26503
26504
26505
26506
26507
26508
26509
26510
26511
26512
26513
26514
26515
26516
26517
26518
26519
26520
26521
26522
26523
26524
26525
26526
26527
26528
26529
26530
26531
26532
26533
26534
26535
26536
26537
26538
26539
26540
26541
26542
26543
26544
26545
26546
26547
26548
26549
26550
26551
26552
26553
26554
26555
26556
26557
26558
26559
26560
26561
26562
26563
26564
26565
26566
26567
26568
26569
26570
26571
26572
26573
26574
26575
26576
26577
26578
26579
26580
26581
26582
26583
26584
26585
26586
26587
26588
26589
26590
26591
26592
26593
26594
26595
26596
26597
26598
26599
26600
26601
26602
26603
26604
26605
26606
26607
26608
26609
26610
26611
26612
26613
26614
26615
26616
26617
26618
26619
26620
26621
26622
26623
26624
26625
26626
26627
26628
26629
26630
26631
26632
26633
26634
26635
26636
26637
26638
26639
26640
26641
26642
26643
26644
26645
26646
26647
26648
26649
26650
26651
26652
26653
26654
26655
26656
26657
26658
26659
26660
26661
26662
26663
26664
26665
26666
26667
26668
26669
26670
26671
26672
26673
26674
26675
26676
26677
26678
26679
26680
26681
26682
26683
26684
26685
26686
26687
26688
26689
26690
26691
26692
26693
26694
26695
26696
26697
26698
26699
26700
26701
26702
26703
26704
26705
26706
26707
26708
26709
26710
26711
26712
26713
26714
26715
26716
26717
26718
26719
26720
26721
26722
26723
26724
26725
26726
26727
26728
26729
26730
26731
26732
26733
26734
26735
26736
26737
26738
26739
26740
26741
26742
26743
26744
26745
26746
26747
26748
26749
26750
26751
26752
26753
26754
26755
26756
26757
26758
26759
26760
26761
26762
26763
26764
26765
26766
26767
26768
26769
26770
26771
26772
26773
26774
26775
26776
26777
26778
26779
26780
26781
26782
26783
26784
26785
26786
26787
26788
26789
26790
26791
26792
26793
26794
26795
26796
26797
26798
26799
26800
26801
26802
26803
26804
26805
26806
26807
26808
26809
26810
26811
26812
26813
26814
26815
26816
26817
26818
26819
26820
26821
26822
26823
26824
26825
26826
26827
26828
26829
26830
26831
26832
26833
26834
26835
26836
26837
26838
26839
26840
26841
26842
26843
26844
26845
26846
26847
26848
26849
26850
26851
26852
26853
26854
26855
26856
26857
26858
26859
26860
26861
26862
26863
26864
26865
26866
26867
26868
26869
26870
26871
26872
26873
26874
26875
26876
26877
26878
26879
26880
26881
26882
26883
26884
26885
26886
26887
26888
26889
26890
26891
26892
26893
26894
26895
26896
26897
26898
26899
26900
26901
26902
26903
26904
26905
26906
26907
26908
26909
26910
26911
26912
26913
26914
26915
26916
26917
26918
26919
26920
26921
26922
26923
26924
26925
26926
26927
26928
26929
26930
26931
26932
26933
26934
26935
26936
26937
26938
26939
26940
26941
26942
26943
26944
26945
26946
26947
26948
26949
26950
26951
26952
26953
26954
26955
26956
26957
26958
26959
26960
26961
26962
26963
26964
26965
26966
26967
26968
26969
26970
26971
26972
26973
26974
26975
26976
26977
26978
26979
26980
26981
26982
26983
26984
26985
26986
26987
26988
26989
26990
26991
26992
26993
26994
26995
26996
26997
26998
26999
27000
27001
27002
27003
27004
27005
27006
27007
27008
27009
27010
27011
27012
27013
27014
27015
27016
27017
27018
27019
27020
27021
27022
27023
27024
27025
27026
27027
27028
27029
27030
27031
27032
27033
27034
27035
27036
27037
27038
27039
27040
27041
27042
27043
27044
27045
27046
27047
27048
27049
27050
27051
27052
27053
27054
27055
27056
27057
27058
27059
27060
27061
27062
27063
27064
27065
27066
27067
27068
27069
27070
27071
27072
27073
27074
27075
27076
27077
27078
27079
27080
27081
27082
27083
27084
27085
27086
27087
27088
27089
27090
27091
27092
27093
27094
27095
27096
27097
27098
27099
27100
27101
27102
27103
27104
27105
27106
27107
27108
27109
27110
27111
27112
27113
27114
27115
27116
27117
27118
27119
27120
27121
27122
27123
27124
27125
27126
27127
27128
27129
27130
27131
27132
27133
27134
27135
27136
27137
27138
27139
27140
27141
27142
27143
27144
27145
27146
27147
27148
27149
27150
27151
27152
27153
27154
27155
27156
27157
27158
27159
27160
27161
27162
27163
27164
27165
27166
27167
27168
27169
27170
27171
27172
27173
27174
27175
27176
27177
27178
27179
27180
27181
27182
27183
27184
27185
27186
27187
27188
27189
27190
27191
27192
27193
27194
27195
27196
27197
27198
27199
27200
27201
27202
27203
27204
27205
27206
27207
27208
27209
27210
27211
27212
27213
27214
27215
27216
27217
27218
27219
27220
27221
27222
27223
27224
27225
27226
27227
27228
27229
27230
27231
27232
27233
27234
27235
27236
27237
27238
27239
27240
27241
27242
27243
27244
27245
27246
27247
27248
27249
27250
27251
27252
27253
27254
27255
27256
27257
27258
27259
27260
27261
27262
27263
27264
27265
27266
27267
27268
27269
27270
27271
27272
27273
27274
27275
27276
27277
27278
27279
27280
27281
27282
27283
27284
27285
27286
27287
27288
27289
27290
27291
27292
27293
27294
27295
27296
27297
27298
27299
27300
27301
27302
27303
27304
27305
27306
27307
27308
27309
27310
27311
27312
27313
27314
27315
27316
27317
27318
27319
27320
27321
27322
27323
27324
27325
27326
27327
27328
27329
27330
27331
27332
27333
27334
27335
27336
27337
27338
27339
27340
27341
27342
27343
27344
27345
27346
27347
27348
27349
27350
27351
27352
27353
27354
27355
27356
27357
27358
27359
27360
27361
27362
27363
27364
27365
27366
27367
27368
27369
27370
27371
27372
27373
27374
27375
27376
27377
27378
27379
27380
27381
27382
27383
27384
27385
27386
27387
27388
27389
27390
27391
27392
27393
27394
27395
27396
27397
27398
27399
27400
27401
27402
27403
27404
27405
27406
27407
27408
27409
27410
27411
27412
27413
27414
27415
27416
27417
27418
27419
27420
27421
27422
27423
27424
27425
27426
27427
27428
27429
27430
27431
27432
27433
27434
27435
27436
27437
27438
27439
27440
27441
27442
27443
27444
27445
27446
27447
27448
27449
27450
27451
27452
27453
27454
27455
27456
27457
27458
27459
27460
27461
27462
27463
27464
27465
27466
27467
27468
27469
27470
27471
27472
27473
27474
27475
27476
27477
27478
27479
27480
27481
27482
27483
27484
27485
27486
27487
27488
27489
27490
27491
27492
27493
27494
27495
27496
27497
27498
27499
27500
27501
27502
27503
27504
27505
27506
27507
27508
27509
27510
27511
27512
27513
27514
27515
27516
27517
27518
27519
27520
27521
27522
27523
27524
27525
27526
27527
27528
27529
27530
27531
27532
27533
27534
27535
27536
27537
27538
27539
27540
27541
27542
27543
27544
27545
27546
27547
27548
27549
27550
27551
27552
27553
27554
27555
27556
27557
27558
27559
27560
27561
27562
27563
27564
27565
27566
27567
27568
27569
27570
27571
27572
27573
27574
27575
27576
27577
27578
27579
27580
27581
27582
27583
27584
27585
27586
27587
27588
27589
27590
27591
27592
27593
27594
27595
27596
27597
27598
27599
27600
27601
27602
27603
27604
27605
27606
27607
27608
27609
27610
27611
27612
27613
27614
27615
27616
27617
27618
27619
27620
27621
27622
27623
27624
27625
27626
27627
27628
27629
27630
27631
27632
27633
27634
27635
27636
27637
27638
27639
27640
27641
27642
27643
27644
27645
27646
27647
27648
27649
27650
27651
27652
27653
27654
27655
27656
27657
27658
27659
27660
27661
27662
27663
27664
27665
27666
27667
27668
27669
27670
27671
27672
27673
27674
27675
27676
27677
27678
27679
27680
27681
27682
27683
27684
27685
27686
27687
27688
27689
27690
27691
27692
27693
27694
27695
27696
27697
27698
27699
27700
27701
27702
27703
27704
27705
27706
27707
27708
27709
27710
27711
27712
27713
27714
27715
27716
27717
27718
27719
27720
27721
27722
27723
27724
27725
27726
27727
27728
27729
27730
27731
27732
27733
27734
27735
27736
27737
27738
27739
27740
27741
27742
27743
27744
27745
27746
27747
27748
27749
27750
27751
27752
27753
27754
27755
27756
27757
27758
27759
27760
27761
27762
27763
27764
27765
27766
27767
27768
27769
27770
27771
27772
27773
27774
27775
27776
27777
27778
27779
27780
27781
27782
27783
27784
27785
27786
27787
27788
27789
27790
27791
27792
27793
27794
27795
27796
27797
27798
27799
27800
27801
27802
27803
27804
27805
27806
27807
27808
27809
27810
27811
27812
27813
27814
27815
27816
27817
27818
27819
27820
27821
27822
27823
27824
27825
27826
27827
27828
27829
27830
27831
27832
27833
27834
27835
27836
27837
27838
27839
27840
27841
27842
27843
27844
27845
27846
27847
27848
27849
27850
27851
27852
27853
27854
27855
27856
27857
27858
27859
27860
27861
27862
27863
27864
27865
27866
27867
27868
27869
27870
27871
27872
27873
27874
27875
27876
27877
27878
27879
27880
27881
27882
27883
27884
27885
27886
27887
27888
27889
27890
27891
27892
27893
27894
27895
27896
27897
27898
27899
27900
27901
27902
27903
27904
27905
27906
27907
27908
27909
27910
27911
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922
27923
27924
27925
27926
27927
27928
27929
27930
27931
27932
27933
27934
27935
27936
27937
27938
27939
27940
27941
27942
27943
27944
27945
27946
27947
27948
27949
27950
27951
27952
27953
27954
27955
27956
27957
27958
27959
27960
27961
27962
27963
27964
27965
27966
27967
27968
27969
27970
27971
27972
27973
27974
27975
27976
27977
27978
27979
27980
27981
27982
27983
27984
27985
27986
27987
27988
27989
27990
27991
27992
27993
27994
27995
27996
27997
27998
27999
28000
28001
28002
28003
28004
28005
28006
28007
28008
28009
28010
28011
28012
28013
28014
28015
28016
28017
28018
28019
28020
28021
28022
28023
28024
28025
28026
28027
28028
28029
28030
28031
28032
28033
28034
28035
28036
28037
28038
28039
28040
28041
28042
28043
28044
28045
28046
28047
28048
28049
28050
28051
28052
28053
28054
28055
28056
28057
28058
28059
28060
28061
28062
28063
28064
28065
28066
28067
28068
28069
28070
28071
28072
28073
28074
28075
28076
28077
28078
28079
28080
28081
28082
28083
28084
28085
28086
28087
28088
28089
28090
28091
28092
28093
28094
28095
28096
28097
28098
28099
28100
28101
28102
28103
28104
28105
28106
28107
28108
28109
28110
28111
28112
28113
28114
28115
28116
28117
28118
28119
28120
28121
28122
28123
28124
28125
28126
28127
28128
28129
28130
28131
28132
28133
28134
28135
28136
28137
28138
28139
28140
28141
28142
28143
28144
28145
28146
28147
28148
28149
28150
28151
28152
28153
28154
28155
28156
28157
28158
28159
28160
28161
28162
28163
28164
28165
28166
28167
28168
28169
28170
28171
28172
28173
28174
28175
28176
28177
28178
28179
28180
28181
28182
28183
28184
28185
28186
28187
28188
28189
28190
28191
28192
28193
28194
28195
28196
28197
28198
28199
28200
28201
28202
28203
28204
28205
28206
28207
28208
28209
28210
28211
28212
28213
28214
28215
28216
28217
28218
28219
28220
28221
28222
28223
28224
28225
28226
28227
28228
28229
28230
28231
28232
28233
28234
28235
28236
28237
28238
28239
28240
28241
28242
28243
28244
28245
28246
28247
28248
28249
28250
28251
28252
28253
28254
28255
28256
28257
28258
28259
28260
28261
28262
28263
28264
28265
28266
28267
28268
28269
28270
28271
28272
28273
28274
28275
28276
28277
28278
28279
28280
28281
28282
28283
28284
28285
28286
28287
28288
28289
28290
28291
28292
28293
28294
28295
28296
28297
28298
28299
28300
28301
28302
28303
28304
28305
28306
28307
28308
28309
28310
28311
28312
28313
28314
28315
28316
28317
28318
28319
28320
28321
28322
28323
28324
28325
28326
28327
28328
28329
28330
28331
28332
28333
28334
28335
28336
28337
28338
28339
28340
28341
28342
28343
28344
28345
28346
28347
28348
28349
28350
28351
28352
28353
28354
28355
28356
28357
28358
28359
28360
28361
28362
28363
28364
28365
28366
28367
28368
28369
28370
28371
28372
28373
28374
28375
28376
28377
28378
28379
28380
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390
28391
28392
28393
28394
28395
28396
28397
28398
28399
28400
28401
28402
28403
28404
28405
28406
28407
28408
28409
28410
28411
28412
28413
28414
28415
28416
28417
28418
28419
28420
28421
28422
28423
28424
28425
28426
28427
28428
28429
28430
28431
28432
28433
28434
28435
28436
28437
28438
28439
28440
28441
28442
28443
28444
28445
28446
28447
28448
28449
28450
28451
28452
28453
28454
28455
28456
28457
28458
28459
28460
28461
28462
28463
28464
28465
28466
28467
28468
28469
28470
28471
28472
28473
28474
28475
28476
28477
28478
28479
28480
28481
28482
28483
28484
28485
28486
28487
28488
28489
28490
28491
28492
28493
28494
28495
28496
28497
28498
28499
28500
28501
28502
28503
28504
28505
28506
28507
28508
28509
28510
28511
28512
28513
28514
28515
28516
28517
28518
28519
28520
28521
28522
28523
28524
28525
28526
28527
28528
28529
28530
28531
28532
28533
28534
28535
28536
28537
28538
28539
28540
28541
28542
28543
28544
28545
28546
28547
28548
28549
28550
28551
28552
28553
28554
28555
28556
28557
28558
28559
28560
28561
28562
28563
28564
28565
28566
28567
28568
28569
28570
28571
28572
28573
28574
28575
28576
28577
28578
28579
28580
28581
28582
28583
28584
28585
28586
28587
28588
28589
28590
28591
28592
28593
28594
28595
28596
28597
28598
28599
28600
28601
28602
28603
28604
28605
28606
28607
28608
28609
28610
28611
28612
28613
28614
28615
28616
28617
28618
28619
28620
28621
28622
28623
28624
28625
28626
28627
28628
28629
28630
28631
28632
28633
28634
28635
28636
28637
28638
28639
28640
28641
28642
28643
28644
28645
28646
28647
28648
28649
28650
28651
28652
28653
28654
28655
28656
28657
28658
28659
28660
28661
28662
28663
28664
28665
28666
28667
28668
28669
28670
28671
28672
28673
28674
28675
28676
28677
28678
28679
28680
28681
28682
28683
28684
28685
28686
28687
28688
28689
28690
28691
28692
28693
28694
28695
28696
28697
28698
28699
28700
28701
28702
28703
28704
28705
28706
28707
28708
28709
28710
28711
28712
28713
28714
28715
28716
28717
28718
28719
28720
28721
28722
28723
28724
28725
28726
28727
28728
28729
28730
28731
28732
28733
28734
28735
28736
28737
28738
28739
28740
28741
28742
28743
28744
28745
28746
28747
28748
28749
28750
28751
28752
28753
28754
28755
28756
28757
28758
28759
28760
28761
28762
28763
28764
28765
28766
28767
28768
28769
28770
28771
28772
28773
28774
28775
28776
28777
28778
28779
28780
28781
28782
28783
28784
28785
28786
28787
28788
28789
28790
28791
28792
28793
28794
28795
28796
28797
28798
28799
28800
28801
28802
28803
28804
28805
28806
28807
28808
28809
28810
28811
28812
28813
28814
28815
28816
28817
28818
28819
28820
28821
28822
28823
28824
28825
28826
28827
28828
28829
28830
28831
28832
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871
28872
28873
28874
28875
28876
28877
28878
28879
28880
28881
28882
28883
28884
28885
28886
28887
28888
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902
28903
28904
28905
28906
28907
28908
28909
28910
28911
28912
28913
28914
28915
28916
28917
28918
28919
28920
28921
28922
28923
28924
28925
28926
28927
28928
28929
28930
28931
28932
28933
28934
28935
28936
28937
28938
28939
28940
28941
28942
28943
28944
28945
28946
28947
28948
28949
28950
28951
28952
28953
28954
28955
28956
28957
28958
28959
28960
28961
28962
28963
28964
28965
28966
28967
28968
28969
28970
28971
28972
28973
28974
28975
28976
28977
28978
28979
28980
28981
28982
28983
28984
28985
28986
28987
28988
28989
28990
28991
28992
28993
28994
28995
28996
28997
28998
28999
29000
29001
29002
29003
29004
29005
29006
29007
29008
29009
29010
29011
29012
29013
29014
29015
29016
29017
29018
29019
29020
29021
29022
29023
29024
29025
29026
29027
29028
29029
29030
29031
29032
29033
29034
29035
29036
29037
29038
29039
29040
29041
29042
29043
29044
29045
29046
29047
29048
29049
29050
29051
29052
29053
29054
29055
29056
29057
29058
29059
29060
29061
29062
29063
29064
29065
29066
29067
29068
29069
29070
29071
29072
29073
29074
29075
29076
29077
29078
29079
29080
29081
29082
29083
29084
29085
29086
29087
29088
29089
29090
29091
29092
29093
29094
29095
29096
29097
29098
29099
29100
29101
29102
29103
29104
29105
29106
29107
29108
29109
29110
29111
29112
29113
29114
29115
29116
29117
29118
29119
29120
29121
29122
29123
29124
29125
29126
29127
29128
29129
29130
29131
29132
29133
29134
29135
29136
29137
29138
29139
29140
29141
29142
29143
29144
29145
29146
29147
29148
29149
29150
29151
29152
29153
29154
29155
29156
29157
29158
29159
29160
29161
29162
29163
29164
29165
29166
29167
29168
29169
29170
29171
29172
29173
29174
29175
29176
29177
29178
29179
29180
29181
29182
29183
29184
29185
29186
29187
29188
29189
29190
29191
29192
29193
29194
29195
29196
29197
29198
29199
29200
29201
29202
29203
29204
29205
29206
29207
29208
29209
29210
29211
29212
29213
29214
29215
29216
29217
29218
29219
29220
29221
29222
29223
29224
29225
29226
29227
29228
29229
29230
29231
29232
29233
29234
29235
29236
29237
29238
29239
29240
29241
29242
29243
29244
29245
29246
29247
29248
29249
29250
29251
29252
29253
29254
29255
29256
29257
29258
29259
29260
29261
29262
29263
29264
29265
29266
29267
29268
29269
29270
29271
29272
29273
29274
29275
29276
29277
29278
29279
29280
29281
29282
29283
29284
29285
29286
29287
29288
29289
29290
29291
29292
29293
29294
29295
29296
29297
29298
29299
29300
29301
29302
29303
29304
29305
29306
29307
29308
29309
29310
29311
29312
29313
29314
29315
29316
29317
29318
29319
29320
29321
29322
29323
29324
29325
29326
29327
29328
29329
29330
29331
29332
29333
29334
29335
29336
29337
29338
29339
29340
29341
29342
29343
29344
29345
29346
29347
29348
29349
29350
29351
29352
29353
29354
29355
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371
29372
29373
29374
29375
29376
29377
29378
29379
29380
29381
29382
29383
29384
29385
29386
29387
29388
29389
29390
29391
29392
29393
29394
29395
29396
29397
29398
29399
29400
29401
29402
29403
29404
29405
29406
29407
29408
29409
29410
29411
29412
29413
29414
29415
29416
29417
29418
29419
29420
29421
29422
29423
29424
29425
29426
29427
29428
29429
29430
29431
29432
29433
29434
29435
29436
29437
29438
29439
29440
29441
29442
29443
29444
29445
29446
29447
29448
29449
29450
29451
29452
29453
29454
29455
29456
29457
29458
29459
29460
29461
29462
29463
29464
29465
29466
29467
29468
29469
29470
29471
29472
29473
29474
29475
29476
29477
29478
29479
29480
29481
29482
29483
29484
29485
29486
29487
29488
29489
29490
29491
29492
29493
29494
29495
29496
29497
29498
29499
29500
29501
29502
29503
29504
29505
29506
29507
29508
29509
29510
29511
29512
29513
29514
29515
29516
29517
29518
29519
29520
29521
29522
29523
29524
29525
29526
29527
29528
29529
29530
29531
29532
29533
29534
29535
29536
29537
29538
29539
29540
29541
29542
29543
29544
29545
29546
29547
29548
29549
29550
29551
29552
29553
29554
29555
29556
29557
29558
29559
29560
29561
29562
29563
29564
29565
29566
29567
29568
29569
29570
29571
29572
29573
29574
29575
29576
29577
29578
29579
29580
29581
29582
29583
29584
29585
29586
29587
29588
29589
29590
29591
29592
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603
29604
29605
29606
29607
29608
29609
29610
29611
29612
29613
29614
29615
29616
29617
29618
29619
29620
29621
29622
29623
29624
29625
29626
29627
29628
29629
29630
29631
29632
29633
29634
29635
29636
29637
29638
29639
29640
29641
29642
29643
29644
29645
29646
29647
29648
29649
29650
29651
29652
29653
29654
29655
29656
29657
29658
29659
29660
29661
29662
29663
29664
29665
29666
29667
29668
29669
29670
29671
29672
29673
29674
29675
29676
29677
29678
29679
29680
29681
29682
29683
29684
29685
29686
29687
29688
29689
29690
29691
29692
29693
29694
29695
29696
29697
29698
29699
29700
29701
29702
29703
29704
29705
29706
29707
29708
29709
29710
29711
29712
29713
29714
29715
29716
29717
29718
29719
29720
29721
29722
29723
29724
29725
29726
29727
29728
29729
29730
29731
29732
29733
29734
29735
29736
29737
29738
29739
29740
29741
29742
29743
29744
29745
29746
29747
29748
29749
29750
29751
29752
29753
29754
29755
29756
29757
29758
29759
29760
29761
29762
29763
29764
29765
29766
29767
29768
29769
29770
29771
29772
29773
29774
29775
29776
29777
29778
29779
29780
29781
29782
29783
29784
29785
29786
29787
29788
29789
29790
29791
29792
29793
29794
29795
29796
29797
29798
29799
29800
29801
29802
29803
29804
29805
29806
29807
29808
29809
29810
29811
29812
29813
29814
29815
29816
29817
29818
29819
29820
29821
29822
29823
29824
29825
29826
29827
29828
29829
29830
29831
29832
29833
29834
29835
29836
29837
29838
29839
29840
29841
29842
29843
29844
29845
29846
29847
29848
29849
29850
29851
29852
29853
29854
29855
29856
29857
29858
29859
29860
29861
29862
29863
29864
29865
29866
29867
29868
29869
29870
29871
29872
29873
29874
29875
29876
29877
29878
29879
29880
29881
29882
29883
29884
29885
29886
29887
29888
29889
29890
29891
29892
29893
29894
29895
29896
29897
29898
29899
29900
29901
29902
29903
29904
29905
29906
29907
29908
29909
29910
29911
29912
29913
29914
29915
29916
29917
29918
29919
29920
29921
29922
29923
29924
29925
29926
29927
29928
29929
29930
29931
29932
29933
29934
29935
29936
29937
29938
29939
29940
29941
29942
29943
29944
29945
29946
29947
29948
29949
29950
29951
29952
29953
29954
29955
29956
29957
29958
29959
29960
29961
29962
29963
29964
29965
29966
29967
29968
29969
29970
29971
29972
29973
29974
29975
29976
29977
29978
29979
29980
29981
29982
29983
29984
29985
29986
29987
29988
29989
29990
29991
29992
29993
29994
29995
29996
29997
29998
29999
30000
30001
30002
30003
30004
30005
30006
30007
30008
30009
30010
30011
30012
30013
30014
30015
30016
30017
30018
30019
30020
30021
30022
30023
30024
30025
30026
30027
30028
30029
30030
30031
30032
30033
30034
30035
30036
30037
30038
30039
30040
30041
30042
30043
30044
30045
30046
30047
30048
30049
30050
30051
30052
30053
30054
30055
30056
30057
30058
30059
30060
30061
30062
30063
30064
30065
30066
30067
30068
30069
30070
30071
30072
30073
30074
30075
30076
30077
30078
30079
30080
30081
30082
30083
30084
30085
30086
30087
30088
30089
30090
30091
30092
30093
30094
30095
30096
30097
30098
30099
30100
30101
30102
30103
30104
30105
30106
30107
30108
30109
30110
30111
30112
30113
30114
30115
30116
30117
30118
30119
30120
30121
30122
30123
30124
30125
30126
30127
30128
30129
30130
30131
30132
30133
30134
30135
30136
30137
30138
30139
30140
30141
30142
30143
30144
30145
30146
30147
30148
30149
30150
30151
30152
30153
30154
30155
30156
30157
30158
30159
30160
30161
30162
30163
30164
30165
30166
30167
30168
30169
30170
30171
30172
30173
30174
30175
30176
30177
30178
30179
30180
30181
30182
30183
30184
30185
30186
30187
30188
30189
30190
30191
30192
30193
30194
30195
30196
30197
30198
30199
30200
30201
30202
30203
30204
30205
30206
30207
30208
30209
30210
30211
30212
30213
30214
30215
30216
30217
30218
30219
30220
30221
30222
30223
30224
30225
30226
30227
30228
30229
30230
30231
30232
30233
30234
30235
30236
30237
30238
30239
30240
30241
30242
30243
30244
30245
30246
30247
30248
30249
30250
30251
30252
30253
30254
30255
30256
30257
30258
30259
30260
30261
30262
30263
30264
30265
30266
30267
30268
30269
30270
30271
30272
30273
30274
30275
30276
30277
30278
30279
30280
30281
30282
30283
30284
30285
30286
30287
30288
30289
30290
30291
30292
30293
30294
30295
30296
30297
30298
30299
30300
30301
30302
30303
30304
30305
30306
30307
30308
30309
30310
30311
30312
30313
30314
30315
30316
30317
30318
30319
30320
30321
30322
30323
30324
30325
30326
30327
30328
30329
30330
30331
30332
30333
30334
30335
30336
30337
30338
30339
30340
30341
30342
30343
30344
30345
30346
30347
30348
30349
30350
30351
30352
30353
30354
30355
30356
30357
30358
30359
30360
30361
30362
30363
30364
30365
30366
30367
30368
30369
30370
30371
30372
30373
30374
30375
30376
30377
30378
30379
30380
30381
30382
30383
30384
30385
30386
30387
30388
30389
30390
30391
30392
30393
30394
30395
30396
30397
30398
30399
30400
30401
30402
30403
30404
30405
30406
30407
30408
30409
30410
30411
30412
30413
30414
30415
30416
30417
30418
30419
30420
30421
30422
30423
30424
30425
30426
30427
30428
30429
30430
30431
30432
30433
30434
30435
30436
30437
30438
30439
30440
30441
30442
30443
30444
30445
30446
30447
30448
30449
30450
30451
30452
30453
30454
30455
30456
30457
30458
30459
30460
30461
30462
30463
30464
30465
30466
30467
30468
30469
30470
30471
30472
30473
30474
30475
30476
30477
30478
30479
30480
30481
30482
30483
30484
30485
30486
30487
30488
30489
30490
30491
30492
30493
30494
30495
30496
30497
30498
30499
30500
30501
30502
30503
30504
30505
30506
30507
30508
30509
30510
30511
30512
30513
30514
30515
30516
30517
30518
30519
30520
30521
30522
30523
30524
30525
30526
30527
30528
30529
30530
30531
30532
30533
30534
30535
30536
30537
30538
30539
30540
30541
30542
30543
30544
30545
30546
30547
30548
30549
30550
30551
30552
30553
30554
30555
30556
30557
30558
30559
30560
30561
30562
30563
30564
30565
30566
30567
30568
30569
30570
30571
30572
30573
30574
30575
30576
30577
30578
30579
30580
30581
30582
30583
30584
30585
30586
30587
30588
30589
30590
30591
30592
30593
30594
30595
30596
30597
30598
30599
30600
30601
30602
30603
30604
30605
30606
30607
30608
30609
30610
30611
30612
30613
30614
30615
30616
30617
30618
30619
30620
30621
30622
30623
30624
30625
30626
30627
30628
30629
30630
30631
30632
30633
30634
30635
30636
30637
30638
30639
30640
30641
30642
30643
30644
30645
30646
30647
30648
30649
30650
30651
30652
30653
30654
30655
30656
30657
30658
30659
30660
30661
30662
30663
30664
30665
30666
30667
30668
30669
30670
30671
30672
30673
30674
30675
30676
30677
30678
30679
30680
30681
30682
30683
30684
30685
30686
30687
30688
30689
30690
30691
30692
30693
30694
30695
30696
30697
30698
30699
30700
30701
30702
30703
30704
30705
30706
30707
30708
30709
30710
30711
30712
30713
30714
30715
30716
30717
30718
30719
30720
30721
30722
30723
30724
30725
30726
30727
30728
30729
30730
30731
30732
30733
30734
30735
30736
30737
30738
30739
30740
30741
30742
30743
30744
30745
30746
30747
30748
30749
30750
30751
30752
30753
30754
30755
30756
30757
30758
30759
30760
30761
30762
30763
30764
30765
30766
30767
30768
30769
30770
30771
30772
30773
30774
30775
30776
30777
30778
30779
30780
30781
30782
30783
30784
30785
30786
30787
30788
30789
30790
30791
30792
30793
30794
30795
30796
30797
30798
30799
30800
30801
30802
30803
30804
30805
30806
30807
30808
30809
30810
30811
30812
30813
30814
30815
30816
30817
30818
30819
30820
30821
30822
30823
30824
30825
30826
30827
30828
30829
30830
30831
30832
30833
30834
30835
30836
30837
30838
30839
30840
30841
30842
30843
30844
30845
30846
30847
30848
30849
30850
30851
30852
30853
30854
30855
30856
30857
30858
30859
30860
30861
30862
30863
30864
30865
30866
30867
30868
30869
30870
30871
30872
30873
30874
30875
30876
30877
30878
30879
30880
30881
30882
30883
30884
30885
30886
30887
30888
30889
30890
30891
30892
30893
30894
30895
30896
30897
30898
30899
30900
30901
30902
30903
30904
30905
30906
30907
30908
30909
30910
30911
30912
30913
30914
30915
30916
30917
30918
30919
30920
30921
30922
30923
30924
30925
30926
30927
30928
30929
30930
30931
30932
30933
30934
30935
30936
30937
30938
30939
30940
30941
30942
30943
30944
30945
30946
30947
30948
30949
30950
30951
30952
30953
30954
30955
30956
30957
30958
30959
30960
30961
30962
30963
30964
30965
30966
30967
30968
30969
30970
30971
30972
30973
30974
30975
30976
30977
30978
30979
30980
30981
30982
30983
30984
30985
30986
30987
30988
30989
30990
30991
30992
30993
30994
30995
30996
30997
30998
30999
31000
31001
31002
31003
31004
31005
31006
31007
31008
31009
31010
31011
31012
31013
31014
31015
31016
31017
31018
31019
31020
31021
31022
31023
31024
31025
31026
31027
31028
31029
31030
31031
31032
31033
31034
31035
31036
31037
31038
31039
31040
31041
31042
31043
31044
31045
31046
31047
31048
31049
31050
31051
31052
31053
31054
31055
31056
31057
31058
31059
31060
31061
31062
31063
31064
31065
31066
31067
31068
31069
31070
31071
31072
31073
31074
31075
31076
31077
31078
31079
31080
31081
31082
31083
31084
31085
31086
31087
31088
31089
31090
31091
31092
31093
31094
31095
31096
31097
31098
31099
31100
31101
31102
31103
31104
31105
31106
31107
31108
31109
31110
31111
31112
31113
31114
31115
31116
31117
31118
31119
31120
31121
31122
31123
31124
31125
31126
31127
31128
31129
31130
31131
31132
31133
31134
31135
31136
31137
31138
31139
31140
31141
31142
31143
31144
31145
31146
31147
31148
31149
31150
31151
31152
31153
31154
31155
31156
31157
31158
31159
31160
31161
31162
31163
31164
31165
31166
31167
31168
31169
31170
31171
31172
31173
31174
31175
31176
31177
31178
31179
31180
31181
31182
31183
31184
31185
31186
31187
31188
31189
31190
31191
31192
31193
31194
31195
31196
31197
31198
31199
31200
31201
31202
31203
31204
31205
31206
31207
31208
31209
31210
31211
31212
31213
31214
31215
31216
31217
31218
31219
31220
31221
31222
31223
31224
31225
31226
31227
31228
31229
31230
31231
31232
31233
31234
31235
31236
31237
31238
31239
31240
31241
31242
31243
31244
31245
31246
31247
31248
31249
31250
31251
31252
31253
31254
31255
31256
31257
31258
31259
31260
31261
31262
31263
31264
31265
31266
31267
31268
31269
31270
31271
31272
31273
31274
31275
31276
31277
31278
31279
31280
31281
31282
31283
31284
31285
31286
31287
31288
31289
31290
31291
31292
31293
31294
31295
31296
31297
31298
31299
31300
31301
31302
31303
31304
31305
31306
31307
31308
31309
31310
31311
31312
31313
31314
31315
31316
31317
31318
31319
31320
31321
31322
31323
31324
31325
31326
31327
31328
31329
31330
31331
31332
31333
31334
31335
31336
31337
31338
31339
31340
31341
31342
31343
31344
31345
31346
31347
31348
31349
31350
31351
31352
31353
31354
31355
31356
31357
31358
31359
31360
31361
31362
31363
31364
31365
31366
31367
31368
31369
31370
31371
31372
31373
31374
31375
31376
31377
31378
31379
31380
31381
31382
31383
31384
31385
31386
31387
31388
31389
31390
31391
31392
31393
31394
31395
31396
31397
31398
31399
31400
31401
31402
31403
31404
31405
31406
31407
31408
31409
31410
31411
31412
31413
31414
31415
31416
31417
31418
31419
31420
31421
31422
31423
31424
31425
31426
31427
31428
31429
31430
31431
31432
31433
31434
31435
31436
31437
31438
31439
31440
31441
31442
31443
31444
31445
31446
31447
31448
31449
31450
31451
31452
31453
31454
31455
31456
31457
31458
31459
31460
31461
31462
31463
31464
31465
31466
31467
31468
31469
31470
31471
31472
31473
31474
31475
31476
31477
31478
31479
31480
31481
31482
31483
31484
31485
31486
31487
31488
31489
31490
31491
31492
31493
31494
31495
31496
31497
31498
31499
31500
31501
31502
31503
31504
31505
31506
31507
31508
31509
31510
31511
31512
31513
31514
31515
31516
31517
31518
31519
31520
31521
31522
31523
31524
31525
31526
31527
31528
31529
31530
31531
31532
31533
31534
31535
31536
31537
31538
31539
31540
31541
31542
31543
31544
31545
31546
31547
31548
31549
31550
31551
31552
31553
31554
31555
31556
31557
31558
31559
31560
31561
31562
31563
31564
31565
31566
31567
31568
31569
31570
31571
31572
31573
31574
31575
31576
31577
31578
31579
31580
31581
31582
31583
31584
31585
31586
31587
31588
31589
31590
31591
31592
31593
31594
31595
31596
31597
31598
31599
31600
31601
31602
31603
31604
31605
31606
31607
31608
31609
31610
31611
31612
31613
31614
31615
31616
31617
31618
31619
31620
31621
31622
31623
31624
31625
31626
31627
31628
31629
31630
31631
31632
31633
31634
31635
31636
31637
31638
31639
31640
31641
31642
31643
31644
31645
31646
31647
31648
31649
31650
31651
31652
31653
31654
31655
31656
31657
31658
31659
31660
31661
31662
31663
31664
31665
31666
31667
31668
31669
31670
31671
31672
31673
31674
31675
31676
31677
31678
31679
31680
31681
31682
31683
31684
31685
31686
31687
31688
31689
31690
31691
31692
31693
31694
31695
31696
31697
31698
31699
31700
31701
31702
31703
31704
31705
31706
31707
31708
31709
31710
31711
31712
31713
31714
31715
31716
31717
31718
31719
31720
31721
31722
31723
31724
31725
31726
31727
31728
31729
31730
31731
31732
31733
31734
31735
31736
31737
31738
31739
31740
31741
31742
31743
31744
31745
31746
31747
31748
31749
31750
31751
31752
31753
31754
31755
31756
31757
31758
31759
31760
31761
31762
31763
31764
31765
31766
31767
31768
31769
31770
31771
31772
31773
31774
31775
31776
31777
31778
31779
31780
31781
31782
31783
31784
31785
31786
31787
31788
31789
31790
31791
31792
31793
31794
31795
31796
31797
31798
31799
31800
31801
31802
31803
31804
31805
31806
31807
31808
31809
31810
31811
31812
31813
31814
31815
31816
31817
31818
31819
31820
31821
31822
31823
31824
31825
31826
31827
31828
31829
31830
31831
31832
31833
31834
31835
31836
31837
31838
31839
31840
31841
31842
31843
31844
31845
31846
31847
31848
31849
31850
31851
31852
31853
31854
31855
31856
31857
31858
31859
31860
31861
31862
31863
31864
31865
31866
31867
31868
31869
31870
31871
31872
31873
31874
31875
31876
31877
31878
31879
31880
31881
31882
31883
31884
31885
31886
31887
31888
31889
31890
31891
31892
31893
31894
31895
31896
31897
31898
31899
31900
31901
31902
31903
31904
31905
31906
31907
31908
31909
31910
31911
31912
31913
31914
31915
31916
31917
31918
31919
31920
31921
31922
31923
31924
31925
31926
31927
31928
31929
31930
31931
31932
31933
31934
31935
31936
31937
31938
31939
31940
31941
31942
31943
31944
31945
31946
31947
31948
31949
31950
31951
31952
31953
31954
31955
31956
31957
31958
31959
31960
31961
31962
31963
31964
31965
31966
31967
31968
31969
31970
31971
31972
31973
31974
31975
31976
31977
31978
31979
31980
31981
31982
31983
31984
31985
31986
31987
31988
31989
31990
31991
31992
31993
31994
31995
31996
31997
31998
31999
32000
32001
32002
32003
32004
32005
32006
32007
32008
32009
32010
32011
32012
32013
32014
32015
32016
32017
32018
32019
32020
32021
32022
32023
32024
32025
32026
32027
32028
32029
32030
32031
32032
32033
32034
32035
32036
32037
32038
32039
32040
32041
32042
32043
32044
32045
32046
32047
32048
32049
32050
32051
32052
32053
32054
32055
32056
32057
32058
32059
32060
32061
32062
32063
32064
32065
32066
32067
32068
32069
32070
32071
32072
32073
32074
32075
32076
32077
32078
32079
32080
32081
32082
32083
32084
32085
32086
32087
32088
32089
32090
32091
32092
32093
32094
32095
32096
32097
32098
32099
32100
32101
32102
32103
32104
32105
32106
32107
32108
32109
32110
32111
32112
32113
32114
32115
32116
32117
32118
32119
32120
32121
32122
32123
32124
32125
32126
32127
32128
32129
32130
32131
32132
32133
32134
32135
32136
32137
32138
32139
32140
32141
32142
32143
32144
32145
32146
32147
32148
32149
32150
32151
32152
32153
32154
32155
32156
32157
32158
32159
32160
32161
32162
32163
32164
32165
32166
32167
32168
32169
32170
32171
32172
32173
32174
32175
32176
32177
32178
32179
32180
32181
32182
32183
32184
32185
32186
32187
32188
32189
32190
32191
32192
32193
32194
32195
32196
32197
32198
32199
32200
32201
32202
32203
32204
32205
32206
32207
32208
32209
32210
32211
32212
32213
32214
32215
32216
32217
32218
32219
32220
32221
32222
32223
32224
32225
32226
32227
32228
32229
32230
32231
32232
32233
32234
32235
32236
32237
32238
32239
32240
32241
32242
32243
32244
32245
32246
32247
32248
32249
32250
32251
32252
32253
32254
32255
32256
32257
32258
32259
32260
32261
32262
32263
32264
32265
32266
32267
32268
32269
32270
32271
32272
32273
32274
32275
32276
32277
32278
32279
32280
32281
32282
32283
32284
32285
32286
32287
32288
32289
32290
32291
32292
32293
32294
32295
32296
32297
32298
32299
32300
32301
32302
32303
32304
32305
32306
32307
32308
32309
32310
32311
32312
32313
32314
32315
32316
32317
32318
32319
32320
32321
32322
32323
32324
32325
32326
32327
32328
32329
32330
32331
32332
32333
32334
32335
32336
32337
32338
32339
32340
32341
32342
32343
32344
32345
32346
32347
32348
32349
32350
32351
32352
32353
32354
32355
32356
32357
32358
32359
32360
32361
32362
32363
32364
32365
32366
32367
32368
32369
32370
32371
32372
32373
32374
32375
32376
32377
32378
32379
32380
32381
32382
32383
32384
32385
32386
32387
32388
32389
32390
32391
32392
32393
32394
32395
32396
32397
32398
32399
32400
32401
32402
32403
32404
32405
32406
32407
32408
32409
32410
32411
32412
32413
32414
32415
32416
32417
32418
32419
32420
32421
32422
32423
32424
32425
32426
32427
32428
32429
32430
32431
32432
32433
32434
32435
32436
32437
32438
32439
32440
32441
32442
32443
32444
32445
32446
32447
32448
32449
32450
32451
32452
32453
32454
32455
32456
32457
32458
32459
32460
32461
32462
32463
32464
32465
32466
32467
32468
32469
32470
32471
32472
32473
32474
32475
32476
32477
32478
32479
32480
32481
32482
32483
32484
32485
32486
32487
32488
32489
32490
32491
32492
32493
32494
32495
32496
32497
32498
32499
32500
32501
32502
32503
32504
32505
32506
32507
32508
32509
32510
32511
32512
32513
32514
32515
32516
32517
32518
32519
32520
32521
32522
32523
32524
32525
32526
32527
32528
32529
32530
32531
32532
32533
32534
32535
32536
32537
32538
32539
32540
32541
32542
32543
32544
32545
32546
32547
32548
32549
32550
32551
32552
32553
32554
32555
32556
32557
32558
32559
32560
32561
32562
32563
32564
32565
32566
32567
32568
32569
32570
32571
32572
32573
32574
32575
32576
32577
32578
32579
32580
32581
32582
32583
32584
32585
32586
32587
32588
32589
32590
32591
32592
32593
32594
32595
32596
32597
32598
32599
32600
32601
32602
32603
32604
32605
32606
32607
32608
32609
32610
32611
32612
32613
32614
32615
32616
32617
32618
32619
32620
32621
32622
32623
32624
32625
32626
32627
32628
32629
32630
32631
32632
32633
32634
32635
32636
32637
32638
32639
32640
32641
32642
32643
32644
32645
32646
32647
32648
32649
32650
32651
32652
32653
32654
32655
32656
32657
32658
32659
32660
32661
32662
32663
32664
32665
32666
32667
32668
32669
32670
32671
32672
32673
32674
32675
32676
32677
32678
32679
32680
32681
32682
32683
32684
32685
32686
32687
32688
32689
32690
32691
32692
32693
32694
32695
32696
32697
32698
32699
32700
32701
32702
32703
32704
32705
32706
32707
32708
32709
32710
32711
32712
32713
32714
32715
32716
32717
32718
32719
32720
32721
32722
32723
32724
32725
32726
32727
32728
32729
32730
32731
32732
32733
32734
32735
32736
32737
32738
32739
32740
32741
32742
32743
32744
32745
32746
32747
32748
32749
32750
32751
32752
32753
32754
32755
32756
32757
32758
32759
32760
32761
32762
32763
32764
32765
32766
32767
32768
32769
32770
32771
32772
32773
32774
32775
32776
32777
32778
32779
32780
32781
32782
32783
32784
32785
32786
32787
32788
32789
32790
32791
32792
32793
32794
32795
32796
32797
32798
32799
32800
32801
32802
32803
32804
32805
32806
32807
32808
32809
32810
32811
32812
32813
32814
32815
32816
32817
32818
32819
32820
32821
32822
32823
32824
32825
32826
32827
32828
32829
32830
32831
32832
32833
32834
32835
32836
32837
32838
32839
32840
32841
32842
32843
32844
32845
32846
32847
32848
32849
32850
32851
32852
32853
32854
32855
32856
32857
32858
32859
32860
32861
32862
32863
32864
32865
32866
32867
32868
32869
32870
32871
32872
32873
32874
32875
32876
32877
32878
32879
32880
32881
32882
32883
32884
32885
32886
32887
32888
32889
32890
32891
32892
32893
32894
32895
32896
32897
32898
32899
32900
32901
32902
32903
32904
32905
32906
32907
32908
32909
32910
32911
32912
32913
32914
32915
32916
32917
32918
32919
32920
32921
32922
32923
32924
32925
32926
32927
32928
32929
32930
32931
32932
32933
32934
32935
32936
32937
32938
32939
32940
32941
32942
32943
32944
32945
32946
32947
32948
32949
32950
32951
32952
32953
32954
32955
32956
32957
32958
32959
32960
32961
32962
32963
32964
32965
32966
32967
32968
32969
32970
32971
32972
32973
32974
32975
32976
32977
32978
32979
32980
32981
32982
32983
32984
32985
32986
32987
32988
32989
32990
32991
32992
32993
32994
32995
32996
32997
32998
32999
33000
33001
33002
33003
33004
33005
33006
33007
33008
33009
33010
33011
33012
33013
33014
33015
33016
33017
33018
33019
33020
33021
33022
33023
33024
33025
33026
33027
33028
33029
33030
33031
33032
33033
33034
33035
33036
33037
33038
33039
33040
33041
33042
33043
33044
33045
33046
33047
33048
33049
33050
33051
33052
33053
33054
33055
33056
33057
33058
33059
33060
33061
33062
33063
33064
33065
33066
33067
33068
33069
33070
33071
33072
33073
33074
33075
33076
33077
33078
33079
33080
33081
33082
33083
33084
33085
33086
33087
33088
33089
33090
33091
33092
33093
33094
33095
33096
33097
33098
33099
33100
33101
33102
33103
33104
33105
33106
33107
33108
33109
33110
33111
33112
33113
33114
33115
33116
33117
33118
33119
33120
33121
33122
33123
33124
33125
33126
33127
33128
33129
33130
33131
33132
33133
33134
33135
33136
33137
33138
33139
33140
33141
33142
33143
33144
33145
33146
33147
33148
33149
33150
33151
33152
33153
33154
33155
33156
33157
33158
33159
33160
33161
33162
33163
33164
33165
33166
33167
33168
33169
33170
33171
33172
33173
33174
33175
33176
33177
33178
33179
33180
33181
33182
33183
33184
33185
33186
33187
33188
33189
33190
33191
33192
33193
33194
33195
33196
33197
33198
33199
33200
33201
33202
33203
33204
33205
33206
33207
33208
33209
33210
33211
33212
33213
33214
33215
33216
33217
33218
33219
33220
33221
33222
33223
33224
33225
33226
33227
33228
33229
33230
33231
33232
33233
33234
33235
33236
33237
33238
33239
33240
33241
33242
33243
33244
33245
33246
33247
33248
33249
33250
33251
33252
33253
33254
33255
33256
33257
33258
33259
33260
33261
33262
33263
33264
33265
33266
33267
33268
33269
33270
33271
33272
33273
33274
33275
33276
33277
33278
33279
33280
33281
33282
33283
33284
33285
33286
33287
33288
33289
33290
33291
33292
33293
33294
33295
33296
33297
33298
33299
33300
33301
33302
33303
33304
33305
33306
33307
33308
33309
33310
33311
33312
33313
33314
33315
33316
33317
33318
33319
33320
33321
33322
33323
33324
33325
33326
33327
33328
33329
33330
33331
33332
33333
33334
33335
33336
33337
33338
33339
33340
33341
33342
33343
33344
33345
33346
33347
33348
33349
33350
33351
33352
33353
33354
33355
33356
33357
33358
33359
33360
33361
33362
33363
33364
33365
33366
33367
33368
33369
33370
33371
33372
33373
33374
33375
33376
33377
33378
33379
33380
33381
33382
33383
33384
33385
33386
33387
33388
33389
33390
33391
33392
33393
33394
33395
33396
33397
33398
33399
33400
33401
33402
33403
33404
33405
33406
33407
33408
33409
33410
33411
33412
33413
33414
33415
33416
33417
33418
33419
33420
33421
33422
33423
33424
33425
33426
33427
33428
33429
33430
33431
33432
33433
33434
33435
33436
33437
33438
33439
33440
33441
33442
33443
33444
33445
33446
33447
33448
33449
33450
33451
33452
33453
33454
33455
33456
33457
33458
33459
33460
33461
33462
33463
33464
33465
33466
33467
33468
33469
33470
33471
33472
33473
33474
33475
33476
33477
33478
33479
33480
33481
33482
33483
33484
33485
33486
33487
33488
33489
33490
33491
33492
33493
33494
33495
33496
33497
33498
33499
33500
33501
33502
33503
33504
33505
33506
33507
33508
33509
33510
33511
33512
33513
33514
33515
33516
33517
33518
33519
33520
33521
33522
33523
33524
33525
33526
33527
33528
33529
33530
33531
33532
33533
33534
33535
33536
33537
33538
33539
33540
33541
33542
33543
33544
33545
33546
33547
33548
33549
33550
33551
33552
33553
33554
33555
33556
33557
33558
33559
33560
33561
33562
33563
33564
33565
33566
33567
33568
33569
33570
33571
33572
33573
33574
33575
33576
33577
33578
33579
33580
33581
33582
33583
33584
33585
33586
33587
33588
33589
33590
33591
33592
33593
33594
33595
33596
33597
33598
33599
33600
33601
33602
33603
33604
33605
33606
33607
33608
33609
33610
33611
33612
33613
33614
33615
33616
33617
33618
33619
33620
33621
33622
33623
33624
33625
33626
33627
33628
33629
33630
33631
33632
33633
33634
33635
33636
33637
33638
33639
33640
33641
33642
33643
33644
33645
33646
33647
33648
33649
33650
33651
33652
33653
33654
33655
33656
33657
33658
33659
33660
33661
33662
33663
33664
33665
33666
33667
33668
33669
33670
33671
33672
33673
33674
33675
33676
33677
33678
33679
33680
33681
33682
33683
33684
33685
33686
33687
33688
33689
33690
33691
33692
33693
33694
33695
33696
33697
33698
33699
33700
33701
33702
33703
33704
33705
33706
33707
33708
33709
33710
33711
33712
33713
33714
33715
33716
33717
33718
33719
33720
33721
33722
33723
33724
33725
33726
33727
33728
33729
33730
33731
33732
33733
33734
33735
33736
33737
33738
33739
33740
33741
33742
33743
33744
33745
33746
33747
33748
33749
33750
33751
33752
33753
33754
33755
33756
33757
33758
33759
33760
33761
33762
33763
33764
33765
33766
33767
33768
33769
33770
33771
33772
33773
33774
33775
33776
33777
33778
33779
33780
33781
33782
33783
33784
33785
33786
33787
33788
33789
33790
33791
33792
33793
33794
33795
33796
33797
33798
33799
33800
33801
33802
33803
33804
33805
33806
33807
33808
33809
33810
33811
33812
33813
33814
33815
33816
33817
33818
33819
33820
33821
33822
33823
33824
33825
33826
33827
33828
33829
33830
33831
33832
33833
33834
33835
33836
33837
33838
33839
33840
33841
33842
33843
33844
33845
33846
33847
33848
33849
33850
33851
33852
33853
33854
33855
33856
33857
33858
33859
33860
33861
33862
33863
33864
33865
33866
33867
33868
33869
33870
33871
33872
33873
33874
33875
33876
33877
33878
33879
33880
33881
33882
33883
33884
33885
33886
33887
33888
33889
33890
33891
33892
33893
33894
33895
33896
33897
33898
33899
33900
33901
33902
33903
33904
33905
33906
33907
33908
33909
33910
33911
33912
33913
33914
33915
33916
33917
33918
33919
33920
33921
33922
33923
33924
33925
33926
33927
33928
33929
33930
33931
33932
33933
33934
33935
33936
33937
33938
33939
33940
33941
33942
33943
33944
33945
33946
33947
33948
33949
33950
33951
33952
33953
33954
33955
33956
33957
33958
33959
33960
33961
33962
33963
33964
33965
33966
33967
33968
33969
33970
33971
33972
33973
33974
33975
33976
33977
33978
33979
33980
33981
33982
33983
33984
33985
33986
33987
33988
33989
33990
33991
33992
33993
33994
33995
33996
33997
33998
33999
34000
34001
34002
34003
34004
34005
34006
34007
34008
34009
34010
34011
34012
34013
34014
34015
34016
34017
34018
34019
34020
34021
34022
34023
34024
34025
34026
34027
34028
34029
34030
34031
34032
34033
34034
34035
34036
34037
34038
34039
34040
34041
34042
34043
34044
34045
34046
34047
34048
34049
34050
34051
34052
34053
34054
34055
34056
34057
34058
34059
34060
34061
34062
34063
34064
34065
34066
34067
34068
34069
34070
34071
34072
34073
34074
34075
34076
34077
34078
34079
34080
34081
34082
34083
34084
34085
34086
34087
34088
34089
34090
34091
34092
34093
34094
34095
34096
34097
34098
34099
34100
34101
34102
34103
34104
34105
34106
34107
34108
34109
34110
34111
34112
34113
34114
34115
34116
34117
34118
34119
34120
34121
34122
34123
34124
34125
34126
34127
34128
34129
34130
34131
34132
34133
34134
34135
34136
34137
34138
34139
34140
34141
34142
34143
34144
34145
34146
34147
34148
34149
34150
34151
34152
34153
34154
34155
34156
34157
34158
34159
34160
34161
34162
34163
34164
34165
34166
34167
34168
34169
34170
34171
34172
34173
34174
34175
34176
34177
34178
34179
34180
34181
34182
34183
34184
34185
34186
34187
34188
34189
34190
34191
34192
34193
34194
34195
34196
34197
34198
34199
34200
34201
34202
34203
34204
34205
34206
34207
34208
34209
34210
34211
34212
34213
34214
34215
34216
34217
34218
34219
34220
34221
34222
34223
34224
34225
34226
34227
34228
34229
34230
34231
34232
34233
34234
34235
34236
34237
34238
34239
34240
34241
34242
34243
34244
34245
34246
34247
34248
34249
34250
34251
34252
34253
34254
34255
34256
34257
34258
34259
34260
34261
34262
34263
34264
34265
34266
34267
34268
34269
34270
34271
34272
34273
34274
34275
34276
34277
34278
34279
34280
34281
34282
34283
34284
34285
34286
34287
34288
34289
34290
34291
34292
34293
34294
34295
34296
34297
34298
34299
34300
34301
34302
34303
34304
34305
34306
34307
34308
34309
34310
34311
34312
34313
34314
34315
34316
34317
34318
34319
34320
34321
34322
34323
34324
34325
34326
34327
34328
34329
34330
34331
34332
34333
34334
34335
34336
34337
34338
34339
34340
34341
34342
34343
34344
34345
34346
34347
34348
34349
34350
34351
34352
34353
34354
34355
34356
34357
34358
34359
34360
34361
34362
34363
34364
34365
34366
34367
34368
34369
34370
34371
34372
34373
34374
34375
34376
34377
34378
34379
34380
34381
34382
34383
34384
34385
34386
34387
34388
34389
34390
34391
34392
34393
34394
34395
34396
34397
34398
34399
34400
34401
34402
34403
34404
34405
34406
34407
34408
34409
34410
34411
34412
34413
34414
34415
34416
34417
34418
34419
34420
34421
34422
34423
34424
34425
34426
34427
34428
34429
34430
34431
34432
34433
34434
34435
34436
34437
34438
34439
34440
34441
34442
34443
34444
34445
34446
34447
34448
34449
34450
34451
34452
34453
34454
34455
34456
34457
34458
34459
34460
34461
34462
34463
34464
34465
34466
34467
34468
34469
34470
34471
34472
34473
34474
34475
34476
34477
34478
34479
34480
34481
34482
34483
34484
34485
34486
34487
34488
34489
34490
34491
34492
34493
34494
34495
34496
34497
34498
34499
34500
34501
34502
34503
34504
34505
34506
34507
34508
34509
34510
34511
34512
34513
34514
34515
34516
34517
34518
34519
34520
34521
34522
34523
34524
34525
34526
34527
34528
34529
34530
34531
34532
34533
34534
34535
34536
34537
34538
34539
34540
34541
34542
34543
34544
34545
34546
34547
34548
34549
34550
34551
34552
34553
34554
34555
34556
34557
34558
34559
34560
34561
34562
34563
34564
34565
34566
34567
34568
34569
34570
34571
34572
34573
34574
34575
34576
34577
34578
34579
34580
34581
34582
34583
34584
34585
34586
34587
34588
34589
34590
34591
34592
34593
34594
34595
34596
34597
34598
34599
34600
34601
34602
34603
34604
34605
34606
34607
34608
34609
34610
34611
34612
34613
34614
34615
34616
34617
34618
34619
34620
34621
34622
34623
34624
34625
34626
34627
34628
34629
34630
34631
34632
34633
34634
34635
34636
34637
34638
34639
34640
34641
34642
34643
34644
34645
34646
34647
34648
34649
34650
34651
34652
34653
34654
34655
34656
34657
34658
34659
34660
34661
34662
34663
34664
34665
34666
34667
34668
34669
34670
34671
34672
34673
34674
34675
34676
34677
34678
34679
34680
34681
34682
34683
34684
34685
34686
34687
34688
34689
34690
34691
34692
34693
34694
34695
34696
34697
34698
34699
34700
34701
34702
34703
34704
34705
34706
34707
34708
34709
34710
34711
34712
34713
34714
34715
34716
34717
34718
34719
34720
34721
34722
34723
34724
34725
34726
34727
34728
34729
34730
34731
34732
34733
34734
34735
34736
34737
34738
34739
34740
34741
34742
34743
34744
34745
34746
34747
34748
34749
34750
34751
34752
34753
34754
34755
34756
34757
34758
34759
34760
34761
34762
34763
34764
34765
34766
34767
34768
34769
34770
34771
34772
34773
34774
34775
34776
34777
34778
34779
34780
34781
34782
34783
34784
34785
34786
34787
34788
34789
34790
34791
34792
34793
34794
34795
34796
34797
34798
34799
34800
34801
34802
34803
34804
34805
34806
34807
34808
34809
34810
34811
34812
34813
34814
34815
34816
34817
34818
34819
34820
34821
34822
34823
34824
34825
34826
34827
34828
34829
34830
34831
34832
34833
34834
34835
34836
34837
34838
34839
34840
34841
34842
34843
34844
34845
34846
34847
34848
34849
34850
34851
34852
34853
34854
34855
34856
34857
34858
34859
34860
34861
34862
34863
34864
34865
34866
34867
34868
34869
34870
34871
34872
34873
34874
34875
34876
34877
34878
34879
34880
34881
34882
34883
34884
34885
34886
34887
34888
34889
34890
34891
34892
34893
34894
34895
34896
34897
34898
34899
34900
34901
34902
34903
34904
34905
34906
34907
34908
34909
34910
34911
34912
34913
34914
34915
34916
34917
34918
34919
34920
34921
34922
34923
34924
34925
34926
34927
34928
34929
34930
34931
34932
34933
34934
34935
34936
34937
34938
34939
34940
34941
34942
34943
34944
34945
34946
34947
34948
34949
34950
34951
34952
34953
34954
34955
34956
34957
34958
34959
34960
34961
34962
34963
34964
34965
34966
34967
34968
34969
34970
34971
34972
34973
34974
34975
34976
34977
34978
34979
34980
34981
34982
34983
34984
34985
34986
34987
34988
34989
34990
34991
34992
34993
34994
34995
34996
34997
34998
34999
35000
35001
35002
35003
35004
35005
35006
35007
35008
35009
35010
35011
35012
35013
35014
35015
35016
35017
35018
35019
35020
35021
35022
35023
35024
35025
35026
35027
35028
35029
35030
35031
35032
35033
35034
35035
35036
35037
35038
35039
35040
35041
35042
35043
35044
35045
35046
35047
35048
35049
35050
35051
35052
35053
35054
35055
35056
35057
35058
35059
35060
35061
35062
35063
35064
35065
35066
35067
35068
35069
35070
35071
35072
35073
35074
35075
35076
35077
35078
35079
35080
35081
35082
35083
35084
35085
35086
35087
35088
35089
35090
35091
35092
35093
35094
35095
35096
35097
35098
35099
35100
35101
35102
35103
35104
35105
35106
35107
35108
35109
35110
35111
35112
35113
35114
35115
35116
35117
35118
35119
35120
35121
35122
35123
35124
35125
35126
35127
35128
35129
35130
35131
35132
35133
35134
35135
35136
35137
35138
35139
35140
35141
35142
35143
35144
35145
35146
35147
35148
35149
35150
35151
35152
35153
35154
35155
35156
35157
35158
35159
35160
35161
35162
35163
35164
35165
35166
35167
35168
35169
35170
35171
35172
35173
35174
35175
35176
35177
35178
35179
35180
35181
35182
35183
35184
35185
35186
35187
35188
35189
35190
35191
35192
35193
35194
35195
35196
35197
35198
35199
35200
35201
35202
35203
35204
35205
35206
35207
35208
35209
35210
35211
35212
35213
35214
35215
35216
35217
35218
35219
35220
35221
35222
35223
35224
35225
35226
35227
35228
35229
35230
35231
35232
35233
35234
35235
35236
35237
35238
35239
35240
35241
35242
35243
35244
35245
35246
35247
35248
35249
35250
35251
35252
35253
35254
35255
35256
35257
35258
35259
35260
35261
35262
35263
35264
35265
35266
35267
35268
35269
35270
35271
35272
35273
35274
35275
35276
35277
35278
35279
35280
35281
35282
35283
35284
35285
35286
35287
35288
35289
35290
35291
35292
35293
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329
35330
35331
35332
35333
35334
35335
35336
35337
35338
35339
35340
35341
35342
35343
35344
35345
35346
35347
35348
35349
35350
35351
35352
35353
35354
35355
35356
35357
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369
35370
35371
35372
35373
35374
35375
35376
35377
35378
35379
35380
35381
35382
35383
35384
35385
35386
35387
35388
35389
35390
35391
35392
35393
35394
35395
35396
35397
35398
35399
35400
35401
35402
35403
35404
35405
35406
35407
35408
35409
35410
35411
35412
35413
35414
35415
35416
35417
35418
35419
35420
35421
35422
35423
35424
35425
35426
35427
35428
35429
35430
35431
35432
35433
35434
35435
35436
35437
35438
35439
35440
35441
35442
35443
35444
35445
35446
35447
35448
35449
35450
35451
35452
35453
35454
35455
35456
35457
35458
35459
35460
35461
35462
35463
35464
35465
35466
35467
35468
35469
35470
35471
35472
35473
35474
35475
35476
35477
35478
35479
35480
35481
35482
35483
35484
35485
35486
35487
35488
35489
35490
35491
35492
35493
35494
35495
35496
35497
35498
35499
35500
35501
35502
35503
35504
35505
35506
35507
35508
35509
35510
35511
35512
35513
35514
35515
35516
35517
35518
35519
35520
35521
35522
35523
35524
35525
35526
35527
35528
35529
35530
35531
35532
35533
35534
35535
35536
35537
35538
35539
35540
35541
35542
35543
35544
35545
35546
35547
35548
35549
35550
35551
35552
35553
35554
35555
35556
35557
35558
35559
35560
35561
35562
35563
35564
35565
35566
35567
35568
35569
35570
35571
35572
35573
35574
35575
35576
35577
35578
35579
35580
35581
35582
35583
35584
35585
35586
35587
35588
35589
35590
35591
35592
35593
35594
35595
35596
35597
35598
35599
35600
35601
35602
35603
35604
35605
35606
35607
35608
35609
35610
35611
35612
35613
35614
35615
35616
35617
35618
35619
35620
35621
35622
35623
35624
35625
35626
35627
35628
35629
35630
35631
35632
35633
35634
35635
35636
35637
35638
35639
35640
35641
35642
35643
35644
35645
35646
35647
35648
35649
35650
35651
35652
35653
35654
35655
35656
35657
35658
35659
35660
35661
35662
35663
35664
35665
35666
35667
35668
35669
35670
35671
35672
35673
35674
35675
35676
35677
35678
35679
35680
35681
35682
35683
35684
35685
35686
35687
35688
35689
35690
35691
35692
35693
35694
35695
35696
35697
35698
35699
35700
35701
35702
35703
35704
35705
35706
35707
35708
35709
35710
35711
35712
35713
35714
35715
35716
35717
35718
35719
35720
35721
35722
35723
35724
35725
35726
35727
35728
35729
35730
35731
35732
35733
35734
35735
35736
35737
35738
35739
35740
35741
35742
35743
35744
35745
35746
35747
35748
35749
35750
35751
35752
35753
35754
35755
35756
35757
35758
35759
35760
35761
35762
35763
35764
35765
35766
35767
35768
35769
35770
35771
35772
35773
35774
35775
35776
35777
35778
35779
35780
35781
35782
35783
35784
35785
35786
35787
35788
35789
35790
35791
35792
35793
35794
35795
35796
35797
35798
35799
35800
35801
35802
35803
35804
35805
35806
35807
35808
35809
35810
35811
35812
35813
35814
35815
35816
35817
35818
35819
35820
35821
35822
35823
35824
35825
35826
35827
35828
35829
35830
35831
35832
35833
35834
35835
35836
35837
35838
35839
35840
35841
35842
35843
35844
35845
35846
35847
35848
35849
35850
35851
35852
35853
35854
35855
35856
35857
35858
35859
35860
35861
35862
35863
35864
35865
35866
35867
35868
35869
35870
35871
35872
35873
35874
35875
35876
35877
35878
35879
35880
35881
35882
35883
35884
35885
35886
35887
35888
35889
35890
35891
35892
35893
35894
35895
35896
35897
35898
35899
35900
35901
35902
35903
35904
35905
35906
35907
35908
35909
35910
35911
35912
35913
35914
35915
35916
35917
35918
35919
35920
35921
35922
35923
35924
35925
35926
35927
35928
35929
35930
35931
35932
35933
35934
35935
35936
35937
35938
35939
35940
35941
35942
35943
35944
35945
35946
35947
35948
35949
35950
35951
35952
35953
35954
35955
35956
35957
35958
35959
35960
35961
35962
35963
35964
35965
35966
35967
35968
35969
35970
35971
35972
35973
35974
35975
35976
35977
35978
35979
35980
35981
35982
35983
35984
35985
35986
35987
35988
35989
35990
35991
35992
35993
35994
35995
35996
35997
35998
35999
36000
36001
36002
36003
36004
36005
36006
36007
36008
36009
36010
36011
36012
36013
36014
36015
36016
36017
36018
36019
36020
36021
36022
36023
36024
36025
36026
36027
36028
36029
36030
36031
36032
36033
36034
36035
36036
36037
36038
36039
36040
36041
36042
36043
36044
36045
36046
36047
36048
36049
36050
36051
36052
36053
36054
36055
36056
36057
36058
36059
36060
36061
36062
36063
36064
36065
36066
36067
36068
36069
36070
36071
36072
36073
36074
36075
36076
36077
36078
36079
36080
36081
36082
36083
36084
36085
36086
36087
36088
36089
36090
36091
36092
36093
36094
36095
36096
36097
36098
36099
36100
36101
36102
36103
36104
36105
36106
36107
36108
36109
36110
36111
36112
36113
36114
36115
36116
36117
36118
36119
36120
36121
36122
36123
36124
36125
36126
36127
36128
36129
36130
36131
36132
36133
36134
36135
36136
36137
36138
36139
36140
36141
36142
36143
36144
36145
36146
36147
36148
36149
36150
36151
36152
36153
36154
36155
36156
36157
36158
36159
36160
36161
36162
36163
36164
36165
36166
36167
36168
36169
36170
36171
36172
36173
36174
36175
36176
36177
36178
36179
36180
36181
36182
36183
36184
36185
36186
36187
36188
36189
36190
36191
36192
36193
36194
36195
36196
36197
36198
36199
36200
36201
36202
36203
36204
36205
36206
36207
36208
36209
36210
36211
36212
36213
36214
36215
36216
36217
36218
36219
36220
36221
36222
36223
36224
36225
36226
36227
36228
36229
36230
36231
36232
36233
36234
36235
36236
36237
36238
36239
36240
36241
36242
36243
36244
36245
36246
36247
36248
36249
36250
36251
36252
36253
36254
36255
36256
36257
36258
36259
36260
36261
36262
36263
36264
36265
36266
36267
36268
36269
36270
36271
36272
36273
36274
36275
36276
36277
36278
36279
36280
36281
36282
36283
36284
36285
36286
36287
36288
36289
36290
36291
36292
36293
36294
36295
36296
36297
36298
36299
36300
36301
36302
36303
36304
36305
36306
36307
36308
36309
36310
36311
36312
36313
36314
36315
36316
36317
36318
36319
36320
36321
36322
36323
36324
36325
36326
36327
36328
36329
36330
36331
36332
36333
36334
36335
36336
36337
36338
36339
36340
36341
36342
36343
36344
36345
36346
36347
36348
36349
36350
36351
36352
36353
36354
36355
36356
36357
36358
36359
36360
36361
36362
36363
36364
36365
36366
36367
36368
36369
36370
36371
36372
36373
36374
36375
36376
36377
36378
36379
36380
36381
36382
36383
36384
36385
36386
36387
36388
36389
36390
36391
36392
36393
36394
36395
36396
36397
36398
36399
36400
36401
36402
36403
36404
36405
36406
36407
36408
36409
36410
36411
36412
36413
36414
36415
36416
36417
36418
36419
36420
36421
36422
36423
36424
36425
36426
36427
36428
36429
36430
36431
36432
36433
36434
36435
36436
36437
36438
36439
36440
36441
36442
36443
36444
36445
36446
36447
36448
36449
36450
36451
36452
36453
36454
36455
36456
36457
36458
36459
36460
36461
36462
36463
36464
36465
36466
36467
36468
36469
36470
36471
36472
36473
36474
36475
36476
36477
36478
36479
36480
36481
36482
36483
36484
36485
36486
36487
36488
36489
36490
36491
36492
36493
36494
36495
36496
36497
36498
36499
36500
36501
36502
36503
36504
36505
36506
36507
36508
36509
36510
36511
36512
36513
36514
36515
36516
36517
36518
36519
36520
36521
36522
36523
36524
36525
36526
36527
36528
36529
36530
36531
36532
36533
36534
36535
36536
36537
36538
36539
36540
36541
36542
36543
36544
36545
36546
36547
36548
36549
36550
36551
36552
36553
36554
36555
36556
36557
36558
36559
36560
36561
36562
36563
36564
36565
36566
36567
36568
36569
36570
36571
36572
36573
36574
36575
36576
36577
36578
36579
36580
36581
36582
36583
36584
36585
36586
36587
36588
36589
36590
36591
36592
36593
36594
36595
36596
36597
36598
36599
36600
36601
36602
36603
36604
36605
36606
36607
36608
36609
36610
36611
36612
36613
36614
36615
36616
36617
36618
36619
36620
36621
36622
36623
36624
36625
36626
36627
36628
36629
36630
36631
36632
36633
36634
36635
36636
36637
36638
36639
36640
36641
36642
36643
36644
36645
36646
36647
36648
36649
36650
36651
36652
36653
36654
36655
36656
36657
36658
36659
36660
36661
36662
36663
36664
36665
36666
36667
36668
36669
36670
36671
36672
36673
36674
36675
36676
36677
36678
36679
36680
36681
36682
36683
36684
36685
36686
36687
36688
36689
36690
36691
36692
36693
36694
36695
36696
36697
36698
36699
36700
36701
36702
36703
36704
36705
36706
36707
36708
36709
36710
36711
36712
36713
36714
36715
36716
36717
36718
36719
36720
36721
36722
36723
36724
36725
36726
36727
36728
36729
36730
36731
36732
36733
36734
36735
36736
36737
36738
36739
36740
36741
36742
36743
36744
36745
36746
36747
36748
36749
36750
36751
36752
36753
36754
36755
36756
36757
36758
36759
36760
36761
36762
36763
36764
36765
36766
36767
36768
36769
36770
36771
36772
36773
36774
36775
36776
36777
36778
36779
36780
36781
36782
36783
36784
36785
36786
36787
36788
36789
36790
36791
36792
36793
36794
36795
36796
36797
36798
36799
36800
36801
36802
36803
36804
36805
36806
36807
36808
36809
36810
36811
36812
36813
36814
36815
36816
36817
36818
36819
36820
36821
36822
36823
36824
36825
36826
36827
36828
36829
36830
36831
36832
36833
36834
36835
36836
36837
36838
36839
36840
36841
36842
36843
36844
36845
36846
36847
36848
36849
36850
36851
36852
36853
36854
36855
36856
36857
36858
36859
36860
36861
36862
36863
36864
36865
36866
36867
36868
36869
36870
36871
36872
36873
36874
36875
36876
36877
36878
36879
36880
36881
36882
36883
36884
36885
36886
36887
36888
36889
36890
36891
36892
36893
36894
36895
36896
36897
36898
36899
36900
36901
36902
36903
36904
36905
36906
36907
36908
36909
36910
36911
36912
36913
36914
36915
36916
36917
36918
36919
36920
36921
36922
36923
36924
36925
36926
36927
36928
36929
36930
36931
36932
36933
36934
36935
36936
36937
36938
36939
36940
36941
36942
36943
36944
36945
36946
36947
36948
36949
36950
36951
36952
36953
36954
36955
36956
36957
36958
36959
36960
36961
36962
36963
36964
36965
36966
36967
36968
36969
36970
36971
36972
36973
36974
36975
36976
36977
36978
36979
36980
36981
36982
36983
36984
36985
36986
36987
36988
36989
36990
36991
36992
36993
36994
36995
36996
36997
36998
36999
37000
37001
37002
37003
37004
37005
37006
37007
37008
37009
37010
37011
37012
37013
37014
37015
37016
37017
37018
37019
37020
37021
37022
37023
37024
37025
37026
37027
37028
37029
37030
37031
37032
37033
37034
37035
37036
37037
37038
37039
37040
37041
37042
37043
37044
37045
37046
37047
37048
37049
37050
37051
37052
37053
37054
37055
37056
37057
37058
37059
37060
37061
37062
37063
37064
37065
37066
37067
37068
37069
37070
37071
37072
37073
37074
37075
37076
37077
37078
37079
37080
37081
37082
37083
37084
37085
37086
37087
37088
37089
37090
37091
37092
37093
37094
37095
37096
37097
37098
37099
37100
37101
37102
37103
37104
37105
37106
37107
37108
37109
37110
37111
37112
37113
37114
37115
37116
37117
37118
37119
37120
37121
37122
37123
37124
37125
37126
37127
37128
37129
37130
37131
37132
37133
37134
37135
37136
37137
37138
37139
37140
37141
37142
37143
37144
37145
37146
37147
37148
37149
37150
37151
37152
37153
37154
37155
37156
37157
37158
37159
37160
37161
37162
37163
37164
37165
37166
37167
37168
37169
37170
37171
37172
37173
37174
37175
37176
37177
37178
37179
37180
37181
37182
37183
37184
37185
37186
37187
37188
37189
37190
37191
37192
37193
37194
37195
37196
37197
37198
37199
37200
37201
37202
37203
37204
37205
37206
37207
37208
37209
37210
37211
37212
37213
37214
37215
37216
37217
37218
37219
37220
37221
37222
37223
37224
37225
37226
37227
37228
37229
37230
37231
37232
37233
37234
37235
37236
37237
37238
37239
37240
37241
37242
37243
37244
37245
37246
37247
37248
37249
37250
37251
37252
37253
37254
37255
37256
37257
37258
37259
37260
37261
37262
37263
37264
37265
37266
37267
37268
37269
37270
37271
37272
37273
37274
37275
37276
37277
37278
37279
37280
37281
37282
37283
37284
37285
37286
37287
37288
37289
37290
37291
37292
37293
37294
37295
37296
37297
37298
37299
37300
37301
37302
37303
37304
37305
37306
37307
37308
37309
37310
37311
37312
37313
37314
37315
37316
37317
37318
37319
37320
37321
37322
37323
37324
37325
37326
37327
37328
37329
37330
37331
37332
37333
37334
37335
37336
37337
37338
37339
37340
37341
37342
37343
37344
37345
37346
37347
37348
37349
37350
37351
37352
37353
37354
37355
37356
37357
37358
37359
37360
37361
37362
37363
37364
37365
37366
37367
37368
37369
37370
37371
37372
37373
37374
37375
37376
37377
37378
37379
37380
37381
37382
37383
37384
37385
37386
37387
37388
37389
37390
37391
37392
37393
37394
37395
37396
37397
37398
37399
37400
37401
37402
37403
37404
37405
37406
37407
37408
37409
37410
37411
37412
37413
37414
37415
37416
37417
37418
37419
37420
37421
37422
37423
37424
37425
37426
37427
37428
37429
37430
37431
37432
37433
37434
37435
37436
37437
37438
37439
37440
37441
37442
37443
37444
37445
37446
37447
37448
37449
37450
37451
37452
37453
37454
37455
37456
37457
37458
37459
37460
37461
37462
37463
37464
37465
37466
37467
37468
37469
37470
37471
37472
37473
37474
37475
37476
37477
37478
37479
37480
37481
37482
37483
37484
37485
37486
37487
37488
37489
37490
37491
37492
37493
37494
37495
37496
37497
37498
37499
37500
37501
37502
37503
37504
37505
37506
37507
37508
37509
37510
37511
37512
37513
37514
37515
37516
37517
37518
37519
37520
37521
37522
37523
37524
37525
37526
37527
37528
37529
37530
37531
37532
37533
37534
37535
37536
37537
37538
37539
37540
37541
37542
37543
37544
37545
37546
37547
37548
37549
37550
37551
37552
37553
37554
37555
37556
37557
37558
37559
37560
37561
37562
37563
37564
37565
37566
37567
37568
37569
37570
37571
37572
37573
37574
37575
37576
37577
37578
37579
37580
37581
37582
37583
37584
37585
37586
37587
37588
37589
37590
37591
37592
37593
37594
37595
37596
37597
37598
37599
37600
37601
37602
37603
37604
37605
37606
37607
37608
37609
37610
37611
37612
37613
37614
37615
37616
37617
37618
37619
37620
37621
37622
37623
37624
37625
37626
37627
37628
37629
37630
37631
37632
37633
37634
37635
37636
37637
37638
37639
37640
37641
37642
37643
37644
37645
37646
37647
37648
37649
37650
37651
37652
37653
37654
37655
37656
37657
37658
37659
37660
37661
37662
37663
37664
37665
37666
37667
37668
37669
37670
37671
37672
37673
37674
37675
37676
37677
37678
37679
37680
37681
37682
37683
37684
37685
37686
37687
37688
37689
37690
37691
37692
37693
37694
37695
37696
37697
37698
37699
37700
37701
37702
37703
37704
37705
37706
37707
37708
37709
37710
37711
37712
37713
37714
37715
37716
37717
37718
37719
37720
37721
37722
37723
37724
37725
37726
37727
37728
37729
37730
37731
37732
37733
37734
37735
37736
37737
37738
37739
37740
37741
37742
37743
37744
37745
37746
37747
37748
37749
37750
37751
37752
37753
37754
37755
37756
37757
37758
37759
37760
37761
37762
37763
37764
37765
37766
37767
37768
37769
37770
37771
37772
37773
37774
37775
37776
37777
37778
37779
37780
37781
37782
37783
37784
37785
37786
37787
37788
37789
37790
37791
37792
37793
37794
37795
37796
37797
37798
37799
37800
37801
37802
37803
37804
37805
37806
37807
37808
37809
37810
37811
37812
37813
37814
37815
37816
37817
37818
37819
37820
37821
37822
37823
37824
37825
37826
37827
37828
37829
37830
37831
37832
37833
37834
37835
37836
37837
37838
37839
37840
37841
37842
37843
37844
37845
37846
37847
37848
37849
37850
37851
37852
37853
37854
37855
37856
37857
37858
37859
37860
37861
37862
37863
37864
37865
37866
37867
37868
37869
37870
37871
37872
37873
37874
37875
37876
37877
37878
37879
37880
37881
37882
37883
37884
37885
37886
37887
37888
37889
37890
37891
37892
37893
37894
37895
37896
37897
37898
37899
37900
37901
37902
37903
37904
37905
37906
37907
37908
37909
37910
37911
37912
37913
37914
37915
37916
37917
37918
37919
37920
37921
37922
37923
37924
37925
37926
37927
37928
37929
37930
37931
37932
37933
37934
37935
37936
37937
37938
37939
37940
37941
37942
37943
37944
37945
37946
37947
37948
37949
37950
37951
37952
37953
37954
37955
37956
37957
37958
37959
37960
37961
37962
37963
37964
37965
37966
37967
37968
37969
37970
37971
37972
37973
37974
37975
37976
37977
37978
37979
37980
37981
37982
37983
37984
37985
37986
37987
37988
37989
37990
37991
37992
37993
37994
37995
37996
37997
37998
37999
38000
38001
38002
38003
38004
38005
38006
38007
38008
38009
38010
38011
38012
38013
38014
38015
38016
38017
38018
38019
38020
38021
38022
38023
38024
38025
38026
38027
38028
38029
38030
38031
38032
38033
38034
38035
38036
38037
38038
38039
38040
38041
38042
38043
38044
38045
38046
38047
38048
38049
38050
38051
38052
38053
38054
38055
38056
38057
38058
38059
38060
38061
38062
38063
38064
38065
38066
38067
38068
38069
38070
38071
38072
38073
38074
38075
38076
38077
38078
38079
38080
38081
38082
38083
38084
38085
38086
38087
38088
38089
38090
38091
38092
38093
38094
38095
38096
38097
38098
38099
38100
38101
38102
38103
38104
38105
38106
38107
38108
38109
38110
38111
38112
38113
38114
38115
38116
38117
38118
38119
38120
38121
38122
38123
38124
38125
38126
38127
38128
38129
38130
38131
38132
38133
38134
38135
38136
38137
38138
38139
38140
38141
38142
38143
38144
38145
38146
38147
38148
38149
38150
38151
38152
38153
38154
38155
38156
38157
38158
38159
38160
38161
38162
38163
38164
38165
38166
38167
38168
38169
38170
38171
38172
38173
38174
38175
38176
38177
38178
38179
38180
38181
38182
38183
38184
38185
38186
38187
38188
38189
38190
38191
38192
38193
38194
38195
38196
38197
38198
38199
38200
38201
38202
38203
38204
38205
38206
38207
38208
38209
38210
38211
38212
38213
38214
38215
38216
38217
38218
38219
38220
38221
38222
38223
38224
38225
38226
38227
38228
38229
38230
38231
38232
38233
38234
38235
38236
38237
38238
38239
38240
38241
38242
38243
38244
38245
38246
38247
38248
38249
38250
38251
38252
38253
38254
38255
38256
38257
38258
38259
38260
38261
38262
38263
38264
38265
38266
38267
38268
38269
38270
38271
38272
38273
38274
38275
38276
38277
38278
38279
38280
38281
38282
38283
38284
38285
38286
38287
38288
38289
38290
38291
38292
38293
38294
38295
38296
38297
38298
38299
38300
38301
38302
38303
38304
38305
38306
38307
38308
38309
38310
38311
38312
38313
38314
38315
38316
38317
38318
38319
38320
38321
38322
38323
38324
38325
38326
38327
38328
38329
38330
38331
38332
38333
38334
38335
38336
38337
38338
38339
38340
38341
38342
38343
38344
38345
38346
38347
38348
38349
38350
38351
38352
38353
38354
38355
38356
38357
38358
38359
38360
38361
38362
38363
38364
38365
38366
38367
38368
38369
38370
38371
38372
38373
38374
38375
38376
38377
38378
38379
38380
38381
38382
38383
38384
38385
38386
38387
38388
38389
38390
38391
38392
38393
38394
38395
38396
38397
38398
38399
38400
38401
38402
38403
38404
38405
38406
38407
38408
38409
38410
38411
38412
38413
38414
38415
38416
38417
38418
38419
38420
38421
38422
38423
38424
38425
38426
38427
38428
38429
38430
38431
38432
38433
38434
38435
38436
38437
38438
38439
38440
38441
38442
38443
38444
38445
38446
38447
38448
38449
38450
38451
38452
38453
38454
38455
38456
38457
38458
38459
38460
38461
38462
38463
38464
38465
38466
38467
38468
38469
38470
38471
38472
38473
38474
38475
38476
38477
38478
38479
38480
38481
38482
38483
38484
38485
38486
38487
38488
38489
38490
38491
38492
38493
38494
38495
38496
38497
38498
38499
38500
38501
38502
38503
38504
38505
38506
38507
38508
38509
38510
38511
38512
38513
38514
38515
38516
38517
38518
38519
38520
38521
38522
38523
38524
38525
38526
38527
38528
38529
38530
38531
38532
38533
38534
38535
38536
38537
38538
38539
38540
38541
38542
38543
38544
38545
38546
38547
38548
38549
38550
38551
38552
38553
38554
38555
38556
38557
38558
38559
38560
38561
38562
38563
38564
38565
38566
38567
38568
38569
38570
38571
38572
38573
38574
38575
38576
38577
38578
38579
38580
38581
38582
38583
38584
38585
38586
38587
38588
38589
38590
38591
38592
38593
38594
38595
38596
38597
38598
38599
38600
38601
38602
38603
38604
38605
38606
38607
38608
38609
38610
38611
38612
38613
38614
38615
38616
38617
38618
38619
38620
38621
38622
38623
38624
38625
38626
38627
38628
38629
38630
38631
38632
38633
38634
38635
38636
38637
38638
38639
38640
38641
38642
38643
38644
38645
38646
38647
38648
38649
38650
38651
38652
38653
38654
38655
38656
38657
38658
38659
38660
38661
38662
38663
38664
38665
38666
38667
38668
38669
38670
38671
38672
38673
38674
38675
38676
38677
38678
38679
38680
38681
38682
38683
38684
38685
38686
38687
38688
38689
38690
38691
38692
38693
38694
38695
38696
38697
38698
38699
38700
38701
38702
38703
38704
38705
38706
38707
38708
38709
38710
38711
38712
38713
38714
38715
38716
38717
38718
38719
38720
38721
38722
38723
38724
38725
38726
38727
38728
38729
38730
38731
38732
38733
38734
38735
38736
38737
38738
38739
38740
38741
38742
38743
38744
38745
38746
38747
38748
38749
38750
38751
38752
38753
38754
38755
38756
38757
38758
38759
38760
38761
38762
38763
38764
38765
38766
38767
38768
38769
38770
38771
38772
38773
38774
38775
38776
38777
38778
38779
38780
38781
38782
38783
38784
38785
38786
38787
38788
38789
38790
38791
38792
38793
38794
38795
38796
38797
38798
38799
38800
38801
38802
38803
38804
38805
38806
38807
38808
38809
38810
38811
38812
38813
38814
38815
38816
38817
38818
38819
38820
38821
38822
38823
38824
38825
38826
38827
38828
38829
38830
38831
38832
38833
38834
38835
38836
38837
38838
38839
38840
38841
38842
38843
38844
38845
38846
38847
38848
38849
38850
38851
38852
38853
38854
38855
38856
38857
38858
38859
38860
38861
38862
38863
38864
38865
38866
38867
38868
38869
38870
38871
38872
38873
38874
38875
38876
38877
38878
38879
38880
38881
38882
38883
38884
38885
38886
38887
38888
38889
38890
38891
38892
38893
38894
38895
38896
38897
38898
38899
38900
38901
38902
38903
38904
38905
38906
38907
38908
38909
38910
38911
38912
38913
38914
38915
38916
38917
38918
38919
38920
38921
38922
38923
38924
38925
38926
38927
38928
38929
38930
38931
38932
38933
38934
38935
38936
38937
38938
38939
38940
38941
38942
38943
38944
38945
38946
38947
38948
38949
38950
38951
38952
38953
38954
38955
38956
38957
38958
38959
38960
38961
38962
38963
38964
38965
38966
38967
38968
38969
38970
38971
38972
38973
38974
38975
38976
38977
38978
38979
38980
38981
38982
38983
38984
38985
38986
38987
38988
38989
38990
38991
38992
38993
38994
38995
38996
38997
38998
38999
39000
39001
39002
39003
39004
39005
39006
39007
39008
39009
39010
39011
39012
39013
39014
39015
39016
39017
39018
39019
39020
39021
39022
39023
39024
39025
39026
39027
39028
39029
39030
39031
39032
39033
39034
39035
39036
39037
39038
39039
39040
39041
39042
39043
39044
39045
39046
39047
39048
39049
39050
39051
39052
39053
39054
39055
39056
39057
39058
39059
39060
39061
39062
39063
39064
39065
39066
39067
39068
39069
39070
39071
39072
39073
39074
39075
39076
39077
39078
39079
39080
39081
39082
39083
39084
39085
39086
39087
39088
39089
39090
39091
39092
39093
39094
39095
39096
39097
39098
39099
39100
39101
39102
39103
39104
39105
39106
39107
39108
39109
39110
39111
39112
39113
39114
39115
39116
39117
39118
39119
39120
39121
39122
39123
39124
39125
39126
39127
39128
39129
39130
39131
39132
39133
39134
39135
39136
39137
39138
39139
39140
39141
39142
39143
39144
39145
39146
39147
39148
39149
39150
39151
39152
39153
39154
39155
39156
39157
39158
39159
39160
39161
39162
39163
39164
39165
39166
39167
39168
39169
39170
39171
39172
39173
39174
39175
39176
39177
39178
39179
39180
39181
39182
39183
39184
39185
39186
39187
39188
39189
39190
39191
39192
39193
39194
39195
39196
39197
39198
39199
39200
39201
39202
39203
39204
39205
39206
39207
39208
39209
39210
39211
39212
39213
39214
39215
39216
39217
39218
39219
39220
39221
39222
39223
39224
39225
39226
39227
39228
39229
39230
39231
39232
39233
39234
39235
39236
39237
39238
39239
39240
39241
39242
39243
39244
39245
39246
39247
39248
39249
39250
39251
39252
39253
39254
39255
39256
39257
39258
39259
39260
39261
39262
39263
39264
39265
39266
39267
39268
39269
39270
39271
39272
39273
39274
39275
39276
39277
39278
39279
39280
39281
39282
39283
39284
39285
39286
39287
39288
39289
39290
39291
39292
39293
39294
39295
39296
39297
39298
39299
39300
39301
39302
39303
39304
39305
39306
39307
39308
39309
39310
39311
39312
39313
39314
39315
39316
39317
39318
39319
39320
39321
39322
39323
39324
39325
39326
39327
39328
39329
39330
39331
39332
39333
39334
39335
39336
39337
39338
39339
39340
39341
39342
39343
39344
39345
39346
39347
39348
39349
39350
39351
39352
39353
39354
39355
39356
39357
39358
39359
39360
39361
39362
39363
39364
39365
39366
39367
39368
39369
39370
39371
39372
39373
39374
39375
39376
39377
39378
39379
39380
39381
39382
39383
39384
39385
39386
39387
39388
39389
39390
39391
39392
39393
39394
39395
39396
39397
39398
39399
39400
39401
39402
39403
39404
39405
39406
39407
39408
39409
39410
39411
39412
39413
39414
39415
39416
39417
39418
39419
39420
39421
39422
39423
39424
39425
39426
39427
39428
39429
39430
39431
39432
39433
39434
39435
39436
39437
39438
39439
39440
39441
39442
39443
39444
39445
39446
39447
39448
39449
39450
39451
39452
39453
39454
39455
39456
39457
39458
39459
39460
39461
39462
39463
39464
39465
39466
39467
39468
39469
39470
39471
39472
39473
39474
39475
39476
39477
39478
39479
39480
39481
39482
39483
39484
39485
39486
39487
39488
39489
39490
39491
39492
39493
39494
39495
39496
39497
39498
39499
39500
39501
39502
39503
39504
39505
39506
39507
39508
39509
39510
39511
39512
39513
39514
39515
39516
39517
39518
39519
39520
39521
39522
39523
39524
39525
39526
39527
39528
39529
39530
39531
39532
39533
39534
39535
39536
39537
39538
39539
39540
39541
39542
39543
39544
39545
39546
39547
39548
39549
39550
39551
39552
39553
39554
39555
39556
39557
39558
39559
39560
39561
39562
39563
39564
39565
39566
39567
39568
39569
39570
39571
39572
39573
39574
39575
39576
39577
39578
39579
39580
39581
39582
39583
39584
39585
39586
39587
39588
39589
39590
39591
39592
39593
39594
39595
39596
39597
39598
39599
39600
39601
39602
39603
39604
39605
39606
39607
39608
39609
39610
39611
39612
39613
39614
39615
39616
39617
39618
39619
39620
39621
39622
39623
39624
39625
39626
39627
39628
39629
39630
39631
39632
39633
39634
39635
39636
39637
39638
39639
39640
39641
39642
39643
39644
39645
39646
39647
39648
39649
39650
39651
39652
39653
39654
39655
39656
39657
39658
39659
39660
39661
39662
39663
39664
39665
39666
39667
39668
39669
39670
39671
39672
39673
39674
39675
39676
39677
39678
39679
39680
39681
39682
39683
39684
39685
39686
39687
39688
39689
39690
39691
39692
39693
39694
39695
39696
39697
39698
39699
39700
39701
39702
39703
39704
39705
39706
39707
39708
39709
39710
39711
39712
39713
39714
39715
39716
39717
39718
39719
39720
39721
39722
39723
39724
39725
39726
39727
39728
39729
39730
39731
39732
39733
39734
39735
39736
39737
39738
39739
39740
39741
39742
39743
39744
39745
39746
39747
39748
39749
39750
39751
39752
39753
39754
39755
39756
39757
39758
39759
39760
39761
39762
39763
39764
39765
39766
39767
39768
39769
39770
39771
39772
39773
39774
39775
39776
39777
39778
39779
39780
39781
39782
39783
39784
39785
39786
39787
39788
39789
39790
39791
39792
39793
39794
39795
39796
39797
39798
39799
39800
39801
39802
39803
39804
39805
39806
39807
39808
39809
39810
39811
39812
39813
39814
39815
39816
39817
39818
39819
39820
39821
39822
39823
39824
39825
39826
39827
39828
39829
39830
39831
39832
39833
39834
39835
39836
39837
39838
39839
39840
39841
39842
39843
39844
39845
39846
39847
39848
39849
39850
39851
39852
39853
39854
39855
39856
39857
39858
39859
39860
39861
39862
39863
39864
39865
39866
39867
39868
39869
39870
39871
39872
39873
39874
39875
39876
39877
39878
39879
39880
39881
39882
39883
39884
39885
39886
39887
39888
39889
39890
39891
39892
39893
39894
39895
39896
39897
39898
39899
39900
39901
39902
39903
39904
39905
39906
39907
39908
39909
39910
39911
39912
39913
39914
39915
39916
39917
39918
39919
39920
39921
39922
39923
39924
39925
39926
39927
39928
39929
39930
39931
39932
39933
39934
39935
39936
39937
39938
39939
39940
39941
39942
39943
39944
39945
39946
39947
39948
39949
39950
39951
39952
39953
39954
39955
39956
39957
39958
39959
39960
39961
39962
39963
39964
39965
39966
39967
39968
39969
39970
39971
39972
39973
39974
39975
39976
39977
39978
39979
39980
39981
39982
39983
39984
39985
39986
39987
39988
39989
39990
39991
39992
39993
39994
39995
39996
39997
39998
39999
40000
40001
40002
40003
40004
40005
40006
40007
40008
40009
40010
40011
40012
40013
40014
40015
40016
40017
40018
40019
40020
40021
40022
40023
40024
40025
40026
40027
40028
40029
40030
40031
40032
40033
40034
40035
40036
40037
40038
40039
40040
40041
40042
40043
40044
40045
40046
40047
40048
40049
40050
40051
40052
40053
40054
40055
40056
40057
40058
40059
40060
40061
40062
40063
40064
40065
40066
40067
40068
40069
40070
40071
40072
40073
40074
40075
40076
40077
40078
40079
40080
40081
40082
40083
40084
40085
40086
40087
40088
40089
40090
40091
40092
40093
40094
40095
40096
40097
40098
40099
40100
40101
40102
40103
40104
40105
40106
40107
40108
40109
40110
40111
40112
40113
40114
40115
40116
40117
40118
40119
40120
40121
40122
40123
40124
40125
40126
40127
40128
40129
40130
40131
40132
40133
40134
40135
40136
40137
40138
40139
40140
40141
40142
40143
40144
40145
40146
40147
40148
40149
40150
40151
40152
40153
40154
40155
40156
40157
40158
40159
40160
40161
40162
40163
40164
40165
40166
40167
40168
40169
40170
40171
40172
40173
40174
40175
40176
40177
40178
40179
40180
40181
40182
40183
40184
40185
40186
40187
40188
40189
40190
40191
40192
40193
40194
40195
40196
40197
40198
40199
40200
40201
40202
40203
40204
40205
40206
40207
40208
40209
40210
40211
40212
40213
40214
40215
40216
40217
40218
40219
40220
40221
40222
40223
40224
40225
40226
40227
40228
40229
40230
40231
40232
40233
40234
40235
40236
40237
40238
40239
40240
40241
40242
40243
40244
40245
40246
40247
40248
40249
40250
40251
40252
40253
40254
40255
40256
40257
40258
40259
40260
40261
40262
40263
40264
40265
40266
40267
40268
40269
40270
40271
40272
40273
40274
40275
40276
40277
40278
40279
40280
40281
40282
40283
40284
40285
40286
40287
40288
40289
40290
40291
40292
40293
40294
40295
40296
40297
40298
40299
40300
40301
40302
40303
40304
40305
40306
40307
40308
40309
40310
40311
40312
40313
40314
40315
40316
40317
40318
40319
40320
40321
40322
40323
40324
40325
40326
40327
40328
40329
40330
40331
40332
40333
40334
40335
40336
40337
40338
40339
40340
40341
40342
40343
40344
40345
40346
40347
40348
40349
40350
40351
40352
40353
40354
40355
40356
40357
40358
40359
40360
40361
40362
40363
40364
40365
40366
40367
40368
40369
40370
40371
40372
40373
40374
40375
40376
40377
40378
40379
40380
40381
40382
40383
40384
40385
40386
40387
40388
40389
40390
40391
40392
40393
40394
40395
40396
40397
40398
40399
40400
40401
40402
40403
40404
40405
40406
40407
40408
40409
40410
40411
40412
40413
40414
40415
40416
40417
40418
40419
40420
40421
40422
40423
40424
40425
40426
40427
40428
40429
40430
40431
40432
40433
40434
40435
40436
40437
40438
40439
40440
40441
40442
40443
40444
40445
40446
40447
40448
40449
40450
40451
40452
40453
40454
40455
40456
40457
40458
40459
40460
40461
40462
40463
40464
40465
40466
40467
40468
40469
40470
40471
40472
40473
40474
40475
40476
40477
40478
40479
40480
40481
40482
40483
40484
40485
40486
40487
40488
40489
40490
40491
40492
40493
40494
40495
40496
40497
40498
40499
40500
40501
40502
40503
40504
40505
40506
40507
40508
40509
40510
40511
40512
40513
40514
40515
40516
40517
40518
40519
40520
40521
40522
40523
40524
40525
40526
40527
40528
40529
40530
40531
40532
40533
40534
40535
40536
40537
40538
40539
40540
40541
40542
40543
40544
40545
40546
40547
40548
40549
40550
40551
40552
40553
40554
40555
40556
40557
40558
40559
40560
40561
40562
40563
40564
40565
40566
40567
40568
40569
40570
40571
40572
40573
40574
40575
40576
40577
40578
40579
40580
40581
40582
40583
40584
40585
40586
40587
40588
40589
40590
40591
40592
40593
40594
40595
40596
40597
40598
40599
40600
40601
40602
40603
40604
40605
40606
40607
40608
40609
40610
40611
40612
40613
40614
40615
40616
40617
40618
40619
40620
40621
40622
40623
40624
40625
40626
40627
40628
40629
40630
40631
40632
40633
40634
40635
40636
40637
40638
40639
40640
40641
40642
40643
40644
40645
40646
40647
40648
40649
40650
40651
40652
40653
40654
40655
40656
40657
40658
40659
40660
40661
40662
40663
40664
40665
40666
40667
40668
40669
40670
40671
40672
40673
40674
40675
40676
40677
40678
40679
40680
40681
40682
40683
40684
40685
40686
40687
40688
40689
40690
40691
40692
40693
40694
40695
40696
40697
40698
40699
40700
40701
40702
40703
40704
40705
40706
40707
40708
40709
40710
40711
40712
40713
40714
40715
40716
40717
40718
40719
40720
40721
40722
40723
40724
40725
40726
40727
40728
40729
40730
40731
40732
40733
40734
40735
40736
40737
40738
40739
40740
40741
40742
40743
40744
40745
40746
40747
40748
40749
40750
40751
40752
40753
40754
40755
40756
40757
40758
40759
40760
40761
40762
40763
40764
40765
40766
40767
40768
40769
40770
40771
40772
40773
40774
40775
40776
40777
40778
40779
40780
40781
40782
40783
40784
40785
40786
40787
40788
40789
40790
40791
40792
40793
40794
40795
40796
40797
40798
40799
40800
40801
40802
40803
40804
40805
40806
40807
40808
40809
40810
40811
40812
40813
40814
40815
40816
40817
40818
40819
40820
40821
40822
40823
40824
40825
40826
40827
40828
40829
40830
40831
40832
40833
40834
40835
40836
40837
40838
40839
40840
40841
40842
40843
40844
40845
40846
40847
40848
40849
40850
40851
40852
40853
40854
40855
40856
40857
40858
40859
40860
40861
40862
40863
40864
40865
40866
40867
40868
40869
40870
40871
40872
40873
40874
40875
40876
40877
40878
40879
40880
40881
40882
40883
40884
40885
40886
40887
40888
40889
40890
40891
40892
40893
40894
40895
40896
40897
40898
40899
40900
40901
40902
40903
40904
40905
40906
40907
40908
40909
40910
40911
40912
40913
40914
40915
40916
40917
40918
40919
40920
40921
40922
40923
40924
40925
40926
40927
40928
40929
40930
40931
40932
40933
40934
40935
40936
40937
40938
40939
40940
40941
40942
40943
40944
40945
40946
40947
40948
40949
40950
40951
40952
40953
40954
40955
40956
40957
40958
40959
40960
40961
40962
40963
40964
40965
40966
40967
40968
40969
40970
40971
40972
40973
40974
40975
40976
40977
40978
40979
40980
40981
40982
40983
40984
40985
40986
40987
40988
40989
40990
40991
40992
40993
40994
40995
40996
40997
40998
40999
41000
41001
41002
41003
41004
41005
41006
41007
41008
41009
41010
41011
41012
41013
41014
41015
41016
41017
41018
41019
41020
41021
41022
41023
41024
41025
41026
41027
41028
41029
41030
41031
41032
41033
41034
41035
41036
41037
41038
41039
41040
41041
41042
41043
41044
41045
41046
41047
41048
41049
41050
41051
41052
41053
41054
41055
41056
41057
41058
41059
41060
41061
41062
41063
41064
41065
41066
41067
41068
41069
41070
41071
41072
41073
41074
41075
41076
41077
41078
41079
41080
41081
41082
41083
41084
41085
41086
41087
41088
41089
41090
41091
41092
41093
41094
41095
41096
41097
41098
41099
41100
41101
41102
41103
41104
41105
41106
41107
41108
41109
41110
41111
41112
41113
41114
41115
41116
41117
41118
41119
41120
41121
41122
41123
41124
41125
41126
41127
41128
41129
41130
41131
41132
41133
41134
41135
41136
41137
41138
41139
41140
41141
41142
41143
41144
41145
41146
41147
41148
41149
41150
41151
41152
41153
41154
41155
41156
41157
41158
41159
41160
41161
41162
41163
41164
41165
41166
41167
41168
41169
41170
41171
41172
41173
41174
41175
41176
41177
41178
41179
41180
41181
41182
41183
41184
41185
41186
41187
41188
41189
41190
41191
41192
41193
41194
41195
41196
41197
41198
41199
41200
41201
41202
41203
41204
41205
41206
41207
41208
41209
41210
41211
41212
41213
41214
41215
41216
41217
41218
41219
41220
41221
41222
41223
41224
41225
41226
41227
41228
41229
41230
41231
41232
41233
41234
41235
41236
41237
41238
41239
41240
41241
41242
41243
41244
41245
41246
41247
41248
41249
41250
41251
41252
41253
41254
41255
41256
41257
41258
41259
41260
41261
41262
41263
41264
41265
41266
41267
41268
41269
41270
41271
41272
41273
41274
41275
41276
41277
41278
41279
41280
41281
41282
41283
41284
41285
41286
41287
41288
41289
41290
41291
41292
41293
41294
41295
41296
41297
41298
41299
41300
41301
41302
41303
41304
41305
41306
41307
41308
41309
41310
41311
41312
41313
41314
41315
41316
41317
41318
41319
41320
41321
41322
41323
41324
41325
41326
41327
41328
41329
41330
41331
41332
41333
41334
41335
41336
41337
41338
41339
41340
41341
41342
41343
41344
41345
41346
41347
41348
41349
41350
41351
41352
41353
41354
41355
41356
41357
41358
41359
41360
41361
41362
41363
41364
41365
41366
41367
41368
41369
41370
41371
41372
41373
41374
41375
41376
41377
41378
41379
41380
41381
41382
41383
41384
41385
41386
41387
41388
41389
41390
41391
41392
41393
41394
41395
41396
41397
41398
41399
41400
41401
41402
41403
41404
41405
41406
41407
41408
41409
41410
41411
41412
41413
41414
41415
41416
41417
41418
41419
41420
41421
41422
41423
41424
41425
41426
41427
41428
41429
41430
41431
41432
41433
41434
41435
41436
41437
41438
41439
41440
41441
41442
41443
41444
41445
41446
41447
41448
41449
41450
41451
41452
41453
41454
41455
41456
41457
41458
41459
41460
41461
41462
41463
41464
41465
41466
41467
41468
41469
41470
41471
41472
41473
41474
41475
41476
41477
41478
41479
41480
41481
41482
41483
41484
41485
41486
41487
41488
41489
41490
41491
41492
41493
41494
41495
41496
41497
41498
41499
41500
41501
41502
41503
41504
41505
41506
41507
41508
41509
41510
41511
41512
41513
41514
41515
41516
41517
41518
41519
41520
41521
41522
41523
41524
41525
41526
41527
41528
41529
41530
41531
41532
41533
41534
41535
41536
41537
41538
41539
41540
41541
41542
41543
41544
41545
41546
41547
41548
41549
41550
41551
41552
41553
41554
41555
41556
41557
41558
41559
41560
41561
41562
41563
41564
41565
41566
41567
41568
41569
41570
41571
41572
41573
41574
41575
41576
41577
41578
41579
41580
41581
41582
41583
41584
41585
41586
41587
41588
41589
41590
41591
41592
41593
41594
41595
41596
41597
41598
41599
41600
41601
41602
41603
41604
41605
41606
41607
41608
41609
41610
41611
41612
41613
41614
41615
41616
41617
41618
41619
41620
41621
41622
41623
41624
41625
41626
41627
41628
41629
41630
41631
41632
41633
41634
41635
41636
41637
41638
41639
41640
41641
41642
41643
41644
41645
41646
41647
41648
41649
41650
41651
41652
41653
41654
41655
41656
41657
41658
41659
41660
41661
41662
41663
41664
41665
41666
41667
41668
41669
41670
41671
41672
41673
41674
41675
41676
41677
41678
41679
41680
41681
41682
41683
41684
41685
41686
41687
41688
41689
41690
41691
41692
41693
41694
41695
41696
41697
41698
41699
41700
41701
41702
41703
41704
41705
41706
41707
41708
41709
41710
41711
41712
41713
41714
41715
41716
41717
41718
41719
41720
41721
41722
41723
41724
41725
41726
41727
41728
41729
41730
41731
41732
41733
41734
41735
41736
41737
41738
41739
41740
41741
41742
41743
41744
41745
41746
41747
41748
41749
41750
41751
41752
41753
41754
41755
41756
41757
41758
41759
41760
41761
41762
41763
41764
41765
41766
41767
41768
41769
41770
41771
41772
41773
41774
41775
41776
41777
41778
41779
41780
41781
41782
41783
41784
41785
41786
41787
41788
41789
41790
41791
41792
41793
41794
41795
41796
41797
41798
41799
41800
41801
41802
41803
41804
41805
41806
41807
41808
41809
41810
41811
41812
41813
41814
41815
41816
41817
41818
41819
41820
41821
41822
41823
41824
41825
41826
41827
41828
41829
41830
41831
41832
41833
41834
41835
41836
41837
41838
41839
41840
41841
41842
41843
41844
41845
41846
41847
41848
41849
41850
41851
41852
41853
41854
41855
41856
41857
41858
41859
41860
41861
41862
41863
41864
41865
41866
41867
41868
41869
41870
41871
41872
41873
41874
41875
41876
41877
41878
41879
41880
41881
41882
41883
41884
41885
41886
41887
41888
41889
41890
41891
41892
41893
41894
41895
41896
41897
41898
41899
41900
41901
41902
41903
41904
41905
41906
41907
41908
41909
41910
41911
41912
41913
41914
41915
41916
41917
41918
41919
41920
41921
41922
41923
41924
41925
41926
41927
41928
41929
41930
41931
41932
41933
41934
41935
41936
41937
41938
41939
41940
41941
41942
41943
41944
41945
41946
41947
41948
41949
41950
41951
41952
41953
41954
41955
41956
41957
41958
41959
41960
41961
41962
41963
41964
41965
41966
41967
41968
41969
41970
41971
41972
41973
41974
41975
41976
41977
41978
41979
41980
41981
41982
41983
41984
41985
41986
41987
41988
41989
41990
41991
41992
41993
41994
41995
41996
41997
41998
41999
42000
42001
42002
42003
42004
42005
42006
42007
42008
42009
42010
42011
42012
42013
42014
42015
42016
42017
42018
42019
42020
42021
42022
42023
42024
42025
42026
42027
42028
42029
42030
42031
42032
42033
42034
42035
42036
42037
42038
42039
42040
42041
42042
42043
42044
42045
42046
42047
42048
42049
42050
42051
42052
42053
42054
42055
42056
42057
42058
42059
42060
42061
42062
42063
42064
42065
42066
42067
42068
42069
42070
42071
42072
42073
42074
42075
42076
42077
42078
42079
42080
42081
42082
42083
42084
42085
42086
42087
42088
42089
42090
42091
42092
42093
42094
42095
42096
42097
42098
42099
42100
42101
42102
42103
42104
42105
42106
42107
42108
42109
42110
42111
42112
42113
42114
42115
42116
42117
42118
42119
42120
42121
42122
42123
42124
42125
42126
42127
42128
42129
42130
42131
42132
42133
42134
42135
42136
42137
42138
42139
42140
42141
42142
42143
42144
42145
42146
42147
42148
42149
42150
42151
42152
42153
42154
42155
42156
42157
42158
42159
42160
42161
42162
42163
42164
42165
42166
42167
42168
42169
42170
42171
42172
42173
42174
42175
42176
42177
42178
42179
42180
42181
42182
42183
42184
42185
42186
42187
42188
42189
42190
42191
42192
42193
42194
42195
42196
42197
42198
42199
42200
42201
42202
42203
42204
42205
42206
42207
42208
42209
42210
42211
42212
42213
42214
42215
42216
42217
42218
42219
42220
42221
42222
42223
42224
42225
42226
42227
42228
42229
42230
42231
42232
42233
42234
42235
42236
42237
42238
42239
42240
42241
42242
42243
42244
42245
42246
42247
42248
42249
42250
42251
42252
42253
42254
42255
42256
42257
42258
42259
42260
42261
42262
42263
42264
42265
42266
42267
42268
42269
42270
42271
42272
42273
42274
42275
42276
42277
42278
42279
42280
42281
42282
42283
42284
42285
42286
42287
42288
42289
42290
42291
42292
42293
42294
42295
42296
42297
42298
42299
42300
42301
42302
42303
42304
42305
42306
42307
42308
42309
42310
42311
42312
42313
42314
42315
42316
42317
42318
42319
42320
42321
42322
42323
42324
42325
42326
42327
42328
42329
42330
42331
42332
42333
42334
42335
42336
42337
42338
42339
42340
42341
42342
42343
42344
42345
42346
42347
42348
42349
42350
42351
42352
42353
42354
42355
42356
42357
42358
42359
42360
42361
42362
42363
42364
42365
42366
42367
42368
42369
42370
42371
42372
42373
42374
42375
42376
42377
42378
42379
42380
42381
42382
42383
42384
42385
42386
42387
42388
42389
42390
42391
42392
42393
42394
42395
42396
42397
42398
42399
42400
42401
42402
42403
42404
42405
42406
42407
42408
42409
42410
42411
42412
42413
42414
42415
42416
42417
42418
42419
42420
42421
42422
42423
42424
42425
42426
42427
42428
42429
42430
42431
42432
42433
42434
42435
42436
42437
42438
42439
42440
42441
42442
42443
42444
42445
42446
42447
42448
42449
42450
42451
42452
42453
42454
42455
42456
42457
42458
42459
42460
42461
42462
42463
42464
42465
42466
42467
42468
42469
42470
42471
42472
42473
42474
42475
42476
42477
42478
42479
42480
42481
42482
42483
42484
42485
42486
42487
42488
42489
42490
42491
42492
42493
42494
42495
42496
42497
42498
42499
42500
42501
42502
42503
42504
42505
42506
42507
42508
42509
42510
42511
42512
42513
42514
42515
42516
42517
42518
42519
42520
42521
42522
42523
42524
42525
42526
42527
42528
42529
42530
42531
42532
42533
42534
42535
42536
42537
42538
42539
42540
42541
42542
42543
42544
42545
42546
42547
42548
42549
42550
42551
42552
42553
42554
42555
42556
42557
42558
42559
42560
42561
42562
42563
42564
42565
42566
42567
42568
42569
42570
42571
42572
42573
42574
42575
42576
42577
42578
42579
42580
42581
42582
42583
42584
42585
42586
42587
42588
42589
42590
42591
42592
42593
42594
42595
42596
42597
42598
42599
42600
42601
42602
42603
42604
42605
42606
42607
42608
42609
42610
42611
42612
42613
42614
42615
42616
42617
42618
42619
42620
42621
42622
42623
42624
42625
42626
42627
42628
42629
42630
42631
42632
42633
42634
42635
42636
42637
42638
42639
42640
42641
42642
42643
42644
42645
42646
42647
42648
42649
42650
42651
42652
42653
42654
42655
42656
42657
42658
42659
42660
42661
42662
42663
42664
42665
42666
42667
42668
42669
42670
42671
42672
42673
42674
42675
42676
42677
42678
42679
42680
42681
42682
42683
42684
42685
42686
42687
42688
42689
42690
42691
42692
42693
42694
42695
42696
42697
42698
42699
42700
42701
42702
42703
42704
42705
42706
42707
42708
42709
42710
42711
42712
42713
42714
42715
42716
42717
42718
42719
42720
42721
42722
42723
42724
42725
42726
42727
42728
42729
42730
42731
42732
42733
42734
42735
42736
42737
42738
42739
42740
42741
42742
42743
42744
42745
42746
42747
42748
42749
42750
42751
42752
42753
42754
42755
42756
42757
42758
42759
42760
42761
42762
42763
42764
42765
42766
42767
42768
42769
42770
42771
42772
42773
42774
42775
42776
42777
42778
42779
42780
42781
42782
42783
42784
42785
42786
42787
42788
42789
42790
42791
42792
42793
42794
42795
42796
42797
42798
42799
42800
42801
42802
42803
42804
42805
42806
42807
42808
42809
42810
42811
42812
42813
42814
42815
42816
42817
42818
42819
42820
42821
42822
42823
42824
42825
42826
42827
42828
42829
42830
42831
42832
42833
42834
42835
42836
42837
42838
42839
42840
42841
42842
42843
42844
42845
42846
42847
42848
42849
42850
42851
42852
42853
42854
42855
42856
42857
42858
42859
42860
42861
42862
42863
42864
42865
42866
42867
42868
42869
42870
42871
42872
-- $Id: general.sql,v 1.31 2007-03-01 02:45:54 briano Exp $
-- ==========================================
-- Chado general module
--
-- ================================================
-- TABLE: tableinfo
-- ================================================

create table tableinfo (
    tableinfo_id bigserial not null,
    primary key (tableinfo_id),
    name varchar(30) not null,
    primary_key_column varchar(30) null,
    is_view int not null default 0,
    view_on_table_id bigint null,
    superclass_table_id bigint null,
    is_updateable int not null default 1,
    modification_date date not null default now(),
    constraint tableinfo_c1 unique (name)
);

COMMENT ON TABLE tableinfo IS NULL;

-- ================================================
-- TABLE: db
-- ================================================

create table db (
    db_id bigserial not null,
    primary key (db_id),
    name varchar(255) not null,
--    contact_id bigint,
--    foreign key (contact_id) references contact (contact_id) on delete cascade INITIALLY DEFERRED,
    description varchar(255) null,
    urlprefix varchar(255) null,
    url varchar(255) null,
    constraint db_c1 unique (name)
);

COMMENT ON TABLE db IS 'A database authority. Typical databases in
bioinformatics are FlyBase, GO, UniProt, NCBI, MGI, etc. The authority
is generally known by this shortened form, which is unique within the
bioinformatics and biomedical realm.  To Do - add support for URIs,
URNs (e.g. LSIDs). We can do this by treating the URL as a URI -
however, some applications may expect this to be resolvable - to be
decided.';

-- ================================================
-- TABLE: dbxref
-- ================================================

create table dbxref (
    dbxref_id bigserial not null,
    primary key (dbxref_id),
    db_id bigint not null,
    foreign key (db_id) references db (db_id) on delete cascade INITIALLY DEFERRED,
    accession varchar(1024) not null,
    version varchar(255) not null default '',
    description text,
    constraint dbxref_c1 unique (db_id,accession,version)
);
create index dbxref_idx1 on dbxref (db_id);
create index dbxref_idx2 on dbxref (accession);
create index dbxref_idx3 on dbxref (version);

COMMENT ON TABLE dbxref IS 'A unique, global, public, stable identifier. Not necessarily an external reference - can reference data items inside the particular chado instance being used. Typically a row in a table can be uniquely identified with a primary identifier (called dbxref_id); a table may also have secondary identifiers (in a linking table <T>_dbxref). A dbxref is generally written as <DB>:<ACCESSION> or as <DB>:<ACCESSION>:<VERSION>.';

COMMENT ON COLUMN dbxref.accession IS 'The local part of the identifier. Guaranteed by the db authority to be unique for that db.';

CREATE VIEW db_dbxref_count AS
  SELECT db.name,count(*) AS num_dbxrefs FROM db INNER JOIN dbxref USING (db_id) GROUP BY db.name;
COMMENT ON VIEW db_dbxref_count IS 'per-db dbxref counts';

CREATE OR REPLACE FUNCTION store_db (VARCHAR) 
  RETURNS BIGINT AS 
'DECLARE
   v_name             ALIAS FOR $1;

   v_db_id            BIGINT;
 BEGIN
    SELECT INTO v_db_id db_id
      FROM db
      WHERE name=v_name;
    IF NOT FOUND THEN
      INSERT INTO db
       (name)
         VALUES
       (v_name);
       RETURN currval(''db_db_id_seq'');
    END IF;
    RETURN v_db_id;
 END;
' LANGUAGE 'plpgsql';
  
CREATE OR REPLACE FUNCTION store_dbxref (VARCHAR,VARCHAR) 
  RETURNS BIGINT AS 
'DECLARE
   v_dbname                ALIAS FOR $1;
   v_accession             ALIAS FOR $2;

   v_db_id                 BIGINT;
   v_dbxref_id             BIGINT;
 BEGIN
    SELECT INTO v_db_id
      store_db(v_dbname);
    SELECT INTO v_dbxref_id dbxref_id
      FROM dbxref
      WHERE db_id=v_db_id       AND
            accession=v_accession;
    IF NOT FOUND THEN
      INSERT INTO dbxref
       (db_id,accession)
         VALUES
       (v_db_id,v_accession);
       RETURN currval(''dbxref_dbxref_id_seq'');
    END IF;
    RETURN v_dbxref_id;
 END;
' LANGUAGE 'plpgsql';
  
-- $Id: cv.sql,v 1.37 2007-02-28 15:08:48 briano Exp $
-- ==========================================
-- Chado cv module
--
-- =================================================================
-- Dependencies:
--
-- :import dbxref from db
-- =================================================================

-- ================================================
-- TABLE: cv
-- ================================================
create table cv (
    cv_id bigserial not null,
    primary key (cv_id),
    name varchar(255) not null,
   definition text,
   constraint cv_c1 unique (name)
);

COMMENT ON TABLE cv IS 'A controlled vocabulary or ontology. A cv is
composed of cvterms (AKA terms, classes, types, universals - relations
and properties are also stored in cvterm) and the relationships
between them.';

COMMENT ON COLUMN cv.name IS 'The name of the ontology. This
corresponds to the obo-format -namespace-. cv names uniquely identify
the cv. In OBO file format, the cv.name is known as the namespace.';

COMMENT ON COLUMN cv.definition IS 'A text description of the criteria for
membership of this ontology.';

-- ================================================
-- TABLE: cvterm
-- ================================================
create table cvterm (
    cvterm_id bigserial not null,
    primary key (cvterm_id),
    cv_id bigint not null,
    foreign key (cv_id) references cv (cv_id) on delete cascade INITIALLY DEFERRED,
    name varchar(1024) not null,
    definition text,
    dbxref_id bigint not null,
    foreign key (dbxref_id) references dbxref (dbxref_id) on delete set null INITIALLY DEFERRED,
    is_obsolete int not null default 0,
    is_relationshiptype int not null default 0,
    constraint cvterm_c1 unique (name,cv_id,is_obsolete),
    constraint cvterm_c2 unique (dbxref_id)
);
create index cvterm_idx1 on cvterm (cv_id);
create index cvterm_idx2 on cvterm (name);
create index cvterm_idx3 on cvterm (dbxref_id);

COMMENT ON TABLE cvterm IS 'A term, class, universal or type within an
ontology or controlled vocabulary.  This table is also used for
relations and properties. cvterms constitute nodes in the graph
defined by the collection of cvterms and cvterm_relationships.';

COMMENT ON COLUMN cvterm.cv_id IS 'The cv or ontology or namespace to which
this cvterm belongs.';

COMMENT ON COLUMN cvterm.name IS 'A concise human-readable name or
label for the cvterm. Uniquely identifies a cvterm within a cv.';

COMMENT ON COLUMN cvterm.definition IS 'A human-readable text
definition.';

COMMENT ON COLUMN cvterm.dbxref_id IS 'Primary identifier dbxref - The
unique global OBO identifier for this cvterm.  Note that a cvterm may
have multiple secondary dbxrefs - see also table: cvterm_dbxref.';

COMMENT ON COLUMN cvterm.is_obsolete IS 'Boolean 0=false,1=true; see
GO documentation for details of obsoletion. Note that two terms with
different primary dbxrefs may exist if one is obsolete.';

COMMENT ON COLUMN cvterm.is_relationshiptype IS 'Boolean
0=false,1=true relations or relationship types (also known as Typedefs
in OBO format, or as properties or slots) form a cv/ontology in
themselves. We use this flag to indicate whether this cvterm is an
actual term/class/universal or a relation. Relations may be drawn from
the OBO Relations ontology, but are not exclusively drawn from there.';

COMMENT ON INDEX cvterm_c1 IS 'A name can mean different things in
different contexts; for example "chromosome" in SO and GO. A name
should be unique within an ontology or cv. A name may exist twice in a
cv, in both obsolete and non-obsolete forms - these will be for
different cvterms with different OBO identifiers; so GO documentation
for more details on obsoletion. Note that occasionally multiple
obsolete terms with the same name will exist in the same cv. If this
is a possibility for the ontology under consideration (e.g. GO) then the
ID should be appended to the name to ensure uniqueness.';

COMMENT ON INDEX cvterm_c2 IS 'The OBO identifier is globally unique.';

-- ================================================
-- TABLE: cvterm_relationship
-- ================================================
create table cvterm_relationship (
    cvterm_relationship_id bigserial not null,
    primary key (cvterm_relationship_id),
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    subject_id bigint not null,
    foreign key (subject_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    object_id bigint not null,
    foreign key (object_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    constraint cvterm_relationship_c1 unique (subject_id,object_id,type_id)
);
create index cvterm_relationship_idx1 on cvterm_relationship (type_id);
create index cvterm_relationship_idx2 on cvterm_relationship (subject_id);
create index cvterm_relationship_idx3 on cvterm_relationship (object_id);

COMMENT ON TABLE cvterm_relationship IS 'A relationship linking two
cvterms. Each cvterm_relationship constitutes an edge in the graph
defined by the collection of cvterms and cvterm_relationships. The
meaning of the cvterm_relationship depends on the definition of the
cvterm R refered to by type_id. However, in general the definitions
are such that the statement "all SUBJs REL some OBJ" is true. The
cvterm_relationship statement is about the subject, not the
object. For example "insect wing part_of thorax".';

COMMENT ON COLUMN cvterm_relationship.subject_id IS 'The subject of
the subj-predicate-obj sentence. The cvterm_relationship is about the
subject. In a graph, this typically corresponds to the child node.';

COMMENT ON COLUMN cvterm_relationship.object_id IS 'The object of the
subj-predicate-obj sentence. The cvterm_relationship refers to the
object. In a graph, this typically corresponds to the parent node.';

COMMENT ON COLUMN cvterm_relationship.type_id IS 'The nature of the
relationship between subject and object. Note that relations are also
housed in the cvterm table, typically from the OBO relationship
ontology, although other relationship types are allowed.';

-- ================================================
-- TABLE: cvtermpath
-- ================================================
create table cvtermpath (
    cvtermpath_id bigserial not null,
    primary key (cvtermpath_id),
    type_id bigint,
    foreign key (type_id) references cvterm (cvterm_id) on delete set null INITIALLY DEFERRED,
    subject_id bigint not null,
    foreign key (subject_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    object_id bigint not null,
    foreign key (object_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    cv_id bigint not null,
    foreign key (cv_id) references cv (cv_id) on delete cascade INITIALLY DEFERRED,
    pathdistance int,
    constraint cvtermpath_c1 unique (subject_id,object_id,type_id,pathdistance)
);
create index cvtermpath_idx1 on cvtermpath (type_id);
create index cvtermpath_idx2 on cvtermpath (subject_id);
create index cvtermpath_idx3 on cvtermpath (object_id);
create index cvtermpath_idx4 on cvtermpath (cv_id);

COMMENT ON TABLE cvtermpath IS 'The reflexive transitive closure of
the cvterm_relationship relation.';

COMMENT ON COLUMN cvtermpath.type_id IS 'The relationship type that
this is a closure over. If null, then this is a closure over ALL
relationship types. If non-null, then this references a relationship
cvterm - note that the closure will apply to both this relationship
AND the OBO_REL:is_a (subclass) relationship.';

COMMENT ON COLUMN cvtermpath.cv_id IS 'Closures will mostly be within
one cv. If the closure of a relationship traverses a cv, then this
refers to the cv of the object_id cvterm.';

COMMENT ON COLUMN cvtermpath.pathdistance IS 'The number of steps
required to get from the subject cvterm to the object cvterm, counting
from zero (reflexive relationship).';

-- ================================================
-- TABLE: cvtermsynonym
-- ================================================
create table cvtermsynonym (
    cvtermsynonym_id bigserial not null,
    primary key (cvtermsynonym_id),
    cvterm_id bigint not null,
    foreign key (cvterm_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    synonym varchar(1024) not null,
    type_id bigint,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade  INITIALLY DEFERRED,
    constraint cvtermsynonym_c1 unique (cvterm_id,synonym)
);
create index cvtermsynonym_idx1 on cvtermsynonym (cvterm_id);

COMMENT ON TABLE cvtermsynonym IS 'A cvterm actually represents a
distinct class or concept. A concept can be refered to by different
phrases or names. In addition to the primary name (cvterm.name) there
can be a number of alternative aliases or synonyms. For example, "T
cell" as a synonym for "T lymphocyte".';

COMMENT ON COLUMN cvtermsynonym.type_id IS 'A synonym can be exact,
narrower, or broader than.';


-- ================================================
-- TABLE: cvterm_dbxref
-- ================================================
create table cvterm_dbxref (
    cvterm_dbxref_id bigserial not null,
    primary key (cvterm_dbxref_id),
    cvterm_id bigint not null,
    foreign key (cvterm_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    dbxref_id bigint not null,
    foreign key (dbxref_id) references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED,
    is_for_definition int not null default 0,
    constraint cvterm_dbxref_c1 unique (cvterm_id,dbxref_id)
);
create index cvterm_dbxref_idx1 on cvterm_dbxref (cvterm_id);
create index cvterm_dbxref_idx2 on cvterm_dbxref (dbxref_id);

COMMENT ON TABLE cvterm_dbxref IS 'In addition to the primary
identifier (cvterm.dbxref_id) a cvterm can have zero or more secondary
identifiers/dbxrefs, which may refer to records in external
databases. The exact semantics of cvterm_dbxref are not fixed. For
example: the dbxref could be a pubmed ID that is pertinent to the
cvterm, or it could be an equivalent or similar term in another
ontology. For example, GO cvterms are typically linked to InterPro
IDs, even though the nature of the relationship between them is
largely one of statistical association. The dbxref may be have data
records attached in the same database instance, or it could be a
"hanging" dbxref pointing to some external database. NOTE: If the
desired objective is to link two cvterms together, and the nature of
the relation is known and holds for all instances of the subject
cvterm then consider instead using cvterm_relationship together with a
well-defined relation.';

COMMENT ON COLUMN cvterm_dbxref.is_for_definition IS 'A
cvterm.definition should be supported by one or more references. If
this column is true, the dbxref is not for a term in an external database -
it is a dbxref for provenance information for the definition.';


-- ================================================
-- TABLE: cvtermprop
-- ================================================
create table cvtermprop ( 
    cvtermprop_id bigserial not null, 
    primary key (cvtermprop_id), 
    cvterm_id bigint not null, 
    foreign key (cvterm_id) references cvterm (cvterm_id) on delete cascade, 
    type_id bigint not null, 
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade, 
    value text not null default '', 
    rank int not null default 0,

    unique(cvterm_id, type_id, value, rank) 
);
create index cvtermprop_idx1 on cvtermprop (cvterm_id);
create index cvtermprop_idx2 on cvtermprop (type_id);

COMMENT ON TABLE cvtermprop IS 'Additional extensible properties can be attached to a cvterm using this table. Corresponds to -AnnotationProperty- in W3C OWL format.';

COMMENT ON COLUMN cvtermprop.type_id IS 'The name of the property or slot is a cvterm. The meaning of the property is defined in that cvterm.';

COMMENT ON COLUMN cvtermprop.value IS 'The value of the property, represented as text. Numeric values are converted to their text representation.';

COMMENT ON COLUMN cvtermprop.rank IS 'Property-Value ordering. Any
cvterm can have multiple values for any particular property type -
these are ordered in a list using rank, counting from zero. For
properties that are single-valued rather than multi-valued, the
default 0 value should be used.';


-- ================================================
-- TABLE: dbxrefprop
-- ================================================
create table dbxrefprop (
    dbxrefprop_id bigserial not null,
    primary key (dbxrefprop_id),
    dbxref_id bigint not null,
    foreign key (dbxref_id) references dbxref (dbxref_id) INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) INITIALLY DEFERRED,
    value text not null default '',
    rank int not null default 0,
    constraint dbxrefprop_c1 unique (dbxref_id,type_id,rank)
);
create index dbxrefprop_idx1 on dbxrefprop (dbxref_id);
create index dbxrefprop_idx2 on dbxrefprop (type_id);

COMMENT ON TABLE dbxrefprop IS 'Metadata about a dbxref. Note that this is not defined in the dbxref module, as it depends on the cvterm table. This table has a structure analagous to cvtermprop.';


-- ================================================
-- TABLE: cvprop
-- ================================================
create table cvprop (
    cvprop_id bigserial not null,
    primary key (cvprop_id),
    cv_id bigint not null,
    foreign key (cv_id) references cv (cv_id) INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) INITIALLY DEFERRED,
    value text,
    rank int not null default 0,
    constraint cvprop_c1 unique (cv_id,type_id,rank)
);

COMMENT ON TABLE cvprop IS 'Additional extensible properties can be attached to a cv using this table.  A notable example would be the cv version';

COMMENT ON COLUMN cvprop.type_id IS 'The name of the property or slot is a cvterm. The meaning of the property is defined in that cvterm.';
COMMENT ON COLUMN cvprop.value IS 'The value of the property, represented as text. Numeric values are converted to their text representation.';

COMMENT ON COLUMN cvprop.rank IS 'Property-Value ordering. Any
cv can have multiple values for any particular property type -
these are ordered in a list using rank, counting from zero. For
properties that are single-valued rather than multi-valued, the
default 0 value should be used.';

-- ================================================
-- TABLE: chadoprop
-- ================================================
create table chadoprop (
    chadoprop_id bigserial not null,
    primary key (chadoprop_id),
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) INITIALLY DEFERRED,
    value text,
    rank int not null default 0,
    constraint chadoprop_c1 unique (type_id,rank)
);

COMMENT ON TABLE chadoprop IS 'This table is different from other prop tables in the database, as it is for storing information about the database itself, like schema version';

COMMENT ON COLUMN chadoprop.type_id IS 'The name of the property or slot is a cvterm. The meaning of the property is defined in that cvterm.';
COMMENT ON COLUMN chadoprop.value IS 'The value of the property, represented as text. Numeric values are converted to their text representation.';

COMMENT ON COLUMN chadoprop.rank IS 'Property-Value ordering. Any
cv can have multiple values for any particular property type -
these are ordered in a list using rank, counting from zero. For
properties that are single-valued rather than multi-valued, the
default 0 value should be used.';


-- ================================================
-- TABLE: dbprop
-- ================================================

create table dbprop (
  dbprop_id bigserial not null,
  primary key (dbprop_id),
  db_id bigint not null,
  type_id bigint not null,
  value text null,
  rank int not null default 0,
  foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
  foreign key (db_id) references db (db_id) on delete cascade INITIALLY DEFERRED,
  constraint dbprop_c1 unique (db_id,type_id,rank)
);
create index dbprop_idx1 on dbprop (db_id);
create index dbprop_idx2 on dbprop (type_id);

COMMENT ON TABLE dbprop IS 'An external database can have any number of
slot-value property tags attached to it. This is an alternative to
hardcoding a list of columns in the relational schema, and is
completely extensible. There is a unique constraint, dbprop_c1, for
the combination of db_id, rank, and type_id. Multivalued property-value pairs must be differentiated by rank.';

CREATE OR REPLACE VIEW cv_root AS
 SELECT 
  cv_id,
  cvterm_id AS root_cvterm_id
 FROM cvterm
 WHERE 
  cvterm_id NOT IN ( SELECT subject_id FROM cvterm_relationship)    AND
  is_obsolete=0;

COMMENT ON VIEW cv_root IS 'the roots of a cv are the set of terms
which have no parents (terms that are not the subject of a
relation). Most cvs will have a single root, some may have >1. All
will have at least 1';

CREATE OR REPLACE VIEW cv_leaf AS
 SELECT 
  cv_id,
  cvterm_id
 FROM cvterm
 WHERE 
  cvterm_id NOT IN ( SELECT object_id FROM cvterm_relationship);

COMMENT ON VIEW cv_leaf IS 'the leaves of a cv are the set of terms
which have no children (terms that are not the object of a
relation). All cvs will have at least 1 leaf';

CREATE OR REPLACE VIEW common_ancestor_cvterm AS
 SELECT
  p1.subject_id          AS cvterm1_id,
  p2.subject_id          AS cvterm2_id,
  p1.object_id           AS ancestor_cvterm_id,
  p1.pathdistance        AS pathdistance1,
  p2.pathdistance        AS pathdistance2,
  p1.pathdistance + p2.pathdistance
                         AS total_pathdistance
 FROM
  cvtermpath AS p1,
  cvtermpath AS p2
 WHERE 
  p1.object_id = p2.object_id;

COMMENT ON VIEW common_ancestor_cvterm IS 'The common ancestor of any
two terms is the intersection of both terms ancestors. Two terms can
have multiple common ancestors. Use total_pathdistance to get the
least common ancestor';

CREATE OR REPLACE VIEW common_descendant_cvterm AS
 SELECT
  p1.object_id           AS cvterm1_id,
  p2.object_id           AS cvterm2_id,
  p1.subject_id          AS ancestor_cvterm_id,
  p1.pathdistance        AS pathdistance1,
  p2.pathdistance        AS pathdistance2,
  p1.pathdistance + p2.pathdistance
                         AS total_pathdistance
 FROM
  cvtermpath AS p1,
  cvtermpath AS p2
 WHERE 
  p1.subject_id = p2.subject_id;

COMMENT ON VIEW common_descendant_cvterm IS 'The common descendant of
any two terms is the intersection of both terms descendants. Two terms
can have multiple common descendants. Use total_pathdistance to get
the least common ancestor';

CREATE OR REPLACE VIEW stats_paths_to_root AS
 SELECT 
  subject_id                            AS cvterm_id, 
  count(DISTINCT cvtermpath_id)         AS total_paths,
  avg(pathdistance)                     AS avg_distance,
  min(pathdistance)                     AS min_distance,
  max(pathdistance)                     AS max_distance
 FROM cvtermpath INNER JOIN cv_root ON (object_id=root_cvterm_id)
 GROUP BY cvterm_id;

COMMENT ON VIEW stats_paths_to_root IS 'per-cvterm statistics on its
placement in the DAG relative to the root. There may be multiple paths
from any term to the root. This gives the total number of paths, and
the average minimum and maximum distances. Here distance is defined by
cvtermpath.pathdistance';
CREATE VIEW cv_cvterm_count AS
  SELECT cv.name,count(*) AS num_terms_excl_obs FROM cv INNER JOIN cvterm USING (cv_id) WHERE is_obsolete=0 GROUP BY cv.name;
COMMENT ON VIEW cv_cvterm_count IS 'per-cv terms counts (excludes obsoletes)';

CREATE VIEW cv_cvterm_count_with_obs AS
  SELECT cv.name,count(*) AS num_terms_incl_obs FROM cv INNER JOIN cvterm USING (cv_id) GROUP BY cv.name;
COMMENT ON VIEW cv_cvterm_count_with_obs IS 'per-cv terms counts (includes obsoletes)';

CREATE VIEW cv_link_count AS
 SELECT cv.name AS cv_name,
        relation.name AS relation_name,
        relation_cv.name AS relation_cv_name,
        count(*) AS num_links
 FROM cv 
  INNER JOIN cvterm ON (cvterm.cv_id=cv.cv_id) 
  INNER JOIN cvterm_relationship ON (cvterm.cvterm_id=subject_id)
  INNER JOIN cvterm AS relation ON (type_id=relation.cvterm_id)
  INNER JOIN cv AS relation_cv ON (relation.cv_id=relation_cv.cv_id) 
 GROUP BY cv.name,relation.name,relation_cv.name;

COMMENT ON VIEW cv_link_count IS 'per-cv summary of number of
links (cvterm_relationships) broken down by
relationship_type. num_links is the total # of links of the specified
type in which the subject_id of the link is in the named cv';

CREATE VIEW cv_path_count AS
 SELECT cv.name AS cv_name,
        relation.name AS relation_name,
        relation_cv.name AS relation_cv_name,
        count(*) AS num_paths
 FROM cv 
  INNER JOIN cvterm ON (cvterm.cv_id=cv.cv_id) 
  INNER JOIN cvtermpath ON (cvterm.cvterm_id=subject_id)
  INNER JOIN cvterm AS relation ON (type_id=relation.cvterm_id)
  INNER JOIN cv AS relation_cv ON (relation.cv_id=relation_cv.cv_id) 
 GROUP BY cv.name,relation.name,relation_cv.name;

COMMENT ON VIEW cv_path_count IS 'per-cv summary of number of
paths (cvtermpaths) broken down by relationship_type. num_paths is the
total # of paths of the specified type in which the subject_id of the
path is in the named cv. See also: cv_distinct_relations';

CREATE OR REPLACE FUNCTION _get_all_subject_ids(bigint) RETURNS SETOF cvtermpath AS
'
DECLARE
    root alias for $1;
    cterm cvtermpath%ROWTYPE;
    cterm2 cvtermpath%ROWTYPE;
BEGIN

    FOR cterm IN SELECT * FROM cvterm_relationship WHERE object_id = root LOOP
        RETURN NEXT cterm;
        FOR cterm2 IN SELECT * FROM _get_all_subject_ids(cterm.subject_id) LOOP
            RETURN NEXT cterm2;
        END LOOP;
    END LOOP;
    RETURN;
END;   
'
LANGUAGE 'plpgsql';

---arg: parent term id
---return: all children term id and their parent term id with relationship type id
CREATE OR REPLACE FUNCTION get_all_subject_ids(bigint) RETURNS SETOF cvtermpath AS
'
DECLARE
    root alias for $1;
    cterm cvtermpath%ROWTYPE;
    exist_c int;
BEGIN

    SELECT INTO exist_c count(*) FROM cvtermpath WHERE object_id = root and pathdistance <= 0;
    IF (exist_c > 0) THEN
        FOR cterm IN SELECT * FROM cvtermpath WHERE object_id = root and pathdistance > 0 LOOP
            RETURN NEXT cterm;
        END LOOP;
    ELSE
        FOR cterm IN SELECT * FROM _get_all_subject_ids(root) LOOP
            RETURN NEXT cterm;
        END LOOP;
    END IF;
    RETURN;
END;   
'
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION get_graph_below(bigint) RETURNS SETOF cvtermpath AS
'
DECLARE
    root alias for $1;
    cterm cvtermpath%ROWTYPE;
    cterm2 cvtermpath%ROWTYPE;

BEGIN

    FOR cterm IN SELECT * FROM cvterm_relationship WHERE object_id = root LOOP
        RETURN NEXT cterm;
        FOR cterm2 IN SELECT * FROM get_all_subject_ids(cterm.subject_id) LOOP
            RETURN NEXT cterm2;
        END LOOP;
    END LOOP;
    RETURN;
END;   
'
LANGUAGE 'plpgsql';


CREATE OR REPLACE FUNCTION get_graph_above(bigint) RETURNS SETOF cvtermpath AS
'
DECLARE
    leaf alias for $1;
    cterm cvtermpath%ROWTYPE;
    cterm2 cvtermpath%ROWTYPE;

BEGIN

    FOR cterm IN SELECT * FROM cvterm_relationship WHERE subject_id = leaf LOOP
        RETURN NEXT cterm;
        FOR cterm2 IN SELECT * FROM get_all_object_ids(cterm.object_id) LOOP
            RETURN NEXT cterm2;
        END LOOP;
    END LOOP;
    RETURN;
END;   
'
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION _get_all_object_ids(bigint) RETURNS SETOF cvtermpath AS
'
DECLARE
    leaf alias for $1;
    cterm cvtermpath%ROWTYPE;
    cterm2 cvtermpath%ROWTYPE;
BEGIN

    FOR cterm IN SELECT * FROM cvterm_relationship WHERE subject_id = leaf LOOP
        RETURN NEXT cterm;
        FOR cterm2 IN SELECT * FROM _get_all_object_ids(cterm.object_id) LOOP
            RETURN NEXT cterm2;
        END LOOP;
    END LOOP;
    RETURN;
END;   
'
LANGUAGE 'plpgsql';

---arg: child term id
---return: all parent term id and their childrent term id with relationship type id
CREATE OR REPLACE FUNCTION get_all_object_ids(bigint) RETURNS SETOF cvtermpath AS
'
DECLARE
    leaf alias for $1;
    cterm cvtermpath%ROWTYPE;
    exist_c int;
BEGIN


    SELECT INTO exist_c count(*) FROM cvtermpath WHERE object_id = leaf and pathdistance <= 0;
    IF (exist_c > 0) THEN
        FOR cterm IN SELECT * FROM cvtermpath WHERE subject_id = leaf AND pathdistance > 0 LOOP
            RETURN NEXT cterm;
        END LOOP;
    ELSE
        FOR cterm IN SELECT * FROM _get_all_object_ids(leaf) LOOP
            RETURN NEXT cterm;
        END LOOP;
    END IF;
    RETURN;
END;   
'
LANGUAGE 'plpgsql';

---arg: sql statement which must be in the form of select cvterm_id from ...
---return: a set of cvterm ids that includes what is in sql statement and their children (subject ids)
CREATE OR REPLACE FUNCTION get_it_sub_cvterm_ids(text) RETURNS SETOF cvterm AS
'
DECLARE
    query alias for $1;
    cterm cvterm%ROWTYPE;
    cterm2 cvterm%ROWTYPE;
BEGIN
    FOR cterm IN EXECUTE query LOOP
        RETURN NEXT cterm;
        FOR cterm2 IN SELECT subject_id as cvterm_id FROM get_all_subject_ids(cterm.cvterm_id) LOOP
            RETURN NEXT cterm2;
        END LOOP;
    END LOOP;
    RETURN;
END;   
'
LANGUAGE 'plpgsql';
--- example: select * from fill_cvtermpath(7); where 7 is cv_id for an ontology
--- fill path from the node to its children and their children
CREATE OR REPLACE FUNCTION _fill_cvtermpath4node(BIGINT, BIGINT, BIGINT, BIGINT, INTEGER) RETURNS INTEGER AS
'
DECLARE
    origin alias for $1;
    child_id alias for $2;
    cvid alias for $3;
    typeid alias for $4;
    depth alias for $5;
    cterm cvterm_relationship%ROWTYPE;
    exist_c int;

BEGIN

    --- RAISE NOTICE ''depth=% root=%'', depth,child_id;
    --- not check type_id as it may be null and not very meaningful in cvtermpath when pathdistance > 1
    SELECT INTO exist_c count(*) FROM cvtermpath WHERE cv_id = cvid AND object_id = origin AND subject_id = child_id AND pathdistance = depth;

    IF (exist_c = 0) THEN
        INSERT INTO cvtermpath (object_id, subject_id, cv_id, type_id, pathdistance) VALUES(origin, child_id, cvid, typeid, depth);
    END IF;
    FOR cterm IN SELECT * FROM cvterm_relationship WHERE object_id = child_id LOOP
        PERFORM _fill_cvtermpath4node(origin, cterm.subject_id, cvid, cterm.type_id, depth+1);
    END LOOP;
    RETURN 1;
END;
'
LANGUAGE 'plpgsql';


CREATE OR REPLACE FUNCTION _fill_cvtermpath4root(BIGINT, BIGINT) RETURNS INTEGER AS
'
DECLARE
    rootid alias for $1;
    cvid alias for $2;
    ttype bigint;
    cterm cvterm_relationship%ROWTYPE;
    child cvterm_relationship%ROWTYPE;

BEGIN

    SELECT INTO ttype cvterm_id FROM cvterm WHERE (name = ''isa'' OR name = ''is_a'');
    PERFORM _fill_cvtermpath4node(rootid, rootid, cvid, ttype, 0);
    FOR cterm IN SELECT * FROM cvterm_relationship WHERE object_id = rootid LOOP
        PERFORM _fill_cvtermpath4root(cterm.subject_id, cvid);
        -- RAISE NOTICE ''DONE for term, %'', cterm.subject_id;
    END LOOP;
    RETURN 1;
END;
'
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION fill_cvtermpath(BIGINT) RETURNS INTEGER AS
'
DECLARE
    cvid alias for $1;
    root cvterm%ROWTYPE;

BEGIN

    DELETE FROM cvtermpath WHERE cv_id = cvid;

    FOR root IN SELECT DISTINCT t.* from cvterm t LEFT JOIN cvterm_relationship r ON (t.cvterm_id = r.subject_id) INNER JOIN cvterm_relationship r2 ON (t.cvterm_id = r2.object_id) WHERE t.cv_id = cvid AND r.subject_id is null LOOP
        PERFORM _fill_cvtermpath4root(root.cvterm_id, root.cv_id);
    END LOOP;
    RETURN 1;
END;   
'
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION fill_cvtermpath(cv.name%TYPE) RETURNS INTEGER AS
'
DECLARE
    cvname alias for $1;
    cv_id   bigint;
    rtn     int;
BEGIN

    SELECT INTO cv_id cv.cv_id from cv WHERE cv.name = cvname;
    SELECT INTO rtn fill_cvtermpath(cv_id);
    RETURN rtn;
END;   
'
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION _fill_cvtermpath4node2detect_cycle(BIGINT, BIGINT, BIGINT, BIGINT, INTEGER) RETURNS BIGINT AS
'
DECLARE
    origin alias for $1;
    child_id alias for $2;
    cvid alias for $3;
    typeid alias for $4;
    depth alias for $5;
    cterm cvterm_relationship%ROWTYPE;
    exist_c int;
    ccount  int;
    ecount  int;
    rtn     bigint;
BEGIN

    EXECUTE ''SELECT * FROM tmpcvtermpath p1, tmpcvtermpath p2 WHERE p1.subject_id=p2.object_id AND p1.object_id=p2.subject_id AND p1.object_id = ''|| origin || '' AND p2.subject_id = '' || child_id || ''AND '' || depth || ''> 0'';
    GET DIAGNOSTICS ccount = ROW_COUNT;
    IF (ccount > 0) THEN
        --RAISE EXCEPTION ''FOUND CYCLE: node % on cycle path'',origin;
        RETURN origin;
    END IF;

    EXECUTE ''SELECT * FROM tmpcvtermpath WHERE cv_id = '' || cvid || '' AND object_id = '' || origin || '' AND subject_id = '' || child_id || '' AND '' || origin || ''<>'' || child_id;
    GET DIAGNOSTICS ecount = ROW_COUNT;
    IF (ecount > 0) THEN
        --RAISE NOTICE ''FOUND TWICE (node), will check root obj % subj %'',origin, child_id;
        SELECT INTO rtn _fill_cvtermpath4root2detect_cycle(child_id, cvid);
        IF (rtn > 0) THEN
            RETURN rtn;
        END IF;
    END IF;

    EXECUTE ''SELECT * FROM tmpcvtermpath WHERE cv_id = '' || cvid || '' AND object_id = '' || origin || '' AND subject_id = '' || child_id || '' AND pathdistance = '' || depth;
    GET DIAGNOSTICS exist_c = ROW_COUNT;
    IF (exist_c = 0) THEN
        EXECUTE ''INSERT INTO tmpcvtermpath (object_id, subject_id, cv_id, type_id, pathdistance) VALUES('' || origin || '', '' || child_id || '', '' || cvid || '', '' || typeid || '', '' || depth || '')'';
    END IF;

    FOR cterm IN SELECT * FROM cvterm_relationship WHERE object_id = child_id LOOP
        --RAISE NOTICE ''DOING for node, % %'', origin, cterm.subject_id;
        SELECT INTO rtn _fill_cvtermpath4node2detect_cycle(origin, cterm.subject_id, cvid, cterm.type_id, depth+1);
        IF (rtn > 0) THEN
            RETURN rtn;
        END IF;
    END LOOP;
    RETURN 0;
END;
'
LANGUAGE 'plpgsql';


CREATE OR REPLACE FUNCTION _fill_cvtermpath4root2detect_cycle(BIGINT, BIGINT) RETURNS BIGINT AS
'
DECLARE
    rootid alias for $1;
    cvid alias for $2;
    ttype bigint;
    ccount int;
    cterm cvterm_relationship%ROWTYPE;
    child cvterm_relationship%ROWTYPE;
    rtn     bigint;
BEGIN

    SELECT INTO ttype cvterm_id FROM cvterm WHERE (name = ''isa'' OR name = ''is_a'');
    SELECT INTO rtn _fill_cvtermpath4node2detect_cycle(rootid, rootid, cvid, ttype, 0);
    IF (rtn > 0) THEN
        RETURN rtn;
    END IF;
    FOR cterm IN SELECT * FROM cvterm_relationship WHERE object_id = rootid LOOP
        EXECUTE ''SELECT * FROM tmpcvtermpath p1, tmpcvtermpath p2 WHERE p1.subject_id=p2.object_id AND p1.object_id=p2.subject_id AND p1.object_id='' || rootid || '' AND p1.subject_id='' || cterm.subject_id;
        GET DIAGNOSTICS ccount = ROW_COUNT;
        IF (ccount > 0) THEN
            --RAISE NOTICE ''FOUND TWICE (root), will check root obj % subj %'',rootid,cterm.subject_id;
            SELECT INTO rtn _fill_cvtermpath4node2detect_cycle(rootid, cterm.subject_id, cvid, ttype, 0);
            IF (rtn > 0) THEN
                RETURN rtn;
            END IF;
        ELSE
            SELECT INTO rtn _fill_cvtermpath4root2detect_cycle(cterm.subject_id, cvid);
            IF (rtn > 0) THEN
                RETURN rtn;
            END IF;
        END IF;
    END LOOP;
    RETURN 0;
END;
'
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION get_cycle_cvterm_id(BIGINT, BIGINT) RETURNS BIGINT AS
'
DECLARE
    cvid alias for $1;
    rootid alias for $2;
    rtn     bigint;
BEGIN

    CREATE TEMP TABLE tmpcvtermpath(object_id bigint, subject_id bigint, cv_id bigint, type_id bigint, pathdistance int);
    CREATE INDEX tmp_cvtpath1 ON tmpcvtermpath(object_id, subject_id);

    SELECT INTO rtn _fill_cvtermpath4root2detect_cycle(rootid, cvid);
    IF (rtn > 0) THEN
        DROP TABLE tmpcvtermpath;
        RETURN rtn;
    END IF;
    DROP TABLE tmpcvtermpath;
    RETURN 0;
END;   
'
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION get_cycle_cvterm_ids(BIGINT) RETURNS SETOF BIGINT AS
'
DECLARE
    cvid alias for $1;
    root cvterm%ROWTYPE;
    rtn     bigint;
BEGIN


    FOR root IN SELECT DISTINCT t.* from cvterm t WHERE cv_id = cvid LOOP
        SELECT INTO rtn get_cycle_cvterm_id(cvid,root.cvterm_id);
        IF (rtn > 0) THEN
            RETURN NEXT rtn;
        END IF;
    END LOOP;
    RETURN;
END;   
'
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION get_cycle_cvterm_id(BIGINT) RETURNS BIGINT AS
'
DECLARE
    cvid alias for $1;
    root cvterm%ROWTYPE;
    rtn     bigint;
BEGIN

    CREATE TEMP TABLE tmpcvtermpath(object_id bigint, subject_id bigint, cv_id bigint, type_id bigint, pathdistance int);
    CREATE INDEX tmp_cvtpath1 ON tmpcvtermpath(object_id, subject_id);

    FOR root IN SELECT DISTINCT t.* from cvterm t LEFT JOIN cvterm_relationship r ON (t.cvterm_id = r.subject_id) INNER JOIN cvterm_relationship r2 ON (t.cvterm_id = r2.object_id) WHERE t.cv_id = cvid AND r.subject_id is null LOOP
        SELECT INTO rtn _fill_cvtermpath4root2detect_cycle(root.cvterm_id, root.cv_id);
        IF (rtn > 0) THEN
            DROP TABLE tmpcvtermpath;
            RETURN rtn;
        END IF;
    END LOOP;
    DROP TABLE tmpcvtermpath;
    RETURN 0;
END;   
'
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION get_cycle_cvterm_id(cv.name%TYPE) RETURNS BIGINT AS
'
DECLARE
    cvname alias for $1;
    cv_id bigint;
    rtn bigint;
BEGIN

    SELECT INTO cv_id cv.cv_id from cv WHERE cv.name = cvname;
    SELECT INTO rtn  get_cycle_cvterm_id(cv_id);

    RETURN rtn;
END;   
'
LANGUAGE 'plpgsql';
-- $Id: contact.sql,v 1.5 2007-02-25 17:00:17 briano Exp $
-- ==========================================
-- Chado contact module
--
-- =================================================================
-- Dependencies:
--
-- :import cvterm from cv
-- =================================================================

-- ================================================
-- TABLE: contact
-- ================================================

CREATE TABLE contact (
    contact_id bigserial not null,
    primary key (contact_id),
    type_id bigint null,
    foreign key (type_id) references cvterm (cvterm_id),
    name varchar(255) not null,
    description varchar(255) null,
    constraint contact_c1 unique (name)
);

COMMENT ON TABLE contact IS 'Model persons, institutes, groups, organizations, etc.';
COMMENT ON COLUMN contact.type_id IS 'What type of contact is this?  E.g. "person", "lab".';

-- ================================================
-- TABLE: contactprop
-- ================================================
CREATE TABLE contactprop (
    contactprop_id bigserial primary key not null,
    contact_id bigint NOT NULL,
    type_id bigint NOT NULL,
    value text,
    rank integer DEFAULT 0 NOT NULL,
    CONSTRAINT contactprop_c1 UNIQUE (contact_id, type_id, rank),    
    FOREIGN KEY (contact_id) REFERENCES contact(contact_id) ON DELETE CASCADE,
    FOREIGN KEY (type_id) REFERENCES cvterm(cvterm_id) ON DELETE CASCADE
);

CREATE INDEX contactprop_idx1 ON contactprop USING btree (contact_id);
CREATE INDEX contactprop_idx2 ON contactprop USING btree (type_id);

COMMENT ON TABLE contactprop IS 'A contact can have any number of slot-value property 
tags attached to it. This is an alternative to hardcoding a list of columns in the 
relational schema, and is completely extensible.';


-- ================================================
-- TABLE: contact_relationship
-- ================================================

create table contact_relationship (
    contact_relationship_id bigserial not null,
    primary key (contact_relationship_id),
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    subject_id bigint not null,
    foreign key (subject_id) references contact (contact_id) on delete cascade INITIALLY DEFERRED,
    object_id bigint not null,
    foreign key (object_id) references contact (contact_id) on delete cascade INITIALLY DEFERRED,
    constraint contact_relationship_c1 unique (subject_id,object_id,type_id)
);
create index contact_relationship_idx1 on contact_relationship (type_id);
create index contact_relationship_idx2 on contact_relationship (subject_id);
create index contact_relationship_idx3 on contact_relationship (object_id);

COMMENT ON TABLE contact_relationship IS 'Model relationships between contacts';
COMMENT ON COLUMN contact_relationship.subject_id IS 'The subject of the subj-predicate-obj sentence. In a DAG, this corresponds to the child node.';
COMMENT ON COLUMN contact_relationship.object_id IS 'The object of the subj-predicate-obj sentence. In a DAG, this corresponds to the parent node.';
COMMENT ON COLUMN contact_relationship.type_id IS 'Relationship type between subject and object. This is a cvterm, typically from the OBO relationship ontology, although other relationship types are allowed.';
-- $Id: pub.sql,v 1.27 2007-02-19 20:50:44 briano Exp $
-- ==========================================
-- Chado pub module
--
-- =================================================================
-- Dependencies:
--
-- :import cvterm from cv
-- :import dbxref from db
-- :import analysis from companalysis
-- :import contact from contact
-- =================================================================

-- ================================================
-- TABLE: pub
-- ================================================

create table pub (
    pub_id bigserial not null,
    primary key (pub_id),
    title text,
    volumetitle text,
    volume varchar(255),
    series_name varchar(255),
    issue varchar(255),
    pyear varchar(255),
    pages varchar(255),
    miniref varchar(255),
    uniquename text not null,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    is_obsolete boolean default 'false',
    publisher varchar(255),
    pubplace varchar(255),
    constraint pub_c1 unique (uniquename)
);
CREATE INDEX pub_idx1 ON pub (type_id);

COMMENT ON TABLE pub IS 'A documented provenance artefact - publications,
documents, personal communication.';
COMMENT ON COLUMN pub.title IS 'Descriptive general heading.';
COMMENT ON COLUMN pub.volumetitle IS 'Title of part if one of a series.';
COMMENT ON COLUMN pub.series_name IS 'Full name of (journal) series.';
COMMENT ON COLUMN pub.pages IS 'Page number range[s], e.g. 457--459, viii + 664pp, lv--lvii.';
COMMENT ON COLUMN pub.type_id IS  'The type of the publication (book, journal, poem, graffiti, etc). Uses pub cv.';

-- ================================================
-- TABLE: pub_relationship
-- ================================================

create table pub_relationship (
    pub_relationship_id bigserial not null,
    primary key (pub_relationship_id),
    subject_id bigint not null,
    foreign key (subject_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
    object_id bigint not null,
    foreign key (object_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,

    constraint pub_relationship_c1 unique (subject_id,object_id,type_id)
);
create index pub_relationship_idx1 on pub_relationship (subject_id);
create index pub_relationship_idx2 on pub_relationship (object_id);
create index pub_relationship_idx3 on pub_relationship (type_id);

COMMENT ON TABLE pub_relationship IS 'Handle relationships between
publications, e.g. when one publication makes others obsolete, when one
publication contains errata with respect to other publication(s), or
when one publication also appears in another pub.';

-- ================================================
-- TABLE: pub_dbxref
-- ================================================

create table pub_dbxref (
    pub_dbxref_id bigserial not null,
    primary key (pub_dbxref_id),
    pub_id bigint not null,
    foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
    dbxref_id bigint not null,
    foreign key (dbxref_id) references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED,
    is_current boolean not null default 'true',
    constraint pub_dbxref_c1 unique (pub_id,dbxref_id)
);
create index pub_dbxref_idx1 on pub_dbxref (pub_id);
create index pub_dbxref_idx2 on pub_dbxref (dbxref_id);

COMMENT ON TABLE pub_dbxref IS 'Handle links to repositories,
e.g. Pubmed, Biosis, zoorec, OCLC, Medline, ISSN, coden...';


-- ================================================
-- TABLE: pubauthor
-- ================================================

create table pubauthor (
    pubauthor_id bigserial not null,
    primary key (pubauthor_id),
    pub_id bigint not null,
    foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
    rank int not null,
    editor boolean default 'false',
    surname varchar(100) not null,
    givennames varchar(100),
    suffix varchar(100),

    constraint pubauthor_c1 unique (pub_id, rank)
);
create index pubauthor_idx2 on pubauthor (pub_id);

COMMENT ON TABLE pubauthor IS 'An author for a publication. Note the denormalisation (hence lack of _ in table name) - this is deliberate as it is in general too hard to assign IDs to authors.';
COMMENT ON COLUMN pubauthor.givennames IS 'First name, initials';
COMMENT ON COLUMN pubauthor.suffix IS 'Jr., Sr., etc';
COMMENT ON COLUMN pubauthor.rank IS 'Order of author in author list for this pub - order is important.';
COMMENT ON COLUMN pubauthor.editor IS 'Indicates whether the author is an editor for linked publication. Note: this is a boolean field but does not follow the normal chado convention for naming booleans.';


-- ================================================
-- TABLE: pubprop
-- ================================================

create table pubprop (
    pubprop_id bigserial not null,
    primary key (pubprop_id),
    pub_id bigint not null,
    foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text not null,
    rank integer,

    constraint pubprop_c1 unique (pub_id,type_id,rank)
);
create index pubprop_idx1 on pubprop (pub_id);
create index pubprop_idx2 on pubprop (type_id);

COMMENT ON TABLE pubprop IS 'Property-value pairs for a pub. Follows standard chado pattern.';

-- ================================================
-- TABLE: pubauthor_contact
-- ================================================

CREATE TABLE pubauthor_contact (
    pubauthor_contact_id bigserial primary key NOT NULL,
    contact_id bigint NOT NULL,
    pubauthor_id bigint NOT NULL,
    CONSTRAINT pubauthor_contact_c1 UNIQUE (contact_id, pubauthor_id),
    FOREIGN KEY (pubauthor_id) REFERENCES pubauthor(pubauthor_id) ON DELETE CASCADE,
    FOREIGN KEY (contact_id) REFERENCES contact(contact_id) ON DELETE CASCADE
);

CREATE INDEX pubauthor_contact_idx1 ON pubauthor USING btree (pubauthor_id);
CREATE INDEX pubauthor_contact_idx2 ON contact USING btree (contact_id);

COMMENT ON TABLE pubauthor_contact IS 'An author on a publication may have a corresponding entry in the contact table and this table can link the two.';
-- $Id: organism.sql,v 1.19 2007/04/01 18:45:41 briano Exp $
-- ==========================================
-- Chado organism module
--
-- ============
-- DEPENDENCIES
-- ============
-- :import cvterm from cv
-- :import dbxref from db
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- ================================================
-- TABLE: organism
-- ================================================

create table organism (
	organism_id bigserial not null,
	primary key (organism_id),
	abbreviation varchar(255) null,
	genus varchar(255) not null,
	species varchar(255) not null,
	common_name varchar(255) null,
  infraspecific_name varchar(1024) null,
  type_id bigint default null,
  FOREIGN KEY (type_id) REFERENCES cvterm (cvterm_id) ON DELETE CASCADE,
	comment text null,
	constraint organism_c1 unique (genus,species,type_id,infraspecific_name)
);

COMMENT ON TABLE organism IS 'The organismal taxonomic
classification. Note that phylogenies are represented using the
phylogeny module, and taxonomies can be represented using the cvterm
module or the phylogeny module.';

COMMENT ON COLUMN organism.species IS 'A type of organism is always
uniquely identified by genus and species. When mapping from the NCBI
taxonomy names.dmp file, this column must be used where it
is present, as the common_name column is not always unique (e.g. environmental
samples). If a particular strain or subspecies is to be represented,
this is appended onto the species name. Follows standard NCBI taxonomy
pattern.';

COMMENT ON COLUMN organism.type_id IS 'A controlled vocabulary term that
specifies the organism rank below species. It is used when an infraspecific 
name is provided.  Ideally, the rank should be a valid ICN name such as 
subspecies, varietas, subvarietas, forma and subforma';

COMMENT ON COLUMN organism.infraspecific_name IS 'The scientific name for any taxon 
below the rank of species.  The rank should be specified using the type_id field
and the name is provided here.';


-- ================================================
-- TABLE: organism_dbxref
-- ================================================

create table organism_dbxref (
    organism_dbxref_id bigserial not null,
    primary key (organism_dbxref_id),
    organism_id bigint not null,
    foreign key (organism_id) references organism (organism_id) on delete cascade INITIALLY DEFERRED,
    dbxref_id bigint not null,
    foreign key (dbxref_id) references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED,
    constraint organism_dbxref_c1 unique (organism_id,dbxref_id)
);
create index organism_dbxref_idx1 on organism_dbxref (organism_id);
create index organism_dbxref_idx2 on organism_dbxref (dbxref_id);

COMMENT ON TABLE organism_dbxref IS 'Links an organism to a dbxref.';


-- ================================================
-- TABLE: organismprop
-- ================================================

create table organismprop (
    organismprop_id bigserial not null,
    primary key (organismprop_id),
    organism_id bigint not null,
    foreign key (organism_id) references organism (organism_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint organismprop_c1 unique (organism_id,type_id,rank)
);
create index organismprop_idx1 on organismprop (organism_id);
create index organismprop_idx2 on organismprop (type_id);

COMMENT ON TABLE organismprop IS 'Tag-value properties - follows standard chado model.';


-- ================================================
-- TABLE: organismprop_pub
-- ================================================

create table organismprop_pub (
    organismprop_pub_id bigserial not null,
    primary key (organismprop_pub_id),
    organismprop_id bigint not null,
    foreign key (organismprop_id) references organismprop (organismprop_id) on delete cascade INITIALLY DEFERRED,
    pub_id bigint not null,
    foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint organismprop_pub_c1 unique (organismprop_id,pub_id)
);
create index organismprop_pub_idx1 on organismprop_pub (organismprop_id);
create index organismprop_pub_idx2 on organismprop_pub (pub_id);

COMMENT ON TABLE organismprop_pub IS 'Attribution for organismprop.';


-- ================================================
-- TABLE: organism_pub
-- ================================================

create table organism_pub (
       organism_pub_id bigserial not null,
       primary key (organism_pub_id),
       organism_id bigint not null,
       foreign key (organism_id) references organism (organism_id) on delete cascade INITIALLY DEFERRED,
       pub_id bigint not null,
       foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
       constraint organism_pub_c1 unique (organism_id,pub_id)
);
create index organism_pub_idx1 on organism_pub (organism_id);
create index organism_pub_idx2 on organism_pub (pub_id);

COMMENT ON TABLE organism_pub IS 'Attribution for organism.';


-- ================================================
-- TABLE: organism_cvterm
-- ================================================

create table organism_cvterm (
       organism_cvterm_id bigserial not null,
       primary key (organism_cvterm_id),
       organism_id bigint not null,
       foreign key (organism_id) references organism (organism_id) on delete cascade INITIALLY
DEFERRED,
       cvterm_id bigint not null,
       foreign key (cvterm_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
       rank int not null default 0,
       pub_id bigint not null,
       foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
       constraint organism_cvterm_c1 unique(organism_id,cvterm_id,pub_id) 
);
create index organism_cvterm_idx1 on organism_cvterm (organism_id);
create index organism_cvterm_idx2 on organism_cvterm (cvterm_id);

COMMENT ON TABLE organism_cvterm IS 'organism to cvterm associations. Examples: taxonomic name';

COMMENT ON COLUMN organism_cvterm.rank IS 'Property-Value
ordering. Any organism_cvterm can have multiple values for any particular
property type - these are ordered in a list using rank, counting from
zero. For properties that are single-valued rather than multi-valued,
the default 0 value should be used';


-- ================================================
-- TABLE: organism_cvtermprop
-- ================================================

create table organism_cvtermprop (
    organism_cvtermprop_id bigserial not null,
    primary key (organism_cvtermprop_id),
    organism_cvterm_id bigint not null,
    foreign key (organism_cvterm_id) references organism_cvterm (organism_cvterm_id) on delete cascade,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint organism_cvtermprop_c1 unique (organism_cvterm_id,type_id,rank)
);
create index organism_cvtermprop_idx1 on organism_cvtermprop (organism_cvterm_id);
create index organism_cvtermprop_idx2 on organism_cvtermprop (type_id);

COMMENT ON TABLE organism_cvtermprop IS 'Extensible properties for
organism to cvterm associations. Examples: qualifiers';

COMMENT ON COLUMN organism_cvtermprop.type_id IS 'The name of the
property/slot is a cvterm. The meaning of the property is defined in
that cvterm. ';

COMMENT ON COLUMN organism_cvtermprop.value IS 'The value of the
property, represented as text. Numeric values are converted to their
text representation. This is less efficient than using native database
types, but is easier to query.';

COMMENT ON COLUMN organism_cvtermprop.rank IS 'Property-Value
ordering. Any organism_cvterm can have multiple values for any particular
property type - these are ordered in a list using rank, counting from
zero. For properties that are single-valued rather than multi-valued,
the default 0 value should be used';

-- ================================================
-- TABLE: organism_relationship
-- ================================================

CREATE TABLE organism_relationship (
    organism_relationship_id bigserial primary key NOT NULL,
    subject_id bigint NOT NULL,
    object_id bigint NOT NULL,
    type_id bigint NOT NULL,
    rank integer DEFAULT 0 NOT NULL,
    CONSTRAINT organism_relationship_c1 UNIQUE (subject_id, object_id, type_id, rank),
    FOREIGN KEY (object_id) REFERENCES organism(organism_id) ON DELETE CASCADE,
    FOREIGN KEY (subject_id) REFERENCES organism(organism_id) ON DELETE CASCADE,
    FOREIGN KEY (type_id) REFERENCES cvterm(cvterm_id) ON DELETE CASCADE    
);

CREATE INDEX organism_relationship_idx1 ON organism_relationship USING btree (subject_id);
CREATE INDEX organism_relationship_idx2 ON organism_relationship USING btree (object_id);
CREATE INDEX organism_relationship_idx3 ON organism_relationship USING btree (type_id);

COMMENT ON TABLE organism_relationship IS 'Specifies relationships between organisms 
that are not taxonomic. For example, in breeding, relationships such as 
"sterile_with", "incompatible_with", or "fertile_with" would be appropriate. Taxonomic
relatinoships should be housed in the phylogeny tables.';



CREATE OR REPLACE FUNCTION get_organism_id(VARCHAR,VARCHAR) RETURNS BIGINT
 AS '
  SELECT organism_id 
  FROM organism
  WHERE genus=$1
    AND species=$2
 ' LANGUAGE 'sql';

CREATE OR REPLACE FUNCTION get_organism_id(VARCHAR) RETURNS BIGINT
 AS ' 
SELECT organism_id
  FROM organism
  WHERE genus=substring($1,1,position('' '' IN $1)-1)
    AND species=substring($1,position('' '' IN $1)+1)
 ' LANGUAGE 'sql';

CREATE OR REPLACE FUNCTION get_organism_id_abbrev(VARCHAR) RETURNS BIGINT
 AS '
SELECT organism_id
  FROM organism
  WHERE substr(genus,1,1)=substring($1,1,1)
    AND species=substring($1,position('' '' IN $1)+1)
 ' LANGUAGE 'sql';

CREATE OR REPLACE FUNCTION store_organism (VARCHAR,VARCHAR,VARCHAR) 
  RETURNS BIGINT AS 
'DECLARE
   v_genus            ALIAS FOR $1;
   v_species          ALIAS FOR $2;
   v_common_name      ALIAS FOR $3;

   v_organism_id      BIGINT;
 BEGIN
    SELECT INTO v_organism_id organism_id
      FROM organism
      WHERE genus=v_genus               AND
            species=v_species;
    IF NOT FOUND THEN
      INSERT INTO organism
       (genus,species,common_name)
         VALUES
       (v_genus,v_species,v_common_name);
       RETURN currval(''organism_organism_id_seq'');
    ELSE
      UPDATE organism
       SET common_name=v_common_name
      WHERE organism_id = v_organism_id;
    END IF;
    RETURN v_organism_id;
 END;
' LANGUAGE 'plpgsql';
  
-- $Id: sequence.sql,v 1.69 2009-05-14 02:44:23 scottcain Exp $
-- ==========================================
-- Chado sequence module
--
-- =================================================================
-- Dependencies:
--
-- :import cvterm from cv
-- :import pub from pub
-- :import organism from organism
-- :import dbxref from db
-- :import contact from contact
-- =================================================================

-- ================================================
-- TABLE: feature
-- ================================================

create table feature (
    feature_id bigserial not null,
    primary key (feature_id),
    dbxref_id bigint,
    foreign key (dbxref_id) references dbxref (dbxref_id) on delete set null INITIALLY DEFERRED,
    organism_id bigint not null,
    foreign key (organism_id) references organism (organism_id) on delete cascade INITIALLY DEFERRED,
    name varchar(255),
    uniquename text not null,
    residues text,
    seqlen bigint,
    md5checksum char(32),
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    is_analysis boolean not null default 'false',
    is_obsolete boolean not null default 'false',
    timeaccessioned timestamp not null default current_timestamp,
    timelastmodified timestamp not null default current_timestamp,
    constraint feature_c1 unique (organism_id,uniquename,type_id)
);
create sequence feature_uniquename_seq;
create index feature_name_ind1 on feature(name);
create index feature_idx1 on feature (dbxref_id);
create index feature_idx2 on feature (organism_id);
create index feature_idx3 on feature (type_id);
create index feature_idx4 on feature (uniquename);
create index feature_idx5 on feature (lower(name));
create index feature_idx1b on feature (feature_id, dbxref_id) where dbxref_id is not null;

ALTER TABLE feature ALTER residues SET STORAGE EXTERNAL;

COMMENT ON TABLE feature IS 'A feature is a biological sequence or a
section of a biological sequence, or a collection of such
sections. Examples include genes, exons, transcripts, regulatory
regions, polypeptides, protein domains, chromosome sequences, sequence
variations, cross-genome match regions such as hits and HSPs and so
on; see the Sequence Ontology for more. The combination of
organism_id, uniquename and type_id should be unique.';

COMMENT ON COLUMN feature.dbxref_id IS 'An optional primary public stable
identifier for this feature. Secondary identifiers and external
dbxrefs go in the table feature_dbxref.';

COMMENT ON COLUMN feature.organism_id IS 'The organism to which this feature
belongs. This column is mandatory.';

COMMENT ON COLUMN feature.name IS 'The optional human-readable common name for
a feature, for display purposes.';

COMMENT ON COLUMN feature.uniquename IS 'The unique name for a feature; may
not be necessarily be particularly human-readable, although this is
preferred. This name must be unique for this type of feature within
this organism.';

COMMENT ON COLUMN feature.residues IS 'A sequence of alphabetic characters
representing biological residues (nucleic acids, amino acids). This
column does not need to be manifested for all features; it is optional
for features such as exons where the residues can be derived from the
featureloc. It is recommended that the value for this column be
manifested for features which may may non-contiguous sublocations (e.g.
transcripts), since derivation at query time is non-trivial. For
expressed sequence, the DNA sequence should be used rather than the
RNA sequence. The default storage method for the residues column is
EXTERNAL, which will store it uncompressed to make substring operations
faster.';

COMMENT ON COLUMN feature.seqlen IS 'The length of the residue feature. See
column:residues. This column is partially redundant with the residues
column, and also with featureloc. This column is required because the
location may be unknown and the residue sequence may not be
manifested, yet it may be desirable to store and query the length of
the feature. The seqlen should always be manifested where the length
of the sequence is known.';

COMMENT ON COLUMN feature.md5checksum IS 'The 32-character checksum of the sequence,
calculated using the MD5 algorithm. This is practically guaranteed to
be unique for any feature. This column thus acts as a unique
identifier on the mathematical sequence.';

COMMENT ON COLUMN feature.type_id IS 'A required reference to a table:cvterm
giving the feature type. This will typically be a Sequence Ontology
identifier. This column is thus used to subclass the feature table.';

COMMENT ON COLUMN feature.is_analysis IS 'Boolean indicating whether this
feature is annotated or the result of an automated analysis. Analysis
results also use the companalysis module. Note that the dividing line
between analysis and annotation may be fuzzy, this should be determined on
a per-project basis in a consistent manner. One requirement is that
there should only be one non-analysis version of each wild-type gene
feature in a genome, whereas the same gene feature can be predicted
multiple times in different analyses.';

COMMENT ON COLUMN feature.is_obsolete IS 'Boolean indicating whether this
feature has been obsoleted. Some chado instances may choose to simply
remove the feature altogether, others may choose to keep an obsolete
row in the table.';

COMMENT ON COLUMN feature.timeaccessioned IS 'For handling object
accession or modification timestamps (as opposed to database auditing data,
handled elsewhere). The expectation is that these fields would be
available to software interacting with chado.';

COMMENT ON COLUMN feature.timelastmodified IS 'For handling object
accession or modification timestamps (as opposed to database auditing data,
handled elsewhere). The expectation is that these fields would be
available to software interacting with chado.';

--- COMMENT ON INDEX feature_c1 IS 'Any feature can be globally identified
--- by the combination of organism, uniquename and feature type';

-- ================================================
-- TABLE: featureloc
-- ================================================

create table featureloc (
    featureloc_id bigserial not null,
    primary key (featureloc_id),
    feature_id bigint not null,
    foreign key (feature_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,
    srcfeature_id bigint,
    foreign key (srcfeature_id) references feature (feature_id) on delete set null INITIALLY DEFERRED,
    fmin bigint,
    is_fmin_partial boolean not null default 'false',
    fmax bigint,
    is_fmax_partial boolean not null default 'false',
    strand smallint,
    phase int,
    residue_info text,
    locgroup int not null default 0,
    rank int not null default 0,
    constraint featureloc_c1 unique (feature_id,locgroup,rank),
    constraint featureloc_c2 check (fmin <= fmax)
);
create index featureloc_idx1 on featureloc (feature_id);
create index featureloc_idx2 on featureloc (srcfeature_id);
create index featureloc_idx3 on featureloc (srcfeature_id,fmin,fmax);
create index featureloc_idx1b on featureloc (feature_id, fmin, fmax);

COMMENT ON TABLE featureloc IS 'The location of a feature relative to
another feature. Important: interbase coordinates are used. This is
vital as it allows us to represent zero-length features e.g. splice
sites, insertion points without an awkward fuzzy system. Features
typically have exactly ONE location, but this need not be the
case. Some features may not be localized (e.g. a gene that has been
characterized genetically but no sequence or molecular information is
available). Note on multiple locations: Each feature can have 0 or
more locations. Multiple locations do NOT indicate non-contiguous
locations (if a feature such as a transcript has a non-contiguous
location, then the subfeatures such as exons should always be
manifested). Instead, multiple featurelocs for a feature designate
alternate locations or grouped locations; for instance, a feature
designating a blast hit or hsp will have two locations, one on the
query feature, one on the subject feature. Features representing
sequence variation could have alternate locations instantiated on a
feature on the mutant strain. The column:rank is used to
differentiate these different locations. Reflexive locations should
never be stored - this is for -proper- (i.e. non-self) locations only; nothing should be located relative to itself.';

COMMENT ON COLUMN featureloc.feature_id IS 'The feature that is being located. Any feature can have zero or more featurelocs.';

COMMENT ON COLUMN featureloc.srcfeature_id IS 'The source feature which this location is relative to. Every location is relative to another feature (however, this column is nullable, because the srcfeature may not be known). All locations are -proper- that is, nothing should be located relative to itself. No cycles are allowed in the featureloc graph.';

COMMENT ON COLUMN featureloc.fmin IS 'The leftmost/minimal boundary in the linear range represented by the featureloc. Sometimes (e.g. in Bioperl) this is called -start- although this is confusing because it does not necessarily represent the 5-prime coordinate. Important: This is space-based (interbase) coordinates, counting from zero. To convert this to the leftmost position in a base-oriented system (eg GFF, Bioperl), add 1 to fmin.';

COMMENT ON COLUMN featureloc.fmax IS 'The rightmost/maximal boundary in the linear range represented by the featureloc. Sometimes (e.g. in bioperl) this is called -end- although this is confusing because it does not necessarily represent the 3-prime coordinate. Important: This is space-based (interbase) coordinates, counting from zero. No conversion is required to go from fmax to the rightmost coordinate in a base-oriented system that counts from 1 (e.g. GFF, Bioperl).';

COMMENT ON COLUMN featureloc.strand IS 'The orientation/directionality of the
location. Should be 0, -1 or +1.';

COMMENT ON COLUMN featureloc.rank IS 'Used when a feature has >1
location, otherwise the default rank 0 is used. Some features (e.g.
blast hits and HSPs) have two locations - one on the query and one on
the subject. Rank is used to differentiate these. Rank=0 is always
used for the query, Rank=1 for the subject. For multiple alignments,
assignment of rank is arbitrary. Rank is also used for
sequence_variant features, such as SNPs. Rank=0 indicates the wildtype
(or baseline) feature, Rank=1 indicates the mutant (or compared) feature.';

COMMENT ON COLUMN featureloc.locgroup IS 'This is used to manifest redundant,
derivable extra locations for a feature. The default locgroup=0 is
used for the DIRECT location of a feature. Important: most Chado users may
never use featurelocs WITH logroup > 0. Transitively derived locations
are indicated with locgroup > 0. For example, the position of an exon on
a BAC and in global chromosome coordinates. This column is used to
differentiate these groupings of locations. The default locgroup 0
is used for the main or primary location, from which the others can be
derived via coordinate transformations. Another example of redundant
locations is storing ORF coordinates relative to both transcript and
genome. Redundant locations open the possibility of the database
getting into inconsistent states; this schema gives us the flexibility
of both warehouse instantiations with redundant locations (easier for
querying) and management instantiations with no redundant
locations. An example of using both locgroup and rank: imagine a
feature indicating a conserved region between the chromosomes of two
different species. We may want to keep redundant locations on both
contigs and chromosomes. We would thus have 4 locations for the single
conserved region feature - two distinct locgroups (contig level and
chromosome level) and two distinct ranks (for the two species).';

COMMENT ON COLUMN featureloc.residue_info IS 'Alternative residues,
when these differ from feature.residues. For instance, a SNP feature
located on a wild and mutant protein would have different alternative residues.
for alignment/similarity features, the alternative residues is used to
represent the alignment string (CIGAR format). Note on variation
features; even if we do not want to instantiate a mutant
chromosome/contig feature, we can still represent a SNP etc with 2
locations, one (rank 0) on the genome, the other (rank 1) would have
most fields null, except for alternative residues.';

COMMENT ON COLUMN featureloc.phase IS 'Phase of translation with
respect to srcfeature_id.
Values are 0, 1, 2. It may not be possible to manifest this column for
some features such as exons, because the phase is dependant on the
spliceform (the same exon can appear in multiple spliceforms). This column is mostly useful for predicted exons and CDSs.';

COMMENT ON COLUMN featureloc.is_fmin_partial IS 'This is typically
false, but may be true if the value for column:fmin is inaccurate or
the leftmost part of the range is unknown/unbounded.';

COMMENT ON COLUMN featureloc.is_fmax_partial IS 'This is typically
false, but may be true if the value for column:fmax is inaccurate or
the rightmost part of the range is unknown/unbounded.';

--- COMMENT ON INDEX featureloc_c1 IS 'locgroup and rank serve to uniquely
--- partition locations for any one feature';


-- ================================================
-- TABLE: featureloc_pub
-- ================================================

create table featureloc_pub (
    featureloc_pub_id bigserial not null,
    primary key (featureloc_pub_id),
    featureloc_id bigint not null,
    foreign key (featureloc_id) references featureloc (featureloc_id) on delete cascade INITIALLY DEFERRED,
    pub_id bigint not null,
    foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
    constraint featureloc_pub_c1 unique (featureloc_id,pub_id)
);
create index featureloc_pub_idx1 on featureloc_pub (featureloc_id);
create index featureloc_pub_idx2 on featureloc_pub (pub_id);

COMMENT ON TABLE featureloc_pub IS 'Provenance of featureloc. Linking table between featurelocs and publications that mention them.';


-- ================================================
-- TABLE: feature_pub
-- ================================================

create table feature_pub (
    feature_pub_id bigserial not null,
    primary key (feature_pub_id),
    feature_id bigint not null,
    foreign key (feature_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,
    pub_id bigint not null,
    foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
    constraint feature_pub_c1 unique (feature_id,pub_id)
);
create index feature_pub_idx1 on feature_pub (feature_id);
create index feature_pub_idx2 on feature_pub (pub_id);

COMMENT ON TABLE feature_pub IS 'Provenance. Linking table between features and publications that mention them.';


-- ================================================
-- TABLE: feature_pubprop
-- ================================================

create table feature_pubprop (
    feature_pubprop_id bigserial not null,
    primary key (feature_pubprop_id),
    feature_pub_id bigint not null,
    foreign key (feature_pub_id) references feature_pub (feature_pub_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint feature_pubprop_c1 unique (feature_pub_id,type_id,rank)
);
create index feature_pubprop_idx1 on feature_pubprop (feature_pub_id);

COMMENT ON TABLE feature_pubprop IS 'Property or attribute of a feature_pub link.';


-- ================================================
-- TABLE: featureprop
-- ================================================

create table featureprop (
    featureprop_id bigserial not null,
    primary key (featureprop_id),
    feature_id bigint not null,
    foreign key (feature_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint featureprop_c1 unique (feature_id,type_id,rank)
);
create index featureprop_idx1 on featureprop (feature_id);
create index featureprop_idx2 on featureprop (type_id);

COMMENT ON TABLE featureprop IS 'A feature can have any number of slot-value property tags attached to it. This is an alternative to hardcoding a list of columns in the relational schema, and is completely extensible.';

COMMENT ON COLUMN featureprop.type_id IS 'The name of the
property/slot is a cvterm. The meaning of the property is defined in
that cvterm. Certain property types will only apply to certain feature
types (e.g. the anticodon property will only apply to tRNA features) ;
the types here come from the sequence feature property ontology.';

COMMENT ON COLUMN featureprop.value IS 'The value of the property, represented as text. Numeric values are converted to their text representation. This is less efficient than using native database types, but is easier to query.';

COMMENT ON COLUMN featureprop.rank IS 'Property-Value ordering. Any
feature can have multiple values for any particular property type -
these are ordered in a list using rank, counting from zero. For
properties that are single-valued rather than multi-valued, the
default 0 value should be used';

COMMENT ON INDEX featureprop_c1 IS 'For any one feature, multivalued
property-value pairs must be differentiated by rank.';


-- ================================================
-- TABLE: featureprop_pub
-- ================================================

create table featureprop_pub (
    featureprop_pub_id bigserial not null,
    primary key (featureprop_pub_id),
    featureprop_id bigint not null,
    foreign key (featureprop_id) references featureprop (featureprop_id) on delete cascade INITIALLY DEFERRED,
    pub_id bigint not null,
    foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
    constraint featureprop_pub_c1 unique (featureprop_id,pub_id)
);
create index featureprop_pub_idx1 on featureprop_pub (featureprop_id);
create index featureprop_pub_idx2 on featureprop_pub (pub_id);

COMMENT ON TABLE featureprop_pub IS 'Provenance. Any featureprop assignment can optionally be supported by a publication.';


-- ================================================
-- TABLE: feature_dbxref
-- ================================================

create table feature_dbxref (
    feature_dbxref_id bigserial not null,
    primary key (feature_dbxref_id),
    feature_id bigint not null,
    foreign key (feature_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,
    dbxref_id bigint not null,
    foreign key (dbxref_id) references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED,
    is_current boolean not null default 'true',
    constraint feature_dbxref_c1 unique (feature_id,dbxref_id)
);
create index feature_dbxref_idx1 on feature_dbxref (feature_id);
create index feature_dbxref_idx2 on feature_dbxref (dbxref_id);

COMMENT ON TABLE feature_dbxref IS 'Links a feature to dbxrefs. This is for secondary identifiers; primary identifiers should use feature.dbxref_id.';

COMMENT ON COLUMN feature_dbxref.is_current IS 'True if this secondary dbxref is the most up to date accession in the corresponding db. Retired accessions should set this field to false';


-- ================================================
-- TABLE: feature_relationship
-- ================================================

create table feature_relationship (
    feature_relationship_id bigserial not null,
    primary key (feature_relationship_id),
    subject_id bigint not null,
    foreign key (subject_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,
    object_id bigint not null,
    foreign key (object_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint feature_relationship_c1 unique (subject_id,object_id,type_id,rank)
);
create index feature_relationship_idx1 on feature_relationship (subject_id);
create index feature_relationship_idx2 on feature_relationship (object_id);
create index feature_relationship_idx3 on feature_relationship (type_id);
create index feature_relationship_idx1b on feature_relationship (object_id, subject_id, type_id);

COMMENT ON TABLE feature_relationship IS 'Features can be arranged in
graphs, e.g. "exon part_of transcript part_of gene"; If type is
thought of as a verb, the each arc or edge makes a statement
[Subject Verb Object]. The object can also be thought of as parent
(containing feature), and subject as child (contained feature or
subfeature). We include the relationship rank/order, because even
though most of the time we can order things implicitly by sequence
coordinates, we can not always do this - e.g. transpliced genes. It is also
useful for quickly getting implicit introns.';

COMMENT ON COLUMN feature_relationship.subject_id IS 'The subject of the subj-predicate-obj sentence. This is typically the subfeature.';

COMMENT ON COLUMN feature_relationship.object_id IS 'The object of the subj-predicate-obj sentence. This is typically the container feature.';

COMMENT ON COLUMN feature_relationship.type_id IS 'Relationship type between subject and object. This is a cvterm, typically from the OBO relationship ontology, although other relationship types are allowed. The most common relationship type is OBO_REL:part_of. Valid relationship types are constrained by the Sequence Ontology.';

COMMENT ON COLUMN feature_relationship.rank IS 'The ordering of subject features with respect to the object feature may be important (for example, exon ordering on a transcript - not always derivable if you take trans spliced genes into consideration). Rank is used to order these; starts from zero.';

COMMENT ON COLUMN feature_relationship.value IS 'Additional notes or comments.';


-- ================================================
-- TABLE: feature_relationship_pub
-- ================================================
 
create table feature_relationship_pub (
	feature_relationship_pub_id bigserial not null,
	primary key (feature_relationship_pub_id),
	feature_relationship_id bigint not null,
	foreign key (feature_relationship_id) references feature_relationship (feature_relationship_id) on delete cascade INITIALLY DEFERRED,
	pub_id bigint not null,
	foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
    constraint feature_relationship_pub_c1 unique (feature_relationship_id,pub_id)
);
create index feature_relationship_pub_idx1 on feature_relationship_pub (feature_relationship_id);
create index feature_relationship_pub_idx2 on feature_relationship_pub (pub_id);

COMMENT ON TABLE feature_relationship_pub IS 'Provenance. Attach optional evidence to a feature_relationship in the form of a publication.';

 
-- ================================================
-- TABLE: feature_relationshipprop
-- ================================================

create table feature_relationshipprop (
    feature_relationshipprop_id bigserial not null,
    primary key (feature_relationshipprop_id),
    feature_relationship_id bigint not null,
    foreign key (feature_relationship_id) references feature_relationship (feature_relationship_id) on delete cascade,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint feature_relationshipprop_c1 unique (feature_relationship_id,type_id,rank)
);
create index feature_relationshipprop_idx1 on feature_relationshipprop (feature_relationship_id);
create index feature_relationshipprop_idx2 on feature_relationshipprop (type_id);

COMMENT ON TABLE feature_relationshipprop IS 'Extensible properties
for feature_relationships. Analagous structure to featureprop. This
table is largely optional and not used with a high frequency. Typical
scenarios may be if one wishes to attach additional data to a
feature_relationship - for example to say that the
feature_relationship is only true in certain contexts.';

COMMENT ON COLUMN feature_relationshipprop.type_id IS 'The name of the
property/slot is a cvterm. The meaning of the property is defined in
that cvterm. Currently there is no standard ontology for
feature_relationship property types.';

COMMENT ON COLUMN feature_relationshipprop.value IS 'The value of the
property, represented as text. Numeric values are converted to their
text representation. This is less efficient than using native database
types, but is easier to query.';

COMMENT ON COLUMN feature_relationshipprop.rank IS 'Property-Value
ordering. Any feature_relationship can have multiple values for any particular
property type - these are ordered in a list using rank, counting from
zero. For properties that are single-valued rather than multi-valued,
the default 0 value should be used.';

-- ================================================
-- TABLE: feature_relationshipprop_pub
-- ================================================

create table feature_relationshipprop_pub (
    feature_relationshipprop_pub_id bigserial not null,
    primary key (feature_relationshipprop_pub_id),
    feature_relationshipprop_id bigint not null,
    foreign key (feature_relationshipprop_id) references feature_relationshipprop (feature_relationshipprop_id) on delete cascade INITIALLY DEFERRED,
    pub_id bigint not null,
    foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
    constraint feature_relationshipprop_pub_c1 unique (feature_relationshipprop_id,pub_id)
);
create index feature_relationshipprop_pub_idx1 on feature_relationshipprop_pub (feature_relationshipprop_id);
create index feature_relationshipprop_pub_idx2 on feature_relationshipprop_pub (pub_id);

COMMENT ON TABLE feature_relationshipprop_pub IS 'Provenance for feature_relationshipprop.';

-- ================================================
-- TABLE: feature_cvterm
-- ================================================

create table feature_cvterm (
    feature_cvterm_id bigserial not null,
    primary key (feature_cvterm_id),
    feature_id bigint not null,
    foreign key (feature_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,
    cvterm_id bigint not null,
    foreign key (cvterm_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    pub_id bigint not null,
    foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
    is_not boolean not null default false,
    rank int not null default 0,
    constraint feature_cvterm_c1 unique (feature_id,cvterm_id,pub_id,rank)
);
create index feature_cvterm_idx1 on feature_cvterm (feature_id);
create index feature_cvterm_idx2 on feature_cvterm (cvterm_id);
create index feature_cvterm_idx3 on feature_cvterm (pub_id);

COMMENT ON TABLE feature_cvterm IS 'Associate a term from a cv with a feature, for example, GO annotation.';

COMMENT ON COLUMN feature_cvterm.pub_id IS 'Provenance for the annotation. Each annotation should have a single primary publication (which may be of the appropriate type for computational analyses) where more details can be found. Additional provenance dbxrefs can be attached using feature_cvterm_dbxref.';

COMMENT ON COLUMN feature_cvterm.is_not IS 'If this is set to true, then this annotation is interpreted as a NEGATIVE annotation - i.e. the feature does NOT have the specified function, process, component, part, etc. See GO docs for more details.';


-- ================================================
-- TABLE: feature_cvtermprop
-- ================================================

create table feature_cvtermprop (
    feature_cvtermprop_id bigserial not null,
    primary key (feature_cvtermprop_id),
    feature_cvterm_id bigint not null,
    foreign key (feature_cvterm_id) references feature_cvterm (feature_cvterm_id) on delete cascade,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint feature_cvtermprop_c1 unique (feature_cvterm_id,type_id,rank)
);
create index feature_cvtermprop_idx1 on feature_cvtermprop (feature_cvterm_id);
create index feature_cvtermprop_idx2 on feature_cvtermprop (type_id);

COMMENT ON TABLE feature_cvtermprop IS 'Extensible properties for
feature to cvterm associations. Examples: GO evidence codes;
qualifiers; metadata such as the date on which the entry was curated
and the source of the association. See the featureprop table for
meanings of type_id, value and rank.';

COMMENT ON COLUMN feature_cvtermprop.type_id IS 'The name of the
property/slot is a cvterm. The meaning of the property is defined in
that cvterm. cvterms may come from the OBO evidence code cv.';

COMMENT ON COLUMN feature_cvtermprop.value IS 'The value of the
property, represented as text. Numeric values are converted to their
text representation. This is less efficient than using native database
types, but is easier to query.';

COMMENT ON COLUMN feature_cvtermprop.rank IS 'Property-Value
ordering. Any feature_cvterm can have multiple values for any particular
property type - these are ordered in a list using rank, counting from
zero. For properties that are single-valued rather than multi-valued,
the default 0 value should be used.';


-- ================================================
-- TABLE: feature_cvterm_dbxref
-- ================================================

create table feature_cvterm_dbxref (
    feature_cvterm_dbxref_id bigserial not null,
    primary key (feature_cvterm_dbxref_id),
    feature_cvterm_id bigint not null,
    foreign key (feature_cvterm_id) references feature_cvterm (feature_cvterm_id) on delete cascade,
    dbxref_id bigint not null,
    foreign key (dbxref_id) references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED,
    constraint feature_cvterm_dbxref_c1 unique (feature_cvterm_id,dbxref_id)
);
create index feature_cvterm_dbxref_idx1 on feature_cvterm_dbxref (feature_cvterm_id);
create index feature_cvterm_dbxref_idx2 on feature_cvterm_dbxref (dbxref_id);

COMMENT ON TABLE feature_cvterm_dbxref IS 'Additional dbxrefs for an association. Rows in the feature_cvterm table may be backed up by dbxrefs. For example, a feature_cvterm association that was inferred via a protein-protein interaction may be backed by by refering to the dbxref for the alternate protein. Corresponds to the WITH column in a GO gene association file (but can also be used for other analagous associations). See http://www.geneontology.org/doc/GO.annotation.shtml#file for more details.';

-- ================================================
-- TABLE: feature_cvterm_pub
-- ================================================

create table feature_cvterm_pub (
    feature_cvterm_pub_id bigserial not null,
    primary key (feature_cvterm_pub_id),
    feature_cvterm_id bigint not null,
    foreign key (feature_cvterm_id) references feature_cvterm (feature_cvterm_id) on delete cascade,
    pub_id bigint not null,
    foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
    constraint feature_cvterm_pub_c1 unique (feature_cvterm_id,pub_id)
);
create index feature_cvterm_pub_idx1 on feature_cvterm_pub (feature_cvterm_id);
create index feature_cvterm_pub_idx2 on feature_cvterm_pub (pub_id);

COMMENT ON TABLE feature_cvterm_pub IS 'Secondary pubs for an
association. Each feature_cvterm association is supported by a single
primary publication. Additional secondary pubs can be added using this
linking table (in a GO gene association file, these corresponding to
any IDs after the pipe symbol in the publications column.';

-- ================================================
-- TABLE: synonym
-- ================================================

create table synonym (
    synonym_id bigserial not null,
    primary key (synonym_id),
    name varchar(255) not null,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    synonym_sgml varchar(255) not null,
    constraint synonym_c1 unique (name,type_id)
);
create index synonym_idx1 on synonym (type_id);
create index synonym_idx2 on synonym ((lower(synonym_sgml)));

COMMENT ON TABLE synonym IS 'A synonym for a feature. One feature can have multiple synonyms, and the same synonym can apply to multiple features.';

COMMENT ON COLUMN synonym.name IS 'The synonym itself. Should be human-readable machine-searchable ascii text.';

COMMENT ON COLUMN synonym.synonym_sgml IS 'The fully specified synonym, with any non-ascii characters encoded in SGML.';

COMMENT ON COLUMN synonym.type_id IS 'Types would be symbol and fullname for now.';


-- ================================================
-- TABLE: feature_synonym
-- ================================================

create table feature_synonym (
    feature_synonym_id bigserial not null,
    primary key (feature_synonym_id),
    synonym_id bigint not null,
    foreign key (synonym_id) references synonym (synonym_id) on delete cascade INITIALLY DEFERRED,
    feature_id bigint not null,
    foreign key (feature_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,
    pub_id bigint not null,
    foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
    is_current boolean not null default 'false',
    is_internal boolean not null default 'false',
    constraint feature_synonym_c1 unique (synonym_id,feature_id,pub_id)
);
create index feature_synonym_idx1 on feature_synonym (synonym_id);
create index feature_synonym_idx2 on feature_synonym (feature_id);
create index feature_synonym_idx3 on feature_synonym (pub_id);

COMMENT ON TABLE feature_synonym IS 'Linking table between feature and synonym.';

COMMENT ON COLUMN feature_synonym.pub_id IS 'The pub_id link is for relating the usage of a given synonym to the publication in which it was used.';

COMMENT ON COLUMN feature_synonym.is_current IS 'The is_current boolean indicates whether the linked synonym is the  current -official- symbol for the linked feature.';

COMMENT ON COLUMN feature_synonym.is_internal IS 'Typically a synonym exists so that somebody querying the db with an obsolete name can find the object theyre looking for (under its current name.  If the synonym has been used publicly and deliberately (e.g. in a paper), it may also be listed in reports as a synonym. If the synonym was not used deliberately (e.g. there was a typo which went public), then the is_internal boolean may be set to -true- so that it is known that the synonym is -internal- and should be queryable but should not be listed in reports as a valid synonym.';

-- ================================================
-- TABLE: feature_contact
-- ================================================

CREATE TABLE feature_contact (
    feature_contact_id bigserial primary key NOT NULL,
    feature_id bigint NOT NULL,
    contact_id bigint NOT NULL,
    CONSTRAINT feature_contact_c1 UNIQUE (feature_id, contact_id),
    FOREIGN KEY (contact_id) REFERENCES contact(contact_id) ON DELETE CASCADE,
    FOREIGN KEY (feature_id) REFERENCES feature(feature_id) ON DELETE CASCADE
);

CREATE INDEX feature_contact_idx1 ON feature_contact USING btree (feature_id);
CREATE INDEX feature_contact_idx2 ON feature_contact USING btree (contact_id);

COMMENT ON TABLE feature_contact IS 'Links contact(s) with a feature.  Used to indicate a particular 
person or organization responsible for discovery or that can provide more information on a particular feature.';
CREATE VIEW type_feature_count AS
  SELECT t.name AS type,count(*) AS num_features 
   FROM cvterm AS t INNER JOIN feature ON (type_id=t.cvterm_id) 
  GROUP BY t.name;
COMMENT ON VIEW type_feature_count IS 'per-feature-type feature counts';
CREATE SCHEMA genetic_code;
SET search_path = genetic_code,public,pg_catalog;

CREATE TABLE gencode (
        gencode_id      BIGINT PRIMARY KEY NOT NULL,
        organismstr     VARCHAR(512) NOT NULL
);

CREATE TABLE gencode_codon_aa (
        gencode_id      BIGINT NOT NULL REFERENCES gencode(gencode_id),
        codon           CHAR(3) NOT NULL,
        aa              CHAR(1) NOT NULL,
        CONSTRAINT gencode_codon_unique UNIQUE( gencode_id, codon )
);
CREATE INDEX gencode_codon_aa_i1 ON gencode_codon_aa(gencode_id,codon,aa);

CREATE TABLE gencode_startcodon (
        gencode_id      BIGINT NOT NULL REFERENCES gencode(gencode_id),
        codon           CHAR(3),
        CONSTRAINT gencode_startcodon_unique UNIQUE( gencode_id, codon )
);
SET search_path = public,pg_catalog;
--
-- functions operating on featureloc ranges
--

-- create a point
CREATE OR REPLACE FUNCTION create_point (bigint, bigint) RETURNS point AS
 'SELECT point ($1, $2)'
LANGUAGE 'sql';

-- create a range box
-- (make this immutable so we can index it)
CREATE OR REPLACE FUNCTION boxrange (bigint, bigint) RETURNS box AS
 'SELECT box (create_point(0, $1), create_point($2,500000000))'
LANGUAGE 'sql' IMMUTABLE;

-- create a query box
CREATE OR REPLACE FUNCTION boxquery (bigint, bigint) RETURNS box AS
 'SELECT box (create_point($1, $2), create_point($1, $2))'
LANGUAGE 'sql' IMMUTABLE;

--functional index that depends on the above functions
CREATE INDEX binloc_boxrange ON featureloc USING GIST (boxrange(fmin, fmax));


CREATE OR REPLACE FUNCTION featureloc_slice(bigint, bigint) RETURNS setof featureloc AS
  'SELECT * from featureloc where boxquery($1, $2) @ boxrange(fmin,fmax)'
LANGUAGE 'sql';

CREATE OR REPLACE FUNCTION featureloc_slice(varchar, bigint, bigint)
  RETURNS setof featureloc AS
  'SELECT featureloc.* 
   FROM featureloc 
   INNER JOIN feature AS srcf ON (srcf.feature_id = featureloc.srcfeature_id)
   WHERE boxquery($2, $3) @ boxrange(fmin,fmax)
   AND srcf.name = $1 '
LANGUAGE 'sql';

CREATE OR REPLACE FUNCTION featureloc_slice(bigint, bigint, bigint)
  RETURNS setof featureloc AS
  'SELECT * 
   FROM featureloc 
   WHERE boxquery($2, $3) @ boxrange(fmin,fmax)
   AND srcfeature_id = $1 '
LANGUAGE 'sql';


-- can we not just do these as views?
CREATE OR REPLACE FUNCTION feature_overlaps(bigint)
 RETURNS setof feature AS
 'SELECT feature.*
  FROM feature
   INNER JOIN featureloc AS x ON (x.feature_id=feature.feature_id)
   INNER JOIN featureloc AS y ON (y.feature_id = $1)
  WHERE
   x.srcfeature_id = y.srcfeature_id            AND
   ( x.fmax >= y.fmin AND x.fmin <= y.fmax ) '
LANGUAGE 'sql';

CREATE OR REPLACE FUNCTION feature_disjoint_from(bigint)
 RETURNS setof feature AS
 'SELECT feature.*
  FROM feature
   INNER JOIN featureloc AS x ON (x.feature_id=feature.feature_id)
   INNER JOIN featureloc AS y ON (y.feature_id = $1)
  WHERE
   x.srcfeature_id = y.srcfeature_id            AND
   ( x.fmax < y.fmin OR x.fmin > y.fmax ) '
LANGUAGE 'sql';



--Evolution of the methods found in range.plpgsql (C. Pommier)
--Goal : increase performances of segment fetching
--       Implies to optimise featureloc_slice

--Background : The existing featureloc_slice uses uses a spatial rtree index. The spatial objects used are a boxrange ((0,fmin), (fmax,500000000)) and a boxquery ((fmin,fmax),(fmin,fmax)) . The boxranges are indexed. 
--             To speed up things (for gbrowse) featureloc_slice has been overiden to filter simultaneously on the boxrange and the srcfeature_id. This gives good results.
--             The goal here is to push this logic further and to include the srcfeature_id filter directly into the boxrange object. We propose to consider the following boxs : 
--             boxrange : ((srcfeature_id,fmin),(srcfeature_id,fmax))
--             boxquery : ((srcfeature_id,fmin),(srcfeature_id,fmax))



CREATE OR REPLACE FUNCTION boxrange (bigint, bigint, bigint) RETURNS box AS
 'SELECT box (create_point($1, $2), create_point($1,$3))'
LANGUAGE 'sql' IMMUTABLE;

-- create a query box
CREATE OR REPLACE FUNCTION boxquery (bigint, bigint, bigint) RETURNS box AS
 'SELECT box (create_point($1, $2), create_point($1, $3))'
LANGUAGE 'sql' IMMUTABLE;

CREATE INDEX binloc_boxrange_src ON featureloc USING GIST (boxrange(srcfeature_id,fmin, fmax));

CREATE OR REPLACE FUNCTION featureloc_slice(bigint, bigint, bigint)
  RETURNS setof featureloc AS
  'SELECT * 
   FROM featureloc 
   WHERE boxquery($1, $2, $3) && boxrange(srcfeature_id,fmin,fmax)'   
LANGUAGE 'sql';

-- reverse_string
CREATE OR REPLACE FUNCTION reverse_string(TEXT) RETURNS TEXT AS 
'
 DECLARE 
  reversed_string TEXT;
  incoming ALIAS FOR $1;
 BEGIN
   reversed_string = '''';
   FOR i IN REVERSE char_length(incoming)..1 loop
     reversed_string = reversed_string || substring(incoming FROM i FOR 1);
   END loop;
 RETURN reversed_string;
END'
language plpgsql;

-- complements DNA
CREATE OR REPLACE FUNCTION complement_residues(text) RETURNS text AS
 'SELECT (translate($1, 
                   ''acgtrymkswhbvdnxACGTRYMKSWHBVDNX'',
                   ''tgcayrkmswdvbhnxTGCAYRKMSWDVBHNX''))'
LANGUAGE 'sql';

-- revcomp
CREATE OR REPLACE FUNCTION reverse_complement(TEXT) RETURNS TEXT AS
 'SELECT reverse_string(complement_residues($1))'
LANGUAGE 'sql';

-- DNA to AA
CREATE OR REPLACE FUNCTION translate_dna(TEXT,BIGINT) RETURNS TEXT AS 
'
 DECLARE 
  dnaseq ALIAS FOR $1;
  gcode ALIAS FOR $2;
  translation TEXT;
  dnaseqlen BIGINT;
  codon CHAR(3);
  aa CHAR(1);
  i INT;
 BEGIN
   translation = '''';
   dnaseqlen = char_length(dnaseq);
   i=1;
   WHILE i+1 < dnaseqlen loop
     codon = substring(dnaseq,i,3);
     aa = translate_codon(codon,gcode);
     translation = translation || aa;
     i = i+3;
   END loop;
 RETURN translation;
END'
language plpgsql;

-- DNA to AA, default genetic code
CREATE OR REPLACE FUNCTION translate_dna(TEXT) RETURNS TEXT AS
 'SELECT translate_dna($1,1)'
LANGUAGE 'sql';


CREATE OR REPLACE FUNCTION translate_codon(TEXT,BIGINT) RETURNS CHAR AS
 'SELECT aa FROM genetic_code.gencode_codon_aa WHERE codon=$1 AND gencode_id=$2'
LANGUAGE 'sql';



CREATE OR REPLACE FUNCTION concat_pair (text, text) RETURNS text AS
 'SELECT $1 || $2'
LANGUAGE 'sql';

CREATE AGGREGATE concat (
sfunc = concat_pair,
basetype = text,
stype = text,
initcond = ''
);


--function to 'unshare' exons.  It looks for exons that have the same fmin
--and fmax and belong to the same gene and only keeps one.  The other,
--redundant exons are marked obsolete in the feature table.  Nothing
--is done with those features' entries in the featureprop, feature_dbxref,
--feature_pub, or feature_cvterm tables.  For the moment, I'm assuming
--that any annotations that they have when this script is run are
--identical to their non-obsoleted doppelgangers.  If that's not the case, 
--they could be merged via query.
--
--The bulk of this code was contributed by Robin Houston at
--GeneDB/Sanger Centre.

CREATE OR REPLACE FUNCTION share_exons () RETURNS void AS '    
  DECLARE    
  BEGIN
    /* Generate a table of shared exons */
    CREATE temporary TABLE shared_exons AS
      SELECT gene.feature_id as gene_feature_id
           , gene.uniquename as gene_uniquename
           , transcript1.uniquename as transcript1
           , exon1.feature_id as exon1_feature_id
           , exon1.uniquename as exon1_uniquename
           , transcript2.uniquename as transcript2
           , exon2.feature_id as exon2_feature_id
           , exon2.uniquename as exon2_uniquename
           , exon1_loc.fmin /* = exon2_loc.fmin */
           , exon1_loc.fmax /* = exon2_loc.fmax */
      FROM feature gene
        JOIN cvterm gene_type ON gene.type_id = gene_type.cvterm_id
        JOIN cv gene_type_cv USING (cv_id)
        JOIN feature_relationship gene_transcript1 ON gene.feature_id = gene_transcript1.object_id
        JOIN feature transcript1 ON gene_transcript1.subject_id = transcript1.feature_id
        JOIN cvterm transcript1_type ON transcript1.type_id = transcript1_type.cvterm_id
        JOIN cv transcript1_type_cv ON transcript1_type.cv_id = transcript1_type_cv.cv_id
        JOIN feature_relationship transcript1_exon1 ON transcript1_exon1.object_id = transcript1.feature_id
        JOIN feature exon1 ON transcript1_exon1.subject_id = exon1.feature_id
        JOIN cvterm exon1_type ON exon1.type_id = exon1_type.cvterm_id
        JOIN cv exon1_type_cv ON exon1_type.cv_id = exon1_type_cv.cv_id
        JOIN featureloc exon1_loc ON exon1_loc.feature_id = exon1.feature_id
        JOIN feature_relationship gene_transcript2 ON gene.feature_id = gene_transcript2.object_id
        JOIN feature transcript2 ON gene_transcript2.subject_id = transcript2.feature_id
        JOIN cvterm transcript2_type ON transcript2.type_id = transcript2_type.cvterm_id
        JOIN cv transcript2_type_cv ON transcript2_type.cv_id = transcript2_type_cv.cv_id
        JOIN feature_relationship transcript2_exon2 ON transcript2_exon2.object_id = transcript2.feature_id
        JOIN feature exon2 ON transcript2_exon2.subject_id = exon2.feature_id
        JOIN cvterm exon2_type ON exon2.type_id = exon2_type.cvterm_id
        JOIN cv exon2_type_cv ON exon2_type.cv_id = exon2_type_cv.cv_id
        JOIN featureloc exon2_loc ON exon2_loc.feature_id = exon2.feature_id
      WHERE gene_type_cv.name = ''sequence''
        AND gene_type.name = ''gene''
        AND transcript1_type_cv.name = ''sequence''
        AND transcript1_type.name = ''mRNA''
        AND transcript2_type_cv.name = ''sequence''
        AND transcript2_type.name = ''mRNA''
        AND exon1_type_cv.name = ''sequence''
        AND exon1_type.name = ''exon''
        AND exon2_type_cv.name = ''sequence''
        AND exon2_type.name = ''exon''
        AND exon1.feature_id < exon2.feature_id
        AND exon1_loc.rank = 0
        AND exon2_loc.rank = 0
        AND exon1_loc.fmin = exon2_loc.fmin
        AND exon1_loc.fmax = exon2_loc.fmax
    ;
    
    /* Choose one of the shared exons to be the canonical representative.
       We pick the one with the smallest feature_id.
     */
    CREATE temporary TABLE canonical_exon_representatives AS
      SELECT gene_feature_id, min(exon1_feature_id) AS canonical_feature_id, fmin
      FROM shared_exons
      GROUP BY gene_feature_id,fmin
    ;
    
    CREATE temporary TABLE exon_replacements AS
      SELECT DISTINCT shared_exons.exon2_feature_id AS actual_feature_id
                    , canonical_exon_representatives.canonical_feature_id
                    , canonical_exon_representatives.fmin
      FROM shared_exons
        JOIN canonical_exon_representatives USING (gene_feature_id)
      WHERE shared_exons.exon2_feature_id <> canonical_exon_representatives.canonical_feature_id
        AND shared_exons.fmin = canonical_exon_representatives.fmin
    ;
    
    UPDATE feature_relationship 
      SET subject_id = (
            SELECT canonical_feature_id
            FROM exon_replacements
            WHERE feature_relationship.subject_id = exon_replacements.actual_feature_id)
      WHERE subject_id IN (
        SELECT actual_feature_id FROM exon_replacements
    );
    
    UPDATE feature_relationship
      SET object_id = (
            SELECT canonical_feature_id
            FROM exon_replacements
            WHERE feature_relationship.subject_id = exon_replacements.actual_feature_id)
      WHERE object_id IN (
        SELECT actual_feature_id FROM exon_replacements
    );
    
    UPDATE feature
      SET is_obsolete = true
      WHERE feature_id IN (
        SELECT actual_feature_id FROM exon_replacements
    );
  END;    
' LANGUAGE 'plpgsql';

--This is a function to seek out exons of transcripts and orders them,
--using feature_relationship.rank, in "transcript order" numbering
--from 0, taking strand into account. It will not touch transcripts that
--already have their exons ordered (in case they have a non-obvious
--ordering due to trans splicing). It takes as an argument the
--feature.type_id of the parent transcript type (typically, mRNA, although
--non coding transcript types should work too).

CREATE OR REPLACE FUNCTION order_exons (bigint) RETURNS void AS '
  DECLARE
    parent_type      ALIAS FOR $1;
    exon_id          bigint;
    part_of          bigint;
    exon_type        bigint;
    strand           int;
    arow             RECORD;
    order_by         varchar;
    rowcount         int;
    exon_count       int;
    ordered_exons    int;    
    transcript_id    bigint;
    transcript_row   feature%ROWTYPE;
  BEGIN
    SELECT INTO part_of cvterm_id FROM cvterm WHERE name=''part_of''
      AND cv_id IN (SELECT cv_id FROM cv WHERE name=''relationship'');
    --SELECT INTO exon_type cvterm_id FROM cvterm WHERE name=''exon''
    --  AND cv_id IN (SELECT cv_id FROM cv WHERE name=''sequence'');

    --RAISE NOTICE ''part_of %, exon %'',part_of,exon_type;

    FOR transcript_row IN
      SELECT * FROM feature WHERE type_id = parent_type
    LOOP
      transcript_id = transcript_row.feature_id;
      SELECT INTO rowcount count(*) FROM feature_relationship
        WHERE object_id = transcript_id
          AND rank = 0;

      --Dont modify this transcript if there are already numbered exons or
      --if there is only one exon
      IF rowcount = 1 THEN
        --RAISE NOTICE ''skipping transcript %, row count %'',transcript_id,rowcount;
        CONTINUE;
      END IF;

      --need to reverse the order if the strand is negative
      SELECT INTO strand strand FROM featureloc WHERE feature_id=transcript_id;
      IF strand > 0 THEN
          order_by = ''fl.fmin'';      
      ELSE
          order_by = ''fl.fmax desc'';
      END IF;

      exon_count = 0;
      FOR arow IN EXECUTE 
        ''SELECT fr.*, fl.fmin, fl.fmax
          FROM feature_relationship fr, featureloc fl
          WHERE fr.object_id  = ''||transcript_id||''
            AND fr.subject_id = fl.feature_id
            AND fr.type_id    = ''||part_of||''
            ORDER BY ''||order_by
      LOOP
        --number the exons for a given transcript
        UPDATE feature_relationship
          SET rank = exon_count 
          WHERE feature_relationship_id = arow.feature_relationship_id;
        exon_count = exon_count + 1;
      END LOOP; 

    END LOOP;

  END;
' LANGUAGE 'plpgsql';
-- down the graph: eg from  chromosome to contig
CREATE OR REPLACE FUNCTION project_point_up(bigint,bigint,bigint,bigint)
 RETURNS bigint AS
'SELECT
  CASE WHEN $4<0
   THEN $3-$1             -- rev strand
   ELSE $1-$2             -- fwd strand
  END AS p'
LANGUAGE 'sql'; 

-- down the graph: eg from contig to chromosome
CREATE OR REPLACE FUNCTION project_point_down(bigint,bigint,bigint,bigint)
 RETURNS bigint AS
'SELECT
  CASE WHEN $4<0
   THEN $3-$1
   ELSE $1+$2
  END AS p'
LANGUAGE 'sql'; 

CREATE OR REPLACE FUNCTION project_featureloc_up(bigint,bigint)
 RETURNS featureloc AS
'
DECLARE
    in_featureloc_id alias for $1;
    up_srcfeature_id alias for $2;
    in_featureloc featureloc%ROWTYPE;
    up_featureloc featureloc%ROWTYPE;
    nu_featureloc featureloc%ROWTYPE;
    nu_fmin BIGINT;
    nu_fmax BIGINT;
    nu_strand INT;
BEGIN
 SELECT INTO in_featureloc
   featureloc.*
  FROM featureloc
  WHERE featureloc_id = in_featureloc_id;

 SELECT INTO up_featureloc
   up_fl.*
  FROM featureloc AS in_fl
  INNER JOIN featureloc AS up_fl
    ON (in_fl.srcfeature_id = up_fl.feature_id)
  WHERE
   in_fl.featureloc_id = in_featureloc_id AND
   up_fl.srcfeature_id = up_srcfeature_id;

  IF up_featureloc.strand IS NULL
   THEN RETURN NULL;
  END IF;
  
  IF up_featureloc.strand < 0
  THEN
   nu_fmin = project_point_up(in_featureloc.fmax,
                              up_featureloc.fmin,up_featureloc.fmax,-1);
   nu_fmax = project_point_up(in_featureloc.fmin,
                              up_featureloc.fmin,up_featureloc.fmax,-1);
   nu_strand = -in_featureloc.strand;
  ELSE
   nu_fmin = project_point_up(in_featureloc.fmin,
                              up_featureloc.fmin,up_featureloc.fmax,1);
   nu_fmax = project_point_up(in_featureloc.fmax,
                              up_featureloc.fmin,up_featureloc.fmax,1);
   nu_strand = in_featureloc.strand;
  END IF;
  in_featureloc.fmin = nu_fmin;
  in_featureloc.fmax = nu_fmax;
  in_featureloc.strand = nu_strand;
  in_featureloc.srcfeature_id = up_featureloc.srcfeature_id;
  RETURN in_featureloc;
END
'   
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION project_point_g2t(bigint,bigint,bigint)
 RETURNS BIGINT AS '
 DECLARE
    in_p             alias for $1;
    srcf_id          alias for $2;
    t_id             alias for $3;
    e_floc           featureloc%ROWTYPE;
    out_p            BIGINT;
    exon_cvterm_id   BIGINT;
BEGIN
 SELECT INTO exon_cvterm_id get_feature_type_id(''exon'');
 SELECT INTO out_p
  CASE 
   WHEN strand<0 THEN fmax-p
   ELSE p-fmin
   END AS p
  FROM featureloc
   INNER JOIN feature USING (feature_id)
   INNER JOIN feature_relationship ON (feature.feature_id=subject_id)
  WHERE
   object_id = t_id                     AND
   feature.type_id = exon_cvterm_id     AND
   featureloc.srcfeature_id = srcf_id   AND
   in_p >= fmin                         AND
   in_p <= fmax;
  RETURN in_featureloc;
END
'   
LANGUAGE 'plpgsql';


CREATE OR REPLACE FUNCTION get_cv_id_for_feature() RETURNS BIGINT
 AS 'SELECT cv_id FROM cv WHERE name=''sequence''' LANGUAGE 'sql';
CREATE OR REPLACE FUNCTION get_cv_id_for_featureprop() RETURNS BIGINT
 AS 'SELECT cv_id FROM cv WHERE name=''feature_property''' LANGUAGE 'sql';
CREATE OR REPLACE FUNCTION get_cv_id_for_feature_relationsgip() RETURNS BIGINT
 AS 'SELECT cv_id FROM cv WHERE name=''relationship''' LANGUAGE 'sql';

CREATE OR REPLACE FUNCTION get_feature_type_id(VARCHAR) RETURNS BIGINT
 AS ' 
  SELECT cvterm_id 
  FROM cv INNER JOIN cvterm USING (cv_id)
  WHERE cvterm.name=$1 AND cv.name=''sequence''
 ' LANGUAGE 'sql';

CREATE OR REPLACE FUNCTION get_featureprop_type_id(VARCHAR) RETURNS BIGINT
 AS '
  SELECT cvterm_id 
  FROM cv INNER JOIN cvterm USING (cv_id)
  WHERE cvterm.name=$1 AND cv.name=''feature_property''
 ' LANGUAGE 'sql';

CREATE OR REPLACE FUNCTION get_feature_relationship_type_id(VARCHAR) RETURNS BIGINT
 AS '
  SELECT cvterm_id 
  FROM cv INNER JOIN cvterm USING (cv_id)
  WHERE cvterm.name=$1 AND cv.name=''relationship''
 ' LANGUAGE 'sql';

-- depends on sequence-cv-helper
CREATE OR REPLACE FUNCTION get_feature_id(VARCHAR,VARCHAR,VARCHAR) RETURNS BIGINT
 AS '
  SELECT feature_id 
  FROM feature
  WHERE uniquename=$1
    AND type_id=get_feature_type_id($2)
    AND organism_id=get_organism_id($3)
 ' LANGUAGE 'sql';
--This is an automatically generated file; do not edit it as changes will not
--be saved.  Instead, modify bin/create-so-bridge.pl, which creates this file.


CREATE SCHEMA so;
SET search_path=so,public,pg_catalog;

--- ************************************************
--- *** relation: region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence_feature with an extent greate ***
--- *** r than zero. A nucleotide region is comp ***
--- *** osed of bases and a polypeptide region i ***
--- *** s composed of amino acids.               ***
--- ************************************************
---

CREATE VIEW region AS
  SELECT
    feature_id AS region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'biomaterial_region' OR cvterm.name = 'experimental_feature' OR cvterm.name = 'biological_region' OR cvterm.name = 'topologically_defined_region' OR 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 = 'ASPE_primer' OR cvterm.name = 'dCAPS_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 = 'targeting_vector' 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 = '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 = '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 = 'high_identity_region' OR cvterm.name = 'mathematically_defined_repeat' OR cvterm.name = 'experimentally_defined_binding_region' 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 = 'paired_end_fragment' OR cvterm.name = 'read_pair' 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 = 'YAC_end' OR cvterm.name = 'clone_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 = 'RR_tract' OR cvterm.name = 'homologous_region' OR cvterm.name = 'centromere_DNA_Element_I' OR cvterm.name = 'centromere_DNA_Element_II' OR cvterm.name = 'centromere_DNA_Element_III' OR cvterm.name = 'X_element' OR cvterm.name = 'U_box' OR cvterm.name = 'regional_centromere_central_core' 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 = 'assembly_error_correction' OR cvterm.name = 'base_call_error_correction' 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 = 'contig_collection' 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 = 'CHiP_seq_region' OR 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 = 'pseudogene' 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 = 'repeat_region' OR cvterm.name = 'insertion' OR cvterm.name = 'gene' OR cvterm.name = 'repeat_unit' OR cvterm.name = 'QTL' 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 = 'genetic_marker' OR cvterm.name = 'sequence_motif' OR cvterm.name = 'restriction_enzyme_recognition_site' OR cvterm.name = 'restriction_enzyme_single_strand_overhang' OR cvterm.name = 'epigenetically_modified_region' OR cvterm.name = 'open_chromatin_region' 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 = 'recombination_signal_sequence' 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 = 'processed_pseudogene' OR cvterm.name = 'non_processed_pseudogene' OR cvterm.name = 'pseudogene_by_unequal_crossing_over' OR cvterm.name = 'nuclear_mt_pseudogene' OR cvterm.name = 'cassette_pseudogene' OR cvterm.name = 'duplicated_pseudogene' OR cvterm.name = 'unitary_pseudogene' OR cvterm.name = 'protein_binding_site' OR cvterm.name = 'epitope' OR cvterm.name = 'nucleotide_binding_site' OR cvterm.name = 'metal_binding_site' OR cvterm.name = 'ligand_binding_site' OR cvterm.name = 'protein_protein_contact' OR cvterm.name = 'nucleotide_to_protein_binding_site' 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 = 'miRNA_target_site' OR cvterm.name = 'DNA_binding_site' OR cvterm.name = 'primer_binding_site' OR cvterm.name = 'polypeptide_DNA_contact' OR cvterm.name = 'polypeptide_metal_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_ligand_contact' 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 = '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 = 'X_element_combinatorial_repeat' OR cvterm.name = 'Y_prime_element' OR cvterm.name = 'telomeric_repeat' OR cvterm.name = 'nested_repeat' OR cvterm.name = 'centromeric_repeat' 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 = 'nested_tandem_repeat' OR cvterm.name = 'regional_centromere_inner_repeat_region' OR cvterm.name = 'regional_centromere_outer_repeat_region' OR cvterm.name = 'transgenic_insertion' OR cvterm.name = 'duplication' OR cvterm.name = 'tandem_duplication' OR cvterm.name = 'direct_tandem_duplication' OR cvterm.name = 'inverted_tandem_duplication' 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_with_non_canonical_start_codon' 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 = 'rRNA_gene' OR cvterm.name = 'piRNA_gene' OR cvterm.name = 'RNase_P_RNA_gene' OR cvterm.name = 'RNase_MRP_RNA_gene' OR cvterm.name = 'lincRNA_gene' OR cvterm.name = 'telomerase_RNA_gene' OR cvterm.name = 'cryptogene' OR cvterm.name = 'gene_with_start_codon_CUG' 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 = 'point_centromere' OR cvterm.name = 'regional_centromere' 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 = 'processed_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 = 'tasiRNA_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 = 'edited_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 = 'tasiRNA' 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 = 'transcription_regulatory_region' OR cvterm.name = 'translation_regulatory_region' OR cvterm.name = 'recombination_regulatory_region' OR cvterm.name = 'replication_regulatory_region' 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 = 'intronic_regulatory_region' 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 = 'operator' OR cvterm.name = 'bacterial_RNApol_promoter' OR cvterm.name = 'bacterial_terminator' OR cvterm.name = 'bacterial_RNApol_promoter_sigma_70' OR cvterm.name = 'bacterial_RNApol_promoter_sigma54' 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 = 'ISRE' 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_II_core_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 = 'bacterial_RNApol_promoter_sigma_70' OR cvterm.name = 'bacterial_RNApol_promoter_sigma54' 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 = 'silencer' OR cvterm.name = 'enhancer_bound_by_factor' OR cvterm.name = 'shadow_enhancer' OR cvterm.name = 'splice_enhancer' OR cvterm.name = 'intronic_splice_enhancer' OR cvterm.name = 'exonic_splice_enhancer' OR cvterm.name = 'attenuator' 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 = 'ribosome_entry_site' OR cvterm.name = 'UTR' OR cvterm.name = 'CDS' 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 = 'internal_ribosome_entry_site' OR cvterm.name = 'Shine_Dalgarno_sequence' OR cvterm.name = 'kozak_sequence' OR cvterm.name = 'internal_Shine_Dalgarno_sequence' 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 = 'upstream_AUG_codon' OR cvterm.name = 'AU_rich_element' OR cvterm.name = 'Bruno_response_element' OR cvterm.name = 'iron_responsive_element' OR cvterm.name = 'coding_start' OR cvterm.name = 'coding_end' OR cvterm.name = 'codon' 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 = '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 = 'cryptic_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 = 'SL3_acceptor_site' OR cvterm.name = 'SL4_acceptor_site' OR cvterm.name = 'SL5_acceptor_site' OR cvterm.name = 'SL6_acceptor_site' OR cvterm.name = 'SL7_acceptor_site' OR cvterm.name = 'SL8_acceptor_site' OR cvterm.name = 'SL9_acceptor_site' OR cvterm.name = 'SL10_accceptor_site' OR cvterm.name = 'SL11_acceptor_site' OR cvterm.name = 'SL12_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 = 'peptide_localization_signal' 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 = 'transit_peptide' OR cvterm.name = 'nuclear_localization_signal' OR cvterm.name = 'endosomal_localization_signal' OR cvterm.name = 'lysosomal_localization_signal' OR cvterm.name = 'nuclear_export_signal' OR cvterm.name = 'nuclear_rim_localization_signal' OR cvterm.name = 'cleaved_initiator_methionine' 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 = 'histone_modification' OR cvterm.name = 'histone_methylation_site' OR cvterm.name = 'histone_acetylation_site' OR cvterm.name = 'histone_ubiqitination_site' OR cvterm.name = 'histone_acylation_region' OR cvterm.name = 'H4K20_monomethylation_site' OR cvterm.name = 'H2BK5_monomethylation_site' OR cvterm.name = 'H3K27_methylation_site' OR cvterm.name = 'H3K36_methylation_site' OR cvterm.name = 'H3K4_methylation_site' OR cvterm.name = 'H3K79_methylation_site' OR cvterm.name = 'H3K9_methylation_site' OR cvterm.name = 'H3K27_monomethylation_site' OR cvterm.name = 'H3K27_trimethylation_site' OR cvterm.name = 'H3K27_dimethylation_site' OR cvterm.name = 'H3K36_monomethylation_site' OR cvterm.name = 'H3K36_dimethylation_site' OR cvterm.name = 'H3K36_trimethylation_site' OR cvterm.name = 'H3K4_monomethylation_site' OR cvterm.name = 'H3K4_trimethylation' OR cvterm.name = 'H3K4_dimethylation_site' OR cvterm.name = 'H3K79_monomethylation_site' OR cvterm.name = 'H3K79_dimethylation_site' OR cvterm.name = 'H3K79_trimethylation_site' OR cvterm.name = 'H3K9_trimethylation_site' OR cvterm.name = 'H3K9_monomethylation_site' OR cvterm.name = 'H3K9_dimethylation_site' OR cvterm.name = 'H3K9_acetylation_site' OR cvterm.name = 'H3K14_acetylation_site' OR cvterm.name = 'H3K18_acetylation_site' OR cvterm.name = 'H3K23_acylation site' OR cvterm.name = 'H3K27_acylation_site' OR cvterm.name = 'H4K16_acylation_site' OR cvterm.name = 'H4K5_acylation_site' OR cvterm.name = 'H4K8_acylation site' OR cvterm.name = 'H2B_ubiquitination_site' OR cvterm.name = 'H4K_acylation_region' 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 = 'pseudogenic_gene_segment' OR cvterm.name = 'mobile_intron' OR cvterm.name = 'extrachromosomal_mobile_genetic_element' OR cvterm.name = 'integrated_mobile_genetic_element' OR cvterm.name = 'natural_transposable_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 = '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 = 'nested_transposon' OR cvterm.name = 'LTR_retrotransposon' OR cvterm.name = 'non_LTR_retrotransposon' 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 = 'p_element' 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 = '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 = 'targeting_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 = '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 = '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 = 'arginine' 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 = 'heritable_phenotypic_marker' OR cvterm.name = 'DArT_marker' OR cvterm.name = 'nucleotide_motif' OR cvterm.name = 'DNA_motif' OR cvterm.name = 'RNA_motif' OR cvterm.name = 'PSE_motif' OR cvterm.name = 'CAAT_signal' OR cvterm.name = 'minus_10_signal' OR cvterm.name = 'minus_35_signal' OR cvterm.name = 'DRE_motif' OR cvterm.name = 'E_box_motif' OR cvterm.name = 'INR1_motif' OR cvterm.name = 'GAGA_motif' OR cvterm.name = 'octamer_motif' OR cvterm.name = 'retinoic_acid_responsive_element' OR cvterm.name = 'promoter_element' OR cvterm.name = 'DCE_SI' OR cvterm.name = 'DCE_SII' OR cvterm.name = 'DCE_SIII' OR cvterm.name = 'minus_12_signal' OR cvterm.name = 'minus_24_signal' OR cvterm.name = 'GC_rich_promoter_region' 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 = 'core_promoter_element' OR cvterm.name = 'regulatory_promoter_element' OR cvterm.name = 'INR_motif' OR cvterm.name = 'DPE_motif' OR cvterm.name = 'BREu_motif' OR cvterm.name = 'TATA_box' OR cvterm.name = 'A_box' OR cvterm.name = 'B_box' OR cvterm.name = 'C_box' OR cvterm.name = 'MTE' OR cvterm.name = 'BREd_motif' OR cvterm.name = 'DCE' OR cvterm.name = 'intermediate_element' OR cvterm.name = 'RNA_polymerase_II_TATA_box' OR cvterm.name = 'RNA_polymerase_III_TATA_box' OR cvterm.name = 'A_box_type_1' OR cvterm.name = 'A_box_type_2' OR cvterm.name = 'proximal_promoter_element' OR cvterm.name = 'distal_promoter_element' 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 = 'blunt_end_restriction_enzyme_cleavage_site' OR cvterm.name = 'sticky_end_restriction_enzyme_cleavage_site' OR cvterm.name = 'modified_base' OR cvterm.name = 'epigenetically_modified_gene' OR cvterm.name = 'histone_modification' OR cvterm.name = 'methylated_base_feature' OR cvterm.name = 'methylated_C' OR cvterm.name = 'methylated_A' 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 = 'histone_methylation_site' OR cvterm.name = 'histone_acetylation_site' OR cvterm.name = 'histone_ubiqitination_site' OR cvterm.name = 'histone_acylation_region' OR cvterm.name = 'H4K20_monomethylation_site' OR cvterm.name = 'H2BK5_monomethylation_site' OR cvterm.name = 'H3K27_methylation_site' OR cvterm.name = 'H3K36_methylation_site' OR cvterm.name = 'H3K4_methylation_site' OR cvterm.name = 'H3K79_methylation_site' OR cvterm.name = 'H3K9_methylation_site' OR cvterm.name = 'H3K27_monomethylation_site' OR cvterm.name = 'H3K27_trimethylation_site' OR cvterm.name = 'H3K27_dimethylation_site' OR cvterm.name = 'H3K36_monomethylation_site' OR cvterm.name = 'H3K36_dimethylation_site' OR cvterm.name = 'H3K36_trimethylation_site' OR cvterm.name = 'H3K4_monomethylation_site' OR cvterm.name = 'H3K4_trimethylation' OR cvterm.name = 'H3K4_dimethylation_site' OR cvterm.name = 'H3K79_monomethylation_site' OR cvterm.name = 'H3K79_dimethylation_site' OR cvterm.name = 'H3K79_trimethylation_site' OR cvterm.name = 'H3K9_trimethylation_site' OR cvterm.name = 'H3K9_monomethylation_site' OR cvterm.name = 'H3K9_dimethylation_site' OR cvterm.name = 'H3K9_acetylation_site' OR cvterm.name = 'H3K14_acetylation_site' OR cvterm.name = 'H3K18_acetylation_site' OR cvterm.name = 'H3K23_acylation site' OR cvterm.name = 'H3K27_acylation_site' OR cvterm.name = 'H4K16_acylation_site' OR cvterm.name = 'H4K5_acylation_site' OR cvterm.name = 'H4K8_acylation site' OR cvterm.name = 'H2B_ubiquitination_site' OR cvterm.name = 'H4K_acylation_region' OR cvterm.name = 'operon' OR cvterm.name = 'mating_type_region' 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 = 'MNP' OR cvterm.name = 'SNV' OR cvterm.name = 'complex_substitution' OR cvterm.name = 'simple_sequence_length_variation' OR cvterm.name = 'SNP' OR cvterm.name = 'point_mutation' 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 = 'flanking_region' 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 = 'non_LTR_retrotransposon_polymeric_tract' OR cvterm.name = 'LTR_component' OR cvterm.name = 'repeat_fragment' OR cvterm.name = 'transposon_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 = 'region';

--- ************************************************
--- *** relation: sequence_secondary_structure ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A folded sequence.                       ***
--- ************************************************
---

CREATE VIEW sequence_secondary_structure AS
  SELECT
    feature_id AS sequence_secondary_structure_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'sequence_secondary_structure';

--- ************************************************
--- *** relation: g_quartet ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** G-quartets are unusual nucleic acid stru ***
--- *** ctures consisting of a planar arrangemen ***
--- *** t where each guanine is hydrogen bonded  ***
--- *** by hoogsteen pairing to another guanine  ***
--- *** in the quartet.                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: interior_coding_exon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: satellite_dna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The many tandem repeats (identical or re ***
--- *** lated) of a short basic repeating unit;  ***
--- *** many have a base composition or other pr ***
--- *** operty different from the genome average ***
--- ***  that allows them to be separated from t ***
--- *** he bulk (main band) genomic DNA.         ***
--- ************************************************
---

CREATE VIEW satellite_dna AS
  SELECT
    feature_id AS satellite_dna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'satellite_DNA';

--- ************************************************
--- *** relation: pcr_product ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region amplified by a PCR reaction.    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: read_pair ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** One of a pair of sequencing reads in whi ***
--- *** ch the two members of the pair are relat ***
--- *** ed by originating at either end of a clo ***
--- *** ne insert.                               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: protein_coding ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: non_protein_coding ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW non_protein_coding AS
  SELECT
    feature_id AS non_protein_coding_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'miRNA_encoding' OR cvterm.name = 'rRNA_encoding' OR cvterm.name = 'scRNA_encoding' OR cvterm.name = 'snoRNA_encoding' OR cvterm.name = 'snRNA_encoding' OR cvterm.name = 'SRP_RNA_encoding' OR cvterm.name = 'stRNA_encoding' OR cvterm.name = 'tmRNA_encoding' OR cvterm.name = 'tRNA_encoding' OR cvterm.name = 'gRNA_encoding' OR cvterm.name = 'C_D_box_snoRNA_encoding' OR cvterm.name = 'H_ACA_box_snoRNA_encoding' OR cvterm.name = 'non_protein_coding';

--- ************************************************
--- *** relation: scrna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The primary transcript of any one of sev ***
--- *** eral small cytoplasmic RNA molecules pre ***
--- *** sent in the cytoplasm and sometimes nucl ***
--- *** eus of a eukaryote.                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: scrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A small non coding RNA sequence, present ***
--- ***  in the cytoplasm.                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: inr_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence element characteristic of som ***
--- *** e RNA polymerase II promoters required f ***
--- *** or the correct positioning of the polyme ***
--- *** rase for the start of transcription. Ove ***
--- *** rlaps the TSS. The mammalian consensus s ***
--- *** equence is YYAN(T|A)YY; the Drosophila c ***
--- *** onsensus sequence is TCA(G|T)t(T|C). In  ***
--- *** each the A is at position +1 with respec ***
--- *** t to the TSS. Functionally similar to th ***
--- *** e TATA box element.                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dpe_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence element characteristic of som ***
--- *** e RNA polymerase II promoters; Positione ***
--- *** d from +28 to +32 with respect to the TS ***
--- *** S (+1). Experimental results suggest tha ***
--- *** t the DPE acts in conjunction with the I ***
--- *** NR_motif to provide a binding site for T ***
--- *** FIID in the absence of a TATA box to med ***
--- *** iate transcription of TATA-less promoter ***
--- *** s. Consensus sequence (A|G)G(A|T)(C|T)(G ***
--- *** |A|C).                                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: breu_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence element characteristic of som ***
--- *** e RNA polymerase II promoters, located i ***
--- *** mmediately upstream of some TATA box ele ***
--- *** ments at -37 to -32 with respect to the  ***
--- *** TSS (+1). Consensus sequence is (G|C)(G| ***
--- *** C)(G|A)CGCC. Binds TFIIB.                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: pse_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence element characteristic of the ***
--- ***  promoters of snRNA genes transcribed by ***
--- ***  RNA polymerase II or by RNA polymerase  ***
--- *** III. Located between -45 and -60 relativ ***
--- *** e to the TSS. The human PSE_motif consen ***
--- *** sus sequence is TCACCNTNA(C|G)TNAAAAG(T| ***
--- *** G).                                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: linkage_group ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A group of loci that can be grouped in a ***
--- ***  linear order representing the different ***
--- ***  degrees of linkage among the genes conc ***
--- *** erned.                                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rna_internal_loop ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of double stranded RNA where th ***
--- *** e bases do not conform to WC base pairin ***
--- *** g. The loop is closed on both sides by c ***
--- *** anonical base pairing. If the interrupti ***
--- *** on to base pairing occurs on one strand  ***
--- *** only, it is known as a bulge.            ***
--- ************************************************
---

CREATE VIEW rna_internal_loop AS
  SELECT
    feature_id AS rna_internal_loop_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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_internal_loop';

--- ************************************************
--- *** relation: asymmetric_rna_internal_loop ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An internal RNA loop where one of the st ***
--- *** rands includes more bases than the corre ***
--- *** sponding region on the other strand.     ***
--- ************************************************
---

CREATE VIEW asymmetric_rna_internal_loop AS
  SELECT
    feature_id AS asymmetric_rna_internal_loop_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'K_turn_RNA_motif' OR cvterm.name = 'sarcin_like_RNA_motif' OR cvterm.name = 'asymmetric_RNA_internal_loop';

--- ************************************************
--- *** relation: a_minor_rna_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region forming a motif, composed of ad ***
--- *** enines, where the minor groove edges are ***
--- ***  inserted into the minor groove of anoth ***
--- *** er helix.                                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: k_turn_rna_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The kink turn (K-turn) is an RNA structu ***
--- *** ral motif that creates a sharp (~120 deg ***
--- *** ree) bend between two continuous helices ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: sarcin_like_rna_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A loop in ribosomal RNA containing the s ***
--- *** ites of attack for ricin and sarcin.     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: symmetric_rna_internal_loop ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An internal RNA loop where the extent of ***
--- ***  the loop on both stands is the same siz ***
--- *** e.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rna_junction_loop ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW rna_junction_loop AS
  SELECT
    feature_id AS rna_junction_loop_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'RNA_hook_turn' OR cvterm.name = 'RNA_junction_loop';

--- ************************************************
--- *** relation: rna_hook_turn ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: base_pair ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW base_pair AS
  SELECT
    feature_id AS base_pair_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'base_pair';

--- ************************************************
--- *** relation: wc_base_pair ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The canonical base pair, where two bases ***
--- ***  interact via WC edges, with glycosidic  ***
--- *** bonds oriented cis relative to the axis  ***
--- *** of orientation.                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: sugar_edge_base_pair ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A type of non-canonical base-pairing.    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: aptamer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** DNA or RNA molecules that have been sele ***
--- *** cted from random pools based on their ab ***
--- *** ility to bind other molecules.           ***
--- ************************************************
---

CREATE VIEW aptamer AS
  SELECT
    feature_id AS aptamer_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'DNA_aptamer' OR cvterm.name = 'RNA_aptamer' OR cvterm.name = 'aptamer';

--- ************************************************
--- *** relation: dna_aptamer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** DNA molecules that have been selected fr ***
--- *** om random pools based on their ability t ***
--- *** o bind other molecules.                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rna_aptamer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** RNA molecules that have been selected fr ***
--- *** om random pools based on their ability t ***
--- *** o bind other molecules.                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: morpholino_oligo ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Morpholino oligos are synthesized from f ***
--- *** our different Morpholino subunits, each  ***
--- *** of which contains one of the four geneti ***
--- *** c bases (A, C, G, T) linked to a 6-membe ***
--- *** red morpholine ring. Eighteen to 25 subu ***
--- *** nits of these four subunit types are joi ***
--- *** ned in a specific order by non-ionic pho ***
--- *** sphorodiamidate intersubunit linkages to ***
--- ***  give a Morpholino.                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: riboswitch ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A riboswitch is a part of an mRNA that c ***
--- *** an act as a direct sensor of small molec ***
--- *** ules to control their own expression. A  ***
--- *** riboswitch is a cis element in the 5' en ***
--- *** d of an mRNA, that acts as a direct sens ***
--- *** or of metabolites.                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: matrix_attachment_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A DNA region that is required for the bi ***
--- *** nding of chromatin to the nuclear matrix ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: locus_control_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A DNA region that includes DNAse hyperse ***
--- *** nsitive sites located 5' to a gene that  ***
--- *** confers the high-level, position-indepen ***
--- *** dent, and copy number-dependent expressi ***
--- *** on to that gene.                         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: match_part ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A part of a match, for example an hsp fr ***
--- *** om blast is a match_part.                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: genomic_clone ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A clone of a DNA region of a genome.     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: processed_pseudogene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A pseudogene where by an mRNA was retrot ***
--- *** ransposed. The mRNA sequence is transcri ***
--- *** bed back into the genome, lacking intron ***
--- *** s and promoters, but often including a p ***
--- *** olyA tail.                               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: pseudogene_by_unequal_crossing_over ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A pseudogene caused by unequal crossing  ***
--- *** over at recombination.                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: probe ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A DNA sequence used experimentally to de ***
--- *** tect the presence or absence of a comple ***
--- *** mentary nucleic acid.                    ***
--- ************************************************
---

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

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

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

--- ************************************************
--- *** relation: hyperploid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of chromosome variation where the ***
--- ***  chromosome complement is not an exact m ***
--- *** ultiple of the haploid number as extra c ***
--- *** hromosomes are present.                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: hypoploid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of chromosome variation where the ***
--- ***  chromosome complement is not an exact m ***
--- *** ultiple of the haploid number as some ch ***
--- *** romosomes are missing.                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: operator ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A regulatory element of an operon to whi ***
--- *** ch activators or repressors bind thereby ***
--- ***  effecting translation of genes in that  ***
--- *** operon.                                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: nuclease_binding_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A binding site that, of a nucleotide mol ***
--- *** ecule, that interacts selectively and no ***
--- *** n-covalently with polypeptide residues o ***
--- *** f a nuclease.                            ***
--- ************************************************
---

CREATE VIEW nuclease_binding_site AS
  SELECT
    feature_id AS nuclease_binding_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'nuclease_binding_site';

--- ************************************************
--- *** relation: compound_chromosome_arm ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: restriction_enzyme_binding_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A binding site that, in the nucleotide m ***
--- *** olecule, interacts selectively and non-c ***
--- *** ovalently with polypeptide residues of a ***
--- ***  restriction enzyme.                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: d_intrachr_transposition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An intrachromosomal transposition whereb ***
--- *** y a translocation in which one of the fo ***
--- *** ur broken ends loses a segment before re ***
--- *** -joining.                                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: d_interchr_transposition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An interchromosomal transposition whereb ***
--- *** y a translocation in which one of the fo ***
--- *** ur broken ends loses a segment before re ***
--- *** -joining.                                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: free_chromosome_arm ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome structure variation whereby ***
--- ***  an arm exists as an individual chromoso ***
--- *** me element.                              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gene_to_gene_feature ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW gene_to_gene_feature AS
  SELECT
    feature_id AS gene_to_gene_feature_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'overlapping' OR cvterm.name = 'inside_intron' OR cvterm.name = 'five_prime_three_prime_overlap' OR cvterm.name = 'five_prime_five_prime_overlap' OR cvterm.name = 'three_prime_three_prime_overlap' OR cvterm.name = 'three_prime_five_prime_overlap' OR cvterm.name = 'antisense' OR cvterm.name = 'inside_intron_antiparallel' OR cvterm.name = 'inside_intron_parallel' OR cvterm.name = 'gene_to_gene_feature';

--- ************************************************
--- *** relation: overlapping ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a gene that has  ***
--- *** a sequence that overlaps the sequence of ***
--- ***  another gene.                           ***
--- ************************************************
---

CREATE VIEW overlapping AS
  SELECT
    feature_id AS overlapping_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'inside_intron' OR cvterm.name = 'five_prime_three_prime_overlap' OR cvterm.name = 'five_prime_five_prime_overlap' OR cvterm.name = 'three_prime_three_prime_overlap' OR cvterm.name = 'three_prime_five_prime_overlap' OR cvterm.name = 'antisense' OR cvterm.name = 'inside_intron_antiparallel' OR cvterm.name = 'inside_intron_parallel' OR cvterm.name = 'overlapping';

--- ************************************************
--- *** relation: inside_intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe a gene when it  ***
--- *** is located within the intron of another  ***
--- *** gene.                                    ***
--- ************************************************
---

CREATE VIEW inside_intron AS
  SELECT
    feature_id AS inside_intron_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'inside_intron_antiparallel' OR cvterm.name = 'inside_intron_parallel' OR cvterm.name = 'inside_intron';

--- ************************************************
--- *** relation: inside_intron_antiparallel ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe a gene when it  ***
--- *** is located within the intron of another  ***
--- *** gene and on the opposite strand.         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: inside_intron_parallel ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe a gene when it  ***
--- *** is located within the intron of another  ***
--- *** gene and on the same strand.             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: five_prime_three_prime_overlap ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe a gene when the ***
--- ***  five prime region overlaps with another ***
--- ***  gene's 3' region.                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: five_prime_five_prime_overlap ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe a gene when the ***
--- ***  five prime region overlaps with another ***
--- ***  gene's five prime region.               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: three_prime_three_prime_overlap ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe a gene when the ***
--- ***  3' region overlaps with another gene's  ***
--- *** 3' region.                               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: three_prime_five_prime_overlap ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe a gene when the ***
--- ***  3' region overlaps with another gene's  ***
--- *** 5' region.                               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: antisense ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region sequence that is complementary  ***
--- *** to a sequence of messenger RNA.          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polycistronic_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript that is polycistronic.      ***
--- ************************************************
---

CREATE VIEW polycistronic_transcript AS
  SELECT
    feature_id AS polycistronic_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'polycistronic_transcript';

--- ************************************************
--- *** relation: dicistronic_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript that is dicistronic.        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: operon_member ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gene_array_member ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: macronuclear_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: micronuclear_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: nuclear_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene from nuclear sequence.            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: mt_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene located in mitochondrial sequence ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW mt_gene AS
  SELECT
    feature_id AS mt_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'kinetoplast_gene' OR cvterm.name = 'maxicircle_gene' OR cvterm.name = 'minicircle_gene' OR cvterm.name = 'cryptogene' OR cvterm.name = 'mt_gene';

--- ************************************************
--- *** relation: kinetoplast_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene located in kinetoplast sequence.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: plastid_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene from plastid sequence.            ***
--- ************************************************
---

CREATE VIEW plastid_gene AS
  SELECT
    feature_id AS plastid_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'plastid_gene';

--- ************************************************
--- *** relation: apicoplast_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene from apicoplast sequence.         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: ct_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene from chloroplast sequence.        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: chromoplast_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene from chromoplast_sequence.        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: cyanelle_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene from cyanelle sequence.           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: leucoplast_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A plastid gene from leucoplast sequence. ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: proplastid_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene from proplastid sequence.         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: nucleomorph_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene from nucleomorph sequence.        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: plasmid_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene from plasmid sequence.            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: proviral_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene from proviral sequence.           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: endogenous_retroviral_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A proviral gene with origin endogenous r ***
--- *** etrovirus.                               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: transposable_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transposon or insertion sequence. An e ***
--- *** lement that can insert in a variety of D ***
--- *** NA sequences.                            ***
--- ************************************************
---

CREATE VIEW transposable_element AS
  SELECT
    feature_id AS transposable_element_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'nested_transposon' OR cvterm.name = 'LTR_retrotransposon' OR cvterm.name = 'non_LTR_retrotransposon' 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 = 'p_element' 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 = 'transposable_element';

--- ************************************************
--- *** relation: expressed_sequence_match ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A match to an EST or cDNA sequence.      ***
--- ************************************************
---

CREATE VIEW expressed_sequence_match AS
  SELECT
    feature_id AS expressed_sequence_match_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'EST_match' OR cvterm.name = 'cDNA_match' OR cvterm.name = 'UST_match' OR cvterm.name = 'RST_match' OR cvterm.name = 'expressed_sequence_match';

--- ************************************************
--- *** relation: clone_insert_end ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The end of the clone insert.             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence of amino acids linked by pept ***
--- *** ide bonds which may lack appreciable ter ***
--- *** tiary structure and may not be liable to ***
--- ***  irreversible denaturation.              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: chromosome_arm ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of the chromosome between the c ***
--- *** entromere and the telomere. Human chromo ***
--- *** somes have two arms, the p arm (short) a ***
--- *** nd the q arm (long) which are separated  ***
--- *** from each other by the centromere.       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: sequencing_primer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: mrna_with_frameshift ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An mRNA with a frameshift.               ***
--- ************************************************
---

CREATE VIEW mrna_with_frameshift AS
  SELECT
    feature_id AS mrna_with_frameshift_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'mRNA_with_frameshift';

--- ************************************************
--- *** relation: sequence_feature ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An extent of biological sequence.        ***
--- ************************************************
---

CREATE VIEW sequence_feature AS
  SELECT
    feature_id AS sequence_feature_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'region' OR cvterm.name = 'junction' OR cvterm.name = 'sequence_alteration' OR cvterm.name = 'biomaterial_region' OR cvterm.name = 'experimental_feature' OR cvterm.name = 'biological_region' OR cvterm.name = 'topologically_defined_region' OR 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 = 'ASPE_primer' OR cvterm.name = 'dCAPS_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 = 'targeting_vector' 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 = '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 = '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 = 'high_identity_region' OR cvterm.name = 'mathematically_defined_repeat' OR cvterm.name = 'experimentally_defined_binding_region' 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 = 'paired_end_fragment' OR cvterm.name = 'read_pair' 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 = 'YAC_end' OR cvterm.name = 'clone_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 = 'RR_tract' OR cvterm.name = 'homologous_region' OR cvterm.name = 'centromere_DNA_Element_I' OR cvterm.name = 'centromere_DNA_Element_II' OR cvterm.name = 'centromere_DNA_Element_III' OR cvterm.name = 'X_element' OR cvterm.name = 'U_box' OR cvterm.name = 'regional_centromere_central_core' 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 = 'assembly_error_correction' OR cvterm.name = 'base_call_error_correction' 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 = 'contig_collection' 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 = 'CHiP_seq_region' OR 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 = 'pseudogene' 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 = 'repeat_region' OR cvterm.name = 'insertion' OR cvterm.name = 'gene' OR cvterm.name = 'repeat_unit' OR cvterm.name = 'QTL' 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 = 'genetic_marker' OR cvterm.name = 'sequence_motif' OR cvterm.name = 'restriction_enzyme_recognition_site' OR cvterm.name = 'restriction_enzyme_single_strand_overhang' OR cvterm.name = 'epigenetically_modified_region' OR cvterm.name = 'open_chromatin_region' 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 = 'recombination_signal_sequence' 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 = 'processed_pseudogene' OR cvterm.name = 'non_processed_pseudogene' OR cvterm.name = 'pseudogene_by_unequal_crossing_over' OR cvterm.name = 'nuclear_mt_pseudogene' OR cvterm.name = 'cassette_pseudogene' OR cvterm.name = 'duplicated_pseudogene' OR cvterm.name = 'unitary_pseudogene' OR cvterm.name = 'protein_binding_site' OR cvterm.name = 'epitope' OR cvterm.name = 'nucleotide_binding_site' OR cvterm.name = 'metal_binding_site' OR cvterm.name = 'ligand_binding_site' OR cvterm.name = 'protein_protein_contact' OR cvterm.name = 'nucleotide_to_protein_binding_site' 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 = 'miRNA_target_site' OR cvterm.name = 'DNA_binding_site' OR cvterm.name = 'primer_binding_site' OR cvterm.name = 'polypeptide_DNA_contact' OR cvterm.name = 'polypeptide_metal_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_ligand_contact' 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 = '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 = 'X_element_combinatorial_repeat' OR cvterm.name = 'Y_prime_element' OR cvterm.name = 'telomeric_repeat' OR cvterm.name = 'nested_repeat' OR cvterm.name = 'centromeric_repeat' 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 = 'nested_tandem_repeat' OR cvterm.name = 'regional_centromere_inner_repeat_region' OR cvterm.name = 'regional_centromere_outer_repeat_region' OR cvterm.name = 'transgenic_insertion' OR cvterm.name = 'duplication' OR cvterm.name = 'tandem_duplication' OR cvterm.name = 'direct_tandem_duplication' OR cvterm.name = 'inverted_tandem_duplication' 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_with_non_canonical_start_codon' 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 = 'rRNA_gene' OR cvterm.name = 'piRNA_gene' OR cvterm.name = 'RNase_P_RNA_gene' OR cvterm.name = 'RNase_MRP_RNA_gene' OR cvterm.name = 'lincRNA_gene' OR cvterm.name = 'telomerase_RNA_gene' OR cvterm.name = 'cryptogene' OR cvterm.name = 'gene_with_start_codon_CUG' 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 = 'point_centromere' OR cvterm.name = 'regional_centromere' 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 = 'processed_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 = 'tasiRNA_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 = 'edited_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 = 'tasiRNA' 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 = 'transcription_regulatory_region' OR cvterm.name = 'translation_regulatory_region' OR cvterm.name = 'recombination_regulatory_region' OR cvterm.name = 'replication_regulatory_region' 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 = 'intronic_regulatory_region' 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 = 'operator' OR cvterm.name = 'bacterial_RNApol_promoter' OR cvterm.name = 'bacterial_terminator' OR cvterm.name = 'bacterial_RNApol_promoter_sigma_70' OR cvterm.name = 'bacterial_RNApol_promoter_sigma54' 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 = 'ISRE' 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_II_core_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 = 'bacterial_RNApol_promoter_sigma_70' OR cvterm.name = 'bacterial_RNApol_promoter_sigma54' 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 = 'silencer' OR cvterm.name = 'enhancer_bound_by_factor' OR cvterm.name = 'shadow_enhancer' OR cvterm.name = 'splice_enhancer' OR cvterm.name = 'intronic_splice_enhancer' OR cvterm.name = 'exonic_splice_enhancer' OR cvterm.name = 'attenuator' 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 = 'ribosome_entry_site' OR cvterm.name = 'UTR' OR cvterm.name = 'CDS' 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 = 'internal_ribosome_entry_site' OR cvterm.name = 'Shine_Dalgarno_sequence' OR cvterm.name = 'kozak_sequence' OR cvterm.name = 'internal_Shine_Dalgarno_sequence' 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 = 'upstream_AUG_codon' OR cvterm.name = 'AU_rich_element' OR cvterm.name = 'Bruno_response_element' OR cvterm.name = 'iron_responsive_element' OR cvterm.name = 'coding_start' OR cvterm.name = 'coding_end' OR cvterm.name = 'codon' 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 = '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 = 'cryptic_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 = 'SL3_acceptor_site' OR cvterm.name = 'SL4_acceptor_site' OR cvterm.name = 'SL5_acceptor_site' OR cvterm.name = 'SL6_acceptor_site' OR cvterm.name = 'SL7_acceptor_site' OR cvterm.name = 'SL8_acceptor_site' OR cvterm.name = 'SL9_acceptor_site' OR cvterm.name = 'SL10_accceptor_site' OR cvterm.name = 'SL11_acceptor_site' OR cvterm.name = 'SL12_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 = 'peptide_localization_signal' 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 = 'transit_peptide' OR cvterm.name = 'nuclear_localization_signal' OR cvterm.name = 'endosomal_localization_signal' OR cvterm.name = 'lysosomal_localization_signal' OR cvterm.name = 'nuclear_export_signal' OR cvterm.name = 'nuclear_rim_localization_signal' OR cvterm.name = 'cleaved_initiator_methionine' 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 = 'histone_modification' OR cvterm.name = 'histone_methylation_site' OR cvterm.name = 'histone_acetylation_site' OR cvterm.name = 'histone_ubiqitination_site' OR cvterm.name = 'histone_acylation_region' OR cvterm.name = 'H4K20_monomethylation_site' OR cvterm.name = 'H2BK5_monomethylation_site' OR cvterm.name = 'H3K27_methylation_site' OR cvterm.name = 'H3K36_methylation_site' OR cvterm.name = 'H3K4_methylation_site' OR cvterm.name = 'H3K79_methylation_site' OR cvterm.name = 'H3K9_methylation_site' OR cvterm.name = 'H3K27_monomethylation_site' OR cvterm.name = 'H3K27_trimethylation_site' OR cvterm.name = 'H3K27_dimethylation_site' OR cvterm.name = 'H3K36_monomethylation_site' OR cvterm.name = 'H3K36_dimethylation_site' OR cvterm.name = 'H3K36_trimethylation_site' OR cvterm.name = 'H3K4_monomethylation_site' OR cvterm.name = 'H3K4_trimethylation' OR cvterm.name = 'H3K4_dimethylation_site' OR cvterm.name = 'H3K79_monomethylation_site' OR cvterm.name = 'H3K79_dimethylation_site' OR cvterm.name = 'H3K79_trimethylation_site' OR cvterm.name = 'H3K9_trimethylation_site' OR cvterm.name = 'H3K9_monomethylation_site' OR cvterm.name = 'H3K9_dimethylation_site' OR cvterm.name = 'H3K9_acetylation_site' OR cvterm.name = 'H3K14_acetylation_site' OR cvterm.name = 'H3K18_acetylation_site' OR cvterm.name = 'H3K23_acylation site' OR cvterm.name = 'H3K27_acylation_site' OR cvterm.name = 'H4K16_acylation_site' OR cvterm.name = 'H4K5_acylation_site' OR cvterm.name = 'H4K8_acylation site' OR cvterm.name = 'H2B_ubiquitination_site' OR cvterm.name = 'H4K_acylation_region' 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 = 'pseudogenic_gene_segment' OR cvterm.name = 'mobile_intron' OR cvterm.name = 'extrachromosomal_mobile_genetic_element' OR cvterm.name = 'integrated_mobile_genetic_element' OR cvterm.name = 'natural_transposable_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 = '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 = 'nested_transposon' OR cvterm.name = 'LTR_retrotransposon' OR cvterm.name = 'non_LTR_retrotransposon' 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 = 'p_element' 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 = '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 = 'targeting_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 = '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 = '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 = 'arginine' 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 = 'heritable_phenotypic_marker' OR cvterm.name = 'DArT_marker' OR cvterm.name = 'nucleotide_motif' OR cvterm.name = 'DNA_motif' OR cvterm.name = 'RNA_motif' OR cvterm.name = 'PSE_motif' OR cvterm.name = 'CAAT_signal' OR cvterm.name = 'minus_10_signal' OR cvterm.name = 'minus_35_signal' OR cvterm.name = 'DRE_motif' OR cvterm.name = 'E_box_motif' OR cvterm.name = 'INR1_motif' OR cvterm.name = 'GAGA_motif' OR cvterm.name = 'octamer_motif' OR cvterm.name = 'retinoic_acid_responsive_element' OR cvterm.name = 'promoter_element' OR cvterm.name = 'DCE_SI' OR cvterm.name = 'DCE_SII' OR cvterm.name = 'DCE_SIII' OR cvterm.name = 'minus_12_signal' OR cvterm.name = 'minus_24_signal' OR cvterm.name = 'GC_rich_promoter_region' 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 = 'core_promoter_element' OR cvterm.name = 'regulatory_promoter_element' OR cvterm.name = 'INR_motif' OR cvterm.name = 'DPE_motif' OR cvterm.name = 'BREu_motif' OR cvterm.name = 'TATA_box' OR cvterm.name = 'A_box' OR cvterm.name = 'B_box' OR cvterm.name = 'C_box' OR cvterm.name = 'MTE' OR cvterm.name = 'BREd_motif' OR cvterm.name = 'DCE' OR cvterm.name = 'intermediate_element' OR cvterm.name = 'RNA_polymerase_II_TATA_box' OR cvterm.name = 'RNA_polymerase_III_TATA_box' OR cvterm.name = 'A_box_type_1' OR cvterm.name = 'A_box_type_2' OR cvterm.name = 'proximal_promoter_element' OR cvterm.name = 'distal_promoter_element' 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 = 'blunt_end_restriction_enzyme_cleavage_site' OR cvterm.name = 'sticky_end_restriction_enzyme_cleavage_site' OR cvterm.name = 'modified_base' OR cvterm.name = 'epigenetically_modified_gene' OR cvterm.name = 'histone_modification' OR cvterm.name = 'methylated_base_feature' OR cvterm.name = 'methylated_C' OR cvterm.name = 'methylated_A' 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 = 'histone_methylation_site' OR cvterm.name = 'histone_acetylation_site' OR cvterm.name = 'histone_ubiqitination_site' OR cvterm.name = 'histone_acylation_region' OR cvterm.name = 'H4K20_monomethylation_site' OR cvterm.name = 'H2BK5_monomethylation_site' OR cvterm.name = 'H3K27_methylation_site' OR cvterm.name = 'H3K36_methylation_site' OR cvterm.name = 'H3K4_methylation_site' OR cvterm.name = 'H3K79_methylation_site' OR cvterm.name = 'H3K9_methylation_site' OR cvterm.name = 'H3K27_monomethylation_site' OR cvterm.name = 'H3K27_trimethylation_site' OR cvterm.name = 'H3K27_dimethylation_site' OR cvterm.name = 'H3K36_monomethylation_site' OR cvterm.name = 'H3K36_dimethylation_site' OR cvterm.name = 'H3K36_trimethylation_site' OR cvterm.name = 'H3K4_monomethylation_site' OR cvterm.name = 'H3K4_trimethylation' OR cvterm.name = 'H3K4_dimethylation_site' OR cvterm.name = 'H3K79_monomethylation_site' OR cvterm.name = 'H3K79_dimethylation_site' OR cvterm.name = 'H3K79_trimethylation_site' OR cvterm.name = 'H3K9_trimethylation_site' OR cvterm.name = 'H3K9_monomethylation_site' OR cvterm.name = 'H3K9_dimethylation_site' OR cvterm.name = 'H3K9_acetylation_site' OR cvterm.name = 'H3K14_acetylation_site' OR cvterm.name = 'H3K18_acetylation_site' OR cvterm.name = 'H3K23_acylation site' OR cvterm.name = 'H3K27_acylation_site' OR cvterm.name = 'H4K16_acylation_site' OR cvterm.name = 'H4K5_acylation_site' OR cvterm.name = 'H4K8_acylation site' OR cvterm.name = 'H2B_ubiquitination_site' OR cvterm.name = 'H4K_acylation_region' OR cvterm.name = 'operon' OR cvterm.name = 'mating_type_region' 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 = 'MNP' OR cvterm.name = 'SNV' OR cvterm.name = 'complex_substitution' OR cvterm.name = 'simple_sequence_length_variation' OR cvterm.name = 'SNP' OR cvterm.name = 'point_mutation' 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 = 'flanking_region' 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 = 'non_LTR_retrotransposon_polymeric_tract' OR cvterm.name = 'LTR_component' OR cvterm.name = 'repeat_fragment' OR cvterm.name = 'transposon_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 = 'clone_insert_end' OR cvterm.name = 'clone_insert_start' OR cvterm.name = 'exon_junction' OR cvterm.name = 'insertion_site' OR cvterm.name = 'polyA_site' OR cvterm.name = 'deletion_junction' OR cvterm.name = 'chromosome_breakpoint' OR cvterm.name = 'splice_junction' OR cvterm.name = 'trans_splice_junction' OR cvterm.name = 'restriction_enzyme_cleavage_junction' OR cvterm.name = 'transposable_element_insertion_site' OR cvterm.name = 'inversion_breakpoint' OR cvterm.name = 'translocation_breakpoint' OR cvterm.name = 'insertion_breakpoint' OR cvterm.name = 'deletion_breakpoint' OR cvterm.name = 'blunt_end_restriction_enzyme_cleavage_junction' OR cvterm.name = 'single_strand_restriction_enzyme_cleavage_site' OR cvterm.name = 'five_prime_restriction_enzyme_junction' OR cvterm.name = 'three_prime_restriction_enzyme_junction' OR cvterm.name = 'deletion' OR cvterm.name = 'translocation' OR cvterm.name = 'insertion' OR cvterm.name = 'copy_number_variation' OR cvterm.name = 'UPD' OR cvterm.name = 'structural_alteration' OR cvterm.name = 'substitution' OR cvterm.name = 'indel' OR cvterm.name = 'inversion' OR cvterm.name = 'transgenic_insertion' OR cvterm.name = 'duplication' OR cvterm.name = 'tandem_duplication' OR cvterm.name = 'direct_tandem_duplication' OR cvterm.name = 'inverted_tandem_duplication' OR cvterm.name = 'copy_number_gain' OR cvterm.name = 'copy_number_loss' OR cvterm.name = 'maternal_uniparental_disomy' OR cvterm.name = 'paternal_uniparental_disomy' OR cvterm.name = 'complex_structural_alteration' OR cvterm.name = 'sequence_length_variation' OR cvterm.name = 'MNP' OR cvterm.name = 'SNV' OR cvterm.name = 'complex_substitution' OR cvterm.name = 'simple_sequence_length_variation' OR cvterm.name = 'SNP' OR cvterm.name = 'point_mutation' 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 = 'sequence_feature';

--- ************************************************
--- *** relation: transposable_element_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene encoded within a transposable ele ***
--- *** ment. For example gag, int, env and pol  ***
--- *** are the transposable element genes of th ***
--- *** e TY element in yeast.                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: primer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An oligo to which new deoxyribonucleotid ***
--- *** es can be added by DNA polymerase.       ***
--- ************************************************
---

CREATE VIEW primer AS
  SELECT
    feature_id AS primer_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sequencing_primer' OR cvterm.name = 'forward_primer' OR cvterm.name = 'reverse_primer' OR cvterm.name = 'ASPE_primer' OR cvterm.name = 'dCAPS_primer' OR cvterm.name = 'primer';

--- ************************************************
--- *** relation: proviral_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A viral sequence which has integrated in ***
--- *** to a host genome.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: methylated_c ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A methylated deoxy-cytosine.             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: edited ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a sequence that  ***
--- *** is modified by editing.                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: transcript_with_translational_frameshift ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript with a translational frames ***
--- *** hift.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: regulated ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe a sequence that ***
--- ***  is regulated.                           ***
--- ************************************************
---

CREATE VIEW regulated AS
  SELECT
    feature_id AS regulated_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'transcriptionally_regulated' OR cvterm.name = 'post_translationally_regulated' OR cvterm.name = 'translationally_regulated' OR cvterm.name = 'imprinted' OR cvterm.name = 'transcriptionally_constitutive' OR cvterm.name = 'transcriptionally_induced' OR cvterm.name = 'transcriptionally_repressed' OR cvterm.name = 'autoregulated' OR cvterm.name = 'positively_autoregulated' OR cvterm.name = 'negatively_autoregulated' OR cvterm.name = 'silenced' OR cvterm.name = 'silenced_by_DNA_modification' OR cvterm.name = 'silenced_by_RNA_interference' OR cvterm.name = 'silenced_by_histone_modification' OR cvterm.name = 'silenced_by_DNA_methylation' OR cvterm.name = 'silenced_by_histone_methylation' OR cvterm.name = 'silenced_by_histone_deacetylation' OR cvterm.name = 'negatively_autoregulated' OR cvterm.name = 'positively_autoregulated' OR cvterm.name = 'post_translationally_regulated_by_protein_stability' OR cvterm.name = 'post_translationally_regulated_by_protein_modification' OR cvterm.name = 'maternally_imprinted' OR cvterm.name = 'paternally_imprinted' OR cvterm.name = 'regulated';

--- ************************************************
--- *** relation: protein_coding_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript that, at least in p ***
--- *** art, encodes one or more proteins.       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: forward_primer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A single stranded oligo used for polymer ***
--- *** ase chain reaction.                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rna_sequence_secondary_structure ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A folded RNA sequence.                   ***
--- ************************************************
---

CREATE VIEW rna_sequence_secondary_structure AS
  SELECT
    feature_id AS rna_sequence_secondary_structure_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'stem_loop' OR cvterm.name = 'tetraloop' OR cvterm.name = 'RNA_sequence_secondary_structure';

--- ************************************************
--- *** relation: transcriptionally_regulated ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a gene that is r ***
--- *** egulated at transcription.               ***
--- ************************************************
---

CREATE VIEW transcriptionally_regulated AS
  SELECT
    feature_id AS transcriptionally_regulated_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'transcriptionally_constitutive' OR cvterm.name = 'transcriptionally_induced' OR cvterm.name = 'transcriptionally_repressed' OR cvterm.name = 'autoregulated' OR cvterm.name = 'positively_autoregulated' OR cvterm.name = 'negatively_autoregulated' OR cvterm.name = 'silenced' OR cvterm.name = 'silenced_by_DNA_modification' OR cvterm.name = 'silenced_by_RNA_interference' OR cvterm.name = 'silenced_by_histone_modification' OR cvterm.name = 'silenced_by_DNA_methylation' OR cvterm.name = 'silenced_by_histone_methylation' OR cvterm.name = 'silenced_by_histone_deacetylation' OR cvterm.name = 'negatively_autoregulated' OR cvterm.name = 'positively_autoregulated' OR cvterm.name = 'transcriptionally_regulated';

--- ************************************************
--- *** relation: transcriptionally_constitutive ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Expressed in relatively constant amounts ***
--- ***  without regard to cellular environmenta ***
--- *** l conditions such as the concentration o ***
--- *** f a particular substrate.                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: transcriptionally_induced ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An inducer molecule is required for tran ***
--- *** scription to occur.                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: transcriptionally_repressed ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A repressor molecule is required for tra ***
--- *** nscription to stop.                      ***
--- ************************************************
---

CREATE VIEW transcriptionally_repressed AS
  SELECT
    feature_id AS transcriptionally_repressed_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'negatively_autoregulated' OR cvterm.name = 'silenced' OR cvterm.name = 'silenced_by_DNA_modification' OR cvterm.name = 'silenced_by_RNA_interference' OR cvterm.name = 'silenced_by_histone_modification' OR cvterm.name = 'silenced_by_DNA_methylation' OR cvterm.name = 'silenced_by_histone_methylation' OR cvterm.name = 'silenced_by_histone_deacetylation' OR cvterm.name = 'transcriptionally_repressed';

--- ************************************************
--- *** relation: silenced_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is silenced.                 ***
--- ************************************************
---

CREATE VIEW silenced_gene AS
  SELECT
    feature_id AS silenced_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'silenced_gene';

--- ************************************************
--- *** relation: gene_silenced_by_dna_modification ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is silenced by DNA modificat ***
--- *** ion.                                     ***
--- ************************************************
---

CREATE VIEW gene_silenced_by_dna_modification AS
  SELECT
    feature_id AS gene_silenced_by_dna_modification_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gene_silenced_by_DNA_methylation' OR cvterm.name = 'gene_silenced_by_DNA_modification';

--- ************************************************
--- *** relation: gene_silenced_by_dna_methylation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is silenced by DNA methylati ***
--- *** on.                                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: post_translationally_regulated ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a gene that is r ***
--- *** egulated after it has been translated.   ***
--- ************************************************
---

CREATE VIEW post_translationally_regulated AS
  SELECT
    feature_id AS post_translationally_regulated_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'post_translationally_regulated_by_protein_stability' OR cvterm.name = 'post_translationally_regulated_by_protein_modification' OR cvterm.name = 'post_translationally_regulated';

--- ************************************************
--- *** relation: translationally_regulated ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a gene that is r ***
--- *** egulated as it is translated.            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: reverse_primer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A single stranded oligo used for polymer ***
--- *** ase chain reaction.                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: epigenetically_modified ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** This attribute describes a gene where he ***
--- *** ritable changes other than those in the  ***
--- *** DNA sequence occur. These changes includ ***
--- *** e: modification to the DNA (such as DNA  ***
--- *** methylation, the covalent modification o ***
--- *** f cytosine), and post-translational modi ***
--- *** fication of histones.                    ***
--- ************************************************
---

CREATE VIEW epigenetically_modified AS
  SELECT
    feature_id AS epigenetically_modified_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'imprinted' OR cvterm.name = 'allelically_excluded' OR cvterm.name = 'rearranged_at_DNA_level' OR cvterm.name = 'maternally_imprinted' OR cvterm.name = 'paternally_imprinted' OR cvterm.name = 'epigenetically_modified';

--- ************************************************
--- *** relation: imprinted ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Imprinted genes are epigenetically modif ***
--- *** ied genes that are expressed monoallelic ***
--- *** ally according to their parent of origin ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW imprinted AS
  SELECT
    feature_id AS imprinted_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'maternally_imprinted' OR cvterm.name = 'paternally_imprinted' OR cvterm.name = 'imprinted';

--- ************************************************
--- *** relation: maternally_imprinted ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The maternal copy of the gene is modifie ***
--- *** d, rendering it transcriptionally silent ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: paternally_imprinted ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The paternal copy of the gene is modifie ***
--- *** d, rendering it transcriptionally silent ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: allelically_excluded ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Allelic exclusion is a process occurring ***
--- ***  in diploid organisms, where a gene is i ***
--- *** nactivated and not expressed in that cel ***
--- *** l.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gene_rearranged_at_dna_level ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An epigenetically modified gene, rearran ***
--- *** ged at the DNA level.                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: ribosome_entry_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Region in mRNA where ribosome assembles. ***
--- ************************************************
---

CREATE VIEW ribosome_entry_site AS
  SELECT
    feature_id AS ribosome_entry_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'internal_ribosome_entry_site' OR cvterm.name = 'Shine_Dalgarno_sequence' OR cvterm.name = 'kozak_sequence' OR cvterm.name = 'internal_Shine_Dalgarno_sequence' OR cvterm.name = 'ribosome_entry_site';

--- ************************************************
--- *** relation: attenuator ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence segment located within the fi ***
--- *** ve prime end of an mRNA that causes prem ***
--- *** ature termination of translation.        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: terminator ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The sequence of DNA located either at th ***
--- *** e end of the transcript that causes RNA  ***
--- *** polymerase to terminate transcription.   ***
--- ************************************************
---

CREATE VIEW terminator AS
  SELECT
    feature_id AS terminator_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'terminator';

--- ************************************************
--- *** relation: dna_sequence_secondary_structure ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A folded DNA sequence.                   ***
--- ************************************************
---

CREATE VIEW dna_sequence_secondary_structure AS
  SELECT
    feature_id AS dna_sequence_secondary_structure_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'i_motif' OR cvterm.name = 'DNA_sequence_secondary_structure';

--- ************************************************
--- *** relation: assembly_component ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of known length which may be us ***
--- *** ed to manufacture a longer region.       ***
--- ************************************************
---

CREATE VIEW assembly_component AS
  SELECT
    feature_id AS assembly_component_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'paired_end_fragment' OR cvterm.name = 'read_pair' 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 = 'YAC_end' OR cvterm.name = 'clone_end' OR cvterm.name = 'RFLP_fragment' OR cvterm.name = 'tiling_path_clone' OR cvterm.name = 'assembly_component';

--- ************************************************
--- *** relation: recoded_codon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A codon that has been redefined at trans ***
--- *** lation. The redefinition may be as a res ***
--- *** ult of translational bypass, translation ***
--- *** al frameshifting or stop codon readthrou ***
--- *** gh.                                      ***
--- ************************************************
---

CREATE VIEW recoded_codon AS
  SELECT
    feature_id AS recoded_codon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'recoded_codon';

--- ************************************************
--- *** relation: capped ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing when a sequence, ***
--- ***  usually an mRNA is capped by the additi ***
--- *** on of a modified guanine nucleotide at t ***
--- *** he 5' end.                               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: exon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of the transcript sequence with ***
--- *** in a gene which is not removed from the  ***
--- *** primary RNA transcript by RNA splicing.  ***
--- ************************************************
---

CREATE VIEW exon AS
  SELECT
    feature_id AS exon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'exon';

--- ************************************************
--- *** relation: supercontig ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** One or more contigs that have been order ***
--- *** ed and oriented using end-read informati ***
--- *** on. Contains gaps that are filled with N ***
--- *** 's.                                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: contig ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A contiguous sequence derived from seque ***
--- *** nce assembly. Has no gaps, but may conta ***
--- *** in N's from unavailable bases.           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: read ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence obtained from a single sequen ***
--- *** cing experiment. Typically a read is pro ***
--- *** duced when a base calling program interp ***
--- *** rets information from a chromatogram tra ***
--- *** ce file produced from a sequencing machi ***
--- *** ne.                                      ***
--- ************************************************
---

CREATE VIEW read AS
  SELECT
    feature_id AS read_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'read_pair' 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 = 'YAC_end' OR cvterm.name = 'clone_end' OR cvterm.name = 'read';

--- ************************************************
--- *** relation: clone ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A piece of DNA that has been inserted in ***
--- ***  a vector so that it can be propagated i ***
--- *** n a host bacterium or some other organis ***
--- *** m.                                       ***
--- ************************************************
---

CREATE VIEW clone AS
  SELECT
    feature_id AS clone_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'clone';

--- ************************************************
--- *** relation: yac ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Yeast Artificial Chromosome, a vector co ***
--- *** nstructed from the telomeric, centromeri ***
--- *** c, and replication origin sequences need ***
--- *** ed for replication in yeast cells.       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: bac ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Bacterial Artificial Chromosome, a cloni ***
--- *** ng vector that can be propagated as mini ***
--- *** -chromosomes in a bacterial host.        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: pac ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The P1-derived artificial chromosome are ***
--- ***  DNA constructs that are derived from th ***
--- *** e DNA of P1 bacteriophage. They can carr ***
--- *** y large amounts (about 100-300 kilobases ***
--- *** ) of other sequences for a variety of bi ***
--- *** oengineering purposes. It is one type of ***
--- ***  vector used to clone DNA fragments (100 ***
--- *** - to 300-kb insert size; average, 150 kb ***
--- *** ) in Escherichia coli cells.             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: plasmid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A self replicating, using the hosts cell ***
--- *** ular machinery, often circular nucleic a ***
--- *** cid molecule that is distinct from a chr ***
--- *** omosome in the organism.                 ***
--- ************************************************
---

CREATE VIEW plasmid AS
  SELECT
    feature_id AS plasmid_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'plasmid';

--- ************************************************
--- *** relation: cosmid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A cloning vector that is a hybrid of lam ***
--- *** bda phages and a plasmid that can be pro ***
--- *** pagated as a plasmid or packaged as a ph ***
--- *** age,since they retain the lambda cos sit ***
--- *** es.                                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: phagemid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A plasmid which carries within its seque ***
--- *** nce a bacteriophage replication origin.  ***
--- *** When the host bacterium is infected with ***
--- ***  "helper" phage, a phagemid is replicate ***
--- *** d along with the phage DNA and packaged  ***
--- *** into phage capsids.                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: fosmid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A cloning vector that utilizes the E. co ***
--- *** li F factor.                             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: deletion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The point at which one or more contiguou ***
--- *** s nucleotides were excised.              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: methylated_a ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A modified RNA base in which adenine has ***
--- ***  been methylated.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: splice_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Consensus region of primary transcript b ***
--- *** ordering junction of splicing. A region  ***
--- *** that overlaps exactly 2 base and adjacen ***
--- *** t_to splice_junction.                    ***
--- ************************************************
---

CREATE VIEW splice_site AS
  SELECT
    feature_id AS splice_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'cis_splice_site' OR cvterm.name = 'trans_splice_site' OR cvterm.name = 'cryptic_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 = 'SL3_acceptor_site' OR cvterm.name = 'SL4_acceptor_site' OR cvterm.name = 'SL5_acceptor_site' OR cvterm.name = 'SL6_acceptor_site' OR cvterm.name = 'SL7_acceptor_site' OR cvterm.name = 'SL8_acceptor_site' OR cvterm.name = 'SL9_acceptor_site' OR cvterm.name = 'SL10_accceptor_site' OR cvterm.name = 'SL11_acceptor_site' OR cvterm.name = 'SL12_acceptor_site' OR cvterm.name = 'splice_site';

--- ************************************************
--- *** relation: five_prime_cis_splice_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Intronic 2 bp region bordering the exon, ***
--- ***  at the 5' edge of the intron. A splice_ ***
--- *** site that is downstream_adjacent_to exon ***
--- ***  and starts intron.                      ***
--- ************************************************
---

CREATE VIEW five_prime_cis_splice_site AS
  SELECT
    feature_id AS five_prime_cis_splice_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'canonical_five_prime_splice_site' OR cvterm.name = 'non_canonical_five_prime_splice_site' OR cvterm.name = 'five_prime_cis_splice_site';

--- ************************************************
--- *** relation: three_prime_cis_splice_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Intronic 2 bp region bordering the exon, ***
--- ***  at the 3' edge of the intron. A splice_ ***
--- *** site that is upstream_adjacent_to exon a ***
--- *** nd finishes intron.                      ***
--- ************************************************
---

CREATE VIEW three_prime_cis_splice_site AS
  SELECT
    feature_id AS three_prime_cis_splice_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'canonical_three_prime_splice_site' OR cvterm.name = 'non_canonical_three_prime_splice_site' OR cvterm.name = 'three_prime_cis_splice_site';

--- ************************************************
--- *** relation: enhancer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A cis-acting sequence that increases the ***
--- ***  utilization of (some) eukaryotic promot ***
--- *** ers, and can function in either orientat ***
--- *** ion and in any location (upstream or dow ***
--- *** nstream) relative to the promoter.       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: enhancer_bound_by_factor ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An enhancer bound by a factor.           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: promoter ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A regulatory_region composed of the TSS( ***
--- *** s) and binding sites for TF_complexes of ***
--- ***  the basal transcription machinery.      ***
--- ************************************************
---

CREATE VIEW promoter AS
  SELECT
    feature_id AS promoter_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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_II_core_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 = 'bacterial_RNApol_promoter_sigma_70' OR cvterm.name = 'bacterial_RNApol_promoter_sigma54' OR cvterm.name = 'SP6_RNA_Polymerase_Promoter' OR cvterm.name = 'T3_RNA_Polymerase_Promoter' OR cvterm.name = 'T7_RNA_Polymerase_Promoter' OR cvterm.name = 'promoter';

--- ************************************************
--- *** relation: rnapol_i_promoter ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A DNA sequence in eukaryotic DNA to whic ***
--- *** h RNA polymerase I binds, to begin trans ***
--- *** cription.                                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rnapol_ii_promoter ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A DNA sequence in eukaryotic DNA to whic ***
--- *** h RNA polymerase II binds, to begin tran ***
--- *** scription.                               ***
--- ************************************************
---

CREATE VIEW rnapol_ii_promoter AS
  SELECT
    feature_id AS rnapol_ii_promoter_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'RNApol_II_core_promoter' OR cvterm.name = 'RNApol_II_promoter';

--- ************************************************
--- *** relation: rnapol_iii_promoter ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A DNA sequence in eukaryotic DNA to whic ***
--- *** h RNA polymerase III binds, to begin tra ***
--- *** nscription.                              ***
--- ************************************************
---

CREATE VIEW rnapol_iii_promoter AS
  SELECT
    feature_id AS rnapol_iii_promoter_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'RNApol_III_promoter';

--- ************************************************
--- *** relation: caat_signal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Part of a conserved sequence located abo ***
--- *** ut 75-bp upstream of the start point of  ***
--- *** eukaryotic transcription units which may ***
--- ***  be involved in RNA polymerase binding;  ***
--- *** consensus=GG(C|T)CAATCT.                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gc_rich_promoter_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A conserved GC-rich region located upstr ***
--- *** eam of the start point of eukaryotic tra ***
--- *** nscription units which may occur in mult ***
--- *** iple copies or in either orientation; co ***
--- *** nsensus=GGGCGG.                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: tata_box ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A conserved AT-rich septamer found about ***
--- ***  25-bp before the start point of many eu ***
--- *** karyotic RNA polymerase II transcript un ***
--- *** its; may be involved in positioning the  ***
--- *** enzyme for correct initiation; consensus ***
--- *** =TATA(A|T)A(A|T).                        ***
--- ************************************************
---

CREATE VIEW tata_box AS
  SELECT
    feature_id AS tata_box_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'RNA_polymerase_II_TATA_box' OR cvterm.name = 'RNA_polymerase_III_TATA_box' OR cvterm.name = 'TATA_box';

--- ************************************************
--- *** relation: minus_10_signal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A conserved region about 10-bp upstream  ***
--- *** of the start point of bacterial transcri ***
--- *** ption units which may be involved in bin ***
--- *** ding RNA polymerase; consensus=TAtAaT. T ***
--- *** his region is associated with sigma fact ***
--- *** or 70.                                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: minus_35_signal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A conserved hexamer about 35-bp upstream ***
--- ***  of the start point of bacterial transcr ***
--- *** iption units; consensus=TTGACa or TGTTGA ***
--- *** CA. This region is associated with sigma ***
--- ***  factor 70.                              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: cross_genome_match ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A nucleotide match against a sequence fr ***
--- *** om another organism.                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: operon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A group of contiguous genes transcribed  ***
--- *** as a single (polycistronic) mRNA from a  ***
--- *** single regulatory region.                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: clone_insert_start ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The start of the clone insert.           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: retrotransposon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transposable element that is incorpora ***
--- *** ted into a chromosome by a mechanism tha ***
--- *** t requires reverse transcriptase.        ***
--- ************************************************
---

CREATE VIEW retrotransposon AS
  SELECT
    feature_id AS retrotransposon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'LTR_retrotransposon' OR cvterm.name = 'non_LTR_retrotransposon' OR cvterm.name = 'LINE_element' OR cvterm.name = 'SINE_element' OR cvterm.name = 'retrotransposon';

--- ************************************************
--- *** relation: translated_nucleotide_match ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A match against a translated sequence.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dna_transposon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transposon where the mechanism of tran ***
--- *** sposition is via a DNA intermediate.     ***
--- ************************************************
---

CREATE VIEW dna_transposon AS
  SELECT
    feature_id AS dna_transposon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'terminal_inverted_repeat_element' OR cvterm.name = 'foldback_element' OR cvterm.name = 'conjugative_transposon' OR cvterm.name = 'helitron' OR cvterm.name = 'p_element' OR cvterm.name = 'MITE' OR cvterm.name = 'insertion_sequence' OR cvterm.name = 'polinton' OR cvterm.name = 'DNA_transposon';

--- ************************************************
--- *** relation: non_transcribed_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of the gene which is not transc ***
--- *** ribed.                                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: u2_intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A major type of spliceosomal intron spli ***
--- *** ced by the U2 spliceosome, that includes ***
--- ***  U1, U2, U4/U6 and U5 snRNAs.            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript that in its initial state r ***
--- *** equires modification to be functional.   ***
--- ************************************************
---

CREATE VIEW primary_transcript AS
  SELECT
    feature_id AS primary_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'tasiRNA_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 = 'primary_transcript';

--- ************************************************
--- *** relation: ltr_retrotransposon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A retrotransposon flanked by long termin ***
--- *** al repeat sequences.                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of a primary transcript that is ***
--- ***  transcribed, but removed from within th ***
--- *** e transcript by splicing together the se ***
--- *** quences (exons) on either side of it.    ***
--- ************************************************
---

CREATE VIEW intron AS
  SELECT
    feature_id AS intron_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'intron';

--- ************************************************
--- *** relation: non_ltr_retrotransposon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A retrotransposon without long terminal  ***
--- *** repeat sequences.                        ***
--- ************************************************
---

CREATE VIEW non_ltr_retrotransposon AS
  SELECT
    feature_id AS non_ltr_retrotransposon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'LINE_element' OR cvterm.name = 'SINE_element' OR cvterm.name = 'non_LTR_retrotransposon';

--- ************************************************
--- *** relation: five_prime_intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: interior_intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: three_prime_intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rflp_fragment ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A DNA fragment used as a reagent to dete ***
--- *** ct the polymorphic genomic loci by hybri ***
--- *** dizing against the genomic DNA digested  ***
--- *** with a given restriction enzyme.         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: line_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A dispersed repeat family with many copi ***
--- *** es, each from 1 to 6 kb long. New elemen ***
--- *** ts are generated by retroposition of a t ***
--- *** ranscribed copy. Typically the LINE cont ***
--- *** ains 2 ORF's one of which is reverse tra ***
--- *** nscriptase, and 3'and 5' direct repeats. ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: coding_exon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An exon whereby at least one base is par ***
--- *** t of a codon (here, 'codon' is inclusive ***
--- ***  of the stop_codon).                     ***
--- ************************************************
---

CREATE VIEW coding_exon AS
  SELECT
    feature_id AS coding_exon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'interior_coding_exon' OR cvterm.name = 'five_prime_coding_exon' OR cvterm.name = 'three_prime_coding_exon' OR cvterm.name = 'coding_exon';

--- ************************************************
--- *** relation: five_prime_coding_exon_coding_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The sequence of the five_prime_coding_ex ***
--- *** on that codes for protein.               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: three_prime_coding_exon_coding_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The sequence of the three_prime_coding_e ***
--- *** xon that codes for protein.              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: noncoding_exon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An exon that does not contain any codons ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW noncoding_exon AS
  SELECT
    feature_id AS noncoding_exon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'three_prime_noncoding_exon' OR cvterm.name = 'five_prime_noncoding_exon' OR cvterm.name = 'noncoding_exon';

--- ************************************************
--- *** relation: translocation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of nucleotide sequence that has ***
--- ***  translocated to a new position.         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: five_prime_coding_exon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The 5' most coding exon.                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: interior_exon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An exon that is bounded by 5' and 3' spl ***
--- *** ice sites.                               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: three_prime_coding_exon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The coding exon that is most 3-prime on  ***
--- *** a given transcript.                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: utr ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Messenger RNA sequences that are untrans ***
--- *** lated and lie five prime or three prime  ***
--- *** to sequences which are translated.       ***
--- ************************************************
---

CREATE VIEW utr AS
  SELECT
    feature_id AS utr_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'UTR';

--- ************************************************
--- *** relation: five_prime_utr ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region at the 5' end of a mature trans ***
--- *** cript (preceding the initiation codon) t ***
--- *** hat is not translated into a protein.    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: three_prime_utr ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region at the 3' end of a mature trans ***
--- *** cript (following the stop codon) that is ***
--- ***  not translated into a protein.          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: sine_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A repetitive element, a few hundred base ***
--- ***  pairs long, that is dispersed throughou ***
--- *** t the genome. A common human SINE is the ***
--- ***  Alu element.                            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: simple_sequence_length_variation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: terminal_inverted_repeat_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A DNA transposable element defined as ha ***
--- *** ving termini with perfect, or nearly per ***
--- *** fect short inverted repeats, generally 1 ***
--- *** 0 - 40 nucleotides long.                 ***
--- ************************************************
---

CREATE VIEW terminal_inverted_repeat_element AS
  SELECT
    feature_id AS terminal_inverted_repeat_element_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'MITE' OR cvterm.name = 'insertion_sequence' OR cvterm.name = 'polinton' OR cvterm.name = 'terminal_inverted_repeat_element';

--- ************************************************
--- *** relation: rrna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding a ribosoma ***
--- *** l RNA.                                   ***
--- ************************************************
---

CREATE VIEW rrna_primary_transcript AS
  SELECT
    feature_id AS rrna_primary_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'rRNA_small_subunit_primary_transcript' OR cvterm.name = 'rRNA_large_subunit_primary_transcript' OR cvterm.name = 'rRNA_primary_transcript';

--- ************************************************
--- *** relation: trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding a transfer ***
--- ***  RNA (SO:0000253).                       ***
--- ************************************************
---

CREATE VIEW trna_primary_transcript AS
  SELECT
    feature_id AS trna_primary_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'tRNA_primary_transcript';

--- ************************************************
--- *** relation: alanine_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding alanyl tRN ***
--- *** A.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: arg_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding arginyl tR ***
--- *** NA (SO:0000255).                         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: asparagine_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding asparaginy ***
--- *** l tRNA (SO:0000256).                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: aspartic_acid_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding aspartyl t ***
--- *** RNA (SO:0000257).                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: cysteine_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding cysteinyl  ***
--- *** tRNA (SO:0000258).                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: glutamic_acid_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding glutaminyl ***
--- ***  tRNA (SO:0000260).                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: glutamine_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding glutamyl t ***
--- *** RNA (SO:0000260).                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: glycine_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding glycyl tRN ***
--- *** A (SO:0000263).                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: histidine_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding histidyl t ***
--- *** RNA (SO:0000262).                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: isoleucine_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding isoleucyl  ***
--- *** tRNA (SO:0000263).                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: leucine_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding leucyl tRN ***
--- *** A (SO:0000264).                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: lysine_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding lysyl tRNA ***
--- ***  (SO:0000265).                           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: methionine_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding methionyl  ***
--- *** tRNA (SO:0000266).                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: phe_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding phenylalan ***
--- *** yl tRNA (SO:0000267).                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: proline_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding prolyl tRN ***
--- *** A (SO:0000268).                          ***
--- ************************************************
---

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

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

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

--- ************************************************
--- *** relation: thr_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding threonyl t ***
--- *** RNA (SO:000270).                         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: try_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding tryptophan ***
--- *** yl tRNA (SO:000271).                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: tyrosine_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding tyrosyl tR ***
--- *** NA (SO:000272).                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: valine_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding valyl tRNA ***
--- ***  (SO:000273).                            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: snrna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding a small nu ***
--- *** clear RNA (SO:0000274).                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: snorna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding a small nu ***
--- *** cleolar mRNA (SO:0000275).               ***
--- ************************************************
---

CREATE VIEW snorna_primary_transcript AS
  SELECT
    feature_id AS snorna_primary_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'snoRNA_primary_transcript';

--- ************************************************
--- *** relation: mature_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript which has undergone the nec ***
--- *** essary modifications, if any, for its fu ***
--- *** nction. In eukaryotes this includes, for ***
--- ***  example, processing of introns, cleavag ***
--- *** e, base modification, and modifications  ***
--- *** to the 5' and/or the 3' ends, other than ***
--- ***  addition of bases. In bacteria function ***
--- *** al mRNAs are usually not modified.       ***
--- ************************************************
---

CREATE VIEW mature_transcript AS
  SELECT
    feature_id AS mature_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'edited_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 = 'tasiRNA' 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 = 'mature_transcript';

--- ************************************************
--- *** relation: mrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Messenger RNA is the intermediate molecu ***
--- *** le between DNA and protein. It includes  ***
--- *** UTR and coding sequences. It does not co ***
--- *** ntain introns.                           ***
--- ************************************************
---

CREATE VIEW mrna AS
  SELECT
    feature_id AS mrna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'edited_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 = 'mRNA';

--- ************************************************
--- *** relation: tf_binding_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of a nucleotide molecule that b ***
--- *** inds a Transcription Factor or Transcrip ***
--- *** tion Factor complex [GO:0005667].        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: orf ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The in-frame interval between the stop c ***
--- *** odons of a reading frame which when read ***
--- ***  as sequential triplets, has the potenti ***
--- *** al of encoding a sequential string of am ***
--- *** ino acids. TER(NNN)nTER.                 ***
--- ************************************************
---

CREATE VIEW orf AS
  SELECT
    feature_id AS orf_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'mini_gene' OR cvterm.name = 'rescue_mini_gene' OR cvterm.name = 'ORF';

--- ************************************************
--- *** relation: transcript_attribute ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW transcript_attribute AS
  SELECT
    feature_id AS transcript_attribute_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'edited' OR cvterm.name = 'capped' OR cvterm.name = 'mRNA_attribute' OR cvterm.name = 'trans_spliced' OR cvterm.name = 'alternatively_spliced' OR cvterm.name = 'monocistronic' OR cvterm.name = 'polycistronic' OR cvterm.name = 'polyadenylated' OR cvterm.name = 'exemplar' OR cvterm.name = 'frameshift' OR cvterm.name = 'recoded' OR cvterm.name = 'minus_1_frameshift' OR cvterm.name = 'minus_2_frameshift' OR cvterm.name = 'plus_1_frameshift' OR cvterm.name = 'plus_2_framshift' OR cvterm.name = 'codon_redefined' OR cvterm.name = 'recoded_by_translational_bypass' OR cvterm.name = 'translationally_frameshifted' OR cvterm.name = 'minus_1_translationally_frameshifted' OR cvterm.name = 'plus_1_translationally_frameshifted' OR cvterm.name = 'dicistronic' OR cvterm.name = 'transcript_attribute';

--- ************************************************
--- *** relation: foldback_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transposable element with extensive se ***
--- *** condary structure, characterized by larg ***
--- *** e modular imperfect long inverted repeat ***
--- *** s.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: flanking_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The sequences extending on either side o ***
--- *** f a specific region.                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: chromosome_variation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW chromosome_variation AS
  SELECT
    feature_id AS chromosome_variation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'assortment_derived_variation' OR cvterm.name = 'chromosome_number_variation' OR cvterm.name = 'chromosome_structure_variation' OR cvterm.name = 'assortment_derived_duplication' OR cvterm.name = 'assortment_derived_deficiency_plus_duplication' OR cvterm.name = 'assortment_derived_deficiency' OR cvterm.name = 'assortment_derived_aneuploid' OR 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 = 'free_chromosome_arm' OR cvterm.name = 'chromosomal_transposition' OR cvterm.name = 'aneuploid_chromosome' OR cvterm.name = 'intrachromosomal_mutation' OR cvterm.name = 'interchromosomal_mutation' OR cvterm.name = 'chromosomal_duplication' 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 = 'unoriented_intrachromosomal_transposition' OR cvterm.name = 'deficient_interchromosomal_transposition' OR cvterm.name = 'inverted_interchromosomal_transposition' OR cvterm.name = 'uninverted_interchromosomal_transposition' OR cvterm.name = 'unoriented_interchromosomal_transposition' OR cvterm.name = 'inversion_derived_aneuploid_chromosome' 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 = 'deficient_intrachromosomal_transposition' 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 = 'inverted_intrachromosomal_transposition' 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 = 'bipartite_duplication' OR cvterm.name = 'deficient_intrachromosomal_transposition' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'uninverted_intrachromosomal_transposition' OR cvterm.name = 'unoriented_intrachromosomal_transposition' 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 = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'deficient_interchromosomal_transposition' OR cvterm.name = 'inverted_interchromosomal_transposition' OR cvterm.name = 'uninverted_interchromosomal_transposition' OR cvterm.name = 'unoriented_interchromosomal_transposition' 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 = 'bipartite_duplication' OR cvterm.name = 'deficient_intrachromosomal_transposition' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'uninverted_intrachromosomal_transposition' OR cvterm.name = 'unoriented_intrachromosomal_transposition' 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 = '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_variation';

--- ************************************************
--- *** relation: internal_utr ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A UTR bordered by the terminal and initi ***
--- *** al codons of two CDSs in a polycistronic ***
--- ***  transcript. Every UTR is either 5', 3'  ***
--- *** or internal.                             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: untranslated_region_polycistronic_mrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The untranslated sequence separating the ***
--- ***  'cistrons' of multicistronic mRNA.      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: internal_ribosome_entry_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Sequence element that recruits a ribosom ***
--- *** al subunit to internal mRNA for translat ***
--- *** ion initiation.                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polyadenylated ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A attribute describing the addition of a ***
--- ***  poly A tail to the 3' end of a mRNA mol ***
--- *** ecule.                                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: sequence_length_variation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: modified_rna_base_feature ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A post_transcriptionally modified base.  ***
--- ************************************************
---

CREATE VIEW modified_rna_base_feature AS
  SELECT
    feature_id AS modified_rna_base_feature_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'modified_RNA_base_feature';

--- ************************************************
--- *** relation: rrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** RNA that comprises part of a ribosome, a ***
--- *** nd that can provide both structural scaf ***
--- *** folding and catalytic activity.          ***
--- ************************************************
---

CREATE VIEW rrna AS
  SELECT
    feature_id AS rrna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'rRNA';

--- ************************************************
--- *** relation: trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Transfer RNA (tRNA) molecules are approx ***
--- *** imately 80 nucleotides in length. Their  ***
--- *** secondary structure includes four short  ***
--- *** double-helical elements and three loops  ***
--- *** (D, anti-codon, and T loops). Further hy ***
--- *** drogen bonds mediate the characteristic  ***
--- *** L-shaped molecular structure. Transfer R ***
--- *** NAs have two regions of fundamental func ***
--- *** tional importance: the anti-codon, which ***
--- ***  is responsible for specific mRNA codon  ***
--- *** recognition, and the 3' end, to which th ***
--- *** e tRNA's corresponding amino acid is att ***
--- *** ached (by aminoacyl-tRNA synthetases). T ***
--- *** ransfer RNAs cope with the degeneracy of ***
--- ***  the genetic code in two manners: having ***
--- ***  more than one tRNA (with a specific ant ***
--- *** i-codon) for a particular amino acid; an ***
--- *** d 'wobble' base-pairing, i.e. permitting ***
--- ***  non-standard base-pairing at the 3rd an ***
--- *** ti-codon position.                       ***
--- ************************************************
---

CREATE VIEW trna AS
  SELECT
    feature_id AS trna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'tRNA';

--- ************************************************
--- *** relation: alanyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has an alanine anti ***
--- *** codon, and a 3' alanine binding region.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rrna_small_subunit_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding a small ri ***
--- *** bosomal subunit RNA.                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: asparaginyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has an asparagine a ***
--- *** nticodon, and a 3' asparagine binding re ***
--- *** gion.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: aspartyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has an aspartic aci ***
--- *** d anticodon, and a 3' aspartic acid bind ***
--- *** ing region.                              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: cysteinyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has a cysteine anti ***
--- *** codon, and a 3' cysteine binding region. ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: glutaminyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has a glutamine ant ***
--- *** icodon, and a 3' glutamine binding regio ***
--- *** n.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: glutamyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has a glutamic acid ***
--- ***  anticodon, and a 3' glutamic acid bindi ***
--- *** ng region.                               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: glycyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has a glycine antic ***
--- *** odon, and a 3' glycine binding region.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: histidyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has a histidine ant ***
--- *** icodon, and a 3' histidine binding regio ***
--- *** n.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: isoleucyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has an isoleucine a ***
--- *** nticodon, and a 3' isoleucine binding re ***
--- *** gion.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: leucyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has a leucine antic ***
--- *** odon, and a 3' leucine binding region.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: lysyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has a lysine antico ***
--- *** don, and a 3' lysine binding region.     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: methionyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has a methionine an ***
--- *** ticodon, and a 3' methionine binding reg ***
--- *** ion.                                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: phenylalanyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has a phenylalanine ***
--- ***  anticodon, and a 3' phenylalanine bindi ***
--- *** ng region.                               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: prolyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has a proline antic ***
--- *** odon, and a 3' proline binding region.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: seryl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has a serine antico ***
--- *** don, and a 3' serine binding region.     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: threonyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has a threonine ant ***
--- *** icodon, and a 3' threonine binding regio ***
--- *** n.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: tryptophanyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has a tryptophan an ***
--- *** ticodon, and a 3' tryptophan binding reg ***
--- *** ion.                                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: tyrosyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has a tyrosine anti ***
--- *** codon, and a 3' tyrosine binding region. ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: valyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has a valine antico ***
--- *** don, and a 3' valine binding region.     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: snrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A small nuclear RNA molecule involved in ***
--- ***  pre-mRNA splicing and processing.       ***
--- ************************************************
---

CREATE VIEW snrna AS
  SELECT
    feature_id AS snrna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'snRNA';

--- ************************************************
--- *** relation: snorna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A snoRNA (small nucleolar RNA) is any on ***
--- *** e of a class of small RNAs that are asso ***
--- *** ciated with the eukaryotic nucleus as co ***
--- *** mponents of small nucleolar ribonucleopr ***
--- *** oteins. They participate in the processi ***
--- *** ng or modifications of many RNAs, mostly ***
--- ***  ribosomal RNAs (rRNAs) though snoRNAs a ***
--- *** re also known to target other classes of ***
--- ***  RNA, including spliceosomal RNAs, tRNAs ***
--- *** , and mRNAs via a stretch of sequence th ***
--- *** at is complementary to a sequence in the ***
--- ***  targeted RNA.                           ***
--- ************************************************
---

CREATE VIEW snorna AS
  SELECT
    feature_id AS snorna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'snoRNA';

--- ************************************************
--- *** relation: mirna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Small, ~22-nt, RNA molecule that is the  ***
--- *** endogenous transcript of a miRNA gene. M ***
--- *** icro RNAs are produced from precursor mo ***
--- *** lecules (SO:0000647) that can form local ***
--- ***  hairpin structures, which ordinarily ar ***
--- *** e processed (via the Dicer pathway) such ***
--- ***  that a single miRNA molecule accumulate ***
--- *** s from one arm of a hairpin precursor mo ***
--- *** lecule. Micro RNAs may trigger the cleav ***
--- *** age of their target molecules or act as  ***
--- *** translational repressors.                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: bound_by_factor ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a sequence that  ***
--- *** is bound by another molecule.            ***
--- ************************************************
---

CREATE VIEW bound_by_factor AS
  SELECT
    feature_id AS bound_by_factor_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'bound_by_protein' OR cvterm.name = 'bound_by_nucleic_acid' OR cvterm.name = 'bound_by_factor';

--- ************************************************
--- *** relation: transcript_bound_by_nucleic_acid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript that is bound by a nucleic  ***
--- *** acid.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: transcript_bound_by_protein ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript that is bound by a protein. ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: engineered_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is engineered.               ***
--- ************************************************
---

CREATE VIEW engineered_gene AS
  SELECT
    feature_id AS engineered_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'engineered_foreign_gene' OR cvterm.name = 'engineered_fusion_gene' OR cvterm.name = 'engineered_foreign_transposable_element_gene' OR cvterm.name = 'engineered_gene';

--- ************************************************
--- *** relation: engineered_foreign_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is engineered and foreign.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: mrna_with_minus_1_frameshift ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An mRNA with a minus 1 frameshift.       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: engineered_foreign_transposable_element_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transposable_element that is engineere ***
--- *** d and foreign.                           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: foreign_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is foreign.                  ***
--- ************************************************
---

CREATE VIEW foreign_gene AS
  SELECT
    feature_id AS foreign_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'engineered_foreign_gene' OR cvterm.name = 'engineered_foreign_transposable_element_gene' OR cvterm.name = 'foreign_gene';

--- ************************************************
--- *** relation: long_terminal_repeat ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence directly repeated at both end ***
--- *** s of a defined sequence, of the sort typ ***
--- *** ically found in retroviruses.            ***
--- ************************************************
---

CREATE VIEW long_terminal_repeat AS
  SELECT
    feature_id AS long_terminal_repeat_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_prime_LTR' OR cvterm.name = 'three_prime_LTR' OR cvterm.name = 'solo_LTR' OR cvterm.name = 'long_terminal_repeat';

--- ************************************************
--- *** relation: fusion_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is a fusion.                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: engineered_fusion_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A fusion gene that is engineered.        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: microsatellite ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A repeat_region containing repeat_units  ***
--- *** (2 to 4 bp) that is repeated multiple ti ***
--- *** mes in tandem.                           ***
--- ************************************************
---

CREATE VIEW microsatellite AS
  SELECT
    feature_id AS microsatellite_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'dinucleotide_repeat_microsatellite_feature' OR cvterm.name = 'trinucleotide_repeat_microsatellite_feature' OR cvterm.name = 'tetranucleotide_repeat_microsatellite_feature' OR cvterm.name = 'microsatellite';

--- ************************************************
--- *** relation: dinucleotide_repeat_microsatellite_feature ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: trinuc_repeat_microsat ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: engineered_foreign_repetitive_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A repetitive element that is engineered  ***
--- *** and foreign.                             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: inverted_repeat ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The sequence is complementarily repeated ***
--- ***  on the opposite strand. It is a palindr ***
--- *** ome, and it may, or may not be hyphenate ***
--- *** d. Examples: GCTGATCAGC, or GCTGA-----TC ***
--- *** AGC.                                     ***
--- ************************************************
---

CREATE VIEW inverted_repeat AS
  SELECT
    feature_id AS inverted_repeat_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'terminal_inverted_repeat' OR cvterm.name = 'five_prime_terminal_inverted_repeat' OR cvterm.name = 'three_prime_terminal_inverted_repeat' OR cvterm.name = 'inverted_repeat';

--- ************************************************
--- *** relation: u12_intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A type of spliceosomal intron spliced by ***
--- ***  the U12 spliceosome, that includes U11, ***
--- ***  U12, U4atac/U6atac and U5 snRNAs.       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: origin_of_replication ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The origin of replication; starting site ***
--- ***  for duplication of a nucleic acid molec ***
--- *** ule to give two identical copies.        ***
--- ************************************************
---

CREATE VIEW origin_of_replication AS
  SELECT
    feature_id AS origin_of_replication_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'origin_of_replication';

--- ************************************************
--- *** relation: d_loop ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Displacement loop; a region within mitoc ***
--- *** hondrial DNA in which a short stretch of ***
--- ***  RNA is paired with one strand of DNA, d ***
--- *** isplacing the original partner DNA stran ***
--- *** d in this region; also used to describe  ***
--- *** the displacement of a region of one stra ***
--- *** nd of duplex DNA by a single stranded in ***
--- *** vader in the reaction catalyzed by RecA  ***
--- *** protein.                                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: recombination_feature ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW recombination_feature AS
  SELECT
    feature_id AS recombination_feature_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'recombination_signal_sequence' 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 = 'recombination_feature';

--- ************************************************
--- *** relation: specific_recombination_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW specific_recombination_site AS
  SELECT
    feature_id AS specific_recombination_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'recombination_feature_of_rearranged_gene' OR cvterm.name = 'site_specific_recombination_target_region' OR cvterm.name = 'recombination_signal_sequence' 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 = 'specific_recombination_site';

--- ************************************************
--- *** relation: recombination_feature_of_rearranged_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW recombination_feature_of_rearranged_gene AS
  SELECT
    feature_id AS recombination_feature_of_rearranged_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'recombination_feature_of_rearranged_gene';

--- ************************************************
--- *** relation: vertebrate_immune_system_gene_recombination_feature ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW vertebrate_immune_system_gene_recombination_feature AS
  SELECT
    feature_id AS vertebrate_immune_system_gene_recombination_feature_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'vertebrate_immune_system_gene_recombination_feature';

--- ************************************************
--- *** relation: j_gene_recombination_feature ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Recombination signal including J-heptame ***
--- *** r, J-spacer and J-nonamer in 5' of J-reg ***
--- *** ion of a J-gene or J-sequence.           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: clip ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Part of the primary transcript that is c ***
--- *** lipped off during processing.            ***
--- ************************************************
---

CREATE VIEW clip AS
  SELECT
    feature_id AS clip_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_prime_clip' OR cvterm.name = 'three_prime_clip' OR cvterm.name = 'clip';

--- ************************************************
--- *** relation: modified_base ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A modified nucleotide, i.e. a nucleotide ***
--- ***  other than A, T, C. G.                  ***
--- ************************************************
---

CREATE VIEW modified_base AS
  SELECT
    feature_id AS modified_base_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'methylated_base_feature' OR cvterm.name = 'methylated_C' OR cvterm.name = 'methylated_A' OR cvterm.name = 'modified_base';

--- ************************************************
--- *** relation: methylated_base_feature ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A nucleotide modified by methylation.    ***
--- ************************************************
---

CREATE VIEW methylated_base_feature AS
  SELECT
    feature_id AS methylated_base_feature_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'methylated_C' OR cvterm.name = 'methylated_A' OR cvterm.name = 'methylated_base_feature';

--- ************************************************
--- *** relation: cpg_island ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Regions of a few hundred to a few thousa ***
--- *** nd bases in vertebrate genomes that are  ***
--- *** relatively GC and CpG rich; they are typ ***
--- *** ically unmethylated and often found near ***
--- ***  the 5' ends of genes.                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: experimentally_determined ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Attribute to describe a feature that has ***
--- ***  been experimentally verified.           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: stem_loop ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A double-helical region of nucleic acid  ***
--- *** formed by base-pairing between adjacent  ***
--- *** (inverted) complementary sequences.      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: direct_repeat ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A repeat where the same sequence is repe ***
--- *** ated in the same direction. Example: GCT ***
--- *** GA-----GCTGA.                            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: tss ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The first base where RNA polymerase begi ***
--- *** ns to synthesize the RNA transcript.     ***
--- ************************************************
---

CREATE VIEW tss AS
  SELECT
    feature_id AS tss_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'major_TSS' OR cvterm.name = 'minor_TSS' OR cvterm.name = 'TSS';

--- ************************************************
--- *** relation: cds ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A contiguous sequence which begins with, ***
--- ***  and includes, a start codon and ends wi ***
--- *** th, and includes, a stop codon.          ***
--- ************************************************
---

CREATE VIEW cds AS
  SELECT
    feature_id AS cds_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'CDS';

--- ************************************************
--- *** relation: cdna_clone ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Complementary DNA; A piece of DNA copied ***
--- ***  from an mRNA and spliced into a vector  ***
--- *** for propagation in a suitable host.      ***
--- ************************************************
---

CREATE VIEW cdna_clone AS
  SELECT
    feature_id AS cdna_clone_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'cDNA_clone';

--- ************************************************
--- *** relation: start_codon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** First codon to be translated by a riboso ***
--- *** me.                                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: stop_codon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** In mRNA, a set of three nucleotides that ***
--- ***  indicates the end of information for pr ***
--- *** otein synthesis.                         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: intronic_splice_enhancer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Sequences within the intron that modulat ***
--- *** e splice site selection for some introns ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: mrna_with_plus_1_frameshift ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An mRNA with a plus 1 frameshift.        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: nuclease_hypersensitive_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: coding_start ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The first base to be translated into pro ***
--- *** tein.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: tag ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A nucleotide sequence that may be used t ***
--- *** o identify a larger sequence.            ***
--- ************************************************
---

CREATE VIEW tag AS
  SELECT
    feature_id AS tag_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'tag';

--- ************************************************
--- *** relation: rrna_large_subunit_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding a large ri ***
--- *** bosomal subunit RNA.                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: sage_tag ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A short diagnostic sequence tag, serial  ***
--- *** analysis of gene expression (SAGE), that ***
--- ***  allows the quantitative and simultaneou ***
--- *** s analysis of a large number of transcri ***
--- *** pts.                                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: coding_end ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The last base to be translated into prot ***
--- *** ein. It does not include the stop codon. ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: microarray_oligo ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: mrna_with_plus_2_frameshift ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An mRNA with a plus 2 frameshift.        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: conserved_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Region of sequence similarity by descent ***
--- ***  from a common ancestor.                 ***
--- ************************************************
---

CREATE VIEW conserved_region AS
  SELECT
    feature_id AS conserved_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'coding_conserved_region' OR cvterm.name = 'nc_conserved_region' OR cvterm.name = 'RR_tract' OR cvterm.name = 'homologous_region' OR cvterm.name = 'centromere_DNA_Element_I' OR cvterm.name = 'centromere_DNA_Element_II' OR cvterm.name = 'centromere_DNA_Element_III' OR cvterm.name = 'X_element' OR cvterm.name = 'U_box' OR cvterm.name = 'regional_centromere_central_core' OR cvterm.name = 'syntenic_region' OR cvterm.name = 'paralogous_region' OR cvterm.name = 'orthologous_region' OR cvterm.name = 'conserved_region';

--- ************************************************
--- *** relation: sts ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Short (typically a few hundred base pair ***
--- *** s) DNA sequence that has a single occurr ***
--- *** ence in a genome and whose location and  ***
--- *** base sequence are known.                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: coding_conserved_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Coding region of sequence similarity by  ***
--- *** descent from a common ancestor.          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: exon_junction ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The boundary between two exons in a proc ***
--- *** essed transcript.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: nc_conserved_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Non-coding region of sequence similarity ***
--- ***  by descent from a common ancestor.      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: mrna_with_minus_2_frameshift ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A mRNA with a minus 2 frameshift.        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: pseudogene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence that closely resembles a know ***
--- *** n functional gene, at another locus with ***
--- *** in a genome, that is non-functional as a ***
--- ***  consequence of (usually several) mutati ***
--- *** ons that prevent either its transcriptio ***
--- *** n or translation (or both). In general,  ***
--- *** pseudogenes result from either reverse t ***
--- *** ranscription of a transcript of their "n ***
--- *** ormal" paralog (SO:0000043) (in which ca ***
--- *** se the pseudogene typically lacks intron ***
--- *** s and includes a poly(A) tail) or from r ***
--- *** ecombination (SO:0000044) (in which case ***
--- ***  the pseudogene is typically a tandem du ***
--- *** plication of its "normal" paralog).      ***
--- ************************************************
---

CREATE VIEW pseudogene AS
  SELECT
    feature_id AS pseudogene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'processed_pseudogene' OR cvterm.name = 'non_processed_pseudogene' OR cvterm.name = 'pseudogene_by_unequal_crossing_over' OR cvterm.name = 'nuclear_mt_pseudogene' OR cvterm.name = 'cassette_pseudogene' OR cvterm.name = 'duplicated_pseudogene' OR cvterm.name = 'unitary_pseudogene' OR cvterm.name = 'pseudogene';

--- ************************************************
--- *** relation: rnai_reagent ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A double stranded RNA duplex, at least 2 ***
--- *** 0bp long, used experimentally to inhibit ***
--- ***  gene function by RNA interference.      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: mite ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A highly repetitive and short (100-500 b ***
--- *** ase pair) transposable element with term ***
--- *** inal inverted repeats (TIR) and target s ***
--- *** ite duplication (TSD). MITEs do not enco ***
--- *** de proteins.                             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: recombination_hotspot ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region in a genome which promotes reco ***
--- *** mbination.                               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Structural unit composed of a nucleic ac ***
--- *** id molecule which controls its own repli ***
--- *** cation through the interaction of specif ***
--- *** ic proteins at one or more origins of re ***
--- *** plication.                               ***
--- ************************************************
---

CREATE VIEW chromosome AS
  SELECT
    feature_id AS chromosome_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'chromosome';

--- ************************************************
--- *** relation: chromosome_band ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A cytologically distinguishable feature  ***
--- *** of a chromosome, often made visible by s ***
--- *** taining, and usually alternating light a ***
--- *** nd dark.                                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: site_specific_recombination_target_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW site_specific_recombination_target_region AS
  SELECT
    feature_id AS site_specific_recombination_target_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'site_specific_recombination_target_region';

--- ************************************************
--- *** relation: match ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of sequence, aligned to another ***
--- ***  sequence with some statistical signific ***
--- *** ance, using an algorithm such as BLAST o ***
--- *** r SIM4.                                  ***
--- ************************************************
---

CREATE VIEW match AS
  SELECT
    feature_id AS match_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'match';

--- ************************************************
--- *** relation: splice_enhancer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Region of a transcript that regulates sp ***
--- *** licing.                                  ***
--- ************************************************
---

CREATE VIEW splice_enhancer AS
  SELECT
    feature_id AS splice_enhancer_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'intronic_splice_enhancer' OR cvterm.name = 'exonic_splice_enhancer' OR cvterm.name = 'splice_enhancer';

--- ************************************************
--- *** relation: est ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tag produced from a single sequencing  ***
--- *** read from a cDNA clone or PCR product; t ***
--- *** ypically a few hundred base pairs long.  ***
--- ************************************************
---

CREATE VIEW est AS
  SELECT
    feature_id AS est_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'EST';

--- ************************************************
--- *** relation: loxp_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: nucleotide_match ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A match against a nucleotide sequence.   ***
--- ************************************************
---

CREATE VIEW nucleotide_match AS
  SELECT
    feature_id AS nucleotide_match_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'nucleotide_match';

--- ************************************************
--- *** relation: nucleic_acid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a sequence consi ***
--- *** sting of nucleobases bound to repeating  ***
--- *** units. The forms found in nature are deo ***
--- *** xyribonucleic acid (DNA), where the repe ***
--- *** ating units are 2-deoxy-D-ribose rings c ***
--- *** onnected to a phosphate backbone, and ri ***
--- *** bonucleic acid (RNA), where the repeatin ***
--- *** g units are D-ribose rings connected to  ***
--- *** a phosphate backbone.                    ***
--- ************************************************
---

CREATE VIEW nucleic_acid AS
  SELECT
    feature_id AS nucleic_acid_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'DNA' OR cvterm.name = 'RNA' OR cvterm.name = 'morpholino_backbone' OR cvterm.name = 'PNA' OR cvterm.name = 'LNA' OR cvterm.name = 'TNA' OR cvterm.name = 'GNA' OR cvterm.name = 'cDNA' OR cvterm.name = 'genomic_DNA' OR cvterm.name = 'single_stranded_cDNA' OR cvterm.name = 'double_stranded_cDNA' OR cvterm.name = 'R_GNA' OR cvterm.name = 'S_GNA' OR cvterm.name = 'nucleic_acid';

--- ************************************************
--- *** relation: protein_match ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A match against a protein sequence.      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: frt_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An inversion site found on the Saccharom ***
--- *** yces cerevisiae 2 micron plasmid.        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: synthetic_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to decide a sequence of nuc ***
--- *** leotides, nucleotide analogs, or amino a ***
--- *** cids that has been designed by an experi ***
--- *** menter and which may, or may not, corres ***
--- *** pond with any natural sequence.          ***
--- ************************************************
---

CREATE VIEW synthetic_sequence AS
  SELECT
    feature_id AS synthetic_sequence_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'random_sequence' OR cvterm.name = 'designed_sequence' OR cvterm.name = 'synthetic_sequence';

--- ************************************************
--- *** relation: dna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a sequence consi ***
--- *** sting of nucleobases bound to a repeatin ***
--- *** g unit made of a 2-deoxy-D-ribose ring c ***
--- *** onnected to a phosphate backbone.        ***
--- ************************************************
---

CREATE VIEW dna AS
  SELECT
    feature_id AS dna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'cDNA' OR cvterm.name = 'genomic_DNA' OR cvterm.name = 'single_stranded_cDNA' OR cvterm.name = 'double_stranded_cDNA' OR cvterm.name = 'DNA';

--- ************************************************
--- *** relation: sequence_assembly ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence of nucleotides that has been  ***
--- *** algorithmically derived from an alignmen ***
--- *** t of two or more different sequences.    ***
--- ************************************************
---

CREATE VIEW sequence_assembly AS
  SELECT
    feature_id AS sequence_assembly_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'sequence_assembly';

--- ************************************************
--- *** relation: group_1_intron_homing_endonuclease_target_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of intronic nucleotide sequence ***
--- ***  targeted by a nuclease enzyme.          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: haplotype_block ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of the genome which is co-inher ***
--- *** ited as the result of the lack of histor ***
--- *** ic recombination within it.              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a sequence consi ***
--- *** sting of nucleobases bound to a repeatin ***
--- *** g unit made of a D-ribose ring connected ***
--- ***  to a phosphate backbone.                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: flanked ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a region that is ***
--- ***  bounded either side by a particular kin ***
--- *** d of region.                             ***
--- ************************************************
---

CREATE VIEW flanked AS
  SELECT
    feature_id AS flanked_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'floxed' OR cvterm.name = 'FRT_flanked' OR cvterm.name = 'flanked';

--- ************************************************
--- *** relation: floxed ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing sequence that is ***
--- ***  flanked by Lox-P sites.                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: codon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A set of (usually) three nucleotide base ***
--- *** s in a DNA or RNA sequence, which togeth ***
--- *** er code for a unique amino acid or the t ***
--- *** ermination of translation and are contai ***
--- *** ned within the CDS.                      ***
--- ************************************************
---

CREATE VIEW codon AS
  SELECT
    feature_id AS codon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'codon';

--- ************************************************
--- *** relation: frt_flanked ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe sequence that i ***
--- *** s flanked by the FLP recombinase recogni ***
--- *** tion site, FRT.                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: invalidated_by_chimeric_cdna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A cDNA clone constructed from more than  ***
--- *** one mRNA. Usually an experimental artifa ***
--- *** ct.                                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: floxed_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transgene that is floxed.              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: transposable_element_flanking_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The region of sequence surrounding a tra ***
--- *** nsposable element.                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: integron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region encoding an integrase which act ***
--- *** s at a site adjacent to it (attI_site) t ***
--- *** o insert DNA which must include but is n ***
--- *** ot limited to an attC_site.              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: insertion_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The junction where an insertion occurred ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: atti_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region within an integron, adjacent to ***
--- ***  an integrase, at which site specific re ***
--- *** combination involving an attC_site takes ***
--- ***  place.                                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: transposable_element_insertion_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The junction in a genome where a transpo ***
--- *** sable_element has inserted.              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: small_regulatory_ncrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A non-coding RNA, usually with a specifi ***
--- *** c secondary structure, that acts to regu ***
--- *** late gene expression.                    ***
--- ************************************************
---

CREATE VIEW small_regulatory_ncrna AS
  SELECT
    feature_id AS small_regulatory_ncrna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'small_regulatory_ncRNA';

--- ************************************************
--- *** relation: conjugative_transposon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transposon that encodes function requi ***
--- *** red for conjugation.                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: enzymatic_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An RNA sequence that has catalytic activ ***
--- *** ity with or without an associated ribonu ***
--- *** cleoprotein.                             ***
--- ************************************************
---

CREATE VIEW enzymatic_rna AS
  SELECT
    feature_id AS enzymatic_rna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'ribozyme' OR cvterm.name = 'enzymatic_RNA';

--- ************************************************
--- *** relation: recombinationally_inverted_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A recombinationally rearranged gene by i ***
--- *** nversion.                                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: ribozyme ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An RNA with catalytic activity.          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rrna_5_8s ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_8S ribosomal RNA (5. 8S rRNA) is a com ***
--- *** ponent of the large subunit of the eukar ***
--- *** yotic ribosome. It is transcribed by RNA ***
--- ***  polymerase I as part of the 45S precurs ***
--- *** or that also contains 18S and 28S rRNA.  ***
--- *** Functionally, it is thought that 5.8S rR ***
--- *** NA may be involved in ribosome transloca ***
--- *** tion. It is also known to form covalent  ***
--- *** linkage to the p53 tumour suppressor pro ***
--- *** tein. 5_8S rRNA is also found in archaea ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rna_6s ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A small (184-nt in E. coli) RNA that for ***
--- *** ms a hairpin type structure. 6S RNA asso ***
--- *** ciates with RNA polymerase in a highly s ***
--- *** pecific manner. 6S RNA represses express ***
--- *** ion from a sigma70-dependent promoter du ***
--- *** ring stationary phase.                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: csrb_rsmb_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An enterobacterial RNA that binds the Cs ***
--- *** rA protein. The CsrB RNAs contain a cons ***
--- *** erved motif CAGGXXG that is found in up  ***
--- *** to 18 copies and has been suggested to b ***
--- *** ind CsrA. The Csr regulatory system has  ***
--- *** a strong negative regulatory effect on g ***
--- *** lycogen biosynthesis, glyconeogenesis an ***
--- *** d glycogen catabolism and a positive reg ***
--- *** ulatory effect on glycolysis. In other b ***
--- *** acteria such as Erwinia caratovara the R ***
--- *** smA protein has been shown to regulate t ***
--- *** he production of virulence determinants, ***
--- ***  such extracellular enzymes. RsmA binds  ***
--- *** to RsmB regulatory RNA which is also a m ***
--- *** ember of this family.                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dsra_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** DsrA RNA regulates both transcription, b ***
--- *** y overcoming transcriptional silencing b ***
--- *** y the nucleoid-associated H-NS protein,  ***
--- *** and translation, by promoting efficient  ***
--- *** translation of the stress sigma factor,  ***
--- *** RpoS. These two activities of DsrA can b ***
--- *** e separated by mutation: the first of th ***
--- *** ree stem-loops of the 85 nucleotide RNA  ***
--- *** is necessary for RpoS translation but no ***
--- *** t for anti-H-NS action, while the second ***
--- ***  stem-loop is essential for antisilencin ***
--- *** g and less critical for RpoS translation ***
--- *** . The third stem-loop, which behaves as  ***
--- *** a transcription terminator, can be subst ***
--- *** ituted by the trp transcription terminat ***
--- *** or without loss of either DsrA function. ***
--- ***  The sequence of the first stem-loop of  ***
--- *** DsrA is complementary with the upstream  ***
--- *** leader portion of RpoS messenger RNA, su ***
--- *** ggesting that pairing of DsrA with the R ***
--- *** poS message might be important for trans ***
--- *** lational regulation.                     ***
--- ************************************************
---

CREATE VIEW dsra_rna AS
  SELECT
    feature_id AS dsra_rna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'GcvB_RNA' OR cvterm.name = 'DsrA_RNA';

--- ************************************************
--- *** relation: gcvb_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A small untranslated RNA involved in exp ***
--- *** ression of the dipeptide and oligopeptid ***
--- *** e transport systems in Escherichia coli. ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: hammerhead_ribozyme ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A small catalytic RNA motif that catalyz ***
--- *** es self-cleavage reaction. Its name come ***
--- *** s from its secondary structure which res ***
--- *** embles a carpenter's hammer. The hammerh ***
--- *** ead ribozyme is involved in the replicat ***
--- *** ion of some viroid and some satellite RN ***
--- *** As.                                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: group_iia_intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: group_iib_intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: micf_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A non-translated 93 nt antisense RNA tha ***
--- *** t binds its target ompF mRNA and regulat ***
--- *** es ompF expression by inhibiting transla ***
--- *** tion and inducing degradation of the mes ***
--- *** sage.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: oxys_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A small untranslated RNA which is induce ***
--- *** d in response to oxidative stress in Esc ***
--- *** herichia coli. Acts as a global regulato ***
--- *** r to activate or repress the expression  ***
--- *** of as many as 40 genes, including the fh ***
--- *** lA-encoded transcriptional activator and ***
--- ***  the rpoS-encoded sigma(s) subunit of RN ***
--- *** A polymerase. OxyS is bound by the Hfq p ***
--- *** rotein, that increases the OxyS RNA inte ***
--- *** raction with its target messages.        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rnase_mrp_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The RNA molecule essential for the catal ***
--- *** ytic activity of RNase MRP, an enzymatic ***
--- *** ally active ribonucleoprotein with two d ***
--- *** istinct roles in eukaryotes. In mitochon ***
--- *** dria it plays a direct role in the initi ***
--- *** ation of mitochondrial DNA replication.  ***
--- *** In the nucleus it is involved in precurs ***
--- *** or rRNA processing, where it cleaves the ***
--- ***  internal transcribed spacer 1 between 1 ***
--- *** 8S and 5.8S rRNAs.                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rnase_p_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The RNA component of Ribonuclease P (RNa ***
--- *** se P), a ubiquitous endoribonuclease, fo ***
--- *** und in archaea, bacteria and eukarya as  ***
--- *** well as chloroplasts and mitochondria. I ***
--- *** ts best characterized activity is the ge ***
--- *** neration of mature 5 prime ends of tRNAs ***
--- ***  by cleaving the 5 prime leader elements ***
--- ***  of precursor-tRNAs. Cellular RNase Ps a ***
--- *** re ribonucleoproteins. RNA from bacteria ***
--- *** l RNase Ps retains its catalytic activit ***
--- *** y in the absence of the protein subunit, ***
--- ***  i.e. it is a ribozyme. Isolated eukaryo ***
--- *** tic and archaeal RNase P RNA has not bee ***
--- *** n shown to retain its catalytic function ***
--- *** , but is still essential for the catalyt ***
--- *** ic activity of the holoenzyme. Although  ***
--- *** the archaeal and eukaryotic holoenzymes  ***
--- *** have a much greater protein content than ***
--- ***  the bacterial ones, the RNA cores from  ***
--- *** all the three lineages are homologous. H ***
--- *** elices corresponding to P1, P2, P3, P4,  ***
--- *** and P10/11 are common to all cellular RN ***
--- *** ase P RNAs. Yet, there is considerable s ***
--- *** equence variation, particularly among th ***
--- *** e eukaryotic RNAs.                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rpra_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Translational regulation of the stationa ***
--- *** ry phase sigma factor RpoS is mediated b ***
--- *** y the formation of a double-stranded RNA ***
--- ***  stem-loop structure in the upstream reg ***
--- *** ion of the rpoS messenger RNA, occluding ***
--- ***  the translation initiation site. Clones ***
--- ***  carrying rprA (RpoS regulator RNA) incr ***
--- *** eased the translation of RpoS. The rprA  ***
--- *** gene encodes a 106 nucleotide regulatory ***
--- ***  RNA. As with DsrA Rfam:RF00014, RprA is ***
--- ***  predicted to form three stem-loops. Thu ***
--- *** s, at least two small RNAs, DsrA and Rpr ***
--- *** A, participate in the positive regulatio ***
--- *** n of RpoS translation. Unlike DsrA, RprA ***
--- ***  does not have an extensive region of co ***
--- *** mplementarity to the RpoS leader, leavin ***
--- *** g its mechanism of action unclear. RprA  ***
--- *** is non-essential.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rre_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The Rev response element (RRE) is encode ***
--- *** d within the HIV-env gene. Rev is an ess ***
--- *** ential regulatory protein of HIV that bi ***
--- *** nds an internal loop of the RRE leading, ***
--- ***  encouraging further Rev-RRE binding. Th ***
--- *** is RNP complex is critical for mRNA expo ***
--- *** rt and hence for expression of the HIV s ***
--- *** tructural proteins.                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: spot_42_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A 109-nucleotide RNA of E. coli that see ***
--- *** ms to have a regulatory role on the gala ***
--- *** ctose operon. Changes in Spot 42 levels  ***
--- *** are implicated in affecting DNA polymera ***
--- *** se I levels.                             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: telomerase_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The RNA component of telomerase, a rever ***
--- *** se transcriptase that synthesizes telome ***
--- *** ric DNA.                                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: u1_snrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** U1 is a small nuclear RNA (snRNA) compon ***
--- *** ent of the spliceosome (involved in pre- ***
--- *** mRNA splicing). Its 5' end forms complem ***
--- *** entary base pairs with the 5' splice jun ***
--- *** ction, thus defining the 5' donor site o ***
--- *** f an intron. There are significant diffe ***
--- *** rences in sequence and secondary structu ***
--- *** re between metazoan and yeast U1 snRNAs, ***
--- ***  the latter being much longer (568 nucle ***
--- *** otides as compared to 164 nucleotides in ***
--- ***  human). Nevertheless, secondary structu ***
--- *** re predictions suggest that all U1 snRNA ***
--- *** s share a 'common core' consisting of he ***
--- *** lices I, II, the proximal region of III, ***
--- ***  and IV.                                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: u2_snrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** U2 is a small nuclear RNA (snRNA) compon ***
--- *** ent of the spliceosome (involved in pre- ***
--- *** mRNA splicing). Complementary binding be ***
--- *** tween U2 snRNA (in an area lying towards ***
--- ***  the 5' end but 3' to hairpin I) and the ***
--- ***  branchpoint sequence (BPS) of the intro ***
--- *** n results in the bulging out of an unpai ***
--- *** red adenine, on the BPS, which initiates ***
--- ***  a nucleophilic attack at the intronic 5 ***
--- *** ' splice site, thus starting the first o ***
--- *** f two transesterification reactions that ***
--- ***  mediate splicing.                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: u4_snrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** U4 small nuclear RNA (U4 snRNA) is a com ***
--- *** ponent of the major U2-dependent spliceo ***
--- *** some. It forms a duplex with U6, and wit ***
--- *** h each splicing round, it is displaced f ***
--- *** rom U6 (and the spliceosome) in an ATP-d ***
--- *** ependent manner, allowing U6 to refold a ***
--- *** nd create the active site for splicing c ***
--- *** atalysis. A recycling process involving  ***
--- *** protein Prp24 re-anneals U4 and U6.      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: u4atac_snrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An snRNA required for the splicing of th ***
--- *** e minor U12-dependent class of eukaryoti ***
--- *** c nuclear introns. It forms a base paire ***
--- *** d complex with U6atac_snRNA (SO:0000397) ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: u5_snrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** U5 RNA is a component of both types of k ***
--- *** nown spliceosome. The precise function o ***
--- *** f this molecule is unknown, though it is ***
--- ***  known that the 5' loop is required for  ***
--- *** splice site selection and p220 binding,  ***
--- *** and that both the 3' stem-loop and the S ***
--- *** m site are important for Sm protein bind ***
--- *** ing and cap methylation.                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: u6_snrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** U6 snRNA is a component of the spliceoso ***
--- *** me which is involved in splicing pre-mRN ***
--- *** A. The putative secondary structure cons ***
--- *** ensus base pairing is confined to a shor ***
--- *** t 5' stem loop, but U6 snRNA is thought  ***
--- *** to form extensive base-pair interactions ***
--- ***  with U4 snRNA.                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: u6atac_snrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** U6atac_snRNA is an snRNA required for th ***
--- *** e splicing of the minor U12-dependent cl ***
--- *** ass of eukaryotic nuclear introns. It fo ***
--- *** rms a base paired complex with U4atac_sn ***
--- *** RNA (SO:0000394).                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: u11_snrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** U11 snRNA plays a role in splicing of th ***
--- *** e minor U12-dependent class of eukaryoti ***
--- *** c nuclear introns, similar to U1 snRNA i ***
--- *** n the major class spliceosome it base pa ***
--- *** irs to the conserved 5' splice site sequ ***
--- *** ence.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: u12_snrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The U12 small nuclear (snRNA), together  ***
--- *** with U4atac/U6atac, U5, and U11 snRNAs a ***
--- *** nd associated proteins, forms a spliceos ***
--- *** ome that cleaves a divergent class of lo ***
--- *** w-abundance pre-mRNA introns.            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: sequence_attribute ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describes a quality of sequ ***
--- *** ence.                                    ***
--- ************************************************
---

CREATE VIEW sequence_attribute AS
  SELECT
    feature_id AS sequence_attribute_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polymer_attribute' OR cvterm.name = 'feature_attribute' OR cvterm.name = 'sequence_location' OR cvterm.name = 'variant_quality' OR cvterm.name = 'nucleic_acid' OR cvterm.name = 'synthetic_sequence' OR cvterm.name = 'topology_attribute' OR cvterm.name = 'peptidyl' OR cvterm.name = 'DNA' OR cvterm.name = 'RNA' OR cvterm.name = 'morpholino_backbone' OR cvterm.name = 'PNA' OR cvterm.name = 'LNA' OR cvterm.name = 'TNA' OR cvterm.name = 'GNA' OR cvterm.name = 'cDNA' OR cvterm.name = 'genomic_DNA' OR cvterm.name = 'single_stranded_cDNA' OR cvterm.name = 'double_stranded_cDNA' OR cvterm.name = 'R_GNA' OR cvterm.name = 'S_GNA' OR cvterm.name = 'random_sequence' OR cvterm.name = 'designed_sequence' OR cvterm.name = 'linear' OR cvterm.name = 'circular' OR cvterm.name = 'transcript_attribute' OR cvterm.name = 'bound_by_factor' OR cvterm.name = 'flanked' OR cvterm.name = 'gene_attribute' OR cvterm.name = 'retrotransposed' OR cvterm.name = 'transgenic' OR cvterm.name = 'natural' OR cvterm.name = 'engineered' OR cvterm.name = 'foreign' OR cvterm.name = 'fusion' OR cvterm.name = 'rescue' OR cvterm.name = 'wild_type' OR cvterm.name = 'conserved' OR cvterm.name = 'status' OR cvterm.name = 'intermediate' OR cvterm.name = 'recombinationally_rearranged' OR cvterm.name = 'cryptic' OR cvterm.name = 'strand_attribute' OR cvterm.name = 'direction_attribute' OR cvterm.name = 'enzymatic' OR cvterm.name = 'mobile' OR cvterm.name = 'alteration_attribute' OR cvterm.name = 'experimental_feature_attribute' OR cvterm.name = 'edited' OR cvterm.name = 'capped' OR cvterm.name = 'mRNA_attribute' OR cvterm.name = 'trans_spliced' OR cvterm.name = 'alternatively_spliced' OR cvterm.name = 'monocistronic' OR cvterm.name = 'polycistronic' OR cvterm.name = 'polyadenylated' OR cvterm.name = 'exemplar' OR cvterm.name = 'frameshift' OR cvterm.name = 'recoded' OR cvterm.name = 'minus_1_frameshift' OR cvterm.name = 'minus_2_frameshift' OR cvterm.name = 'plus_1_frameshift' OR cvterm.name = 'plus_2_framshift' OR cvterm.name = 'codon_redefined' OR cvterm.name = 'recoded_by_translational_bypass' OR cvterm.name = 'translationally_frameshifted' OR cvterm.name = 'minus_1_translationally_frameshifted' OR cvterm.name = 'plus_1_translationally_frameshifted' OR cvterm.name = 'dicistronic' OR cvterm.name = 'bound_by_protein' OR cvterm.name = 'bound_by_nucleic_acid' OR cvterm.name = 'floxed' OR cvterm.name = 'FRT_flanked' OR cvterm.name = 'protein_coding' OR cvterm.name = 'non_protein_coding' OR cvterm.name = 'gene_to_gene_feature' OR cvterm.name = 'gene_array_member' OR cvterm.name = 'regulated' OR cvterm.name = 'epigenetically_modified' OR cvterm.name = 'encodes_alternately_spliced_transcripts' OR cvterm.name = 'encodes_alternate_transcription_start_sites' OR cvterm.name = 'intein_containing' OR cvterm.name = 'miRNA_encoding' OR cvterm.name = 'rRNA_encoding' OR cvterm.name = 'scRNA_encoding' OR cvterm.name = 'snoRNA_encoding' OR cvterm.name = 'snRNA_encoding' OR cvterm.name = 'SRP_RNA_encoding' OR cvterm.name = 'stRNA_encoding' OR cvterm.name = 'tmRNA_encoding' OR cvterm.name = 'tRNA_encoding' OR cvterm.name = 'gRNA_encoding' OR cvterm.name = 'C_D_box_snoRNA_encoding' OR cvterm.name = 'H_ACA_box_snoRNA_encoding' OR cvterm.name = 'overlapping' OR cvterm.name = 'inside_intron' OR cvterm.name = 'five_prime_three_prime_overlap' OR cvterm.name = 'five_prime_five_prime_overlap' OR cvterm.name = 'three_prime_three_prime_overlap' OR cvterm.name = 'three_prime_five_prime_overlap' OR cvterm.name = 'antisense' OR cvterm.name = 'inside_intron_antiparallel' OR cvterm.name = 'inside_intron_parallel' OR cvterm.name = 'operon_member' OR cvterm.name = 'gene_cassette_member' OR cvterm.name = 'gene_subarray_member' OR cvterm.name = 'member_of_regulon' OR cvterm.name = 'cassette_array_member' OR cvterm.name = 'transcriptionally_regulated' OR cvterm.name = 'post_translationally_regulated' OR cvterm.name = 'translationally_regulated' OR cvterm.name = 'imprinted' OR cvterm.name = 'transcriptionally_constitutive' OR cvterm.name = 'transcriptionally_induced' OR cvterm.name = 'transcriptionally_repressed' OR cvterm.name = 'autoregulated' OR cvterm.name = 'positively_autoregulated' OR cvterm.name = 'negatively_autoregulated' OR cvterm.name = 'silenced' OR cvterm.name = 'silenced_by_DNA_modification' OR cvterm.name = 'silenced_by_RNA_interference' OR cvterm.name = 'silenced_by_histone_modification' OR cvterm.name = 'silenced_by_DNA_methylation' OR cvterm.name = 'silenced_by_histone_methylation' OR cvterm.name = 'silenced_by_histone_deacetylation' OR cvterm.name = 'negatively_autoregulated' OR cvterm.name = 'positively_autoregulated' OR cvterm.name = 'post_translationally_regulated_by_protein_stability' OR cvterm.name = 'post_translationally_regulated_by_protein_modification' OR cvterm.name = 'maternally_imprinted' OR cvterm.name = 'paternally_imprinted' OR cvterm.name = 'imprinted' OR cvterm.name = 'allelically_excluded' OR cvterm.name = 'rearranged_at_DNA_level' OR cvterm.name = 'maternally_imprinted' OR cvterm.name = 'paternally_imprinted' OR cvterm.name = 'encodes_1_polypeptide' OR cvterm.name = 'encodes_greater_than_1_polypeptide' OR 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 = 'homologous' OR cvterm.name = 'syntenic' OR cvterm.name = 'orthologous' OR cvterm.name = 'paralogous' OR cvterm.name = 'fragmentary' OR cvterm.name = 'predicted' OR cvterm.name = 'validated' OR cvterm.name = 'invalidated' OR cvterm.name = 'independently_known' OR cvterm.name = 'consensus' OR cvterm.name = 'low_complexity' OR cvterm.name = 'whole_genome_sequence_status' OR cvterm.name = 'supported_by_sequence_similarity' OR cvterm.name = 'orphan' OR cvterm.name = 'predicted_by_ab_initio_computation' OR cvterm.name = 'supported_by_domain_match' OR cvterm.name = 'supported_by_EST_or_cDNA' OR cvterm.name = 'experimentally_determined' OR cvterm.name = 'invalidated_by_chimeric_cDNA' OR cvterm.name = 'invalidated_by_genomic_contamination' OR cvterm.name = 'invalidated_by_genomic_polyA_primed_cDNA' OR cvterm.name = 'invalidated_by_partial_processing' OR cvterm.name = 'standard_draft' OR cvterm.name = 'high_quality_draft' OR cvterm.name = 'improved_high_quality_draft' OR cvterm.name = 'annotation_directed_improved_draft' OR cvterm.name = 'noncontiguous_finished' OR cvterm.name = 'finished_genome' OR cvterm.name = 'single' OR cvterm.name = 'double' OR cvterm.name = 'forward' OR cvterm.name = 'reverse' OR cvterm.name = 'ribozymic' OR cvterm.name = 'chromosomal_variation_attribute' OR cvterm.name = 'insertion_attribute' OR cvterm.name = 'inversion_attribute' OR cvterm.name = 'translocaton_attribute' OR cvterm.name = 'duplication_attribute' OR cvterm.name = 'intrachromosomal' OR cvterm.name = 'interchromosomal' OR cvterm.name = 'tandem' OR cvterm.name = 'direct' OR cvterm.name = 'inverted' OR cvterm.name = 'pericentric' OR cvterm.name = 'paracentric' OR cvterm.name = 'reciprocal' OR cvterm.name = 'insertional' OR cvterm.name = 'free' OR cvterm.name = 'score' OR cvterm.name = 'quality_value' OR cvterm.name = 'organelle_sequence' OR cvterm.name = 'plasmid_location' OR cvterm.name = 'proviral_location' OR cvterm.name = 'macronuclear_sequence' OR cvterm.name = 'micronuclear_sequence' OR cvterm.name = 'mitochondrial_sequence' OR cvterm.name = 'nuclear_sequence' OR cvterm.name = 'nucleomorphic_sequence' OR cvterm.name = 'plastid_sequence' OR cvterm.name = 'mitochondrial_DNA' OR cvterm.name = 'apicoplast_sequence' OR cvterm.name = 'chromoplast_sequence' OR cvterm.name = 'chloroplast_sequence' OR cvterm.name = 'cyanelle_sequence' OR cvterm.name = 'leucoplast_sequence' OR cvterm.name = 'proplastid_sequence' OR cvterm.name = 'chloroplast_DNA' OR cvterm.name = 'endogenous_retroviral_sequence' OR cvterm.name = 'variant_origin' OR cvterm.name = 'variant_frequency' OR cvterm.name = 'variant_phenotype' OR cvterm.name = 'maternal_variant' OR cvterm.name = 'paternal_variant' OR cvterm.name = 'somatic_variant' OR cvterm.name = 'germline_variant' OR cvterm.name = 'pedigree_specific_variant' OR cvterm.name = 'population_specific_variant' OR cvterm.name = 'de_novo_variant' OR cvterm.name = 'unique_variant' OR cvterm.name = 'rare_variant' OR cvterm.name = 'polymorphic_variant' OR cvterm.name = 'common_variant' OR cvterm.name = 'fixed_variant' OR cvterm.name = 'benign_variant' OR cvterm.name = 'disease_associated_variant' OR cvterm.name = 'disease_causing_variant' OR cvterm.name = 'lethal_variant' OR cvterm.name = 'quantitative_variant' OR cvterm.name = 'sequence_attribute';

--- ************************************************
--- *** relation: gene_attribute ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW gene_attribute AS
  SELECT
    feature_id AS gene_attribute_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'protein_coding' OR cvterm.name = 'non_protein_coding' OR cvterm.name = 'gene_to_gene_feature' OR cvterm.name = 'gene_array_member' OR cvterm.name = 'regulated' OR cvterm.name = 'epigenetically_modified' OR cvterm.name = 'encodes_alternately_spliced_transcripts' OR cvterm.name = 'encodes_alternate_transcription_start_sites' OR cvterm.name = 'intein_containing' OR cvterm.name = 'miRNA_encoding' OR cvterm.name = 'rRNA_encoding' OR cvterm.name = 'scRNA_encoding' OR cvterm.name = 'snoRNA_encoding' OR cvterm.name = 'snRNA_encoding' OR cvterm.name = 'SRP_RNA_encoding' OR cvterm.name = 'stRNA_encoding' OR cvterm.name = 'tmRNA_encoding' OR cvterm.name = 'tRNA_encoding' OR cvterm.name = 'gRNA_encoding' OR cvterm.name = 'C_D_box_snoRNA_encoding' OR cvterm.name = 'H_ACA_box_snoRNA_encoding' OR cvterm.name = 'overlapping' OR cvterm.name = 'inside_intron' OR cvterm.name = 'five_prime_three_prime_overlap' OR cvterm.name = 'five_prime_five_prime_overlap' OR cvterm.name = 'three_prime_three_prime_overlap' OR cvterm.name = 'three_prime_five_prime_overlap' OR cvterm.name = 'antisense' OR cvterm.name = 'inside_intron_antiparallel' OR cvterm.name = 'inside_intron_parallel' OR cvterm.name = 'operon_member' OR cvterm.name = 'gene_cassette_member' OR cvterm.name = 'gene_subarray_member' OR cvterm.name = 'member_of_regulon' OR cvterm.name = 'cassette_array_member' OR cvterm.name = 'transcriptionally_regulated' OR cvterm.name = 'post_translationally_regulated' OR cvterm.name = 'translationally_regulated' OR cvterm.name = 'imprinted' OR cvterm.name = 'transcriptionally_constitutive' OR cvterm.name = 'transcriptionally_induced' OR cvterm.name = 'transcriptionally_repressed' OR cvterm.name = 'autoregulated' OR cvterm.name = 'positively_autoregulated' OR cvterm.name = 'negatively_autoregulated' OR cvterm.name = 'silenced' OR cvterm.name = 'silenced_by_DNA_modification' OR cvterm.name = 'silenced_by_RNA_interference' OR cvterm.name = 'silenced_by_histone_modification' OR cvterm.name = 'silenced_by_DNA_methylation' OR cvterm.name = 'silenced_by_histone_methylation' OR cvterm.name = 'silenced_by_histone_deacetylation' OR cvterm.name = 'negatively_autoregulated' OR cvterm.name = 'positively_autoregulated' OR cvterm.name = 'post_translationally_regulated_by_protein_stability' OR cvterm.name = 'post_translationally_regulated_by_protein_modification' OR cvterm.name = 'maternally_imprinted' OR cvterm.name = 'paternally_imprinted' OR cvterm.name = 'imprinted' OR cvterm.name = 'allelically_excluded' OR cvterm.name = 'rearranged_at_DNA_level' OR cvterm.name = 'maternally_imprinted' OR cvterm.name = 'paternally_imprinted' OR cvterm.name = 'encodes_1_polypeptide' OR cvterm.name = 'encodes_greater_than_1_polypeptide' OR 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 = 'gene_attribute';

--- ************************************************
--- *** relation: u14_snorna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** U14 small nucleolar RNA (U14 snoRNA) is  ***
--- *** required for early cleavages of eukaryot ***
--- *** ic precursor rRNAs. In yeasts, this mole ***
--- *** cule possess a stem-loop region (known a ***
--- *** s the Y-domain) which is essential for f ***
--- *** unction. A similar structure, but with a ***
--- ***  different consensus sequence, is found  ***
--- *** in plants, but is absent in vertebrates. ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: vault_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A family of RNAs are found as part of th ***
--- *** e enigmatic vault ribonucleoprotein comp ***
--- *** lex. The complex consists of a major vau ***
--- *** lt protein (MVP), two minor vault protei ***
--- *** ns (VPARP and TEP1), and several small u ***
--- *** ntranslated RNA molecules. It has been s ***
--- *** uggested that the vault complex is invol ***
--- *** ved in drug resistance.                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: y_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Y RNAs are components of the Ro ribonucl ***
--- *** eoprotein particle (Ro RNP), in associat ***
--- *** ion with Ro60 and La proteins. The Y RNA ***
--- *** s and Ro60 and La proteins are well cons ***
--- *** erved, but the function of the Ro RNP is ***
--- ***  not known. In humans the RNA component  ***
--- *** can be one of four small RNAs: hY1, hY3, ***
--- ***  hY4 and hY5. These small RNAs are predi ***
--- *** cted to fold into a conserved secondary  ***
--- *** structure containing three stem structur ***
--- *** es. The largest of the four, hY1, contai ***
--- *** ns an additional hairpin.                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: twintron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An intron within an intron. Twintrons ar ***
--- *** e group II or III introns, into which an ***
--- *** other group II or III intron has been tr ***
--- *** ansposed.                                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rrna_18s ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A large polynucleotide in eukaryotes, wh ***
--- *** ich functions as the small subunit of th ***
--- *** e ribosome.                              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: binding_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A biological_region of sequence that, in ***
--- ***  the molecule, interacts selectively and ***
--- ***  non-covalently with other molecules. A  ***
--- *** region on the surface of a molecule that ***
--- ***  may interact with another molecule. Whe ***
--- *** n applied to polypeptides: Amino acids i ***
--- *** nvolved in binding or interactions. It c ***
--- *** an also apply to an amino acid bond whic ***
--- *** h is represented by the positions of the ***
--- ***  two flanking amino acids.               ***
--- ************************************************
---

CREATE VIEW binding_site AS
  SELECT
    feature_id AS binding_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'protein_binding_site' OR cvterm.name = 'epitope' OR cvterm.name = 'nucleotide_binding_site' OR cvterm.name = 'metal_binding_site' OR cvterm.name = 'ligand_binding_site' OR cvterm.name = 'protein_protein_contact' OR cvterm.name = 'nucleotide_to_protein_binding_site' 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 = 'miRNA_target_site' OR cvterm.name = 'DNA_binding_site' OR cvterm.name = 'primer_binding_site' OR cvterm.name = 'polypeptide_DNA_contact' OR cvterm.name = 'polypeptide_metal_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_ligand_contact' OR cvterm.name = 'binding_site';

--- ************************************************
--- *** relation: protein_binding_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A binding site that, in the molecule, in ***
--- *** teracts selectively and non-covalently w ***
--- *** ith polypeptide molecules.               ***
--- ************************************************
---

CREATE VIEW protein_binding_site AS
  SELECT
    feature_id AS protein_binding_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'protein_protein_contact' OR cvterm.name = 'nucleotide_to_protein_binding_site' 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 = 'protein_binding_site';

--- ************************************************
--- *** relation: rescue_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region that rescues.                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: restriction_fragment ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of polynucleotide sequence prod ***
--- *** uced by digestion with a restriction end ***
--- *** onuclease.                               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: sequence_difference ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region where the sequence differs from ***
--- ***  that of a specified sequence.           ***
--- ************************************************
---

CREATE VIEW sequence_difference AS
  SELECT
    feature_id AS sequence_difference_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'possible_base_call_error' OR cvterm.name = 'possible_assembly_error' OR cvterm.name = 'assembly_error_correction' OR cvterm.name = 'base_call_error_correction' OR cvterm.name = 'sequence_difference';

--- ************************************************
--- *** relation: invalidated_by_genomic_contamination ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe a feature that  ***
--- *** is invalidated due to genomic contaminat ***
--- *** ion.                                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: invalidated_by_genomic_polya_primed_cdna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe a feature that  ***
--- *** is invalidated due to polyA priming.     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: invalidated_by_partial_processing ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe a feature that  ***
--- *** is invalidated due to partial processing ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide_domain ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A structurally or functionally defined p ***
--- *** rotein region. In proteins with multiple ***
--- ***  domains, the combination of the domains ***
--- ***  determines the function of the protein. ***
--- ***  A region which has been shown to recur  ***
--- *** throughout evolution.                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: signal_peptide ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The signal_peptide is a short region of  ***
--- *** the peptide located at the N-terminus th ***
--- *** at directs the protein to be secreted or ***
--- ***  part of membrane components.            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: mature_protein_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The polypeptide sequence that remains wh ***
--- *** en the cleaved peptide regions have been ***
--- ***  cleaved from the immature peptide.      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: five_prime_terminal_inverted_repeat ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: three_prime_terminal_inverted_repeat ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: u5_ltr_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW u5_ltr_region AS
  SELECT
    feature_id AS u5_ltr_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'U5_five_prime_LTR_region' OR cvterm.name = 'U5_LTR_region';

--- ************************************************
--- *** relation: r_ltr_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW r_ltr_region AS
  SELECT
    feature_id AS r_ltr_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'R_five_prime_LTR_region' OR cvterm.name = 'R_LTR_region';

--- ************************************************
--- *** relation: u3_ltr_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW u3_ltr_region AS
  SELECT
    feature_id AS u3_ltr_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'U3_five_prime_LTR_region' OR cvterm.name = 'U3_LTR_region';

--- ************************************************
--- *** relation: five_prime_ltr ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: three_prime_ltr ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: r_five_prime_ltr_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: u5_five_prime_ltr_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: u3_five_prime_ltr_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: r_three_prime_ltr_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: u3_three_prime_ltr_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: u5_three_prime_ltr_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: non_ltr_retrotransposon_polymeric_tract ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A polymeric tract, such as poly(dA), wit ***
--- *** hin a non_LTR_retrotransposon.           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: target_site_duplication ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence of the target DNA that is dup ***
--- *** licated when a transposable element or p ***
--- *** hage inserts; usually found at each end  ***
--- *** the insertion.                           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rr_tract ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A polypurine tract within an LTR_retrotr ***
--- *** ansposon.                                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: ars ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence that can autonomously replica ***
--- *** te, as a plasmid, when transformed into  ***
--- *** a bacterial host.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: inverted_ring_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: vector_replicon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A replicon that has been modified to act ***
--- ***  as a vector for foreign sequence.       ***
--- ************************************************
---

CREATE VIEW vector_replicon AS
  SELECT
    feature_id AS vector_replicon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'targeting_vector' OR cvterm.name = 'vector_replicon';

--- ************************************************
--- *** relation: ss_oligo ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A single stranded oligonucleotide.       ***
--- ************************************************
---

CREATE VIEW ss_oligo AS
  SELECT
    feature_id AS ss_oligo_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'primer' OR cvterm.name = 'sequencing_primer' OR cvterm.name = 'forward_primer' OR cvterm.name = 'reverse_primer' OR cvterm.name = 'ASPE_primer' OR cvterm.name = 'dCAPS_primer' OR cvterm.name = 'ss_oligo';

--- ************************************************
--- *** relation: ds_oligo ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A double stranded oligonucleotide.       ***
--- ************************************************
---

CREATE VIEW ds_oligo AS
  SELECT
    feature_id AS ds_oligo_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'RNAi_reagent' OR cvterm.name = 'DNA_constraint_sequence' OR cvterm.name = 'ds_oligo';

--- ************************************************
--- *** relation: polymer_attribute ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe the kind of bio ***
--- *** logical sequence.                        ***
--- ************************************************
---

CREATE VIEW polymer_attribute AS
  SELECT
    feature_id AS polymer_attribute_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'nucleic_acid' OR cvterm.name = 'synthetic_sequence' OR cvterm.name = 'topology_attribute' OR cvterm.name = 'peptidyl' OR cvterm.name = 'DNA' OR cvterm.name = 'RNA' OR cvterm.name = 'morpholino_backbone' OR cvterm.name = 'PNA' OR cvterm.name = 'LNA' OR cvterm.name = 'TNA' OR cvterm.name = 'GNA' OR cvterm.name = 'cDNA' OR cvterm.name = 'genomic_DNA' OR cvterm.name = 'single_stranded_cDNA' OR cvterm.name = 'double_stranded_cDNA' OR cvterm.name = 'R_GNA' OR cvterm.name = 'S_GNA' OR cvterm.name = 'random_sequence' OR cvterm.name = 'designed_sequence' OR cvterm.name = 'linear' OR cvterm.name = 'circular' OR cvterm.name = 'polymer_attribute';

--- ************************************************
--- *** relation: three_prime_noncoding_exon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Non-coding exon in the 3' UTR.           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: five_prime_noncoding_exon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Non-coding exon in the 5' UTR.           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: utr_intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Intron located in the untranslated regio ***
--- *** n.                                       ***
--- ************************************************
---

CREATE VIEW utr_intron AS
  SELECT
    feature_id AS utr_intron_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_prime_UTR_intron' OR cvterm.name = 'three_prime_UTR_intron' OR cvterm.name = 'UTR_intron';

--- ************************************************
--- *** relation: five_prime_utr_intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An intron located in the 5' UTR.         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: three_prime_utr_intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An intron located in the 3' UTR.         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: random_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence of nucleotides or amino acids ***
--- ***  which, by design, has a "random" order  ***
--- *** of components, given a predetermined inp ***
--- *** ut frequency of these components.        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: interband ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A light region between two darkly staini ***
--- *** ng bands in a polytene chromosome.       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gene_with_polyadenylated_mrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that encodes a polyadenylated mRN ***
--- *** A.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: chromosomal_transposition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome structure variant whereby a ***
--- ***  region of a chromosome has been transfe ***
--- *** rred to another position. Among interchr ***
--- *** omosomal rearrangements, the term transp ***
--- *** osition is reserved for that class in wh ***
--- *** ich the telomeres of the chromosomes inv ***
--- *** olved are coupled (that is to say, form  ***
--- *** the two ends of a single DNA molecule) a ***
--- *** s in wild-type.                          ***
--- ************************************************
---

CREATE VIEW chromosomal_transposition AS
  SELECT
    feature_id AS chromosomal_transposition_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'unoriented_intrachromosomal_transposition' OR cvterm.name = 'deficient_interchromosomal_transposition' OR cvterm.name = 'inverted_interchromosomal_transposition' OR cvterm.name = 'uninverted_interchromosomal_transposition' OR cvterm.name = 'unoriented_interchromosomal_transposition' OR cvterm.name = 'chromosomal_transposition';

--- ************************************************
--- *** relation: rasirna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A 17-28-nt, small interfering RNA derive ***
--- *** d from transcripts of repetitive element ***
--- *** s.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gene_with_mrna_with_frameshift ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that encodes an mRNA with a frame ***
--- *** shift.                                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: recombinationally_rearranged_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is recombinationally rearran ***
--- *** ged.                                     ***
--- ************************************************
---

CREATE VIEW recombinationally_rearranged_gene AS
  SELECT
    feature_id AS recombinationally_rearranged_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'recombinationally_inverted_gene' OR cvterm.name = 'recombinationally_rearranged_vertebrate_immune_system_gene' OR cvterm.name = 'recombinationally_rearranged_gene';

--- ************************************************
--- *** relation: interchromosomal_duplication ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome duplication involving an in ***
--- *** sertion from another chromosome.         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: d_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Germline genomic DNA including D-region  ***
--- *** with 5' UTR and 3' UTR, also designated  ***
--- *** as D-segment.                            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gene_with_trans_spliced_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene with a transcript that is trans-s ***
--- *** pliced.                                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: vertebrate_immunoglobulin_t_cell_receptor_segment ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW vertebrate_immunoglobulin_t_cell_receptor_segment AS
  SELECT
    feature_id AS vertebrate_immunoglobulin_t_cell_receptor_segment_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'D_gene' OR cvterm.name = 'V_gene' OR cvterm.name = 'J_gene' OR cvterm.name = 'C_gene' OR cvterm.name = 'vertebrate_immunoglobulin_T_cell_receptor_segment';

--- ************************************************
--- *** relation: inversion_derived_bipartite_deficiency ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosomal deletion whereby a chromos ***
--- *** ome generated by recombination between t ***
--- *** wo inversions; has a deficiency at each  ***
--- *** end of the inversion.                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: pseudogenic_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A non-functional descendent of a functio ***
--- *** nal entity.                              ***
--- ************************************************
---

CREATE VIEW pseudogenic_region AS
  SELECT
    feature_id AS pseudogenic_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'pseudogenic_region';

--- ************************************************
--- *** relation: encodes_alternately_spliced_transcripts ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that encodes more than one transc ***
--- *** ript.                                    ***
--- ************************************************
---

CREATE VIEW encodes_alternately_spliced_transcripts AS
  SELECT
    feature_id AS encodes_alternately_spliced_transcripts_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'encodes_1_polypeptide' OR cvterm.name = 'encodes_greater_than_1_polypeptide' OR 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_alternately_spliced_transcripts';

--- ************************************************
--- *** relation: decayed_exon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A non-functional descendant of an exon.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: inversion_derived_deficiency_plus_duplication ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome deletion whereby a chromoso ***
--- *** me is generated by recombination between ***
--- ***  two inversions; there is a deficiency a ***
--- *** t one end of the inversion and a duplica ***
--- *** tion at the other end of the inversion.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Germline genomic DNA including L-part1,  ***
--- *** V-intron and V-exon, with the 5' UTR and ***
--- ***  3' UTR.                                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: post_translationally_regulated_by_protein_stability ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a gene sequence  ***
--- *** where the resulting protein is regulated ***
--- ***  by the stability of the resulting prote ***
--- *** in.                                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: golden_path_fragment ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** One of the pieces of sequence that make  ***
--- *** up a golden path.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: post_translationally_regulated_by_protein_modification ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a gene sequence  ***
--- *** where the resulting protein is modified  ***
--- *** to regulate it.                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: j_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Germline genomic DNA of an immunoglobuli ***
--- *** n/T-cell receptor gene including J-regio ***
--- *** n with 5' UTR (SO:0000204) and 3' UTR (S ***
--- *** O:0000205), also designated as J-segment ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: autoregulated ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The gene product is involved in its own  ***
--- *** transcriptional regulation.              ***
--- ************************************************
---

CREATE VIEW autoregulated AS
  SELECT
    feature_id AS autoregulated_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'negatively_autoregulated' OR cvterm.name = 'positively_autoregulated' OR cvterm.name = 'autoregulated';

--- ************************************************
--- *** relation: tiling_path ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A set of regions which overlap with mini ***
--- *** mal polymorphism to form a linear sequen ***
--- *** ce.                                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: negatively_autoregulated ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The gene product is involved in its own  ***
--- *** transcriptional regulation where it decr ***
--- *** eases transcription.                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: tiling_path_fragment ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A piece of sequence that makes up a tili ***
--- *** ng_path (SO:0000472).                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: positively_autoregulated ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The gene product is involved in its own  ***
--- *** transcriptional regulation, where it inc ***
--- *** reases transcription.                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: contig_read ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A DNA sequencer read which is part of a  ***
--- *** contig.                                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: c_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene including C-region (and intro ***
--- *** ns if present) with 5' UTR (SO:0000204)  ***
--- *** and 3' UTR (SO:0000205).                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: trans_spliced_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript that is trans-spliced.      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: tiling_path_clone ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A clone which is part of a tiling path.  ***
--- *** A tiling path is a set of sequencing sub ***
--- *** strates, typically clones, which have be ***
--- *** en selected in order to efficiently cove ***
--- *** r a region of the genome in preparation  ***
--- *** for sequencing and assembly.             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: terminal_inverted_repeat ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An inverted repeat (SO:0000294) occurrin ***
--- *** g at the termini of a DNA transposon.    ***
--- ************************************************
---

CREATE VIEW terminal_inverted_repeat AS
  SELECT
    feature_id AS terminal_inverted_repeat_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_prime_terminal_inverted_repeat' OR cvterm.name = 'three_prime_terminal_inverted_repeat' OR cvterm.name = 'terminal_inverted_repeat';

--- ************************************************
--- *** relation: vertebrate_immunoglobulin_t_cell_receptor_gene_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW vertebrate_immunoglobulin_t_cell_receptor_gene_cluster AS
  SELECT
    feature_id AS vertebrate_immunoglobulin_t_cell_receptor_gene_cluster_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'vertebrate_immunoglobulin_T_cell_receptor_gene_cluster';

--- ************************************************
--- *** relation: nc_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript that is never trans ***
--- *** lated into a protein.                    ***
--- ************************************************
---

CREATE VIEW nc_primary_transcript AS
  SELECT
    feature_id AS nc_primary_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'tasiRNA_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 = 'nc_primary_transcript';

--- ************************************************
--- *** relation: three_prime_coding_exon_noncoding_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The sequence of the 3' exon that is not  ***
--- *** coding.                                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dj_j_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one DJ-gene, and one J ***
--- *** -gene.                                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: five_prime_coding_exon_noncoding_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The sequence of the 5' exon preceding th ***
--- *** e start codon.                           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: vdj_j_c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one VDJ-gene, one J-ge ***
--- *** ne and one C-gene.                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: vdj_j_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one VDJ-gene and one J ***
--- *** -gene.                                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: vj_c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one VJ-gene and one C- ***
--- *** gene.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: vj_j_c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one VJ-gene, one J-gen ***
--- *** e and one C-gene.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: vj_j_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one VJ-gene and one J- ***
--- *** gene.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: d_gene_recombination_feature ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW d_gene_recombination_feature AS
  SELECT
    feature_id AS d_gene_recombination_feature_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_prime_D_recombination_signal_sequence' OR cvterm.name = 'three_prime_D_recombination_signal_sequence' OR cvterm.name = 'D_gene_recombination_feature';

--- ************************************************
--- *** relation: three_prime_d_heptamer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 7 nucleotide recombination site like CAC ***
--- *** AGTG, part of a 3' D-recombination signa ***
--- *** l sequence of an immunoglobulin/T-cell r ***
--- *** eceptor gene.                            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: three_prime_d_nonamer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A 9 nucleotide recombination site (e.g.  ***
--- *** ACAAAAACC), part of a 3' D-recombination ***
--- ***  signal sequence of an immunoglobulin/T- ***
--- *** cell receptor gene.                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: three_prime_d_spacer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A 12 or 23 nucleotide spacer between the ***
--- ***  3'D-HEPTAMER and 3'D-NONAMER of a 3'D-R ***
--- *** S.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: five_prime_d_heptamer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 7 nucleotide recombination site (e.g. CA ***
--- *** CTGTG), part of a 5' D-recombination sig ***
--- *** nal sequence (SO:0000556) of an immunogl ***
--- *** obulin/T-cell receptor gene.             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: five_prime_d_nonamer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 9 nucleotide recombination site (e.g. GG ***
--- *** TTTTTGT), part of a five_prime_D-recombi ***
--- *** nation signal sequence (SO:0000556) of a ***
--- *** n immunoglobulin/T-cell receptor gene.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: five_prime_d_spacer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 12 or 23 nucleotide spacer between the 5 ***
--- *** ' D-heptamer (SO:0000496) and 5' D-nonam ***
--- *** er (SO:0000497) of a 5' D-recombination  ***
--- *** signal sequence (SO:0000556) of an immun ***
--- *** oglobulin/T-cell receptor gene.          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: virtual_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A continuous piece of sequence similar t ***
--- *** o the 'virtual contig' concept of the En ***
--- *** sembl database.                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: hoogsteen_base_pair ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A type of non-canonical base-pairing. Th ***
--- *** is is less energetically favourable than ***
--- ***  watson crick base pairing. Hoogsteen GC ***
--- ***  base pairs only have two hydrogen bonds ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: reverse_hoogsteen_base_pair ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A type of non-canonical base-pairing.    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: d_dj_c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one D-gene, one DJ-gen ***
--- *** e and one C-gene.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: d_dj_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one D-gene and one DJ- ***
--- *** gene.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: d_dj_j_c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one D-gene, one DJ-gen ***
--- *** e, one J-gene and one C-gene.            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: pseudogenic_exon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A non functional descendant of an exon,  ***
--- *** part of a pseudogene.                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: d_dj_j_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one D-gene, one DJ-gen ***
--- *** e, and one J-gene.                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: d_j_c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in germline configuration inc ***
--- *** luding at least one D-gene, one J-gene a ***
--- *** nd one C-gene.                           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: vd_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in partially rearranged genom ***
--- *** ic DNA including L-part1, V-intron and V ***
--- *** -D-exon, with the 5' UTR (SO:0000204) an ***
--- *** d 3' UTR (SO:0000205).                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: j_c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in germline configuration inc ***
--- *** luding at least one J-gene and one C-gen ***
--- *** e.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: inversion_derived_deficiency_plus_aneuploid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosomal deletion whereby a chromos ***
--- *** ome generated by recombination between t ***
--- *** wo inversions; has a deficiency at one e ***
--- *** nd and presumed to have a deficiency or  ***
--- *** duplication at the other end of the inve ***
--- *** rsion.                                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: j_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in germline configuration inc ***
--- *** luding more than one J-gene.             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: j_nonamer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 9 nucleotide recombination site (e.g. GG ***
--- *** TTTTTGT), part of a J-gene recombination ***
--- ***  feature of an immunoglobulin/T-cell rec ***
--- *** eptor gene.                              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: j_heptamer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 7 nucleotide recombination site (e.g. CA ***
--- *** CAGTG), part of a J-gene recombination f ***
--- *** eature of an immunoglobulin/T-cell recep ***
--- *** tor gene.                                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: pseudogenic_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A non functional descendant of a transcr ***
--- *** ipt, part of a pseudogene.               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: j_spacer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 12 or 23 nucleotide spacer between the J ***
--- *** -nonamer and the J-heptamer of a J-gene  ***
--- *** recombination feature of an immunoglobul ***
--- *** in/T-cell receptor gene.                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_dj_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one V-gene and one DJ- ***
--- *** gene.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_dj_j_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one V-gene, one DJ-gen ***
--- *** e and one J-gene.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_vdj_c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one V-gene, one VDJ-ge ***
--- *** ne and one C-gene.                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_vdj_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one V-gene and one VDJ ***
--- *** -gene.                                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_vdj_j_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one V-gene, one VDJ-ge ***
--- *** ne and one J-gene.                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_vj_c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one V-gene, one VJ-gen ***
--- *** e and one C-gene.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_vj_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one V-gene and one VJ- ***
--- *** gene.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_vj_j_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one V-gene, one VJ-gen ***
--- *** e and one J-gene.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in germline configuration inc ***
--- *** luding more than one V-gene.             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_d_dj_c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one V-gene, one D-gene ***
--- *** , one DJ-gene and one C-gene.            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_d_dj_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one V-gene, one D-gene ***
--- *** , one DJ-gene.                           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_d_dj_j_c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one V-gene, one D-gene ***
--- *** , one DJ-gene, one J-gene and one C-gene ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_d_dj_j_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one V-gene, one D-gene ***
--- *** , one DJ-gene and one J-gene.            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_d_j_c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in germline configuration inc ***
--- *** luding at least one V-gene, one D-gene a ***
--- *** nd one J-gene and one C-gene.            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_d_j_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in germline configuration inc ***
--- *** luding at least one V-gene, one D-gene a ***
--- *** nd one J-gene.                           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_heptamer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 7 nucleotide recombination site (e.g. CA ***
--- *** CAGTG), part of V-gene recombination fea ***
--- *** ture of an immunoglobulin/T-cell recepto ***
--- *** r gene.                                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_j_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in germline configuration inc ***
--- *** luding at least one V-gene and one J-gen ***
--- *** e.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_j_c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in germline configuration inc ***
--- *** luding at least one V-gene, one J-gene a ***
--- *** nd one C-gene.                           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_nonamer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 9 nucleotide recombination site (e.g. AC ***
--- *** AAAAACC), part of V-gene recombination f ***
--- *** eature of an immunoglobulin/T-cell recep ***
--- *** tor gene.                                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_spacer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 12 or 23 nucleotide spacer between the V ***
--- *** -heptamer and the V-nonamer of a V-gene  ***
--- *** recombination feature of an immunoglobul ***
--- *** in/T-cell receptor gene.                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_gene_recombination_feature ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Recombination signal including V-heptame ***
--- *** r, V-spacer and V-nonamer in 3' of V-reg ***
--- *** ion of a V-gene or V-sequence of an immu ***
--- *** noglobulin/T-cell receptor gene.         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dj_c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one DJ-gene and one C- ***
--- *** gene.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dj_j_c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA in rearranged configuration  ***
--- *** including at least one D-J-GENE, one J-G ***
--- *** ENE and one C-GENE.                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: vdj_c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one VDJ-gene and one C ***
--- *** -gene.                                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_dj_c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one V-gene, one DJ-gen ***
--- *** e and one C-gene.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: helitron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A rolling circle transposon. Autonomous  ***
--- *** helitrons encode a 5'-to-3' DNA helicase ***
--- ***  and nuclease/ligase similar to those en ***
--- *** coded by known rolling-circle replicons. ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: recoding_pseudoknot ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The pseudoknots involved in recoding are ***
--- ***  unique in that, as they play their role ***
--- ***  as a structure, they are immediately un ***
--- *** folded and their now linear sequence ser ***
--- *** ves as a template for decoding.          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: designed_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: inversion_derived_bipartite_duplication ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome generated by recombination  ***
--- *** between two inversions; there is a dupli ***
--- *** cation at each end of the inversion.     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gene_with_edited_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that encodes a transcript that is ***
--- ***  edited.                                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: inversion_derived_duplication_plus_aneuploid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome generated by recombination  ***
--- *** between two inversions; has a duplicatio ***
--- *** n at one end and presumed to have a defi ***
--- *** ciency or duplication at the other end o ***
--- *** f the inversion.                         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: aneuploid_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome structural variation whereb ***
--- *** y either a chromosome exists in addition ***
--- ***  to the normal chromosome complement or  ***
--- *** is lacking.                              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polya_signal_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The recognition sequence necessary for e ***
--- *** ndonuclease cleavage of an RNA transcrip ***
--- *** t that is followed by polyadenylation; c ***
--- *** onsensus=AATAAA.                         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: shine_dalgarno_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region in the 5' UTR that pairs with t ***
--- *** he 16S rRNA during formation of the prei ***
--- *** nitiation complex.                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polya_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The site on an RNA transcript to which w ***
--- *** ill be added adenine residues by post-tr ***
--- *** anscriptional polyadenylation. The bound ***
--- *** ary between the UTR and the polyA sequen ***
--- *** ce.                                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: five_prime_clip ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5' most region of a precursor transcript ***
--- ***  that is clipped off during processing.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: five_prime_d_recombination_signal_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Recombination signal of an immunoglobuli ***
--- *** n/T-cell receptor gene, including the 5' ***
--- ***  D-nonamer (SO:0000497), 5' D-spacer (SO ***
--- *** :0000498), and 5' D-heptamer (SO:0000396 ***
--- *** ) in 5' of the D-region of a D-gene, or  ***
--- *** in 5' of the D-region of DJ-gene.        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: three_prime_clip ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 3'-most region of a precursor transcript ***
--- ***  that is clipped off during processing.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene including more than one C-gen ***
--- *** e.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: d_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in germline configuration inc ***
--- *** luding more than one D-gene.             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: d_j_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in germline configuration inc ***
--- *** luding at least one D-gene and one J-gen ***
--- *** e.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: heptamer_of_recombination_feature_of_vertebrate_im_sys_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Seven nucleotide recombination site (e.g ***
--- *** . CACAGTG), part of V-gene, D-gene or J- ***
--- *** gene recombination feature of an immunog ***
--- *** lobulin or T-cell receptor gene.         ***
--- ************************************************
---

CREATE VIEW heptamer_of_recombination_feature_of_vertebrate_im_sys_gene AS
  SELECT
    feature_id AS heptamer_of_recombination_feature_of_vertebrate_im_sys_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'heptamer_of_recombination_feature_of_vertebrate_immune_system_gene';

--- ************************************************
--- *** relation: nonamer_of_recombination_feature_of_vertebrate_im_sys_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW nonamer_of_recombination_feature_of_vertebrate_im_sys_gene AS
  SELECT
    feature_id AS nonamer_of_recombination_feature_of_vertebrate_im_sys_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'nonamer_of_recombination_feature_of_vertebrate_immune_system_gene';

--- ************************************************
--- *** relation: vertebrate_immune_system_gene_recombination_spacer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW vertebrate_immune_system_gene_recombination_spacer AS
  SELECT
    feature_id AS vertebrate_immune_system_gene_recombination_spacer_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'vertebrate_immune_system_gene_recombination_spacer';

--- ************************************************
--- *** relation: v_dj_j_c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one V-gene, one DJ-gen ***
--- *** e, one J-gene and one C-gene.            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_vdj_j_c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one V-gene, one VDJ-ge ***
--- *** ne, one J-gene and one C-gene.           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: v_vj_j_c_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in rearranged configuration i ***
--- *** ncluding at least one V-gene, one VJ-gen ***
--- *** e, one J-gene and one C-gene.            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: inversion_derived_aneuploid_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome may be generated by recombi ***
--- *** nation between two inversions; presumed  ***
--- *** to have a deficiency or duplication at e ***
--- *** ach end of the inversion.                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: bidirectional_promoter ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: retrotransposed ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute of a feature that occurred  ***
--- *** as the product of a reverse transcriptas ***
--- *** e mediated event.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: three_prime_d_recombination_signal_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Recombination signal of an immunoglobuli ***
--- *** n/T-cell receptor gene, including the 3' ***
--- ***  D-heptamer (SO:0000493), 3' D-spacer, a ***
--- *** nd 3' D-nonamer (SO:0000494) in 3' of th ***
--- *** e D-region of a D-gene.                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: mirna_encoding ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dj_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic DNA of immunoglobulin/T-cell rec ***
--- *** eptor gene in partially rearranged genom ***
--- *** ic DNA including D-J-region with 5' UTR  ***
--- *** and 3' UTR, also designated as D-J-segme ***
--- *** nt.                                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rrna_encoding ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: vdj_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Rearranged genomic DNA of immunoglobulin ***
--- *** /T-cell receptor gene including L-part1, ***
--- ***  V-intron and V-D-J-exon, with the 5'UTR ***
--- ***  (SO:0000204) and 3'UTR (SO:0000205).    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: scrna_encoding ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: vj_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Rearranged genomic DNA of immunoglobulin ***
--- *** /T-cell receptor gene including L-part1, ***
--- ***  V-intron and V-J-exon, with the 5'UTR ( ***
--- *** SO:0000204) and 3'UTR (SO:0000205).      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: centromere ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of chromosome where the spindle ***
--- ***  fibers attach during mitosis and meiosi ***
--- *** s.                                       ***
--- ************************************************
---

CREATE VIEW centromere AS
  SELECT
    feature_id AS centromere_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'point_centromere' OR cvterm.name = 'regional_centromere' OR cvterm.name = 'centromere';

--- ************************************************
--- *** relation: snorna_encoding ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW snorna_encoding AS
  SELECT
    feature_id AS snorna_encoding_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'C_D_box_snoRNA_encoding' OR cvterm.name = 'H_ACA_box_snoRNA_encoding' OR cvterm.name = 'snoRNA_encoding';

--- ************************************************
--- *** relation: edited_transcript_feature ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A locatable feature on a transcript that ***
--- ***  is edited.                              ***
--- ************************************************
---

CREATE VIEW edited_transcript_feature AS
  SELECT
    feature_id AS edited_transcript_feature_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'pre_edited_region' OR cvterm.name = 'editing_block' OR cvterm.name = 'editing_domain' OR cvterm.name = 'unedited_region' OR cvterm.name = 'edited_transcript_feature';

--- ************************************************
--- *** relation: methylation_guide_snorna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding a methylat ***
--- *** ion guide small nucleolar RNA.           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: cap ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A structure consisting of a 7-methylguan ***
--- *** osine in 5'-5' triphosphate linkage with ***
--- ***  the first nucleotide of an mRNA. It is  ***
--- *** added post-transcriptionally, and is not ***
--- ***  encoded in the DNA.                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rrna_cleavage_snorna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding an rRNA cl ***
--- *** eavage snoRNA.                           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: pre_edited_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The region of a transcript that will be  ***
--- *** edited.                                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: tmrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tmRNA liberates a mRNA from a stalled  ***
--- *** ribosome. To accomplish this part of the ***
--- ***  tmRNA is used as a reading frame that e ***
--- *** nds in a translation stop signal. The br ***
--- *** oken mRNA is replaced in the ribosome by ***
--- ***  the tmRNA and translation of the tmRNA  ***
--- *** leads to addition of a proteolysis tag t ***
--- *** o the incomplete protein enabling recogn ***
--- *** ition by a protease. Recently a number o ***
--- *** f permuted tmRNAs genes have been found  ***
--- *** encoded in two parts. TmRNAs have been i ***
--- *** dentified in eubacteria and some chlorop ***
--- *** lasts but are absent from archeal and Eu ***
--- *** karyote nuclear genomes.                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: c_d_box_snorna_encoding ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: tmrna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding a tmRNA (S ***
--- *** O:0000584).                              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: group_i_intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Group I catalytic introns are large self ***
--- *** -splicing ribozymes. They catalyze their ***
--- ***  own excision from mRNA, tRNA and rRNA p ***
--- *** recursors in a wide range of organisms.  ***
--- *** The core secondary structure consists of ***
--- ***  9 paired regions (P1-P9). These fold to ***
--- ***  essentially two domains, the P4-P6 doma ***
--- *** in (formed from the stacking of P5, P4,  ***
--- *** P6 and P6a helices) and the P3-P9 domain ***
--- ***  (formed from the P8, P3, P7 and P9 heli ***
--- *** ces). Group I catalytic introns often ha ***
--- *** ve long ORFs inserted in loop regions.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: autocatalytically_spliced_intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A self spliced intron.                   ***
--- ************************************************
---

CREATE VIEW autocatalytically_spliced_intron AS
  SELECT
    feature_id AS autocatalytically_spliced_intron_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'autocatalytically_spliced_intron';

--- ************************************************
--- *** relation: srp_rna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding a signal r ***
--- *** ecognition particle RNA.                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: srp_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The signal recognition particle (SRP) is ***
--- ***  a universally conserved ribonucleoprote ***
--- *** in. It is involved in the co-translation ***
--- *** al targeting of proteins to membranes. T ***
--- *** he eukaryotic SRP consists of a 300-nucl ***
--- *** eotide 7S RNA and six proteins: SRPs 72, ***
--- ***  68, 54, 19, 14, and 9. Archaeal SRP con ***
--- *** sists of a 7S RNA and homologues of the  ***
--- *** eukaryotic SRP19 and SRP54 proteins. In  ***
--- *** most eubacteria, the SRP consists of a 4 ***
--- *** .5S RNA and the Ffh protein (a homologue ***
--- ***  of the eukaryotic SRP54 protein). Eukar ***
--- *** yotic and archaeal 7S RNAs have very sim ***
--- *** ilar secondary structures, with eight he ***
--- *** lical elements. These fold into the Alu  ***
--- *** and S domains, separated by a long linke ***
--- *** r region. Eubacterial SRP is generally a ***
--- ***  simpler structure, with the M domain of ***
--- ***  Ffh bound to a region of the 4.5S RNA t ***
--- *** hat corresponds to helix 8 of the eukary ***
--- *** otic and archaeal SRP S domain. Some Gra ***
--- *** m-positive bacteria (e.g. Bacillus subti ***
--- *** lis), however, have a larger SRP RNA tha ***
--- *** t also has an Alu domain. The Alu domain ***
--- ***  is thought to mediate the peptide chain ***
--- ***  elongation retardation function of the  ***
--- *** SRP. The universally conserved helix whi ***
--- *** ch interacts with the SRP54/Ffh M domain ***
--- ***  mediates signal sequence recognition. I ***
--- *** n eukaryotes and archaea, the SRP19-heli ***
--- *** x 6 complex is thought to be involved in ***
--- ***  SRP assembly and stabilizes helix 8 for ***
--- ***  SRP54 binding.                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: pseudoknot ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tertiary structure in RNA where nucleo ***
--- *** tides in a loop form base pairs with a r ***
--- *** egion of RNA downstream of the loop.     ***
--- ************************************************
---

CREATE VIEW pseudoknot AS
  SELECT
    feature_id AS pseudoknot_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'recoding_pseudoknot' OR cvterm.name = 'H_pseudoknot' OR cvterm.name = 'pseudoknot';

--- ************************************************
--- *** relation: h_pseudoknot ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A pseudoknot which contains two stems an ***
--- *** d at least two loops.                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: c_d_box_snorna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Most box C/D snoRNAs also contain long ( ***
--- *** >10 nt) sequences complementary to rRNA. ***
--- ***  Boxes C and D, as well as boxes C' and  ***
--- *** D', are usually located in close proximi ***
--- *** ty, and form a structure known as the bo ***
--- *** x C/D motif. This motif is important for ***
--- ***  snoRNA stability, processing, nucleolar ***
--- ***  targeting and function. A small number  ***
--- *** of box C/D snoRNAs are involved in rRNA  ***
--- *** processing; most, however, are known or  ***
--- *** predicted to serve as guide RNAs in ribo ***
--- *** se methylation of rRNA. Targeting involv ***
--- *** es direct base pairing of the snoRNA at  ***
--- *** the rRNA site to be modified and selecti ***
--- *** on of a rRNA nucleotide a fixed distance ***
--- ***  from box D or D'.                       ***
--- ************************************************
---

CREATE VIEW c_d_box_snorna AS
  SELECT
    feature_id AS c_d_box_snorna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'U14_snoRNA' OR cvterm.name = 'U3_snoRNA' OR cvterm.name = 'methylation_guide_snoRNA' OR cvterm.name = 'C_D_box_snoRNA';

--- ************************************************
--- *** relation: h_aca_box_snorna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Members of the box H/ACA family contain  ***
--- *** an ACA triplet, exactly 3 nt upstream fr ***
--- *** om the 3' end and an H-box in a hinge re ***
--- *** gion that links two structurally similar ***
--- ***  functional domains of the molecule. Bot ***
--- *** h boxes are important for snoRNA biosynt ***
--- *** hesis and function. A few box H/ACA snoR ***
--- *** NAs are involved in rRNA processing; mos ***
--- *** t others are known or predicted to parti ***
--- *** cipate in selection of uridine nucleosid ***
--- *** es in rRNA to be converted to pseudourid ***
--- *** ines. Site selection is mediated by dire ***
--- *** ct base pairing of the snoRNA with rRNA  ***
--- *** through one or both targeting domains.   ***
--- ************************************************
---

CREATE VIEW h_aca_box_snorna AS
  SELECT
    feature_id AS h_aca_box_snorna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'pseudouridylation_guide_snoRNA' OR cvterm.name = 'H_ACA_box_snoRNA';

--- ************************************************
--- *** relation: c_d_box_snorna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding a small nu ***
--- *** cleolar RNA of the box C/D family.       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: h_aca_box_snorna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding a small nu ***
--- *** cleolar RNA of the box H/ACA family.     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: guide_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A short 3'-uridylated RNA that can form  ***
--- *** a duplex (except for its post-transcript ***
--- *** ionally added oligo_U tail (SO:0000609)) ***
--- ***  with a stretch of mature edited mRNA.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: group_ii_intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Group II introns are found in rRNA, tRNA ***
--- ***  and mRNA of organelles in fungi, plants ***
--- ***  and protists, and also in mRNA in bacte ***
--- *** ria. They are large self-splicing ribozy ***
--- *** mes and have 6 structural domains (usual ***
--- *** ly designated dI to dVI). A subset of gr ***
--- *** oup II introns also encode essential spl ***
--- *** icing proteins in intronic ORFs. The len ***
--- *** gth of these introns can therefore be up ***
--- ***  to 3kb. Splicing occurs in almost ident ***
--- *** ical fashion to nuclear pre-mRNA splicin ***
--- *** g with two transesterification steps. Th ***
--- *** e 2' hydroxyl of a bulged adenosine in d ***
--- *** omain VI attacks the 5' splice site, fol ***
--- *** lowed by nucleophilic attack on the 3' s ***
--- *** plice site by the 3' OH of the upstream  ***
--- *** exon. Protein machinery is required for  ***
--- *** splicing in vivo, and long range intron- ***
--- *** intron and intron-exon interactions are  ***
--- *** important for splice site positioning. G ***
--- *** roup II introns are further sub-classifi ***
--- *** ed into groups IIA and IIB which differ  ***
--- *** in splice site consensus, distance of bu ***
--- *** lged A from 3' splice site, some tertiar ***
--- *** y interactions, and intronic ORF phyloge ***
--- *** ny.                                      ***
--- ************************************************
---

CREATE VIEW group_ii_intron AS
  SELECT
    feature_id AS group_ii_intron_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'group_IIA_intron' OR cvterm.name = 'group_IIB_intron' OR cvterm.name = 'group_II_intron';

--- ************************************************
--- *** relation: editing_block ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Edited mRNA sequence mediated by a singl ***
--- *** e guide RNA (SO:0000602).                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: intergenic_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region containing or overlapping no ge ***
--- *** nes that is bounded on either side by a  ***
--- *** gene, or bounded by a gene and the end o ***
--- *** f the chromosome.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: editing_domain ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Edited mRNA sequence mediated by two or  ***
--- *** more overlapping guide RNAs (SO:0000602) ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: unedited_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The region of an edited transcript that  ***
--- *** will not be edited.                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: h_aca_box_snorna_encoding ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: oligo_u_tail ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The string of non-encoded U's at the 3'  ***
--- *** end of a guide RNA (SO:0000602).         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polya_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Sequence of about 100 nucleotides of A a ***
--- *** dded to the 3' end of most eukaryotic mR ***
--- *** NAs.                                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: branch_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A pyrimidine rich sequence near the 3' e ***
--- *** nd of an intron to which the 5'end becom ***
--- *** es covalently bound during nuclear splic ***
--- *** ing. The resulting structure resembles a ***
--- ***  lariat.                                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypyrimidine_tract ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The polypyrimidine tract is one of the c ***
--- *** is-acting sequence elements directing in ***
--- *** tron removal in pre-mRNA splicing.       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: bacterial_rnapol_promoter ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A DNA sequence to which bacterial RNA po ***
--- *** lymerase binds, to begin transcription.  ***
--- ************************************************
---

CREATE VIEW bacterial_rnapol_promoter AS
  SELECT
    feature_id AS bacterial_rnapol_promoter_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'bacterial_RNApol_promoter_sigma_70' OR cvterm.name = 'bacterial_RNApol_promoter_sigma54' OR cvterm.name = 'bacterial_RNApol_promoter';

--- ************************************************
--- *** relation: bacterial_terminator ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A terminator signal for bacterial transc ***
--- *** ription.                                 ***
--- ************************************************
---

CREATE VIEW bacterial_terminator AS
  SELECT
    feature_id AS bacterial_terminator_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'rho_dependent_bacterial_terminator' OR cvterm.name = 'rho_independent_bacterial_terminator' OR cvterm.name = 'bacterial_terminator';

--- ************************************************
--- *** relation: terminator_of_type_2_rnapol_iii_promoter ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A terminator signal for RNA polymerase I ***
--- *** II transcription.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: transcription_end_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The base where transcription ends.       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rnapol_iii_promoter_type_1 ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rnapol_iii_promoter_type_2 ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: a_box ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A variably distant linear promoter regio ***
--- *** n recognized by TFIIIC, with consensus s ***
--- *** equence TGGCnnAGTGG.                     ***
--- ************************************************
---

CREATE VIEW a_box AS
  SELECT
    feature_id AS a_box_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'A_box_type_1' OR cvterm.name = 'A_box_type_2' OR cvterm.name = 'A_box';

--- ************************************************
--- *** relation: b_box ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A variably distant linear promoter regio ***
--- *** n recognized by TFIIIC, with consensus s ***
--- *** equence AGGTTCCAnnCC.                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rnapol_iii_promoter_type_3 ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: c_box ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An RNA polymerase III type 1 promoter wi ***
--- *** th consensus sequence CAnnCCn.           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: snrna_encoding ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: telomere ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A specific structure at the end of a lin ***
--- *** ear chromosome, required for the integri ***
--- *** ty and maintenance of the end.           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: silencer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A regulatory region which upon binding o ***
--- *** f transcription factors, suppress the tr ***
--- *** anscription of the gene or genes they co ***
--- *** ntrol.                                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: chromosomal_regulatory_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: insulator ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcriptional cis regulatory region  ***
--- *** that when located between a CM and a gen ***
--- *** e's promoter prevents the CRM from modul ***
--- *** ating that genes expression.             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: chromosomal_structural_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW chromosomal_structural_element AS
  SELECT
    feature_id AS chromosomal_structural_element_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'centromere' OR cvterm.name = 'telomere' OR cvterm.name = 'point_centromere' OR cvterm.name = 'regional_centromere' OR cvterm.name = 'chromosomal_structural_element';

--- ************************************************
--- *** relation: five_prime_open_reading_frame ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: upstream_aug_codon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A start codon upstream of the ORF.       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polycistronic_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding for more t ***
--- *** han one gene product.                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: monocistronic_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding for one ge ***
--- *** ne product.                              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: monocistronic_mrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An mRNA with either a single protein pro ***
--- *** duct, or for which the regions encoding  ***
--- *** all its protein products overlap.        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polycistronic_mrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An mRNA that encodes multiple proteins f ***
--- *** rom at least two non-overlapping regions ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW polycistronic_mrna AS
  SELECT
    feature_id AS polycistronic_mrna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'dicistronic_mRNA' OR cvterm.name = 'polycistronic_mRNA';

--- ************************************************
--- *** relation: mini_exon_donor_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript that donates the sp ***
--- *** liced leader to other mRNA.              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: spliced_leader_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: engineered_plasmid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A plasmid that is engineered.            ***
--- ************************************************
---

CREATE VIEW engineered_plasmid AS
  SELECT
    feature_id AS engineered_plasmid_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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_plasmid';

--- ************************************************
--- *** relation: transcribed_spacer_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Part of an rRNA transcription unit that  ***
--- *** is transcribed but discarded during matu ***
--- *** ration, not giving rise to any part of r ***
--- *** RNA.                                     ***
--- ************************************************
---

CREATE VIEW transcribed_spacer_region AS
  SELECT
    feature_id AS transcribed_spacer_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'internal_transcribed_spacer_region' OR cvterm.name = 'external_transcribed_spacer_region' OR cvterm.name = 'transcribed_spacer_region';

--- ************************************************
--- *** relation: internal_transcribed_spacer_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Non-coding regions of DNA sequence that  ***
--- *** separate genes coding for the 28S, 5.8S, ***
--- ***  and 18S ribosomal RNAs.                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: external_transcribed_spacer_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Non-coding regions of DNA that precede t ***
--- *** he sequence that codes for the ribosomal ***
--- ***  RNA.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: tetranuc_repeat_microsat ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: srp_rna_encoding ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: minisatellite ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A repeat region containing tandemly repe ***
--- *** ated sequences having a unit length of 1 ***
--- *** 0 to 40 bp.                              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: antisense_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Antisense RNA is RNA that is transcribed ***
--- ***  from the coding, rather than the templa ***
--- *** te, strand of DNA. It is therefore compl ***
--- *** ementary to mRNA.                        ***
--- ************************************************
---

CREATE VIEW antisense_rna AS
  SELECT
    feature_id AS antisense_rna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'MicF_RNA' OR cvterm.name = 'antisense_RNA';

--- ************************************************
--- *** relation: antisense_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The reverse complement of the primary tr ***
--- *** anscript.                                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: sirna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A small RNA molecule that is the product ***
--- ***  of a longer exogenous or endogenous dsR ***
--- *** NA, which is either a bimolecular duplex ***
--- ***  or very long hairpin, processed (via th ***
--- *** e Dicer pathway) such that numerous siRN ***
--- *** As accumulate from both strands of the d ***
--- *** sRNA. SRNAs trigger the cleavage of thei ***
--- *** r target molecules.                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: mirna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding a micro RN ***
--- *** A.                                       ***
--- ************************************************
---

CREATE VIEW mirna_primary_transcript AS
  SELECT
    feature_id AS mirna_primary_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'stRNA_primary_transcript' OR cvterm.name = 'miRNA_primary_transcript';

--- ************************************************
--- *** relation: strna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding a small te ***
--- *** mporal mRNA (SO:0000649).                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: strna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Non-coding RNAs of about 21 nucleotides  ***
--- *** in length that regulate temporal develop ***
--- *** ment; first discovered in C. elegans.    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: small_subunit_rrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Ribosomal RNA transcript that structures ***
--- ***  the small subunit of the ribosome.      ***
--- ************************************************
---

CREATE VIEW small_subunit_rrna AS
  SELECT
    feature_id AS small_subunit_rrna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'rRNA_18S' OR cvterm.name = 'rRNA_16S' OR cvterm.name = 'small_subunit_rRNA';

--- ************************************************
--- *** relation: large_subunit_rrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Ribosomal RNA transcript that structures ***
--- ***  the large subunit of the ribosome.      ***
--- ************************************************
---

CREATE VIEW large_subunit_rrna AS
  SELECT
    feature_id AS large_subunit_rrna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'large_subunit_rRNA';

--- ************************************************
--- *** relation: rrna_5s ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5S ribosomal RNA (5S rRNA) is a componen ***
--- *** t of the large ribosomal subunit in both ***
--- ***  prokaryotes and eukaryotes. In eukaryot ***
--- *** es, it is synthesised by RNA polymerase  ***
--- *** III (the other eukaryotic rRNAs are clea ***
--- *** ved from a 45S precursor synthesised by  ***
--- *** RNA polymerase I). In Xenopus oocytes, i ***
--- *** t has been shown that fingers 4-7 of the ***
--- ***  nine-zinc finger transcription factor T ***
--- *** FIIIA can bind to the central region of  ***
--- *** 5S RNA. Thus, in addition to positively  ***
--- *** regulating 5S rRNA transcription, TFIIIA ***
--- ***  also stabilizes 5S rRNA until it is req ***
--- *** uired for transcription.                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rrna_28s ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A component of the large ribosomal subun ***
--- *** it.                                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: maxicircle_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A mitochondrial gene located in a maxici ***
--- *** rcle.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: ncrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An RNA transcript that does not encode f ***
--- *** or a protein rather the RNA molecule is  ***
--- *** the gene product.                        ***
--- ************************************************
---

CREATE VIEW ncrna AS
  SELECT
    feature_id AS ncrna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'tasiRNA' 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 = 'ncRNA';

--- ************************************************
--- *** relation: strna_encoding ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: repeat_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of sequence containing one or m ***
--- *** ore repeat units.                        ***
--- ************************************************
---

CREATE VIEW repeat_region AS
  SELECT
    feature_id AS repeat_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'X_element_combinatorial_repeat' OR cvterm.name = 'Y_prime_element' OR cvterm.name = 'telomeric_repeat' OR cvterm.name = 'nested_repeat' OR cvterm.name = 'centromeric_repeat' 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 = 'nested_tandem_repeat' OR cvterm.name = 'regional_centromere_inner_repeat_region' OR cvterm.name = 'regional_centromere_outer_repeat_region' OR cvterm.name = 'repeat_region';

--- ************************************************
--- *** relation: dispersed_repeat ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A repeat that is located at dispersed si ***
--- *** tes in the genome.                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: tmrna_encoding ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: spliceosomal_intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An intron which is spliced by the splice ***
--- *** osome.                                   ***
--- ************************************************
---

CREATE VIEW spliceosomal_intron AS
  SELECT
    feature_id AS spliceosomal_intron_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'U2_intron' OR cvterm.name = 'U12_intron' OR cvterm.name = 'spliceosomal_intron';

--- ************************************************
--- *** relation: trna_encoding ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: introgressed_chromosome_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: monocistronic_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript that is monocistronic.      ***
--- ************************************************
---

CREATE VIEW monocistronic_transcript AS
  SELECT
    feature_id AS monocistronic_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'monocistronic_primary_transcript' OR cvterm.name = 'monocistronic_mRNA' OR cvterm.name = 'monocistronic_transcript';

--- ************************************************
--- *** relation: mobile_intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An intron (mitochondrial, chloroplast, n ***
--- *** uclear or prokaryotic) that encodes a do ***
--- *** uble strand sequence specific endonuclea ***
--- *** se allowing for mobility.                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: insertion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The sequence of one or more nucleotides  ***
--- *** added between two adjacent nucleotides i ***
--- *** n the sequence.                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: est_match ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A match against an EST sequence.         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: sequence_rearrangement_feature ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_rearrangement_feature AS
  SELECT
    feature_id AS sequence_rearrangement_feature_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'recombination_signal_sequence' 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 = 'sequence_rearrangement_feature';

--- ************************************************
--- *** relation: chromosome_breakage_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence within the micronuclear DNA o ***
--- *** f ciliates at which chromosome breakage  ***
--- *** and telomere addition occurs during nucl ***
--- *** ear differentiation.                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: internal_eliminated_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence eliminated from the genome of ***
--- ***  ciliates during nuclear differentiation ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: macronucleus_destined_segment ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence that is conserved, although r ***
--- *** earranged relative to the micronucleus,  ***
--- *** in the macronucleus of a ciliate genome. ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An RNA synthesized on a DNA or RNA templ ***
--- *** ate by an RNA polymerase.                ***
--- ************************************************
---

CREATE VIEW transcript AS
  SELECT
    feature_id AS transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'processed_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 = 'tasiRNA_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 = 'edited_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 = 'tasiRNA' 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 = 'transcript';

--- ************************************************
--- *** relation: canonical_three_prime_splice_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The canonical 3' splice site has the seq ***
--- *** uence "AG".                              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: canonical_five_prime_splice_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The canonical 5' splice site has the seq ***
--- *** uence "GT".                              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: non_canonical_three_prime_splice_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A 3' splice site that does not have the  ***
--- *** sequence "AG".                           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: non_canonical_five_prime_splice_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A 5' splice site which does not have the ***
--- ***  sequence "GT".                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: non_canonical_start_codon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A start codon that is not the usual AUG  ***
--- *** sequence.                                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: aberrant_processed_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript that has been processed "in ***
--- *** correctly", for example by the failure o ***
--- *** f splicing of one or more exons.         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: exonic_splice_enhancer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Exonic splicing enhancers (ESEs) facilit ***
--- *** ate exon definition by assisting in the  ***
--- *** recruitment of splicing factors to the a ***
--- *** djacent intron.                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: nuclease_sensitive_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of nucleotide sequence targeted ***
--- ***  by a nuclease enzyme.                   ***
--- ************************************************
---

CREATE VIEW nuclease_sensitive_site AS
  SELECT
    feature_id AS nuclease_sensitive_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'nuclease_hypersensitive_site' OR cvterm.name = 'group_1_intron_homing_endonuclease_target_region' OR cvterm.name = 'DNAseI_hypersensitive_site' OR cvterm.name = 'nuclease_sensitive_site';

--- ************************************************
--- *** relation: dnasei_hypersensitive_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: translocation_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosomal translocation whereby the  ***
--- *** chromosomes carrying non-homologous cent ***
--- *** romeres may be recovered independently.  ***
--- *** These chromosomes are described as trans ***
--- *** location elements. This occurs for some  ***
--- *** translocations, particularly but not exc ***
--- *** lusively, reciprocal translocations.     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: deletion_junction ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The space between two bases in a sequenc ***
--- *** e which marks the position where a delet ***
--- *** ion has occurred.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: golden_path ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A set of subregions selected from sequen ***
--- *** ce contigs which when concatenated form  ***
--- *** a nonredundant linear sequence.          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: cdna_match ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A match against cDNA sequence.           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gene_with_polycistronic_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that encodes a polycistronic tran ***
--- *** script.                                  ***
--- ************************************************
---

CREATE VIEW gene_with_polycistronic_transcript AS
  SELECT
    feature_id AS gene_with_polycistronic_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gene_with_dicistronic_transcript' OR cvterm.name = 'gene_with_dicistronic_primary_transcript' OR cvterm.name = 'gene_with_dicistronic_mRNA' OR cvterm.name = 'gene_with_polycistronic_transcript';

--- ************************************************
--- *** relation: cleaved_initiator_methionine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The initiator methionine that has been c ***
--- *** leaved from a mature polypeptide sequenc ***
--- *** e.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gene_with_dicistronic_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that encodes a dicistronic transc ***
--- *** ript.                                    ***
--- ************************************************
---

CREATE VIEW gene_with_dicistronic_transcript AS
  SELECT
    feature_id AS gene_with_dicistronic_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gene_with_dicistronic_primary_transcript' OR cvterm.name = 'gene_with_dicistronic_mRNA' OR cvterm.name = 'gene_with_dicistronic_transcript';

--- ************************************************
--- *** relation: gene_with_recoded_mrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that encodes an mRNA that is reco ***
--- *** ded.                                     ***
--- ************************************************
---

CREATE VIEW gene_with_recoded_mrna AS
  SELECT
    feature_id AS gene_with_recoded_mrna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'gene_with_recoded_mRNA';

--- ************************************************
--- *** relation: snp ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** SNPs are single base pair positions in g ***
--- *** enomic DNA at which different sequence a ***
--- *** lternatives exist in normal individuals  ***
--- *** in some population(s), wherein the least ***
--- ***  frequent variant has an abundance of 1% ***
--- ***  or greater.                             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: reagent ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence used in experiment.           ***
--- ************************************************
---

CREATE VIEW reagent AS
  SELECT
    feature_id AS reagent_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'ASPE_primer' OR cvterm.name = 'dCAPS_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 = 'reagent';

--- ************************************************
--- *** relation: oligo ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A short oligonucleotide sequence, of len ***
--- *** gth on the order of 10's of bases; eithe ***
--- *** r single or double stranded.             ***
--- ************************************************
---

CREATE VIEW oligo AS
  SELECT
    feature_id AS oligo_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'ASPE_primer' OR cvterm.name = 'dCAPS_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 = 'oligo';

--- ************************************************
--- *** relation: gene_with_stop_codon_read_through ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that encodes a transcript with st ***
--- *** op codon readthrough.                    ***
--- ************************************************
---

CREATE VIEW gene_with_stop_codon_read_through AS
  SELECT
    feature_id AS gene_with_stop_codon_read_through_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gene_with_stop_codon_redefined_as_pyrrolysine' OR cvterm.name = 'gene_with_stop_codon_redefined_as_selenocysteine' OR cvterm.name = 'gene_with_stop_codon_read_through';

--- ************************************************
--- *** relation: gene_with_stop_codon_redefined_as_pyrrolysine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene encoding an mRNA that has the sto ***
--- *** p codon redefined as pyrrolysine.        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: junction ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence_feature with an extent of zer ***
--- *** o.                                       ***
--- ************************************************
---

CREATE VIEW junction AS
  SELECT
    feature_id AS junction_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'clone_insert_end' OR cvterm.name = 'clone_insert_start' OR cvterm.name = 'exon_junction' OR cvterm.name = 'insertion_site' OR cvterm.name = 'polyA_site' OR cvterm.name = 'deletion_junction' OR cvterm.name = 'chromosome_breakpoint' OR cvterm.name = 'splice_junction' OR cvterm.name = 'trans_splice_junction' OR cvterm.name = 'restriction_enzyme_cleavage_junction' OR cvterm.name = 'transposable_element_insertion_site' OR cvterm.name = 'inversion_breakpoint' OR cvterm.name = 'translocation_breakpoint' OR cvterm.name = 'insertion_breakpoint' OR cvterm.name = 'deletion_breakpoint' OR cvterm.name = 'blunt_end_restriction_enzyme_cleavage_junction' OR cvterm.name = 'single_strand_restriction_enzyme_cleavage_site' OR cvterm.name = 'five_prime_restriction_enzyme_junction' OR cvterm.name = 'three_prime_restriction_enzyme_junction' OR cvterm.name = 'junction';

--- ************************************************
--- *** relation: remark ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A comment about the sequence.            ***
--- ************************************************
---

CREATE VIEW remark AS
  SELECT
    feature_id AS remark_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'assembly_error_correction' OR cvterm.name = 'base_call_error_correction' 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 = 'contig_collection' OR cvterm.name = 'remark';

--- ************************************************
--- *** relation: possible_base_call_error ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of sequence where the validity  ***
--- *** of the base calling is questionable.     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: possible_assembly_error ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of sequence where there may hav ***
--- *** e been an error in the assembly.         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: experimental_result_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of sequence implicated in an ex ***
--- *** perimental result.                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region (or regions) that includes all  ***
--- *** of the sequence elements necessary to en ***
--- *** code a functional transcript. A gene may ***
--- ***  include regulatory regions, transcribed ***
--- ***  regions and/or other functional sequenc ***
--- *** e regions.                               ***
--- ************************************************
---

CREATE VIEW gene AS
  SELECT
    feature_id AS gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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_with_non_canonical_start_codon' 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 = 'rRNA_gene' OR cvterm.name = 'piRNA_gene' OR cvterm.name = 'RNase_P_RNA_gene' OR cvterm.name = 'RNase_MRP_RNA_gene' OR cvterm.name = 'lincRNA_gene' OR cvterm.name = 'telomerase_RNA_gene' OR cvterm.name = 'cryptogene' OR cvterm.name = 'gene_with_start_codon_CUG' OR cvterm.name = 'gene';

--- ************************************************
--- *** relation: tandem_repeat ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Two or more adjcent copies of a region ( ***
--- *** of length greater than 1).               ***
--- ************************************************
---

CREATE VIEW tandem_repeat AS
  SELECT
    feature_id AS tandem_repeat_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'tandem_repeat';

--- ************************************************
--- *** relation: trans_splice_acceptor_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The 3' splice site of the acceptor prima ***
--- *** ry transcript.                           ***
--- ************************************************
---

CREATE VIEW trans_splice_acceptor_site AS
  SELECT
    feature_id AS trans_splice_acceptor_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'SL1_acceptor_site' OR cvterm.name = 'SL2_acceptor_site' OR cvterm.name = 'SL3_acceptor_site' OR cvterm.name = 'SL4_acceptor_site' OR cvterm.name = 'SL5_acceptor_site' OR cvterm.name = 'SL6_acceptor_site' OR cvterm.name = 'SL7_acceptor_site' OR cvterm.name = 'SL8_acceptor_site' OR cvterm.name = 'SL9_acceptor_site' OR cvterm.name = 'SL10_accceptor_site' OR cvterm.name = 'SL11_acceptor_site' OR cvterm.name = 'SL12_acceptor_site' OR cvterm.name = 'trans_splice_acceptor_site';

--- ************************************************
--- *** relation: trans_splice_donor_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The 5' five prime splice site region of  ***
--- *** the donor RNA.                           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: sl1_acceptor_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A trans_splicing_acceptor_site which app ***
--- *** ends the 22nt SL1 RNA leader sequence to ***
--- ***  the 5' end of most mRNAs.               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: sl2_acceptor_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A trans_splicing_acceptor_site which app ***
--- *** ends the 22nt SL2 RNA leader sequence to ***
--- ***  the 5' end of mRNAs. SL2 acceptor sites ***
--- ***  occur in genes in internal segments of  ***
--- *** polycistronic transcripts.               ***
--- ************************************************
---

CREATE VIEW sl2_acceptor_site AS
  SELECT
    feature_id AS sl2_acceptor_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'SL3_acceptor_site' OR cvterm.name = 'SL4_acceptor_site' OR cvterm.name = 'SL5_acceptor_site' OR cvterm.name = 'SL6_acceptor_site' OR cvterm.name = 'SL7_acceptor_site' OR cvterm.name = 'SL8_acceptor_site' OR cvterm.name = 'SL9_acceptor_site' OR cvterm.name = 'SL10_accceptor_site' OR cvterm.name = 'SL11_acceptor_site' OR cvterm.name = 'SL12_acceptor_site' OR cvterm.name = 'SL2_acceptor_site';

--- ************************************************
--- *** relation: gene_with_stop_codon_redefined_as_selenocysteine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene encoding an mRNA that has the sto ***
--- *** p codon redefined as selenocysteine.     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gene_with_mrna_recoded_by_translational_bypass ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene with mRNA recoded by translationa ***
--- *** l bypass.                                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gene_with_transcript_with_translational_frameshift ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene encoding a transcript that has a  ***
--- *** translational frameshift.                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dna_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif that is active in the DNA form o ***
--- *** f the sequence.                          ***
--- ************************************************
---

CREATE VIEW dna_motif AS
  SELECT
    feature_id AS dna_motif_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'PSE_motif' OR cvterm.name = 'CAAT_signal' OR cvterm.name = 'minus_10_signal' OR cvterm.name = 'minus_35_signal' OR cvterm.name = 'DRE_motif' OR cvterm.name = 'E_box_motif' OR cvterm.name = 'INR1_motif' OR cvterm.name = 'GAGA_motif' OR cvterm.name = 'octamer_motif' OR cvterm.name = 'retinoic_acid_responsive_element' OR cvterm.name = 'promoter_element' OR cvterm.name = 'DCE_SI' OR cvterm.name = 'DCE_SII' OR cvterm.name = 'DCE_SIII' OR cvterm.name = 'minus_12_signal' OR cvterm.name = 'minus_24_signal' OR cvterm.name = 'GC_rich_promoter_region' 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 = 'core_promoter_element' OR cvterm.name = 'regulatory_promoter_element' OR cvterm.name = 'INR_motif' OR cvterm.name = 'DPE_motif' OR cvterm.name = 'BREu_motif' OR cvterm.name = 'TATA_box' OR cvterm.name = 'A_box' OR cvterm.name = 'B_box' OR cvterm.name = 'C_box' OR cvterm.name = 'MTE' OR cvterm.name = 'BREd_motif' OR cvterm.name = 'DCE' OR cvterm.name = 'intermediate_element' OR cvterm.name = 'RNA_polymerase_II_TATA_box' OR cvterm.name = 'RNA_polymerase_III_TATA_box' OR cvterm.name = 'A_box_type_1' OR cvterm.name = 'A_box_type_2' OR cvterm.name = 'proximal_promoter_element' OR cvterm.name = 'distal_promoter_element' OR cvterm.name = 'DNA_motif';

--- ************************************************
--- *** relation: nucleotide_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of nucleotide sequence correspo ***
--- *** nding to a known motif.                  ***
--- ************************************************
---

CREATE VIEW nucleotide_motif AS
  SELECT
    feature_id AS nucleotide_motif_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'DNA_motif' OR cvterm.name = 'RNA_motif' OR cvterm.name = 'PSE_motif' OR cvterm.name = 'CAAT_signal' OR cvterm.name = 'minus_10_signal' OR cvterm.name = 'minus_35_signal' OR cvterm.name = 'DRE_motif' OR cvterm.name = 'E_box_motif' OR cvterm.name = 'INR1_motif' OR cvterm.name = 'GAGA_motif' OR cvterm.name = 'octamer_motif' OR cvterm.name = 'retinoic_acid_responsive_element' OR cvterm.name = 'promoter_element' OR cvterm.name = 'DCE_SI' OR cvterm.name = 'DCE_SII' OR cvterm.name = 'DCE_SIII' OR cvterm.name = 'minus_12_signal' OR cvterm.name = 'minus_24_signal' OR cvterm.name = 'GC_rich_promoter_region' 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 = 'core_promoter_element' OR cvterm.name = 'regulatory_promoter_element' OR cvterm.name = 'INR_motif' OR cvterm.name = 'DPE_motif' OR cvterm.name = 'BREu_motif' OR cvterm.name = 'TATA_box' OR cvterm.name = 'A_box' OR cvterm.name = 'B_box' OR cvterm.name = 'C_box' OR cvterm.name = 'MTE' OR cvterm.name = 'BREd_motif' OR cvterm.name = 'DCE' OR cvterm.name = 'intermediate_element' OR cvterm.name = 'RNA_polymerase_II_TATA_box' OR cvterm.name = 'RNA_polymerase_III_TATA_box' OR cvterm.name = 'A_box_type_1' OR cvterm.name = 'A_box_type_2' OR cvterm.name = 'proximal_promoter_element' OR cvterm.name = 'distal_promoter_element' 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 = 'nucleotide_motif';

--- ************************************************
--- *** relation: rna_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif that is active in RNA sequence.  ***
--- ************************************************
---

CREATE VIEW rna_motif AS
  SELECT
    feature_id AS rna_motif_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'RNA_motif';

--- ************************************************
--- *** relation: dicistronic_mrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An mRNA that has the quality dicistronic ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: reading_frame ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A nucleic acid sequence that when read a ***
--- *** s sequential triplets, has the potential ***
--- ***  of encoding a sequential string of amin ***
--- *** o acids. It need not contain the start o ***
--- *** r stop codon.                            ***
--- ************************************************
---

CREATE VIEW reading_frame AS
  SELECT
    feature_id AS reading_frame_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'ORF' OR cvterm.name = 'blocked_reading_frame' OR cvterm.name = 'mini_gene' OR cvterm.name = 'rescue_mini_gene' OR cvterm.name = 'reading_frame';

--- ************************************************
--- *** relation: blocked_reading_frame ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A reading_frame that is interrupted by o ***
--- *** ne or more stop codons; usually identifi ***
--- *** ed through intergenomic sequence compari ***
--- *** sons.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: ultracontig ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An ordered and oriented set of scaffolds ***
--- ***  based on somewhat weaker sets of infere ***
--- *** ntial evidence such as one set of mate p ***
--- *** air reads together with supporting evide ***
--- *** nce from ESTs or location of markers fro ***
--- *** m SNP or microsatellite maps, or cytogen ***
--- *** etic localization of contained markers.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: foreign_transposable_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transposable element that is foreign.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gene_with_dicistronic_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that encodes a dicistronic primar ***
--- *** y transcript.                            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gene_with_dicistronic_mrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that encodes a polycistronic mRNA ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: idna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Genomic sequence removed from the genome ***
--- *** , as a normal event, by a process of rec ***
--- *** ombination.                              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: orit ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of a DNA molecule where transfe ***
--- *** r is initiated during the process of con ***
--- *** jugation or mobilization.                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: transit_peptide ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The transit_peptide is a short region at ***
--- ***  the N-terminus of the peptide that dire ***
--- *** cts the protein to an organelle (chlorop ***
--- *** last, mitochondrion, microbody or cyanel ***
--- *** le).                                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: repeat_unit ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The simplest repeated component of a rep ***
--- *** eat region. A single repeat.             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: crm ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A regulatory_region where more than 1 TF ***
--- *** _binding_site together are regulatorily  ***
--- *** active.                                  ***
--- ************************************************
---

CREATE VIEW crm AS
  SELECT
    feature_id AS crm_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'locus_control_region' OR cvterm.name = 'enhancer' OR cvterm.name = 'silencer' OR cvterm.name = 'enhancer_bound_by_factor' OR cvterm.name = 'shadow_enhancer' OR cvterm.name = 'CRM';

--- ************************************************
--- *** relation: intein ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of a peptide that is able to ex ***
--- *** cise itself and rejoin the remaining por ***
--- *** tions with a peptide bond.               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: intein_containing ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute of protein-coding genes whe ***
--- *** re the initial protein product contains  ***
--- *** an intein.                               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gap ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gap in the sequence of known length. T ***
--- *** he unknown bases are filled in with N's. ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: fragmentary ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe a feature that  ***
--- *** is incomplete.                           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: predicted ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing an unverified re ***
--- *** gion.                                    ***
--- ************************************************
---

CREATE VIEW predicted AS
  SELECT
    feature_id AS predicted_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'supported_by_sequence_similarity' OR cvterm.name = 'orphan' OR cvterm.name = 'predicted_by_ab_initio_computation' OR cvterm.name = 'supported_by_domain_match' OR cvterm.name = 'supported_by_EST_or_cDNA' OR cvterm.name = 'predicted';

--- ************************************************
--- *** relation: feature_attribute ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a located_sequen ***
--- *** ce_feature.                              ***
--- ************************************************
---

CREATE VIEW feature_attribute AS
  SELECT
    feature_id AS feature_attribute_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'transcript_attribute' OR cvterm.name = 'bound_by_factor' OR cvterm.name = 'flanked' OR cvterm.name = 'gene_attribute' OR cvterm.name = 'retrotransposed' OR cvterm.name = 'transgenic' OR cvterm.name = 'natural' OR cvterm.name = 'engineered' OR cvterm.name = 'foreign' OR cvterm.name = 'fusion' OR cvterm.name = 'rescue' OR cvterm.name = 'wild_type' OR cvterm.name = 'conserved' OR cvterm.name = 'status' OR cvterm.name = 'intermediate' OR cvterm.name = 'recombinationally_rearranged' OR cvterm.name = 'cryptic' OR cvterm.name = 'strand_attribute' OR cvterm.name = 'direction_attribute' OR cvterm.name = 'enzymatic' OR cvterm.name = 'mobile' OR cvterm.name = 'alteration_attribute' OR cvterm.name = 'experimental_feature_attribute' OR cvterm.name = 'edited' OR cvterm.name = 'capped' OR cvterm.name = 'mRNA_attribute' OR cvterm.name = 'trans_spliced' OR cvterm.name = 'alternatively_spliced' OR cvterm.name = 'monocistronic' OR cvterm.name = 'polycistronic' OR cvterm.name = 'polyadenylated' OR cvterm.name = 'exemplar' OR cvterm.name = 'frameshift' OR cvterm.name = 'recoded' OR cvterm.name = 'minus_1_frameshift' OR cvterm.name = 'minus_2_frameshift' OR cvterm.name = 'plus_1_frameshift' OR cvterm.name = 'plus_2_framshift' OR cvterm.name = 'codon_redefined' OR cvterm.name = 'recoded_by_translational_bypass' OR cvterm.name = 'translationally_frameshifted' OR cvterm.name = 'minus_1_translationally_frameshifted' OR cvterm.name = 'plus_1_translationally_frameshifted' OR cvterm.name = 'dicistronic' OR cvterm.name = 'bound_by_protein' OR cvterm.name = 'bound_by_nucleic_acid' OR cvterm.name = 'floxed' OR cvterm.name = 'FRT_flanked' OR cvterm.name = 'protein_coding' OR cvterm.name = 'non_protein_coding' OR cvterm.name = 'gene_to_gene_feature' OR cvterm.name = 'gene_array_member' OR cvterm.name = 'regulated' OR cvterm.name = 'epigenetically_modified' OR cvterm.name = 'encodes_alternately_spliced_transcripts' OR cvterm.name = 'encodes_alternate_transcription_start_sites' OR cvterm.name = 'intein_containing' OR cvterm.name = 'miRNA_encoding' OR cvterm.name = 'rRNA_encoding' OR cvterm.name = 'scRNA_encoding' OR cvterm.name = 'snoRNA_encoding' OR cvterm.name = 'snRNA_encoding' OR cvterm.name = 'SRP_RNA_encoding' OR cvterm.name = 'stRNA_encoding' OR cvterm.name = 'tmRNA_encoding' OR cvterm.name = 'tRNA_encoding' OR cvterm.name = 'gRNA_encoding' OR cvterm.name = 'C_D_box_snoRNA_encoding' OR cvterm.name = 'H_ACA_box_snoRNA_encoding' OR cvterm.name = 'overlapping' OR cvterm.name = 'inside_intron' OR cvterm.name = 'five_prime_three_prime_overlap' OR cvterm.name = 'five_prime_five_prime_overlap' OR cvterm.name = 'three_prime_three_prime_overlap' OR cvterm.name = 'three_prime_five_prime_overlap' OR cvterm.name = 'antisense' OR cvterm.name = 'inside_intron_antiparallel' OR cvterm.name = 'inside_intron_parallel' OR cvterm.name = 'operon_member' OR cvterm.name = 'gene_cassette_member' OR cvterm.name = 'gene_subarray_member' OR cvterm.name = 'member_of_regulon' OR cvterm.name = 'cassette_array_member' OR cvterm.name = 'transcriptionally_regulated' OR cvterm.name = 'post_translationally_regulated' OR cvterm.name = 'translationally_regulated' OR cvterm.name = 'imprinted' OR cvterm.name = 'transcriptionally_constitutive' OR cvterm.name = 'transcriptionally_induced' OR cvterm.name = 'transcriptionally_repressed' OR cvterm.name = 'autoregulated' OR cvterm.name = 'positively_autoregulated' OR cvterm.name = 'negatively_autoregulated' OR cvterm.name = 'silenced' OR cvterm.name = 'silenced_by_DNA_modification' OR cvterm.name = 'silenced_by_RNA_interference' OR cvterm.name = 'silenced_by_histone_modification' OR cvterm.name = 'silenced_by_DNA_methylation' OR cvterm.name = 'silenced_by_histone_methylation' OR cvterm.name = 'silenced_by_histone_deacetylation' OR cvterm.name = 'negatively_autoregulated' OR cvterm.name = 'positively_autoregulated' OR cvterm.name = 'post_translationally_regulated_by_protein_stability' OR cvterm.name = 'post_translationally_regulated_by_protein_modification' OR cvterm.name = 'maternally_imprinted' OR cvterm.name = 'paternally_imprinted' OR cvterm.name = 'imprinted' OR cvterm.name = 'allelically_excluded' OR cvterm.name = 'rearranged_at_DNA_level' OR cvterm.name = 'maternally_imprinted' OR cvterm.name = 'paternally_imprinted' OR cvterm.name = 'encodes_1_polypeptide' OR cvterm.name = 'encodes_greater_than_1_polypeptide' OR 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 = 'homologous' OR cvterm.name = 'syntenic' OR cvterm.name = 'orthologous' OR cvterm.name = 'paralogous' OR cvterm.name = 'fragmentary' OR cvterm.name = 'predicted' OR cvterm.name = 'validated' OR cvterm.name = 'invalidated' OR cvterm.name = 'independently_known' OR cvterm.name = 'consensus' OR cvterm.name = 'low_complexity' OR cvterm.name = 'whole_genome_sequence_status' OR cvterm.name = 'supported_by_sequence_similarity' OR cvterm.name = 'orphan' OR cvterm.name = 'predicted_by_ab_initio_computation' OR cvterm.name = 'supported_by_domain_match' OR cvterm.name = 'supported_by_EST_or_cDNA' OR cvterm.name = 'experimentally_determined' OR cvterm.name = 'invalidated_by_chimeric_cDNA' OR cvterm.name = 'invalidated_by_genomic_contamination' OR cvterm.name = 'invalidated_by_genomic_polyA_primed_cDNA' OR cvterm.name = 'invalidated_by_partial_processing' OR cvterm.name = 'standard_draft' OR cvterm.name = 'high_quality_draft' OR cvterm.name = 'improved_high_quality_draft' OR cvterm.name = 'annotation_directed_improved_draft' OR cvterm.name = 'noncontiguous_finished' OR cvterm.name = 'finished_genome' OR cvterm.name = 'single' OR cvterm.name = 'double' OR cvterm.name = 'forward' OR cvterm.name = 'reverse' OR cvterm.name = 'ribozymic' OR cvterm.name = 'chromosomal_variation_attribute' OR cvterm.name = 'insertion_attribute' OR cvterm.name = 'inversion_attribute' OR cvterm.name = 'translocaton_attribute' OR cvterm.name = 'duplication_attribute' OR cvterm.name = 'intrachromosomal' OR cvterm.name = 'interchromosomal' OR cvterm.name = 'tandem' OR cvterm.name = 'direct' OR cvterm.name = 'inverted' OR cvterm.name = 'pericentric' OR cvterm.name = 'paracentric' OR cvterm.name = 'reciprocal' OR cvterm.name = 'insertional' OR cvterm.name = 'free' OR cvterm.name = 'score' OR cvterm.name = 'quality_value' OR cvterm.name = 'feature_attribute';

--- ************************************************
--- *** relation: exemplar_mrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An exemplar is a representative cDNA seq ***
--- *** uence for each gene. The exemplar approa ***
--- *** ch is a method that usually involves som ***
--- *** e initial clustering into gene groups an ***
--- *** d the subsequent selection of a represen ***
--- *** tative from each gene group.             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: sequence_location ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sequence_location AS
  SELECT
    feature_id AS sequence_location_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'organelle_sequence' OR cvterm.name = 'plasmid_location' OR cvterm.name = 'proviral_location' OR cvterm.name = 'macronuclear_sequence' OR cvterm.name = 'micronuclear_sequence' OR cvterm.name = 'mitochondrial_sequence' OR cvterm.name = 'nuclear_sequence' OR cvterm.name = 'nucleomorphic_sequence' OR cvterm.name = 'plastid_sequence' OR cvterm.name = 'mitochondrial_DNA' OR cvterm.name = 'apicoplast_sequence' OR cvterm.name = 'chromoplast_sequence' OR cvterm.name = 'chloroplast_sequence' OR cvterm.name = 'cyanelle_sequence' OR cvterm.name = 'leucoplast_sequence' OR cvterm.name = 'proplastid_sequence' OR cvterm.name = 'chloroplast_DNA' OR cvterm.name = 'endogenous_retroviral_sequence' OR cvterm.name = 'sequence_location';

--- ************************************************
--- *** relation: organelle_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW organelle_sequence AS
  SELECT
    feature_id AS organelle_sequence_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'macronuclear_sequence' OR cvterm.name = 'micronuclear_sequence' OR cvterm.name = 'mitochondrial_sequence' OR cvterm.name = 'nuclear_sequence' OR cvterm.name = 'nucleomorphic_sequence' OR cvterm.name = 'plastid_sequence' OR cvterm.name = 'mitochondrial_DNA' OR cvterm.name = 'apicoplast_sequence' OR cvterm.name = 'chromoplast_sequence' OR cvterm.name = 'chloroplast_sequence' OR cvterm.name = 'cyanelle_sequence' OR cvterm.name = 'leucoplast_sequence' OR cvterm.name = 'proplastid_sequence' OR cvterm.name = 'chloroplast_DNA' OR cvterm.name = 'organelle_sequence';

--- ************************************************
--- *** relation: mitochondrial_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: nuclear_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: nucleomorphic_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: plastid_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW plastid_sequence AS
  SELECT
    feature_id AS plastid_sequence_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'apicoplast_sequence' OR cvterm.name = 'chromoplast_sequence' OR cvterm.name = 'chloroplast_sequence' OR cvterm.name = 'cyanelle_sequence' OR cvterm.name = 'leucoplast_sequence' OR cvterm.name = 'proplastid_sequence' OR cvterm.name = 'chloroplast_DNA' OR cvterm.name = 'plastid_sequence';

--- ************************************************
--- *** relation: kinetoplast ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kinetoplast is an interlocked network  ***
--- *** of thousands of minicircles and tens of  ***
--- *** maxi circles, located near the base of t ***
--- *** he flagellum of some protozoan species.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: maxicircle ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A maxicircle is a replicon, part of a ki ***
--- *** netoplast, that contains open reading fr ***
--- *** ames and replicates via a rolling circle ***
--- ***  method.                                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: apicoplast_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: chromoplast_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: chloroplast_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: cyanelle_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: leucoplast_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: proplastid_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: plasmid_location ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: amplification_origin ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An origin_of_replication that is used fo ***
--- *** r the amplification of a chromosomal nuc ***
--- *** leic acid sequence.                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: proviral_location ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gene_group_regulatory_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW gene_group_regulatory_region AS
  SELECT
    feature_id AS gene_group_regulatory_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'operator' OR cvterm.name = 'bacterial_RNApol_promoter' OR cvterm.name = 'bacterial_terminator' OR cvterm.name = 'bacterial_RNApol_promoter_sigma_70' OR cvterm.name = 'bacterial_RNApol_promoter_sigma54' OR cvterm.name = 'rho_dependent_bacterial_terminator' OR cvterm.name = 'rho_independent_bacterial_terminator' OR cvterm.name = 'gene_group_regulatory_region';

--- ************************************************
--- *** relation: clone_insert ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The region of sequence that has been ins ***
--- *** erted and is being propagated by the clo ***
--- *** ne.                                      ***
--- ************************************************
---

CREATE VIEW clone_insert AS
  SELECT
    feature_id AS clone_insert_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'clone_insert';

--- ************************************************
--- *** relation: lambda_vector ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The lambda bacteriophage is the vector f ***
--- *** or the linear lambda clone. The genes in ***
--- *** volved in the lysogenic pathway are remo ***
--- *** ved from the from the viral DNA. Up to 2 ***
--- *** 5 kb of foreign DNA can then be inserted ***
--- ***  into the lambda genome.                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: plasmid_vector ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: cdna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** DNA synthesized by reverse transcriptase ***
--- ***  using RNA as a template.                ***
--- ************************************************
---

CREATE VIEW cdna AS
  SELECT
    feature_id AS cdna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'single_stranded_cDNA' OR cvterm.name = 'double_stranded_cDNA' OR cvterm.name = 'cDNA';

--- ************************************************
--- *** relation: single_stranded_cdna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: double_stranded_cdna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: pyrrolysyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has a pyrrolysine a ***
--- *** nticodon, and a 3' pyrrolysine binding r ***
--- *** egion.                                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: episome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A plasmid that may integrate with a chro ***
--- *** mosome.                                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: tmrna_coding_piece ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The region of a two-piece tmRNA that bea ***
--- *** rs the reading frame encoding the proteo ***
--- *** lysis tag. The tmRNA gene undergoes circ ***
--- *** ular permutation in some groups of bacte ***
--- *** ria. Processing of the transcripts from  ***
--- *** such a gene leaves the mature tmRNA in t ***
--- *** wo pieces, base-paired together.         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: tmrna_acceptor_piece ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The acceptor region of a two-piece tmRNA ***
--- ***  that when mature is charged at its 3' e ***
--- *** nd with alanine. The tmRNA gene undergoe ***
--- *** s circular permutation in some groups of ***
--- ***  bacteria; processing of the transcripts ***
--- ***  from such a gene leaves the mature tmRN ***
--- *** A in two pieces, base-paired together.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: qtl ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A quantitative trait locus (QTL) is a po ***
--- *** lymorphic locus which contains alleles t ***
--- *** hat differentially affect the expression ***
--- ***  of a continuously distributed phenotypi ***
--- *** c trait. Usually it is a marker describe ***
--- *** d by statistical association to quantita ***
--- *** tive variation in the particular phenoty ***
--- *** pic trait that is thought to be controll ***
--- *** ed by the cumulative action of alleles a ***
--- *** t multiple loci.                         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: genomic_island ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A genomic island is an integrated mobile ***
--- ***  genetic element, characterized by size  ***
--- *** (over 10 Kb). It that has features that  ***
--- *** suggest a foreign origin. These can incl ***
--- *** ude nucleotide distribution (oligonucleo ***
--- *** tides signature, CG content etc.) that d ***
--- *** iffers from the bulk of the chromosome a ***
--- *** nd/or genes suggesting DNA mobility.     ***
--- ************************************************
---

CREATE VIEW genomic_island AS
  SELECT
    feature_id AS genomic_island_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'genomic_island';

--- ************************************************
--- *** relation: pathogenic_island ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Mobile genetic elements that contribute  ***
--- *** to rapid changes in virulence potential. ***
--- ***  They are present on the genomes of path ***
--- *** ogenic strains but absent from the genom ***
--- *** es of non pathogenic members of the same ***
--- ***  or related species.                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: metabolic_island ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transmissible element containing genes ***
--- ***  involved in metabolism, analogous to th ***
--- *** e pathogenicity islands of gram negative ***
--- ***  bacteria.                               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: adaptive_island ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An adaptive island is a genomic island t ***
--- *** hat provides an adaptive advantage to th ***
--- *** e host.                                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: symbiosis_island ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transmissible element containing genes ***
--- ***  involved in symbiosis, analogous to the ***
--- ***  pathogenicity islands of gram negative  ***
--- *** bacteria.                                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: pseudogenic_rrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A non functional descendent of an rRNA.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: pseudogenic_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A non functional descendent of a tRNA.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: engineered_episome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An episome that is engineered.           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: transgenic ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Attribute describing sequence that has b ***
--- *** een integrated with foreign sequence.    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: so_natural ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a feature that o ***
--- *** ccurs in nature.                         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: engineered ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe a region that w ***
--- *** as modified in vitro.                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: so_foreign ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe a region from a ***
--- *** nother species.                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: cloned_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: validated ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe a feature that  ***
--- *** has been proven.                         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: invalidated ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a feature that i ***
--- *** s invalidated.                           ***
--- ************************************************
---

CREATE VIEW invalidated AS
  SELECT
    feature_id AS invalidated_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'invalidated_by_chimeric_cDNA' OR cvterm.name = 'invalidated_by_genomic_contamination' OR cvterm.name = 'invalidated_by_genomic_polyA_primed_cDNA' OR cvterm.name = 'invalidated_by_partial_processing' OR cvterm.name = 'invalidated';

--- ************************************************
--- *** relation: engineered_rescue_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A rescue region that is engineered.      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rescue_mini_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A mini_gene that rescues.                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: transgenic_transposable_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** TE that has been modified in vitro, incl ***
--- *** uding insertion of DNA derived from a so ***
--- *** urce other than the originating TE.      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: natural_transposable_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** TE that exists (or existed) in nature.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: engineered_transposable_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** TE that has been modified by manipulatio ***
--- *** ns in vitro.                             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: engineered_foreign_transposable_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transposable_element that is engineere ***
--- *** d and foreign.                           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: assortment_derived_duplication ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A multi-chromosome duplication aberratio ***
--- *** n generated by reassortment of other abe ***
--- *** rration components.                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: assortment_derived_deficiency_plus_duplication ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A multi-chromosome aberration generated  ***
--- *** by reassortment of other aberration comp ***
--- *** onents; presumed to have a deficiency an ***
--- *** d a duplication.                         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: assortment_derived_deficiency ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A multi-chromosome deficiency aberration ***
--- ***  generated by reassortment of other aber ***
--- *** ration components.                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: assortment_derived_aneuploid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A multi-chromosome aberration generated  ***
--- *** by reassortment of other aberration comp ***
--- *** onents; presumed to have a deficiency or ***
--- ***  a duplication.                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: engineered_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region that is engineered.             ***
--- ************************************************
---

CREATE VIEW engineered_region AS
  SELECT
    feature_id AS engineered_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'targeting_vector' 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 = 'engineered_region';

--- ************************************************
--- *** relation: engineered_foreign_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region that is engineered and foreign. ***
--- ************************************************
---

CREATE VIEW engineered_foreign_region AS
  SELECT
    feature_id AS engineered_foreign_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'engineered_foreign_region';

--- ************************************************
--- *** relation: fusion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: engineered_tag ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tag that is engineered.                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: validated_cdna_clone ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A cDNA clone that has been validated.    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: invalidated_cdna_clone ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A cDNA clone that is invalid.            ***
--- ************************************************
---

CREATE VIEW invalidated_cdna_clone AS
  SELECT
    feature_id AS invalidated_cdna_clone_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'invalidated_cDNA_clone';

--- ************************************************
--- *** relation: chimeric_cdna_clone ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A cDNA clone invalidated because it is c ***
--- *** himeric.                                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: genomically_contaminated_cdna_clone ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A cDNA clone invalidated by genomic cont ***
--- *** amination.                               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polya_primed_cdna_clone ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A cDNA clone invalidated by polyA primin ***
--- *** g.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: partially_processed_cdna_clone ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A cDNA invalidated clone by partial proc ***
--- *** essing.                                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rescue ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a region's abili ***
--- *** ty, when introduced to a mutant organism ***
--- *** , to re-establish (rescue) a phenotype.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: mini_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** By definition, minigenes are short open- ***
--- *** reading frames (ORF), usually encoding a ***
--- *** pproximately 9 to 20 amino acids, which  ***
--- *** are expressed in vivo (as distinct from  ***
--- *** being synthesized as peptide or protein  ***
--- *** ex vivo and subsequently injected). The  ***
--- *** in vivo synthesis confers a distinct adv ***
--- *** antage: the expressed sequences can ente ***
--- *** r both antigen presentation pathways, MH ***
--- *** C I (inducing CD8+ T- cells, which are u ***
--- *** sually cytotoxic T-lymphocytes (CTL)) an ***
--- *** d MHC II (inducing CD4+ T-cells, usually ***
--- ***  'T-helpers' (Th)); and can encounter B- ***
--- *** cells, inducing antibody responses. Thre ***
--- *** e main vector approaches have been used  ***
--- *** to deliver minigenes: viral vectors, bac ***
--- *** terial vectors and plasmid DNA.          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rescue_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that rescues.                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: wild_type ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing sequence with th ***
--- *** e genotype found in nature and/or standa ***
--- *** rd laboratory stock.                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: wild_type_rescue_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that rescues.                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: mitochondrial_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome originating in a mitochondr ***
--- *** ia.                                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: chloroplast_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome originating in a chloroplas ***
--- *** t.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: chromoplast_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome originating in a chromoplas ***
--- *** t.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: cyanelle_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome originating in a cyanelle.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: leucoplast_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome with origin in a leucoplast ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: macronuclear_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome originating in a macronucle ***
--- *** us.                                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: micronuclear_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome originating in a micronucle ***
--- *** us.                                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: nuclear_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome originating in a nucleus.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: nucleomorphic_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome originating in a nucleomorp ***
--- *** h.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: chromosome_part ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of a chromosome.                ***
--- ************************************************
---

CREATE VIEW chromosome_part AS
  SELECT
    feature_id AS chromosome_part_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'point_centromere' OR cvterm.name = 'regional_centromere' OR cvterm.name = 'chromosome_part';

--- ************************************************
--- *** relation: gene_member_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of a gene.                      ***
--- ************************************************
---

CREATE VIEW gene_member_region AS
  SELECT
    feature_id AS gene_member_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'processed_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 = 'tasiRNA_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 = 'edited_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 = 'tasiRNA' 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 = 'transcription_regulatory_region' OR cvterm.name = 'translation_regulatory_region' OR cvterm.name = 'recombination_regulatory_region' OR cvterm.name = 'replication_regulatory_region' 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 = 'intronic_regulatory_region' 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 = 'operator' OR cvterm.name = 'bacterial_RNApol_promoter' OR cvterm.name = 'bacterial_terminator' OR cvterm.name = 'bacterial_RNApol_promoter_sigma_70' OR cvterm.name = 'bacterial_RNApol_promoter_sigma54' 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 = 'ISRE' 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_II_core_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 = 'bacterial_RNApol_promoter_sigma_70' OR cvterm.name = 'bacterial_RNApol_promoter_sigma54' 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 = 'silencer' OR cvterm.name = 'enhancer_bound_by_factor' OR cvterm.name = 'shadow_enhancer' OR cvterm.name = 'splice_enhancer' OR cvterm.name = 'intronic_splice_enhancer' OR cvterm.name = 'exonic_splice_enhancer' OR cvterm.name = 'attenuator' OR cvterm.name = 'gene_member_region';

--- ************************************************
--- *** relation: transcript_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of a transcript.                ***
--- ************************************************
---

CREATE VIEW transcript_region AS
  SELECT
    feature_id AS transcript_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'ribosome_entry_site' OR cvterm.name = 'UTR' OR cvterm.name = 'CDS' 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 = 'internal_ribosome_entry_site' OR cvterm.name = 'Shine_Dalgarno_sequence' OR cvterm.name = 'kozak_sequence' OR cvterm.name = 'internal_Shine_Dalgarno_sequence' 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 = 'upstream_AUG_codon' OR cvterm.name = 'AU_rich_element' OR cvterm.name = 'Bruno_response_element' OR cvterm.name = 'iron_responsive_element' OR cvterm.name = 'coding_start' OR cvterm.name = 'coding_end' OR cvterm.name = 'codon' 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 = '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 = 'cryptic_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 = 'SL3_acceptor_site' OR cvterm.name = 'SL4_acceptor_site' OR cvterm.name = 'SL5_acceptor_site' OR cvterm.name = 'SL6_acceptor_site' OR cvterm.name = 'SL7_acceptor_site' OR cvterm.name = 'SL8_acceptor_site' OR cvterm.name = 'SL9_acceptor_site' OR cvterm.name = 'SL10_accceptor_site' OR cvterm.name = 'SL11_acceptor_site' OR cvterm.name = 'SL12_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 = 'transcript_region';

--- ************************************************
--- *** relation: mature_transcript_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of a mature transcript.         ***
--- ************************************************
---

CREATE VIEW mature_transcript_region AS
  SELECT
    feature_id AS mature_transcript_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'ribosome_entry_site' OR cvterm.name = 'UTR' OR cvterm.name = 'CDS' 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 = 'internal_ribosome_entry_site' OR cvterm.name = 'Shine_Dalgarno_sequence' OR cvterm.name = 'kozak_sequence' OR cvterm.name = 'internal_Shine_Dalgarno_sequence' 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 = 'upstream_AUG_codon' OR cvterm.name = 'AU_rich_element' OR cvterm.name = 'Bruno_response_element' OR cvterm.name = 'iron_responsive_element' OR cvterm.name = 'coding_start' OR cvterm.name = 'coding_end' OR cvterm.name = 'codon' 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 = '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 = 'mature_transcript_region';

--- ************************************************
--- *** relation: primary_transcript_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A part of a primary transcript.          ***
--- ************************************************
---

CREATE VIEW primary_transcript_region AS
  SELECT
    feature_id AS primary_transcript_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'cryptic_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 = 'SL3_acceptor_site' OR cvterm.name = 'SL4_acceptor_site' OR cvterm.name = 'SL5_acceptor_site' OR cvterm.name = 'SL6_acceptor_site' OR cvterm.name = 'SL7_acceptor_site' OR cvterm.name = 'SL8_acceptor_site' OR cvterm.name = 'SL9_acceptor_site' OR cvterm.name = 'SL10_accceptor_site' OR cvterm.name = 'SL11_acceptor_site' OR cvterm.name = 'SL12_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 = 'primary_transcript_region';

--- ************************************************
--- *** relation: mrna_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of an mRNA.                     ***
--- ************************************************
---

CREATE VIEW mrna_region AS
  SELECT
    feature_id AS mrna_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'riboswitch' OR cvterm.name = 'ribosome_entry_site' OR cvterm.name = 'UTR' OR cvterm.name = 'CDS' 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 = 'internal_ribosome_entry_site' OR cvterm.name = 'Shine_Dalgarno_sequence' OR cvterm.name = 'kozak_sequence' OR cvterm.name = 'internal_Shine_Dalgarno_sequence' 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 = 'upstream_AUG_codon' OR cvterm.name = 'AU_rich_element' OR cvterm.name = 'Bruno_response_element' OR cvterm.name = 'iron_responsive_element' OR cvterm.name = 'coding_start' OR cvterm.name = 'coding_end' OR cvterm.name = 'codon' 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 = '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 = 'mRNA_region';

--- ************************************************
--- *** relation: utr_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of UTR.                         ***
--- ************************************************
---

CREATE VIEW utr_region AS
  SELECT
    feature_id AS utr_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'UTR_region';

--- ************************************************
--- *** relation: rrna_primary_transcript_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of an rRNA primary transcript.  ***
--- ************************************************
---

CREATE VIEW rrna_primary_transcript_region AS
  SELECT
    feature_id AS rrna_primary_transcript_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'transcribed_spacer_region' OR cvterm.name = 'internal_transcribed_spacer_region' OR cvterm.name = 'external_transcribed_spacer_region' OR cvterm.name = 'rRNA_primary_transcript_region';

--- ************************************************
--- *** relation: polypeptide_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Biological sequence region that can be a ***
--- *** ssigned to a specific subsequence of a p ***
--- *** olypeptide.                              ***
--- ************************************************
---

CREATE VIEW polypeptide_region AS
  SELECT
    feature_id AS polypeptide_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'peptide_localization_signal' 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 = 'transit_peptide' OR cvterm.name = 'nuclear_localization_signal' OR cvterm.name = 'endosomal_localization_signal' OR cvterm.name = 'lysosomal_localization_signal' OR cvterm.name = 'nuclear_export_signal' OR cvterm.name = 'nuclear_rim_localization_signal' OR cvterm.name = 'cleaved_initiator_methionine' 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 = 'histone_modification' OR cvterm.name = 'histone_methylation_site' OR cvterm.name = 'histone_acetylation_site' OR cvterm.name = 'histone_ubiqitination_site' OR cvterm.name = 'histone_acylation_region' OR cvterm.name = 'H4K20_monomethylation_site' OR cvterm.name = 'H2BK5_monomethylation_site' OR cvterm.name = 'H3K27_methylation_site' OR cvterm.name = 'H3K36_methylation_site' OR cvterm.name = 'H3K4_methylation_site' OR cvterm.name = 'H3K79_methylation_site' OR cvterm.name = 'H3K9_methylation_site' OR cvterm.name = 'H3K27_monomethylation_site' OR cvterm.name = 'H3K27_trimethylation_site' OR cvterm.name = 'H3K27_dimethylation_site' OR cvterm.name = 'H3K36_monomethylation_site' OR cvterm.name = 'H3K36_dimethylation_site' OR cvterm.name = 'H3K36_trimethylation_site' OR cvterm.name = 'H3K4_monomethylation_site' OR cvterm.name = 'H3K4_trimethylation' OR cvterm.name = 'H3K4_dimethylation_site' OR cvterm.name = 'H3K79_monomethylation_site' OR cvterm.name = 'H3K79_dimethylation_site' OR cvterm.name = 'H3K79_trimethylation_site' OR cvterm.name = 'H3K9_trimethylation_site' OR cvterm.name = 'H3K9_monomethylation_site' OR cvterm.name = 'H3K9_dimethylation_site' OR cvterm.name = 'H3K9_acetylation_site' OR cvterm.name = 'H3K14_acetylation_site' OR cvterm.name = 'H3K18_acetylation_site' OR cvterm.name = 'H3K23_acylation site' OR cvterm.name = 'H3K27_acylation_site' OR cvterm.name = 'H4K16_acylation_site' OR cvterm.name = 'H4K5_acylation_site' OR cvterm.name = 'H4K8_acylation site' OR cvterm.name = 'H2B_ubiquitination_site' OR cvterm.name = 'H4K_acylation_region' 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_region';

--- ************************************************
--- *** relation: repeat_component ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of a repeated sequence.         ***
--- ************************************************
---

CREATE VIEW repeat_component AS
  SELECT
    feature_id AS repeat_component_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'non_LTR_retrotransposon_polymeric_tract' OR cvterm.name = 'LTR_component' OR cvterm.name = 'repeat_fragment' OR cvterm.name = 'transposon_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 = 'repeat_component';

--- ************************************************
--- *** relation: spliceosomal_intron_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region within an intron.               ***
--- ************************************************
---

CREATE VIEW spliceosomal_intron_region AS
  SELECT
    feature_id AS spliceosomal_intron_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'intronic_splice_enhancer' OR cvterm.name = 'branch_site' OR cvterm.name = 'polypyrimidine_tract' OR cvterm.name = 'spliceosomal_intron_region';

--- ************************************************
--- *** relation: gene_component_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW gene_component_region AS
  SELECT
    feature_id AS gene_component_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'non_transcribed_region' OR cvterm.name = 'gene_fragment' OR cvterm.name = 'TSS_region' OR cvterm.name = 'gene_segment' OR cvterm.name = 'pseudogenic_gene_segment' OR cvterm.name = 'gene_component_region';

--- ************************************************
--- *** relation: tmrna_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of a tmRNA.                     ***
--- ************************************************
---

CREATE VIEW tmrna_region AS
  SELECT
    feature_id AS tmrna_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'tmRNA_coding_piece' OR cvterm.name = 'tmRNA_acceptor_piece' OR cvterm.name = 'tmRNA_region';

--- ************************************************
--- *** relation: ltr_component ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW ltr_component AS
  SELECT
    feature_id AS ltr_component_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'LTR_component';

--- ************************************************
--- *** relation: three_prime_ltr_component ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW three_prime_ltr_component AS
  SELECT
    feature_id AS three_prime_ltr_component_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'three_prime_LTR_component';

--- ************************************************
--- *** relation: five_prime_ltr_component ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW five_prime_ltr_component AS
  SELECT
    feature_id AS five_prime_ltr_component_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'five_prime_LTR_component';

--- ************************************************
--- *** relation: cds_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of a CDS.                       ***
--- ************************************************
---

CREATE VIEW cds_region AS
  SELECT
    feature_id AS cds_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'coding_start' OR cvterm.name = 'coding_end' OR cvterm.name = 'codon' 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 = 'CDS_region';

--- ************************************************
--- *** relation: exon_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of an exon.                     ***
--- ************************************************
---

CREATE VIEW exon_region AS
  SELECT
    feature_id AS exon_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'exon_region';

--- ************************************************
--- *** relation: homologous_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region that is homologous to another r ***
--- *** egion.                                   ***
--- ************************************************
---

CREATE VIEW homologous_region AS
  SELECT
    feature_id AS homologous_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'paralogous_region' OR cvterm.name = 'orthologous_region' OR cvterm.name = 'homologous_region';

--- ************************************************
--- *** relation: paralogous_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A homologous_region that is paralogous t ***
--- *** o another region.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: orthologous_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A homologous_region that is orthologous  ***
--- *** to another region.                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: conserved ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW conserved AS
  SELECT
    feature_id AS conserved_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'homologous' OR cvterm.name = 'syntenic' OR cvterm.name = 'orthologous' OR cvterm.name = 'paralogous' OR cvterm.name = 'conserved';

--- ************************************************
--- *** relation: homologous ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Similarity due to common ancestry.       ***
--- ************************************************
---

CREATE VIEW homologous AS
  SELECT
    feature_id AS homologous_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'orthologous' OR cvterm.name = 'paralogous' OR cvterm.name = 'homologous';

--- ************************************************
--- *** relation: orthologous ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a kind of homolo ***
--- *** gy where divergence occured after a spec ***
--- *** iation event.                            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: paralogous ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a kind of homolo ***
--- *** gy where divergence occurred after a dup ***
--- *** lication event.                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: syntenic ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Attribute describing sequence regions oc ***
--- *** curring in same order on chromosome of d ***
--- *** ifferent species.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: capped_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript that is capped.     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: capped_mrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An mRNA that is capped.                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: mrna_attribute ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing an mRNA feature. ***
--- ************************************************
---

CREATE VIEW mrna_attribute AS
  SELECT
    feature_id AS mrna_attribute_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polyadenylated' OR cvterm.name = 'exemplar' OR cvterm.name = 'frameshift' OR cvterm.name = 'recoded' OR cvterm.name = 'minus_1_frameshift' OR cvterm.name = 'minus_2_frameshift' OR cvterm.name = 'plus_1_frameshift' OR cvterm.name = 'plus_2_framshift' OR cvterm.name = 'codon_redefined' OR cvterm.name = 'recoded_by_translational_bypass' OR cvterm.name = 'translationally_frameshifted' OR cvterm.name = 'minus_1_translationally_frameshifted' OR cvterm.name = 'plus_1_translationally_frameshifted' OR cvterm.name = 'mRNA_attribute';

--- ************************************************
--- *** relation: exemplar ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a sequence is re ***
--- *** presentative of a class of similar seque ***
--- *** nces.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: frameshift ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a sequence that  ***
--- *** contains a mutation involving the deleti ***
--- *** on or insertion of one or more bases, wh ***
--- *** ere this number is not divisible by 3.   ***
--- ************************************************
---

CREATE VIEW frameshift AS
  SELECT
    feature_id AS frameshift_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'minus_1_frameshift' OR cvterm.name = 'minus_2_frameshift' OR cvterm.name = 'plus_1_frameshift' OR cvterm.name = 'plus_2_framshift' OR cvterm.name = 'frameshift';

--- ************************************************
--- *** relation: minus_1_frameshift ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A frameshift caused by deleting one base ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: minus_2_frameshift ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A frameshift caused by deleting two base ***
--- *** s.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: plus_1_frameshift ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A frameshift caused by inserting one bas ***
--- *** e.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: plus_2_framshift ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A frameshift caused by inserting two bas ***
--- *** es.                                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: trans_spliced ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing transcript seque ***
--- *** nce that is created by splicing exons fr ***
--- *** om diferent genes.                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polyadenylated_mrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An mRNA that is polyadenylated.          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: trans_spliced_mrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An mRNA that is trans-spliced.           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: edited_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript that is edited.             ***
--- ************************************************
---

CREATE VIEW edited_transcript AS
  SELECT
    feature_id AS edited_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'edited_transcript_by_A_to_I_substitution' OR cvterm.name = 'edited_mRNA' OR cvterm.name = 'edited_transcript';

--- ************************************************
--- *** relation: edited_transcript_by_a_to_i_substitution ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript that has been edited by A t ***
--- *** o I substitution.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: bound_by_protein ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a sequence that  ***
--- *** is bound by a protein.                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: bound_by_nucleic_acid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a sequence that  ***
--- *** is bound by a nucleic acid.              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: alternatively_spliced ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a situation wher ***
--- *** e a gene may encode for more than 1 tran ***
--- *** script.                                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: monocistronic ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a sequence that  ***
--- *** contains the code for one gene product.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dicistronic ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a sequence that  ***
--- *** contains the code for two gene products. ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polycistronic ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a sequence that  ***
--- *** contains the code for more than one gene ***
--- ***  product.                                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: recoded ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing an mRNA sequence ***
--- ***  that has been reprogrammed at translati ***
--- *** on, causing localized alterations.       ***
--- ************************************************
---

CREATE VIEW recoded AS
  SELECT
    feature_id AS recoded_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'codon_redefined' OR cvterm.name = 'recoded_by_translational_bypass' OR cvterm.name = 'translationally_frameshifted' OR cvterm.name = 'minus_1_translationally_frameshifted' OR cvterm.name = 'plus_1_translationally_frameshifted' OR cvterm.name = 'recoded';

--- ************************************************
--- *** relation: codon_redefined ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing the alteration o ***
--- *** f codon meaning.                         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: stop_codon_read_through ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A stop codon redefined to be a new amino ***
--- ***  acid.                                   ***
--- ************************************************
---

CREATE VIEW stop_codon_read_through AS
  SELECT
    feature_id AS stop_codon_read_through_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'stop_codon_redefined_as_pyrrolysine' OR cvterm.name = 'stop_codon_redefined_as_selenocysteine' OR cvterm.name = 'stop_codon_read_through';

--- ************************************************
--- *** relation: stop_codon_redefined_as_pyrrolysine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A stop codon redefined to be the new ami ***
--- *** no acid, pyrrolysine.                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: stop_codon_redefined_as_selenocysteine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A stop codon redefined to be the new ami ***
--- *** no acid, selenocysteine.                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: recoded_by_translational_bypass ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Recoded mRNA where a block of nucleotide ***
--- *** s is not translated.                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: translationally_frameshifted ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Recoding by frameshifting a particular s ***
--- *** ite.                                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: maternally_imprinted_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is maternally_imprinted.     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: paternally_imprinted_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is paternally imprinted.     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: post_translationally_regulated_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is post translationally regu ***
--- *** lated.                                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: negatively_autoregulated_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is negatively autoreguated.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: positively_autoregulated_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is positively autoregulated. ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: silenced ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing an epigenetic pr ***
--- *** ocess where a gene is inactivated at tra ***
--- *** nscriptional or translational level.     ***
--- ************************************************
---

CREATE VIEW silenced AS
  SELECT
    feature_id AS silenced_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'silenced_by_DNA_modification' OR cvterm.name = 'silenced_by_RNA_interference' OR cvterm.name = 'silenced_by_histone_modification' OR cvterm.name = 'silenced_by_DNA_methylation' OR cvterm.name = 'silenced_by_histone_methylation' OR cvterm.name = 'silenced_by_histone_deacetylation' OR cvterm.name = 'silenced';

--- ************************************************
--- *** relation: silenced_by_dna_modification ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing an epigenetic pr ***
--- *** ocess where a gene is inactivated by DNA ***
--- ***  modifications, resulting in repression  ***
--- *** of transcription.                        ***
--- ************************************************
---

CREATE VIEW silenced_by_dna_modification AS
  SELECT
    feature_id AS silenced_by_dna_modification_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'silenced_by_DNA_methylation' OR cvterm.name = 'silenced_by_DNA_modification';

--- ************************************************
--- *** relation: silenced_by_dna_methylation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing an epigenetic pr ***
--- *** ocess where a gene is inactivated by DNA ***
--- ***  methylation, resulting in repression of ***
--- ***  transcription.                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: translationally_regulated_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is translationally regulated ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: allelically_excluded_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is allelically_excluded.     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: epigenetically_modified_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is epigenetically modified.  ***
--- ************************************************
---

CREATE VIEW epigenetically_modified_gene AS
  SELECT
    feature_id AS epigenetically_modified_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'epigenetically_modified_gene';

--- ************************************************
--- *** relation: transgene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transgene is a gene that has been tran ***
--- *** sferred naturally or by any of a number  ***
--- *** of genetic engineering techniques from o ***
--- *** ne organism to another.                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: endogenous_retroviral_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rearranged_at_dna_level ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe the sequence of ***
--- ***  a feature, where the DNA is rearranged. ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: status ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing the status of a  ***
--- *** feature, based on the available evidence ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW status AS
  SELECT
    feature_id AS status_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'fragmentary' OR cvterm.name = 'predicted' OR cvterm.name = 'validated' OR cvterm.name = 'invalidated' OR cvterm.name = 'independently_known' OR cvterm.name = 'consensus' OR cvterm.name = 'low_complexity' OR cvterm.name = 'whole_genome_sequence_status' OR cvterm.name = 'supported_by_sequence_similarity' OR cvterm.name = 'orphan' OR cvterm.name = 'predicted_by_ab_initio_computation' OR cvterm.name = 'supported_by_domain_match' OR cvterm.name = 'supported_by_EST_or_cDNA' OR cvterm.name = 'experimentally_determined' OR cvterm.name = 'invalidated_by_chimeric_cDNA' OR cvterm.name = 'invalidated_by_genomic_contamination' OR cvterm.name = 'invalidated_by_genomic_polyA_primed_cDNA' OR cvterm.name = 'invalidated_by_partial_processing' OR cvterm.name = 'standard_draft' OR cvterm.name = 'high_quality_draft' OR cvterm.name = 'improved_high_quality_draft' OR cvterm.name = 'annotation_directed_improved_draft' OR cvterm.name = 'noncontiguous_finished' OR cvterm.name = 'finished_genome' OR cvterm.name = 'status';

--- ************************************************
--- *** relation: independently_known ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Attribute to describe a feature that is  ***
--- *** independently known - not predicted.     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: supported_by_sequence_similarity ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe a feature that  ***
--- *** has been predicted using sequence simila ***
--- *** rity techniques.                         ***
--- ************************************************
---

CREATE VIEW supported_by_sequence_similarity AS
  SELECT
    feature_id AS supported_by_sequence_similarity_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'supported_by_domain_match' OR cvterm.name = 'supported_by_EST_or_cDNA' OR cvterm.name = 'supported_by_sequence_similarity';

--- ************************************************
--- *** relation: supported_by_domain_match ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe a feature that  ***
--- *** has been predicted using sequence simila ***
--- *** rity of a known domain.                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: supported_by_est_or_cdna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe a feature that  ***
--- *** has been predicted using sequence simila ***
--- *** rity to EST or cDNA data.                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: orphan ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: predicted_by_ab_initio_computation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a feature that i ***
--- *** s predicted by a computer program that d ***
--- *** id not rely on sequence similarity.      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: asx_turn ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of three consecutive residues an ***
--- *** d one H-bond in which: residue(i) is Asp ***
--- *** artate or Asparagine (Asx), the side-cha ***
--- *** in O of residue(i) is H-bonded to the ma ***
--- *** in-chain NH of residue(i+2).             ***
--- ************************************************
---

CREATE VIEW asx_turn AS
  SELECT
    feature_id AS asx_turn_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'asx_turn';

--- ************************************************
--- *** relation: cloned_cdna_insert ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A clone insert made from cDNA.           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: cloned_genomic_insert ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A clone insert made from genomic DNA.    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: engineered_insert ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A clone insert that is engineered.       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: edited_mrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An mRNA that is edited.                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: guide_rna_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of guide RNA.                   ***
--- ************************************************
---

CREATE VIEW guide_rna_region AS
  SELECT
    feature_id AS guide_rna_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'anchor_region' OR cvterm.name = 'template_region' OR cvterm.name = 'guide_RNA_region';

--- ************************************************
--- *** relation: anchor_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of a guide_RNA that base-pairs  ***
--- *** to a target mRNA.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: pre_edited_mrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: intermediate ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute to describe a feature betwe ***
--- *** en stages of processing.                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: mirna_target_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A miRNA target site is a binding site wh ***
--- *** ere the molecule is a micro RNA.         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: edited_cds ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A CDS that is edited.                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: vertebrate_immunoglobulin_t_cell_receptor_rearranged_segment ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW vertebrate_immunoglobulin_t_cell_receptor_rearranged_segment AS
  SELECT
    feature_id AS vertebrate_immunoglobulin_t_cell_receptor_rearranged_segment_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'VD_gene' OR cvterm.name = 'DJ_gene' OR cvterm.name = 'VDJ_gene' OR cvterm.name = 'VJ_gene' OR cvterm.name = 'vertebrate_immunoglobulin_T_cell_receptor_rearranged_segment';

--- ************************************************
--- *** relation: vertebrate_ig_t_cell_receptor_rearranged_gene_cluster ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW vertebrate_ig_t_cell_receptor_rearranged_gene_cluster AS
  SELECT
    feature_id AS vertebrate_ig_t_cell_receptor_rearranged_gene_cluster_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'vertebrate_immunoglobulin_T_cell_receptor_rearranged_gene_cluster';

--- ************************************************
--- *** relation: vertebrate_immune_system_gene_recombination_signal_feature ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW vertebrate_immune_system_gene_recombination_signal_feature AS
  SELECT
    feature_id AS vertebrate_immune_system_gene_recombination_signal_feature_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'vertebrate_immune_system_gene_recombination_signal_feature';

--- ************************************************
--- *** relation: recombinationally_rearranged ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: recombinationally_rearranged_vertebrate_immune_system_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A recombinationally rearranged gene of t ***
--- *** he vertebrate immune system.             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: attp_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An integration/excision site of a phage  ***
--- *** chromosome at which a recombinase acts t ***
--- *** o insert the phage DNA at a cognate inte ***
--- *** gration/excision site on a bacterial chr ***
--- *** omosome.                                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: attb_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An integration/excision site of a bacter ***
--- *** ial chromosome at which a recombinase ac ***
--- *** ts to insert foreign DNA containing a co ***
--- *** gnate integration/excision site.         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: attl_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region that results from recombination ***
--- ***  between attP_site and attB_site, compos ***
--- *** ed of the 5' portion of attB_site and th ***
--- *** e 3' portion of attP_site.               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: attr_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region that results from recombination ***
--- ***  between attP_site and attB_site, compos ***
--- *** ed of the 5' portion of attP_site and th ***
--- *** e 3' portion of attB_site.               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: integration_excision_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region specifically recognised by a re ***
--- *** combinase, which inserts or removes anot ***
--- *** her region marked by a distinct cognate  ***
--- *** integration/excision site.               ***
--- ************************************************
---

CREATE VIEW integration_excision_site AS
  SELECT
    feature_id AS integration_excision_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'integration_excision_site';

--- ************************************************
--- *** relation: resolution_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region specifically recognised by a re ***
--- *** combinase, which separates a physically  ***
--- *** contiguous circle of DNA into two physic ***
--- *** ally separate circles.                   ***
--- ************************************************
---

CREATE VIEW resolution_site AS
  SELECT
    feature_id AS resolution_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'loxP_site' OR cvterm.name = 'dif_site' OR cvterm.name = 'resolution_site';

--- ************************************************
--- *** relation: inversion_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region specifically recognised by a re ***
--- *** combinase, which inverts the region flan ***
--- *** ked by a pair of sites.                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dif_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A site at which replicated bacterial cir ***
--- *** cular chromosomes are decatenated by sit ***
--- *** e specific resolvase.                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: attc_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attC site is a sequence required for  ***
--- *** the integration of a DNA of an integron. ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: eukaryotic_terminator ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: oriv ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An origin of vegetative replication in p ***
--- *** lasmids and phages.                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: oric ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An origin of bacterial chromosome replic ***
--- *** ation.                                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dna_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Structural unit composed of a self-repli ***
--- *** cating, DNA molecule.                    ***
--- ************************************************
---

CREATE VIEW dna_chromosome AS
  SELECT
    feature_id AS dna_chromosome_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'DNA_chromosome';

--- ************************************************
--- *** relation: double_stranded_dna_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Structural unit composed of a self-repli ***
--- *** cating, double-stranded DNA molecule.    ***
--- ************************************************
---

CREATE VIEW double_stranded_dna_chromosome AS
  SELECT
    feature_id AS double_stranded_dna_chromosome_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'linear_double_stranded_DNA_chromosome' OR cvterm.name = 'circular_double_stranded_DNA_chromosome' OR cvterm.name = 'double_stranded_DNA_chromosome';

--- ************************************************
--- *** relation: single_stranded_dna_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Structural unit composed of a self-repli ***
--- *** cating, single-stranded DNA molecule.    ***
--- ************************************************
---

CREATE VIEW single_stranded_dna_chromosome AS
  SELECT
    feature_id AS single_stranded_dna_chromosome_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'linear_single_stranded_DNA_chromosome' OR cvterm.name = 'circular_single_stranded_DNA_chromosome' OR cvterm.name = 'single_stranded_DNA_chromosome';

--- ************************************************
--- *** relation: linear_double_stranded_dna_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Structural unit composed of a self-repli ***
--- *** cating, double-stranded, linear DNA mole ***
--- *** cule.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: circular_double_stranded_dna_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Structural unit composed of a self-repli ***
--- *** cating, double-stranded, circular DNA mo ***
--- *** lecule.                                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: linear_single_stranded_dna_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Structural unit composed of a self-repli ***
--- *** cating, single-stranded, linear DNA mole ***
--- *** cule.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: circular_single_stranded_dna_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Structural unit composed of a self-repli ***
--- *** cating, single-stranded, circular DNA mo ***
--- *** lecule.                                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rna_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Structural unit composed of a self-repli ***
--- *** cating, RNA molecule.                    ***
--- ************************************************
---

CREATE VIEW rna_chromosome AS
  SELECT
    feature_id AS rna_chromosome_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'RNA_chromosome';

--- ************************************************
--- *** relation: single_stranded_rna_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Structural unit composed of a self-repli ***
--- *** cating, single-stranded RNA molecule.    ***
--- ************************************************
---

CREATE VIEW single_stranded_rna_chromosome AS
  SELECT
    feature_id AS single_stranded_rna_chromosome_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'linear_single_stranded_RNA_chromosome' OR cvterm.name = 'circular_single_stranded_RNA_chromosome' OR cvterm.name = 'single_stranded_RNA_chromosome';

--- ************************************************
--- *** relation: linear_single_stranded_rna_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Structural unit composed of a self-repli ***
--- *** cating, single-stranded, linear RNA mole ***
--- *** cule.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: linear_double_stranded_rna_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Structural unit composed of a self-repli ***
--- *** cating, double-stranded, linear RNA mole ***
--- *** cule.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: double_stranded_rna_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Structural unit composed of a self-repli ***
--- *** cating, double-stranded RNA molecule.    ***
--- ************************************************
---

CREATE VIEW double_stranded_rna_chromosome AS
  SELECT
    feature_id AS double_stranded_rna_chromosome_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'linear_double_stranded_RNA_chromosome' OR cvterm.name = 'circular_double_stranded_RNA_chromosome' OR cvterm.name = 'double_stranded_RNA_chromosome';

--- ************************************************
--- *** relation: circular_single_stranded_rna_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Structural unit composed of a self-repli ***
--- *** cating, single-stranded, circular DNA mo ***
--- *** lecule.                                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: circular_double_stranded_rna_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Structural unit composed of a self-repli ***
--- *** cating, double-stranded, circular RNA mo ***
--- *** lecule.                                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: insertion_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A terminal_inverted_repeat_element that  ***
--- *** is bacterial and only encodes the functi ***
--- *** ons required for its transposition betwe ***
--- *** en these inverted repeats.               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: minicircle_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: cryptic ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A feature_attribute describing a feature ***
--- ***  that is not manifest under normal condi ***
--- *** tions.                                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: anchor_binding_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: template_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of a guide_RNA that specifies t ***
--- *** he insertions and deletions of bases in  ***
--- *** the editing of a target mRNA.            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: grna_encoding ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A non-protein_coding gene that encodes a ***
--- ***  guide_RNA.                              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: minicircle ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A minicircle is a replicon, part of a ki ***
--- *** netoplast, that encodes for guide RNAs.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rho_dependent_bacterial_terminator ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rho_independent_bacterial_terminator ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: strand_attribute ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW strand_attribute AS
  SELECT
    feature_id AS strand_attribute_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'single' OR cvterm.name = 'double' OR cvterm.name = 'strand_attribute';

--- ************************************************
--- *** relation: single ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: double ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: topology_attribute ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW topology_attribute AS
  SELECT
    feature_id AS topology_attribute_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'linear' OR cvterm.name = 'circular' OR cvterm.name = 'topology_attribute';

--- ************************************************
--- *** relation: linear ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A quality of a nucleotide polymer that h ***
--- *** as a 3'-terminal residue and a 5'-termin ***
--- *** al residue.                              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: circular ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A quality of a nucleotide polymer that h ***
--- *** as no terminal nucleotide residues.      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: class_ii_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Small non-coding RNA (59-60 nt long) con ***
--- *** taining 5' and 3' ends that are predicte ***
--- *** d to come together to form a stem struct ***
--- *** ure. Identified in the social amoeba Dic ***
--- *** tyostelium discoideum and localized in t ***
--- *** he cytoplasm.                            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: class_i_rna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Small non-coding RNA (55-65 nt long) con ***
--- *** taining highly conserved 5' and 3' ends  ***
--- *** (16 and 8 nt, respectively) that are pre ***
--- *** dicted to come together to form a stem s ***
--- *** tructure. Identified in the social amoeb ***
--- *** a Dictyostelium discoideum and localized ***
--- ***  in the cytoplasm.                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: genomic_dna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: bac_cloned_genomic_insert ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: consensus ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: consensus_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: consensus_mrna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: predicted_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gene_fragment ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: recursive_splice_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A recursive splice site is a splice site ***
--- ***  which subdivides a large intron. Recurs ***
--- *** ive splicing is a mechanism that splices ***
--- ***  large introns by sub dividing the intro ***
--- *** n at non exonic elements and alternate e ***
--- *** xons.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: bac_end ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of sequence from the end of a B ***
--- *** AC clone that may provide a highly speci ***
--- *** fic marker.                              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rrna_16s ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A large polynucleotide in Bacteria and A ***
--- *** rchaea, which functions as the small sub ***
--- *** unit of the ribosome.                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rrna_23s ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A large polynucleotide in Bacteria and A ***
--- *** rchaea, which functions as the large sub ***
--- *** unit of the ribosome.                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rrna_25s ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A large polynucleotide which functions a ***
--- *** s part of the large subunit of the ribos ***
--- *** ome in some eukaryotes.                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: solo_ltr ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A recombination product between the 2 LT ***
--- *** R of the same element.                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: low_complexity ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: low_complexity_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: prophage ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A phage genome after it has established  ***
--- *** in the host genome in a latent/immune st ***
--- *** ate either as a plasmid or as an integra ***
--- *** ted "island".                            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: cryptic_prophage ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A remnant of an integrated prophage in t ***
--- *** he host genome or an "island" in the hos ***
--- *** t genome that includes phage like-genes. ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: tetraloop ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A base-paired stem with loop of 4 non-hy ***
--- *** drogen bonded nucleotides.               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dna_constraint_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A double-stranded DNA used to control ma ***
--- *** cromolecular structure and function.     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: i_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A cytosine rich domain whereby strands a ***
--- *** ssociate both inter- and intramolecularl ***
--- *** y at moderately acidic pH.               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: pna_oligo ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Peptide nucleic acid, is a chemical not  ***
--- *** known to occur naturally but is artifici ***
--- *** ally synthesized and used in some biolog ***
--- *** ical research and medical treatments. Th ***
--- *** e PNA backbone is composed of repeating  ***
--- *** N-(2-aminoethyl)-glycine units linked by ***
--- ***  peptide bonds. The purine and pyrimidin ***
--- *** e bases are linked to the backbone by me ***
--- *** thylene carbonyl bonds.                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dnazyme ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A DNA sequence with catalytic activity.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: mnp ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A multiple nucleotide polymorphism with  ***
--- *** alleles of common length > 1, for exampl ***
--- *** e AAA/TTT.                               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: intron_domain ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW intron_domain AS
  SELECT
    feature_id AS intron_domain_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'internal_guide_sequence' OR cvterm.name = 'mirtron' OR cvterm.name = 'intron_domain';

--- ************************************************
--- *** relation: wobble_base_pair ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A type of non-canonical base pairing, mo ***
--- *** st commonly between G and U, which is im ***
--- *** portant for the secondary structure of R ***
--- *** NAs. It has similar thermodynamic stabil ***
--- *** ity to the Watson-Crick pairing. Wobble  ***
--- *** base pairs only have two hydrogen bonds. ***
--- ***  Other wobble base pair possibilities ar ***
--- *** e I-A, I-U and I-C.                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: internal_guide_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A purine-rich sequence in the group I in ***
--- *** trons which determines the locations of  ***
--- *** the splice sites in group I intron splic ***
--- *** ing and has catalytic activity.          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: silent_mutation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that does not affect  ***
--- *** protein function. Silent mutations may o ***
--- *** ccur in genic ( CDS, UTR, intron etc) an ***
--- *** d intergenic regions. Silent mutations m ***
--- *** ay have affects on processes such as spl ***
--- *** icing and regulation.                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: epitope ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A binding site that, in the molecule, in ***
--- *** teracts selectively and non-covalently w ***
--- *** ith antibodies, B cells or T cells.      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: copy_number_variation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A variation that increases or decreases  ***
--- *** the copy number of a given region.       ***
--- ************************************************
---

CREATE VIEW copy_number_variation AS
  SELECT
    feature_id AS copy_number_variation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'copy_number_gain' OR cvterm.name = 'copy_number_loss' OR cvterm.name = 'copy_number_variation';

--- ************************************************
--- *** relation: chromosome_breakpoint ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW chromosome_breakpoint AS
  SELECT
    feature_id AS chromosome_breakpoint_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'inversion_breakpoint' OR cvterm.name = 'translocation_breakpoint' OR cvterm.name = 'insertion_breakpoint' OR cvterm.name = 'deletion_breakpoint' OR cvterm.name = 'chromosome_breakpoint';

--- ************************************************
--- *** relation: inversion_breakpoint ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The point within a chromosome where an i ***
--- *** nversion begins or ends.                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: allele ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An allele is one of a set of coexisting  ***
--- *** sequence variants of a gene.             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: haplotype ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A haplotype is one of a set of coexistin ***
--- *** g sequence variants of a haplotype block ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polymorphic_sequence_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that is segregating i ***
--- *** n one or more natural populations of a s ***
--- *** pecies.                                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: genome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A genome is the sum of genetic material  ***
--- *** within a cell or virion.                 ***
--- ************************************************
---

CREATE VIEW genome AS
  SELECT
    feature_id AS genome_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'kinetoplast' OR cvterm.name = 'reference_genome' OR cvterm.name = 'variant_genome' OR cvterm.name = 'chromosomally_aberrant_genome' OR cvterm.name = 'genome';

--- ************************************************
--- *** relation: so_genotype ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A genotype is a variant genome, complete ***
--- ***  or incomplete.                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: diplotype ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A diplotype is a pair of haplotypes from ***
--- ***  a given individual. It is a genotype wh ***
--- *** ere the phase is known.                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: direction_attribute ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW direction_attribute AS
  SELECT
    feature_id AS direction_attribute_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'forward' OR cvterm.name = 'reverse' OR cvterm.name = 'direction_attribute';

--- ************************************************
--- *** relation: forward ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Forward is an attribute of the feature,  ***
--- *** where the feature is in the 5' to 3' dir ***
--- *** ection.                                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: reverse ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Reverse is an attribute of the feature,  ***
--- *** where the feature is in the 3' to 5' dir ***
--- *** ection. Again could be applied to primer ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: mitochondrial_dna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: chloroplast_dna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: mirtron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A de-branched intron which mimics the st ***
--- *** ructure of pre-miRNA and enters the miRN ***
--- *** A processing pathway without Drosha medi ***
--- *** ated cleavage.                           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: pirna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A small non coding RNA, part of a silenc ***
--- *** ing system that prevents the spreading o ***
--- *** f selfish genetic elements.              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: arginyl_trna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tRNA sequence that has an arginine ant ***
--- *** icodon, and a 3' arginine binding region ***
--- *** .                                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: mobile_genetic_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A nucleotide region with either intra-ge ***
--- *** nome or intracellular moblity, of varyin ***
--- *** g length, which often carry the informat ***
--- *** ion necessary for transfer and recombina ***
--- *** tion with the host genome.               ***
--- ************************************************
---

CREATE VIEW mobile_genetic_element AS
  SELECT
    feature_id AS mobile_genetic_element_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'mobile_intron' OR cvterm.name = 'extrachromosomal_mobile_genetic_element' OR cvterm.name = 'integrated_mobile_genetic_element' OR cvterm.name = 'natural_transposable_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 = '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 = 'nested_transposon' OR cvterm.name = 'LTR_retrotransposon' OR cvterm.name = 'non_LTR_retrotransposon' 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 = 'p_element' 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 = 'mobile_genetic_element';

--- ************************************************
--- *** relation: extrachromosomal_mobile_genetic_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An MGE that is not integrated into the h ***
--- *** ost chromosome.                          ***
--- ************************************************
---

CREATE VIEW extrachromosomal_mobile_genetic_element AS
  SELECT
    feature_id AS extrachromosomal_mobile_genetic_element_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'natural_transposable_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 = 'extrachromosomal_mobile_genetic_element';

--- ************************************************
--- *** relation: integrated_mobile_genetic_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An MGE that is integrated into the host  ***
--- *** chromosome.                              ***
--- ************************************************
---

CREATE VIEW integrated_mobile_genetic_element AS
  SELECT
    feature_id AS integrated_mobile_genetic_element_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'nested_transposon' OR cvterm.name = 'LTR_retrotransposon' OR cvterm.name = 'non_LTR_retrotransposon' 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 = 'p_element' 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 = 'integrated_mobile_genetic_element';

--- ************************************************
--- *** relation: integrated_plasmid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A plasmid sequence that is integrated wi ***
--- *** thin the host chromosome.                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: viral_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The region of nucleotide sequence of a v ***
--- *** irus, a submicroscopic particle that rep ***
--- *** licates by infecting a host cell.        ***
--- ************************************************
---

CREATE VIEW viral_sequence AS
  SELECT
    feature_id AS viral_sequence_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'viral_sequence';

--- ************************************************
--- *** relation: phage_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The nucleotide sequence of a virus that  ***
--- *** infects bacteria.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: attctn_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attachment site located on a conjugat ***
--- *** ive transposon and used for site-specifi ***
--- *** c integration of a conjugative transposo ***
--- *** n.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: nuclear_mt_pseudogene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A nuclear pseudogene of either coding or ***
--- ***  non-coding mitochondria derived sequenc ***
--- *** e.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: cointegrated_plasmid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A MGE region consisting of two fused pla ***
--- *** smids resulting from a replicative trans ***
--- *** position event.                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: irlinv_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Component of the inversion site located  ***
--- *** at the left of a region susceptible to s ***
--- *** ite-specific inversion.                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: irrinv_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Component of the inversion site located  ***
--- *** at the right of a region susceptible to  ***
--- *** site-specific inversion.                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: inversion_site_part ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region located within an inversion sit ***
--- *** e.                                       ***
--- ************************************************
---

CREATE VIEW inversion_site_part AS
  SELECT
    feature_id AS inversion_site_part_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'IRLinv_site' OR cvterm.name = 'IRRinv_site' OR cvterm.name = 'inversion_site_part';

--- ************************************************
--- *** relation: defective_conjugative_transposon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An island that contains genes for integr ***
--- *** ation/excision and the gene and site for ***
--- ***  the initiation of intercellular transfe ***
--- *** r by conjugation. It can be complemented ***
--- ***  for transfer by a conjugative transposo ***
--- *** n.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: repeat_fragment ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A portion of a repeat, interrupted by th ***
--- *** e insertion of another element.          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: transposon_fragment ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A portion of a transposon, interrupted b ***
--- *** y the insertion of another element.      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: transcriptional_cis_regulatory_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A regulatory_region that modulates the t ***
--- *** ranscription of a gene or genes.         ***
--- ************************************************
---

CREATE VIEW transcriptional_cis_regulatory_region AS
  SELECT
    feature_id AS transcriptional_cis_regulatory_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'promoter' OR cvterm.name = 'insulator' OR cvterm.name = 'CRM' OR cvterm.name = 'promoter_targeting_sequence' OR cvterm.name = 'ISRE' 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_II_core_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 = 'bacterial_RNApol_promoter_sigma_70' OR cvterm.name = 'bacterial_RNApol_promoter_sigma54' 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 = 'silencer' OR cvterm.name = 'enhancer_bound_by_factor' OR cvterm.name = 'shadow_enhancer' OR cvterm.name = 'transcriptional_cis_regulatory_region';

--- ************************************************
--- *** relation: splicing_regulatory_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A regulatory_region that modulates splic ***
--- *** ing.                                     ***
--- ************************************************
---

CREATE VIEW splicing_regulatory_region AS
  SELECT
    feature_id AS splicing_regulatory_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'splice_enhancer' OR cvterm.name = 'intronic_splice_enhancer' OR cvterm.name = 'exonic_splice_enhancer' OR cvterm.name = 'splicing_regulatory_region';

--- ************************************************
--- *** relation: promoter_targeting_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcriptional_cis_regulatory_region  ***
--- *** that restricts the activity of a CRM to  ***
--- *** a single promoter and which functions on ***
--- *** ly when both itself and an insulator are ***
--- ***  located between the CRM and the promote ***
--- *** r.                                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: sequence_alteration ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence_alteration is a sequence_feat ***
--- *** ure whose extent is the deviation from a ***
--- *** nother sequence.                         ***
--- ************************************************
---

CREATE VIEW sequence_alteration AS
  SELECT
    feature_id AS sequence_alteration_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'deletion' OR cvterm.name = 'translocation' OR cvterm.name = 'insertion' OR cvterm.name = 'copy_number_variation' OR cvterm.name = 'UPD' OR cvterm.name = 'structural_alteration' OR cvterm.name = 'substitution' OR cvterm.name = 'indel' OR cvterm.name = 'inversion' OR cvterm.name = 'transgenic_insertion' OR cvterm.name = 'duplication' OR cvterm.name = 'tandem_duplication' OR cvterm.name = 'direct_tandem_duplication' OR cvterm.name = 'inverted_tandem_duplication' OR cvterm.name = 'copy_number_gain' OR cvterm.name = 'copy_number_loss' OR cvterm.name = 'maternal_uniparental_disomy' OR cvterm.name = 'paternal_uniparental_disomy' OR cvterm.name = 'complex_structural_alteration' OR cvterm.name = 'sequence_length_variation' OR cvterm.name = 'MNP' OR cvterm.name = 'SNV' OR cvterm.name = 'complex_substitution' OR cvterm.name = 'simple_sequence_length_variation' OR cvterm.name = 'SNP' OR cvterm.name = 'point_mutation' 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 = 'sequence_alteration';

--- ************************************************
--- *** relation: sequence_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence_variant is a non exact copy o ***
--- *** f a sequence_feature or genome exhibitin ***
--- *** g one or more sequence_alteration.       ***
--- ************************************************
---

CREATE VIEW sequence_variant AS
  SELECT
    feature_id AS sequence_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'functional_variant' OR cvterm.name = 'structural_variant' OR cvterm.name = 'loss_of_heterozygosity' OR cvterm.name = 'transcript_function_variant' OR cvterm.name = 'translational_product_function_variant' OR cvterm.name = 'level_of_transcript_variant' OR cvterm.name = 'transcript_processing_variant' OR cvterm.name = 'transcript_stability_variant' OR cvterm.name = 'transcription_variant' OR cvterm.name = 'decreased_transcript_level_variant' OR cvterm.name = 'increased_transcript_level_variant' OR cvterm.name = 'editing_variant' OR cvterm.name = 'polyadenylation_variant' OR cvterm.name = 'increased_polyadenylation_variant' OR cvterm.name = 'decreased_polyadenylation_variant' OR cvterm.name = 'decreased_transcript_stability_variant' OR cvterm.name = 'increased_transcript_stability_variant' OR cvterm.name = 'rate_of_transcription_variant' OR cvterm.name = 'increased_transcription_rate_variant' OR cvterm.name = 'decreased_transcription_rate_variant' OR cvterm.name = 'translational_product_level_variant' OR cvterm.name = 'polypeptide_function_variant' OR cvterm.name = 'decreased_translational_product_level' OR cvterm.name = 'increased_translational_product_level' OR cvterm.name = 'polypeptide_gain_of_function_variant' OR cvterm.name = 'polypeptide_localization_variant' OR cvterm.name = 'polypeptide_loss_of_function_variant' OR cvterm.name = 'polypeptide_post_translational_processing_variant' OR cvterm.name = 'inactive_ligand_binding_site' OR cvterm.name = 'polypeptide_partial_loss_of_function' OR cvterm.name = 'inactive_catalytic_site' OR cvterm.name = 'silent_mutation' OR cvterm.name = 'copy_number_change' OR cvterm.name = 'gene_variant' OR cvterm.name = 'regulatory_region_variant' OR cvterm.name = 'intergenic_variant' OR cvterm.name = 'upstream_gene_variant' OR cvterm.name = 'downstream_gene_variant' OR cvterm.name = 'gene_fusion' OR cvterm.name = 'splicing_variant' OR cvterm.name = 'transcript_variant' OR cvterm.name = 'translational_product_structure_variant' OR cvterm.name = 'cryptic_splice_site_variant' OR cvterm.name = 'exon_loss' OR cvterm.name = 'intron_gain' OR cvterm.name = 'splice_region_variant' OR cvterm.name = 'cryptic_splice_acceptor' OR cvterm.name = 'cryptic_splice_donor' OR cvterm.name = 'complex_change_in_transcript' OR cvterm.name = 'transcript_secondary_structure_variant' OR cvterm.name = 'nc_transcript_variant' OR cvterm.name = 'NMD_transcript_variant' OR cvterm.name = 'UTR_variant' OR cvterm.name = 'intron_variant' OR cvterm.name = 'exon_variant' OR cvterm.name = 'compensatory_transcript_secondary_structure_variant' OR cvterm.name = 'mature_miRNA_variant' OR cvterm.name = '5_prime_UTR_variant' OR cvterm.name = '3_prime_UTR_variant' OR cvterm.name = 'splice_site_variant' OR cvterm.name = 'splice_acceptor_variant' OR cvterm.name = 'splice_donor_variant' OR cvterm.name = 'splice_donor_5th_base_variant' OR cvterm.name = 'coding_sequence_variant' OR cvterm.name = 'non_coding_exon_variant' OR cvterm.name = 'codon_variant' OR cvterm.name = 'frameshift_variant' OR cvterm.name = 'inframe_variant' OR cvterm.name = 'initiator_codon_change' OR cvterm.name = 'non_synonymous_codon' OR cvterm.name = 'synonymous_codon' OR cvterm.name = 'terminal_codon_variant' OR cvterm.name = 'stop_gained' OR cvterm.name = 'missense_codon' OR cvterm.name = 'conservative_missense_codon' OR cvterm.name = 'non_conservative_missense_codon' OR cvterm.name = 'terminator_codon_variant' OR cvterm.name = 'incomplete_terminal_codon_variant' OR cvterm.name = 'stop_retained_variant' OR cvterm.name = 'stop_lost' OR cvterm.name = 'frame_restoring_variant' OR cvterm.name = 'minus_1_frameshift_variant' OR cvterm.name = 'minus_2_frameshift_variant' OR cvterm.name = 'plus_1_frameshift_variant' OR cvterm.name = 'plus_2_frameshift variant' OR cvterm.name = 'inframe_codon_gain' OR cvterm.name = 'inframe_codon_loss' OR cvterm.name = '3D_polypeptide_structure_variant' OR cvterm.name = 'complex_change_of_translational_product_variant' OR cvterm.name = 'polypeptide_sequence_variant' OR cvterm.name = 'complex_3D_structural_variant' OR cvterm.name = 'conformational_change_variant' OR cvterm.name = 'amino_acid_deletion' OR cvterm.name = 'amino_acid_insertion' OR cvterm.name = 'amino_acid_substitution' OR cvterm.name = 'elongated_polypeptide' OR cvterm.name = 'polypeptide_fusion' OR cvterm.name = 'polypeptide_truncation' OR cvterm.name = 'conservative_amino_acid_substitution' OR cvterm.name = 'non_conservative_amino_acid_substitution' OR cvterm.name = 'elongated_polypeptide_C_terminal' OR cvterm.name = 'elongated_polypeptide_N_terminal' OR cvterm.name = 'elongated_in_frame_polypeptide_C_terminal' OR cvterm.name = 'elongated_out_of_frame_polypeptide_C_terminal' OR cvterm.name = 'elongated_in_frame_polypeptide_N_terminal_elongation' OR cvterm.name = 'elongated_out_of_frame_polypeptide_N_terminal' OR cvterm.name = 'TF_binding_site_variant' OR cvterm.name = '5KB_upstream_variant' OR cvterm.name = '2KB_upstream_variant' OR cvterm.name = '5KB_downstream_variant' OR cvterm.name = '500B_downstream_variant' OR cvterm.name = 'sequence_variant';

--- ************************************************
--- *** relation: propeptide_cleavage_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The propeptide_cleavage_site is the argi ***
--- *** nine/lysine boundary on a propeptide whe ***
--- *** re cleavage occurs.                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: propeptide ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Part of a peptide chain which is cleaved ***
--- ***  off during the formation of the mature  ***
--- *** protein.                                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: immature_peptide_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An immature_peptide_region is the extent ***
--- ***  of the peptide after it has been transl ***
--- *** ated and before any processing occurs.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: active_peptide ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Active peptides are proteins which are b ***
--- *** iologically active, released from a prec ***
--- *** ursor molecule.                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: compositionally_biased_region_of_peptide ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Polypeptide region that is rich in a par ***
--- *** ticular amino acid or homopolymeric and  ***
--- *** greater than three residues in length.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence motif is a short (up to 20 am ***
--- *** ino acids) region of biological interest ***
--- *** . Such motifs, although they are too sho ***
--- *** rt to constitute functional domains, sha ***
--- *** re sequence similarities and are conserv ***
--- *** ed in different proteins. They display a ***
--- ***  common function (protein-binding, subce ***
--- *** llular location etc.).                   ***
--- ************************************************
---

CREATE VIEW polypeptide_motif AS
  SELECT
    feature_id AS polypeptide_motif_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'histone_modification' OR cvterm.name = 'histone_methylation_site' OR cvterm.name = 'histone_acetylation_site' OR cvterm.name = 'histone_ubiqitination_site' OR cvterm.name = 'histone_acylation_region' OR cvterm.name = 'H4K20_monomethylation_site' OR cvterm.name = 'H2BK5_monomethylation_site' OR cvterm.name = 'H3K27_methylation_site' OR cvterm.name = 'H3K36_methylation_site' OR cvterm.name = 'H3K4_methylation_site' OR cvterm.name = 'H3K79_methylation_site' OR cvterm.name = 'H3K9_methylation_site' OR cvterm.name = 'H3K27_monomethylation_site' OR cvterm.name = 'H3K27_trimethylation_site' OR cvterm.name = 'H3K27_dimethylation_site' OR cvterm.name = 'H3K36_monomethylation_site' OR cvterm.name = 'H3K36_dimethylation_site' OR cvterm.name = 'H3K36_trimethylation_site' OR cvterm.name = 'H3K4_monomethylation_site' OR cvterm.name = 'H3K4_trimethylation' OR cvterm.name = 'H3K4_dimethylation_site' OR cvterm.name = 'H3K79_monomethylation_site' OR cvterm.name = 'H3K79_dimethylation_site' OR cvterm.name = 'H3K79_trimethylation_site' OR cvterm.name = 'H3K9_trimethylation_site' OR cvterm.name = 'H3K9_monomethylation_site' OR cvterm.name = 'H3K9_dimethylation_site' OR cvterm.name = 'H3K9_acetylation_site' OR cvterm.name = 'H3K14_acetylation_site' OR cvterm.name = 'H3K18_acetylation_site' OR cvterm.name = 'H3K23_acylation site' OR cvterm.name = 'H3K27_acylation_site' OR cvterm.name = 'H4K16_acylation_site' OR cvterm.name = 'H4K5_acylation_site' OR cvterm.name = 'H4K8_acylation site' OR cvterm.name = 'H2B_ubiquitination_site' OR cvterm.name = 'H4K_acylation_region' 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_motif';

--- ************************************************
--- *** relation: polypeptide_repeat ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A polypeptide_repeat is a single copy of ***
--- ***  an internal sequence repetition.        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide_structural_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Region of polypeptide with a given struc ***
--- *** tural property.                          ***
--- ************************************************
---

CREATE VIEW polypeptide_structural_region AS
  SELECT
    feature_id AS polypeptide_structural_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'polypeptide_structural_region';

--- ************************************************
--- *** relation: membrane_structure ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Arrangement of the polypeptide with resp ***
--- *** ect to the lipid bilayer.                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: extramembrane_polypeptide_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Polypeptide region that is localized out ***
--- *** side of a lipid bilayer.                 ***
--- ************************************************
---

CREATE VIEW extramembrane_polypeptide_region AS
  SELECT
    feature_id AS extramembrane_polypeptide_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'cytoplasmic_polypeptide_region' OR cvterm.name = 'non_cytoplasmic_polypeptide_region' OR cvterm.name = 'extramembrane_polypeptide_region';

--- ************************************************
--- *** relation: cytoplasmic_polypeptide_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Polypeptide region that is localized ins ***
--- *** ide the cytoplasm.                       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: non_cytoplasmic_polypeptide_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Polypeptide region that is localized out ***
--- *** side of a lipid bilayer and outside of t ***
--- *** he cytoplasm.                            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: intramembrane_polypeptide_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Polypeptide region present in the lipid  ***
--- *** bilayer.                                 ***
--- ************************************************
---

CREATE VIEW intramembrane_polypeptide_region AS
  SELECT
    feature_id AS intramembrane_polypeptide_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'membrane_peptide_loop' OR cvterm.name = 'transmembrane_polypeptide_region' OR cvterm.name = 'intramembrane_polypeptide_region';

--- ************************************************
--- *** relation: membrane_peptide_loop ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Polypeptide region localized within the  ***
--- *** lipid bilayer where both ends traverse t ***
--- *** he same membrane.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: transmembrane_polypeptide_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Polypeptide region traversing the lipid  ***
--- *** bilayer.                                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide_secondary_structure ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of peptide with secondary struc ***
--- *** ture has hydrogen bonding along the pept ***
--- *** ide chain that causes a defined conforma ***
--- *** tion of the chain.                       ***
--- ************************************************
---

CREATE VIEW polypeptide_secondary_structure AS
  SELECT
    feature_id AS polypeptide_secondary_structure_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'polypeptide_secondary_structure';

--- ************************************************
--- *** relation: polypeptide_structural_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Motif is a three-dimensional structural  ***
--- *** element within the chain, which appears  ***
--- *** also in a variety of other molecules. Un ***
--- *** like a domain, a motif does not need to  ***
--- *** form a stable globular unit.             ***
--- ************************************************
---

CREATE VIEW polypeptide_structural_motif AS
  SELECT
    feature_id AS polypeptide_structural_motif_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'coiled_coil' OR cvterm.name = 'helix_turn_helix' OR cvterm.name = 'polypeptide_structural_motif';

--- ************************************************
--- *** relation: coiled_coil ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A coiled coil is a structural motif in p ***
--- *** roteins, in which alpha-helices are coil ***
--- *** ed together like the strands of a rope.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: helix_turn_helix ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif comprising two helices separated ***
--- ***  by a turn.                              ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide_sequencing_information ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Incompatibility in the sequence due to s ***
--- *** ome experimental problem.                ***
--- ************************************************
---

CREATE VIEW polypeptide_sequencing_information AS
  SELECT
    feature_id AS polypeptide_sequencing_information_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'non_adjacent_residues' OR cvterm.name = 'non_terminal_residue' OR cvterm.name = 'sequence_conflict' OR cvterm.name = 'sequence_uncertainty' OR cvterm.name = 'contig_collection' OR cvterm.name = 'polypeptide_sequencing_information';

--- ************************************************
--- *** relation: non_adjacent_residues ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Indicates that two consecutive residues  ***
--- *** in a fragment sequence are not consecuti ***
--- *** ve in the full-length protein and that t ***
--- *** here are a number of unsequenced residue ***
--- *** s between them.                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: non_terminal_residue ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The residue at an extremity of the seque ***
--- *** nce is not the terminal residue.         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: sequence_conflict ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Different sources report differing seque ***
--- *** nces.                                    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: sequence_uncertainty ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Describes the positions in a sequence wh ***
--- *** ere the authors are unsure about the seq ***
--- *** uence assignment.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: post_translationally_modified_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region where a transformation occurs i ***
--- *** n a protein after it has been synthesize ***
--- *** d. This which may regulate, stabilize, c ***
--- *** rosslink or introduce new chemical funct ***
--- *** ionalities in the protein.               ***
--- ************************************************
---

CREATE VIEW post_translationally_modified_region AS
  SELECT
    feature_id AS post_translationally_modified_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'histone_modification' OR cvterm.name = 'histone_methylation_site' OR cvterm.name = 'histone_acetylation_site' OR cvterm.name = 'histone_ubiqitination_site' OR cvterm.name = 'histone_acylation_region' OR cvterm.name = 'H4K20_monomethylation_site' OR cvterm.name = 'H2BK5_monomethylation_site' OR cvterm.name = 'H3K27_methylation_site' OR cvterm.name = 'H3K36_methylation_site' OR cvterm.name = 'H3K4_methylation_site' OR cvterm.name = 'H3K79_methylation_site' OR cvterm.name = 'H3K9_methylation_site' OR cvterm.name = 'H3K27_monomethylation_site' OR cvterm.name = 'H3K27_trimethylation_site' OR cvterm.name = 'H3K27_dimethylation_site' OR cvterm.name = 'H3K36_monomethylation_site' OR cvterm.name = 'H3K36_dimethylation_site' OR cvterm.name = 'H3K36_trimethylation_site' OR cvterm.name = 'H3K4_monomethylation_site' OR cvterm.name = 'H3K4_trimethylation' OR cvterm.name = 'H3K4_dimethylation_site' OR cvterm.name = 'H3K79_monomethylation_site' OR cvterm.name = 'H3K79_dimethylation_site' OR cvterm.name = 'H3K79_trimethylation_site' OR cvterm.name = 'H3K9_trimethylation_site' OR cvterm.name = 'H3K9_monomethylation_site' OR cvterm.name = 'H3K9_dimethylation_site' OR cvterm.name = 'H3K9_acetylation_site' OR cvterm.name = 'H3K14_acetylation_site' OR cvterm.name = 'H3K18_acetylation_site' OR cvterm.name = 'H3K23_acylation site' OR cvterm.name = 'H3K27_acylation_site' OR cvterm.name = 'H4K16_acylation_site' OR cvterm.name = 'H4K5_acylation_site' OR cvterm.name = 'H4K8_acylation site' OR cvterm.name = 'H2B_ubiquitination_site' OR cvterm.name = 'H4K_acylation_region' OR cvterm.name = 'post_translationally_modified_region';

--- ************************************************
--- *** relation: polypeptide_metal_contact ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A binding site that, in the polypeptide  ***
--- *** molecule, interacts selectively and non- ***
--- *** covalently with metal ions.              ***
--- ************************************************
---

CREATE VIEW polypeptide_metal_contact AS
  SELECT
    feature_id AS polypeptide_metal_contact_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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_metal_contact';

--- ************************************************
--- *** relation: protein_protein_contact ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A binding site that, in the protein mole ***
--- *** cule, interacts selectively and non-cova ***
--- *** lently with polypeptide residues.        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide_calcium_ion_contact_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A binding site that, in the polypeptide  ***
--- *** molecule, interacts selectively and non- ***
--- *** covalently with calcium ions.            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide_cobalt_ion_contact_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A binding site that, in the polypeptide  ***
--- *** molecule, interacts selectively and non- ***
--- *** covalently with cobalt ions.             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide_copper_ion_contact_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A binding site that, in the polypeptide  ***
--- *** molecule, interacts selectively and non- ***
--- *** covalently with copper ions.             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide_iron_ion_contact_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A binding site that, in the polypeptide  ***
--- *** molecule, interacts selectively and non- ***
--- *** covalently with iron ions.               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide_magnesium_ion_contact_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A binding site that, in the polypeptide  ***
--- *** molecule, interacts selectively and non- ***
--- *** covalently with magnesium ions.          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide_manganese_ion_contact_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A binding site that, in the polypeptide  ***
--- *** molecule, interacts selectively and non- ***
--- *** covalently with manganese ions.          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide_molybdenum_ion_contact_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A binding site that, in the polypeptide  ***
--- *** molecule, interacts selectively and non- ***
--- *** covalently with molybdenum ions.         ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide_nickel_ion_contact_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A binding site that, in the polypeptide  ***
--- *** molecule, interacts selectively and non- ***
--- *** covalently with nickel ions.             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide_tungsten_ion_contact_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A binding site that, in the polypeptide  ***
--- *** molecule, interacts selectively and non- ***
--- *** covalently with tungsten ions.           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide_zinc_ion_contact_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A binding site that, in the polypeptide  ***
--- *** molecule, interacts selectively and non- ***
--- *** covalently with zinc ions.               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: catalytic_residue ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Amino acid involved in the activity of a ***
--- *** n enzyme.                                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide_ligand_contact ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Residues which interact with a ligand.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: asx_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of five consecutive residues and ***
--- ***  two H-bonds in which: Residue(i) is Asp ***
--- *** artate or Asparagine (Asx), side-chain O ***
--- ***  of residue(i) is H-bonded to the main-c ***
--- *** hain NH of residue(i+2) or (i+3), main-c ***
--- *** hain CO of residue(i) is H-bonded to the ***
--- ***  main-chain NH of residue(i+3) or (i+4). ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: beta_bulge ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of three residues within a beta- ***
--- *** sheet in which the main chains of two co ***
--- *** nsecutive residues are H-bonded to that  ***
--- *** of the third, and in which the dihedral  ***
--- *** angles are as follows: Residue(i): -140  ***
--- *** degrees < phi(l) -20 degrees , -90 degre ***
--- *** es < psi(l) < 40 degrees. Residue (i+1): ***
--- ***  -180 degrees < phi < -25 degrees or +12 ***
--- *** 0 degrees < phi < +180 degrees, +40 degr ***
--- *** ees < psi < +180 degrees or -180 degrees ***
--- ***  < psi < -120 degrees.                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: beta_bulge_loop ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of three residues within a beta- ***
--- *** sheet consisting of two H-bonds. Beta bu ***
--- *** lge loops often occur at the loop ends o ***
--- *** f beta-hairpins.                         ***
--- ************************************************
---

CREATE VIEW beta_bulge_loop AS
  SELECT
    feature_id AS beta_bulge_loop_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'beta_bulge_loop_five' OR cvterm.name = 'beta_bulge_loop_six' OR cvterm.name = 'beta_bulge_loop';

--- ************************************************
--- *** relation: beta_bulge_loop_five ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of three residues within a beta- ***
--- *** sheet consisting of two H-bonds in which ***
--- *** : the main-chain NH of residue(i) is H-b ***
--- *** onded to the main-chain CO of residue(i+ ***
--- *** 4), the main-chain CO of residue i is H- ***
--- *** bonded to the main-chain NH of residue(i ***
--- *** +3), these loops have an RL nest at resi ***
--- *** dues i+2 and i+3.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: beta_bulge_loop_six ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of three residues within a beta- ***
--- *** sheet consisting of two H-bonds in which ***
--- *** : the main-chain NH of residue(i) is H-b ***
--- *** onded to the main-chain CO of residue(i+ ***
--- *** 5), the main-chain CO of residue i is H- ***
--- *** bonded to the main-chain NH of residue(i ***
--- *** +4), these loops have an RL nest at resi ***
--- *** dues i+3 and i+4.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: beta_strand ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A beta strand describes a single length  ***
--- *** of polypeptide chain that forms part of  ***
--- *** a beta sheet. A single continuous stretc ***
--- *** h of amino acids adopting an extended co ***
--- *** nformation of hydrogen bonds between the ***
--- ***  N-O and the C=O of another part of the  ***
--- *** peptide. This forms a secondary protein  ***
--- *** structure in which two or more extended  ***
--- *** polypeptide regions are hydrogen-bonded  ***
--- *** to one another in a planar array.        ***
--- ************************************************
---

CREATE VIEW beta_strand AS
  SELECT
    feature_id AS beta_strand_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'antiparallel_beta_strand' OR cvterm.name = 'parallel_beta_strand' OR cvterm.name = 'beta_strand';

--- ************************************************
--- *** relation: antiparallel_beta_strand ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A peptide region which hydrogen bonded t ***
--- *** o another region of peptide running in t ***
--- *** he oposite direction (one running N-term ***
--- *** inal to C-terminal and one running C-ter ***
--- *** minal to N-terminal). Hydrogen bonding o ***
--- *** ccurs between every other C=O from one s ***
--- *** trand to every other N-H on the adjacent ***
--- ***  strand. In this case, if two atoms C-al ***
--- *** pha (i) and C-alpha (j) are adjacent in  ***
--- *** two hydrogen-bonded beta strands, then t ***
--- *** hey form two mutual backbone hydrogen bo ***
--- *** nds to each other's flanking peptide gro ***
--- *** ups; this is known as a close pair of hy ***
--- *** drogen bonds. The peptide backbone dihed ***
--- *** ral angles (phi, psi) are about (-140 de ***
--- *** grees, 135 degrees) in antiparallel shee ***
--- *** ts.                                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: parallel_beta_strand ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A peptide region which hydrogen bonded t ***
--- *** o another region of peptide running in t ***
--- *** he oposite direction (both running N-ter ***
--- *** minal to C-terminal). This orientation i ***
--- *** s slightly less stable because it introd ***
--- *** uces nonplanarity in the inter-strand hy ***
--- *** drogen bonding pattern. Hydrogen bonding ***
--- ***  occurs between every other C=O from one ***
--- ***  strand to every other N-H on the adjace ***
--- *** nt strand. In this case, if two atoms C- ***
--- *** alpha (i)and C-alpha (j) are adjacent in ***
--- ***  two hydrogen-bonded beta strands, then  ***
--- *** they do not hydrogen bond to each other; ***
--- ***  rather, one residue forms hydrogen bond ***
--- *** s to the residues that flank the other ( ***
--- *** but not vice versa). For example, residu ***
--- *** e i may form hydrogen bonds to residues  ***
--- *** j - 1 and j + 1; this is known as a wide ***
--- ***  pair of hydrogen bonds. By contrast, re ***
--- *** sidue j may hydrogen-bond to different r ***
--- *** esidues altogether, or to none at all. T ***
--- *** he dihedral angles (phi, psi) are about  ***
--- *** (-120 degrees, 115 degrees) in parallel  ***
--- *** sheets.                                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: peptide_helix ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A helix is a secondary_structure conform ***
--- *** ation where the peptide backbone forms a ***
--- ***  coil.                                   ***
--- ************************************************
---

CREATE VIEW peptide_helix AS
  SELECT
    feature_id AS peptide_helix_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'peptide_helix';

--- ************************************************
--- *** relation: left_handed_peptide_helix ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A left handed helix is a region of pepti ***
--- *** de where the coiled conformation turns i ***
--- *** n an anticlockwise, left handed screw.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: right_handed_peptide_helix ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A right handed helix is a region of pept ***
--- *** ide where the coiled conformation turns  ***
--- *** in a clockwise, right handed screw.      ***
--- ************************************************
---

CREATE VIEW right_handed_peptide_helix AS
  SELECT
    feature_id AS right_handed_peptide_helix_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'alpha_helix' OR cvterm.name = 'pi_helix' OR cvterm.name = 'three_ten_helix' OR cvterm.name = 'right_handed_peptide_helix';

--- ************************************************
--- *** relation: alpha_helix ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The helix has 3.6 residues per turn whic ***
--- *** h corersponds to a translation of 1.5 an ***
--- *** gstroms (= 0.15 nm) along the helical ax ***
--- *** is. Every backbone N-H group donates a h ***
--- *** ydrogen bond to the backbone C=O group o ***
--- *** f the amino acid four residues earlier.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: pi_helix ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The pi helix has 4.1 residues per turn a ***
--- *** nd a translation of 1.15  (=0.115 nm) al ***
--- *** ong the helical axis. The N-H group of a ***
--- *** n amino acid forms a hydrogen bond with  ***
--- *** the C=O group of the amino acid five res ***
--- *** idues earlier.                           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: three_ten_helix ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The 3-10 helix has 3 residues per turn w ***
--- *** ith a translation of 2.0 angstroms (=0.2 ***
--- ***  nm) along the helical axis. The N-H gro ***
--- *** up of an amino acid forms a hydrogen bon ***
--- *** d with the C=O group of the amino acid t ***
--- *** hree residues earlier.                   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide_nest_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of two consecutive residues with ***
--- ***  dihedral angles. Nest should not have P ***
--- *** roline as any residue. Nests frequently  ***
--- *** occur as parts of other motifs such as S ***
--- *** chellman loops.                          ***
--- ************************************************
---

CREATE VIEW polypeptide_nest_motif AS
  SELECT
    feature_id AS polypeptide_nest_motif_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polypeptide_nest_left_right_motif' OR cvterm.name = 'polypeptide_nest_right_left_motif' OR cvterm.name = 'polypeptide_nest_motif';

--- ************************************************
--- *** relation: polypeptide_nest_left_right_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of two consecutive residues with ***
--- ***  dihedral angles: Residue(i): +20 degree ***
--- *** s < phi < +140 degrees, -40 degrees < ps ***
--- *** i < +90 degrees. Residue(i+1): -140 degr ***
--- *** ees < phi < -20 degrees, -90 degrees < p ***
--- *** si < +40 degrees.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide_nest_right_left_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of two consecutive residues with ***
--- ***  dihedral angles: Residue(i): -140 degre ***
--- *** es < phi < -20 degrees, -90 degrees < ps ***
--- *** i < +40 degrees. Residue(i+1): +20 degre ***
--- *** es < phi < +140 degrees, -40 degrees < p ***
--- *** si < +90 degrees.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: schellmann_loop ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of six or seven consecutive resi ***
--- *** dues that contains two H-bonds.          ***
--- ************************************************
---

CREATE VIEW schellmann_loop AS
  SELECT
    feature_id AS schellmann_loop_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'schellmann_loop_seven' OR cvterm.name = 'schellmann_loop_six' OR cvterm.name = 'schellmann_loop';

--- ************************************************
--- *** relation: schellmann_loop_seven ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Wild type: A motif of seven consecutive  ***
--- *** residues that contains two H-bonds in wh ***
--- *** ich: the main-chain CO of residue(i) is  ***
--- *** H-bonded to the main-chain NH of residue ***
--- *** (i+6), the main-chain CO of residue(i+1) ***
--- ***  is H-bonded to the main-chain NH of res ***
--- *** idue(i+5).                               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: schellmann_loop_six ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Common Type: A motif of six consecutive  ***
--- *** residues that contains two H-bonds in wh ***
--- *** ich: the main-chain CO of residue(i) is  ***
--- *** H-bonded to the main-chain NH of residue ***
--- *** (i+5) the main-chain CO of residue(i+1)  ***
--- *** is H-bonded to the main-chain NH of resi ***
--- *** due(i+4).                                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: serine_threonine_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of five consecutive residues and ***
--- ***  two hydrogen bonds in which: residue(i) ***
--- ***  is Serine (S) or Threonine (T), the sid ***
--- *** e-chain O of residue(i) is H-bonded to t ***
--- *** he main-chain NH of residue(i+2) or (i+3 ***
--- *** ) , the main-chain CO group of residue(i ***
--- *** ) is H-bonded to the main-chain NH of re ***
--- *** sidue(i+3) or (i+4).                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: serine_threonine_staple_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of four or five consecutive resi ***
--- *** dues and one H-bond in which: residue(i) ***
--- ***  is Serine (S) or Threonine (T), the sid ***
--- *** e-chain OH of residue(i) is H-bonded to  ***
--- *** the main-chain CO of residue(i3) or (i4) ***
--- *** , Phi angles of residues(i1), (i2) and ( ***
--- *** i3) are negative.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide_turn_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A reversal in the direction of the backb ***
--- *** one of a protein that is stabilized by h ***
--- *** ydrogen bond between backbone NH and CO  ***
--- *** groups, involving no more than 4 amino a ***
--- *** cid residues.                            ***
--- ************************************************
---

CREATE VIEW polypeptide_turn_motif AS
  SELECT
    feature_id AS polypeptide_turn_motif_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'polypeptide_turn_motif';

--- ************************************************
--- *** relation: asx_turn_left_handed_type_one ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Left handed type I (dihedral angles):- R ***
--- *** esidue(i): -140 degrees < chi (1) -120 d ***
--- *** egrees < -20 degrees, -90 degrees < psi  ***
--- *** +120 degrees < +40 degrees. Residue(i+1) ***
--- *** : -140 degrees < phi < -20 degrees, -90  ***
--- *** degrees < psi < +40 degrees.             ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: asx_turn_left_handed_type_two ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Left handed type II (dihedral angles):-  ***
--- *** Residue(i): -140 degrees < chi (1) -120  ***
--- *** degrees < -20 degrees, +80 degrees < psi ***
--- ***  +120 degrees < +180 degrees. Residue(i+ ***
--- *** 1): +20 degrees < phi < +140 degrees, -4 ***
--- *** 0 degrees < psi < +90 degrees.           ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: asx_turn_right_handed_type_two ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Right handed type II (dihedral angles):- ***
--- ***  Residue(i): -140 degrees < chi (1) -120 ***
--- ***  degrees < -20 degrees, +80 degrees < ps ***
--- *** i +120 degrees < +180 degrees. Residue(i ***
--- *** +1): +20 degrees < phi < +140 degrees, - ***
--- *** 40 degrees < psi < +90 degrees.          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: asx_turn_right_handed_type_one ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Right handed type I (dihedral angles):-  ***
--- *** Residue(i): -140 degrees < chi (1) -120  ***
--- *** degrees < -20 degrees, -90 degrees < psi ***
--- ***  +120 degrees < +40 degrees. Residue(i+1 ***
--- *** ): -140 degrees < phi < -20 degrees, -90 ***
--- ***  degrees < psi < +40 degrees.            ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: beta_turn ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of four consecutive residues tha ***
--- *** t may contain one H-bond, which, if pres ***
--- *** ent, is between the main-chain CO of the ***
--- ***  first residue and the main-chain NH of  ***
--- *** the fourth. It is characterized by the d ***
--- *** ihedral angles of the second and third r ***
--- *** esidues, which are the basis for sub-cat ***
--- *** egorization.                             ***
--- ************************************************
---

CREATE VIEW beta_turn AS
  SELECT
    feature_id AS beta_turn_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'beta_turn';

--- ************************************************
--- *** relation: beta_turn_left_handed_type_one ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Left handed type I:A motif of four conse ***
--- *** cutive residues that may contain one H-b ***
--- *** ond, which, if present, is between the m ***
--- *** ain-chain CO of the first residue and th ***
--- *** e main-chain NH of the fourth. It is cha ***
--- *** racterized by the dihedral angles:- Resi ***
--- *** due(i+1): -140 degrees > phi > -20 degre ***
--- *** es, -90 degrees > psi > +40 degrees. Res ***
--- *** idue(i+2): -140 degrees > phi > -20 degr ***
--- *** ees, -90 degrees > psi > +40 degrees.    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: beta_turn_left_handed_type_two ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Left handed type II: A motif of four con ***
--- *** secutive residues that may contain one H ***
--- *** -bond, which, if present, is between the ***
--- ***  main-chain CO of the first residue and  ***
--- *** the main-chain NH of the fourth. It is c ***
--- *** haracterized by the dihedral angles: Res ***
--- *** idue(i+1): -140 degrees > phi > -20 degr ***
--- *** ees, +80 degrees > psi > +180 degrees. R ***
--- *** esidue(i+2): +20 degrees > phi > +140 de ***
--- *** grees, -40 degrees > psi > +90 degrees.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: beta_turn_right_handed_type_one ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Right handed type I:A motif of four cons ***
--- *** ecutive residues that may contain one H- ***
--- *** bond, which, if present, is between the  ***
--- *** main-chain CO of the first residue and t ***
--- *** he main-chain NH of the fourth. It is ch ***
--- *** aracterized by the dihedral angles: Resi ***
--- *** due(i+1): -140 degrees < phi < -20 degre ***
--- *** es, -90 degrees < psi < +40 degrees. Res ***
--- *** idue(i+2): -140 degrees < phi < -20 degr ***
--- *** ees, -90 degrees < psi < +40 degrees.    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: beta_turn_right_handed_type_two ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Right handed type II:A motif of four con ***
--- *** secutive residues that may contain one H ***
--- *** -bond, which, if present, is between the ***
--- ***  main-chain CO of the first residue and  ***
--- *** the main-chain NH of the fourth. It is c ***
--- *** haracterized by the dihedral angles: Res ***
--- *** idue(i+1): -140 degrees < phi < -20 degr ***
--- *** ees, +80 degrees < psi < +180 degrees. R ***
--- *** esidue(i+2): +20 degrees < phi < +140 de ***
--- *** grees, -40 degrees < psi < +90 degrees.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gamma_turn ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Gamma turns, defined for 3 residues i,(  ***
--- *** i+1),( i+2) if a hydrogen bond exists be ***
--- *** tween residues i and i+2 and the phi and ***
--- ***  psi angles of residue i+1 fall within 4 ***
--- *** 0 degrees.                               ***
--- ************************************************
---

CREATE VIEW gamma_turn AS
  SELECT
    feature_id AS gamma_turn_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gamma_turn_classic' OR cvterm.name = 'gamma_turn_inverse' OR cvterm.name = 'gamma_turn';

--- ************************************************
--- *** relation: gamma_turn_classic ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Gamma turns, defined for 3 residues i, i ***
--- *** +1, i+2 if a hydrogen bond exists betwee ***
--- *** n residues i and i+2 and the phi and psi ***
--- ***  angles of residue i+1 fall within 40 de ***
--- *** grees: phi(i+1)=75.0 - psi(i+1)=-64.0.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gamma_turn_inverse ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Gamma turns, defined for 3 residues i, i ***
--- *** +1, i+2 if a hydrogen bond exists betwee ***
--- *** n residues i and i+2 and the phi and psi ***
--- ***  angles of residue i+1 fall within 40 de ***
--- *** grees: phi(i+1)=-79.0 - psi(i+1)=69.0.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: serine_threonine_turn ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of three consecutive residues an ***
--- *** d one H-bond in which: residue(i) is Ser ***
--- *** ine (S) or Threonine (T), the side-chain ***
--- ***  O of residue(i) is H-bonded to the main ***
--- *** -chain NH of residue(i+2).               ***
--- ************************************************
---

CREATE VIEW serine_threonine_turn AS
  SELECT
    feature_id AS serine_threonine_turn_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'serine_threonine_turn';

--- ************************************************
--- *** relation: st_turn_left_handed_type_one ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The peptide twists in an anticlockwise,  ***
--- *** left handed manner. The dihedral angles  ***
--- *** for this turn are: Residue(i): -140 degr ***
--- *** ees < chi(1) -120 degrees < -20 degrees, ***
--- ***  -90 degrees psi +120 degrees < +40 degr ***
--- *** ees, residue(i+1): -140 degrees < phi <  ***
--- *** -20 degrees, -90 < psi < +40 degrees.    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: st_turn_left_handed_type_two ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The peptide twists in an anticlockwise,  ***
--- *** left handed manner. The dihedral angles  ***
--- *** for this turn are: Residue(i): -140 degr ***
--- *** ees < chi(1) -120 degrees < -20 degrees, ***
--- ***  +80 degrees psi +120 degrees < +180 deg ***
--- *** rees, residue(i+1): +20 degrees < phi <  ***
--- *** +140 degrees, -40 < psi < +90 degrees.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: st_turn_right_handed_type_one ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The peptide twists in an clockwise, righ ***
--- *** t handed manner. The dihedral angles for ***
--- ***  this turn are: Residue(i): -140 degrees ***
--- ***  < chi(1) -120 degrees < -20 degrees, -9 ***
--- *** 0 degrees psi +120 degrees < +40 degrees ***
--- *** , residue(i+1): -140 degrees < phi < -20 ***
--- ***  degrees, -90 < psi < +40 degrees.       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: st_turn_right_handed_type_two ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The peptide twists in an clockwise, righ ***
--- *** t handed manner. The dihedral angles for ***
--- ***  this turn are: Residue(i): -140 degrees ***
--- ***  < chi(1) -120 degrees < -20 degrees, +8 ***
--- *** 0 degrees psi +120 degrees < +180 degree ***
--- *** s, residue(i+1): +20 degrees < phi < +14 ***
--- *** 0 degrees, -40 < psi < +90 degrees.      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polypeptide_variation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A site of sequence variation (alteration ***
--- *** ). Alternative sequence due to naturally ***
--- ***  occuring events such as polymorphisms a ***
--- *** nd altermatve splicing or experimental m ***
--- *** ethods such as site directed mutagenesis ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW polypeptide_variation_site AS
  SELECT
    feature_id AS polypeptide_variation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'natural_variant_site' OR cvterm.name = 'mutated_variant_site' OR cvterm.name = 'alternate_sequence_site' OR cvterm.name = 'polypeptide_variation_site';

--- ************************************************
--- *** relation: natural_variant_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Describes the natural sequence variants  ***
--- *** due to polymorphisms, disease-associated ***
--- ***  mutations, RNA editing and variations b ***
--- *** etween strains, isolates or cultivars.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: mutated_variant_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Site which has been experimentally alter ***
--- *** ed.                                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: alternate_sequence_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Description of sequence variants produce ***
--- *** d by alternative splicing, alternative p ***
--- *** romoter usage, alternative initiation an ***
--- *** d ribosomal frameshifting.               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: beta_turn_type_six ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of four consecutive peptide resi ***
--- *** des of type VIa or type VIb and where th ***
--- *** e i+2 residue is cis-proline.            ***
--- ************************************************
---

CREATE VIEW beta_turn_type_six AS
  SELECT
    feature_id AS beta_turn_type_six_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'beta_turn_type_six';

--- ************************************************
--- *** relation: beta_turn_type_six_a ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of four consecutive peptide resi ***
--- *** dues, of which the i+2 residue is prolin ***
--- *** e, and that may contain one H-bond, whic ***
--- *** h, if present, is between the main-chain ***
--- ***  CO of the first residue and the main-ch ***
--- *** ain NH of the fourth and is characterize ***
--- *** d by the dihedral angles: Residue(i+1):  ***
--- *** phi ~ -60 degrees, psi ~ 120 degrees. Re ***
--- *** sidue(i+2): phi ~ -90 degrees, psi ~ 0 d ***
--- *** egrees.                                  ***
--- ************************************************
---

CREATE VIEW beta_turn_type_six_a AS
  SELECT
    feature_id AS beta_turn_type_six_a_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'beta_turn_type_six_a_one' OR cvterm.name = 'beta_turn_type_six_a_two' OR cvterm.name = 'beta_turn_type_six_a';

--- ************************************************
--- *** relation: beta_turn_type_six_a_one ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: beta_turn_type_six_a_two ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: beta_turn_type_six_b ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of four consecutive peptide resi ***
--- *** dues, of which the i+2 residue is prolin ***
--- *** e, and that may contain one H-bond, whic ***
--- *** h, if present, is between the main-chain ***
--- ***  CO of the first residue and the main-ch ***
--- *** ain NH of the fourth and is characterize ***
--- *** d by the dihedral angles: Residue(i+1):  ***
--- *** phi ~ -120 degrees, psi ~ 120 degrees. R ***
--- *** esidue(i+2): phi ~ -60 degrees, psi ~ 0  ***
--- *** degrees.                                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: beta_turn_type_eight ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A motif of four consecutive peptide resi ***
--- *** dues that may contain one H-bond, which, ***
--- ***  if present, is between the main-chain C ***
--- *** O of the first residue and the main-chai ***
--- *** n NH of the fourth and is characterized  ***
--- *** by the dihedral angles: Residue(i+1): ph ***
--- *** i ~ -60 degrees, psi ~ -30 degrees. Resi ***
--- *** due(i+2): phi ~ -120 degrees, psi ~ 120  ***
--- *** degrees.                                 ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dre_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence element characteristic of som ***
--- *** e RNA polymerase II promoters, usually l ***
--- *** ocated between -10 and -60 relative to t ***
--- *** he TSS. Consensus sequence is WATCGATW.  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dmv4_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence element characteristic of som ***
--- *** e RNA polymerase II promoters, located i ***
--- *** mmediately upstream of some TATA box ele ***
--- *** ments with respect to the TSS (+1). Cons ***
--- *** ensus sequence is YGGTCACACTR. Marked sp ***
--- *** atial preference within core promoter; t ***
--- *** end to occur near the TSS, although not  ***
--- *** as tightly as INR (SO:0000014).          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: e_box_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence element characteristic of som ***
--- *** e RNA polymerase II promoters, usually l ***
--- *** ocated between -60 and +1 relative to th ***
--- *** e TSS. Consensus sequence is AWCAGCTGWT. ***
--- ***  Tends to co-occur with DMv2 (SO:0001161 ***
--- *** ). Tends to not occur with DPE motif (SO ***
--- *** :0000015).                               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dmv5_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence element characteristic of som ***
--- *** e RNA polymerase II promoters, usually l ***
--- *** ocated between -50 and -10 relative to t ***
--- *** he TSS. Consensus sequence is KTYRGTATWT ***
--- *** TT. Tends to co-occur with DMv4 (SO:0001 ***
--- *** 157) . Tends to not occur with DPE motif ***
--- ***  (SO:0000015) or MTE (SO:0001162).       ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dmv3_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence element characteristic of som ***
--- *** e RNA polymerase II promoters, usually l ***
--- *** ocated between -30 and +15 relative to t ***
--- *** he TSS. Consensus sequence is KNNCAKCNCT ***
--- *** RNY. Tends to co-occur with DMv2 (SO:000 ***
--- *** 1161). Tends to not occur with DPE motif ***
--- ***  (SO:0000015) or MTE (0001162).          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dmv2_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence element characteristic of som ***
--- *** e RNA polymerase II promoters, usually l ***
--- *** ocated between -60 and -45 relative to t ***
--- *** he TSS. Consensus sequence is MKSYGGCARC ***
--- *** GSYSS. Tends to co-occur with DMv3 (SO:0 ***
--- *** 001160). Tends to not occur with DPE mot ***
--- *** if (SO:0000015) or MTE (SO:0001162).     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: mte ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence element characteristic of som ***
--- *** e RNA polymerase II promoters, usually l ***
--- *** ocated between +20 and +30 relative to t ***
--- *** he TSS. Consensus sequence is CSARCSSAAC ***
--- *** GS. Tends to co-occur with INR motif (SO ***
--- *** :0000014). Tends to not occur with DPE m ***
--- *** otif (SO:0000015) or DMv5 (SO:0001159).  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: inr1_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A promoter motif with consensus sequence ***
--- ***  TCATTCG.                                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dpe1_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A promoter motif with consensus sequence ***
--- ***  CGGACGT.                                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dmv1_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A promoter motif with consensus sequence ***
--- ***  CARCCCT.                                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: gaga_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A non directional promoter motif with co ***
--- *** nsensus sequence GAGAGCG.                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: ndm2_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A non directional promoter motif with co ***
--- *** nsensus CGMYGYCR.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: ndm3_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A non directional promoter motif with co ***
--- *** nsensus sequence GAAAGCT.                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: ds_rna_viral_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A ds_RNA_viral_sequence is a viral_seque ***
--- *** nce that is the sequence of a virus that ***
--- ***  exists as double stranded RNA.          ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: polinton ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of DNA transposon that populates  ***
--- *** the genomes of protists, fungi, and anim ***
--- *** als, characterized by a unique set of pr ***
--- *** oteins necessary for their transposition ***
--- *** , including a protein-primed DNA polymer ***
--- *** ase B, retroviral integrase, cysteine pr ***
--- *** otease, and ATPase. Polintons are charac ***
--- *** terized by 6-bp target site duplications ***
--- *** , terminal-inverted repeats that are sev ***
--- *** eral hundred nucleotides long, and 5'-AG ***
--- ***  and TC-3' termini. Polintons exist as a ***
--- *** utonomous and nonautonomous elements.    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: rrna_21s ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A component of the large ribosomal subun ***
--- *** it in mitochondrial rRNA.                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: trna_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of a tRNA.                      ***
--- ************************************************
---

CREATE VIEW trna_region AS
  SELECT
    feature_id AS trna_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'tRNA_region';

--- ************************************************
--- *** relation: anticodon_loop ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence of seven nucleotide bases in  ***
--- *** tRNA which contains the anticodon. It ha ***
--- *** s the sequence 5'-pyrimidine-purine-anti ***
--- *** codon-modified purine-any base-3.        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: anticodon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence of three nucleotide bases in  ***
--- *** tRNA which recognizes a codon in mRNA.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: cca_tail ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Base sequence at the 3' end of a tRNA. T ***
--- *** he 3'-hydroxyl group on the terminal ade ***
--- *** nosine is the attachment point for the a ***
--- *** mino acid.                               ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: dhu_loop ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Non-base-paired sequence of nucleotide b ***
--- *** ases in tRNA. It contains several dihydr ***
--- *** ouracil residues.                        ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: t_loop ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Non-base-paired sequence of three nucleo ***
--- *** tide bases in tRNA. It has sequence T-Ps ***
--- *** i-C.                                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: pyrrolysine_trna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding pyrrolysyl ***
--- ***  tRNA (SO:0000766).                      ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: u3_snorna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** U3 snoRNA is a member of the box C/D cla ***
--- *** ss of small nucleolar RNAs. The U3 snoRN ***
--- *** A secondary structure is characterised b ***
--- *** y a small 5' domain (with boxes A and A' ***
--- *** ), and a larger 3' domain (with boxes B, ***
--- ***  C, C', and D), the two domains being li ***
--- *** nked by a single-stranded hinge. Boxes B ***
--- ***  and C form the B/C motif, which appears ***
--- ***  to be exclusive to U3 snoRNAs, and boxe ***
--- *** s C' and D form the C'/D motif. The latt ***
--- *** er is functionally similar to the C/D mo ***
--- *** tifs found in other snoRNAs. The 5' doma ***
--- *** in and the hinge region act as a pre-rRN ***
--- *** A-binding domain. The 3' domain has cons ***
--- *** erved protein-binding sites. Both the bo ***
--- *** x B/C and box C'/D motifs are sufficient ***
--- ***  for nuclear retention of U3 snoRNA. The ***
--- ***  box C'/D motif is also necessary for nu ***
--- *** cleolar localization, stability and hype ***
--- *** rmethylation of U3 snoRNA. Both box B/C  ***
--- *** and C'/D motifs are involved in specific ***
--- ***  protein interactions and are necessary  ***
--- *** for the rRNA processing functions of U3  ***
--- *** snoRNA.                                  ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: au_rich_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A cis-acting element found in the 3' UTR ***
--- ***  of some mRNA which is rich in AUUUA pen ***
--- *** tamers. Messenger RNAs bearing multiple  ***
--- *** AU-rich elements are often unstable.     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: bruno_response_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A cis-acting element found in the 3' UTR ***
--- ***  of some mRNA which is bound by the Dros ***
--- *** ophila Bruno protein and its homologs.   ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: iron_responsive_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A regulatory sequence found in the 5' an ***
--- *** d 3' UTRs of many mRNAs which encode iro ***
--- *** n-binding proteins. It has a hairpin str ***
--- *** ucture and is recognized by trans-acting ***
--- ***  proteins known as iron-regulatory prote ***
--- *** ins.                                     ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: morpholino_backbone ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a sequence compo ***
--- *** sed of nucleobases bound to a morpholino ***
--- ***  backbone. A morpholino backbone consist ***
--- *** s of morpholine (CHEBI:34856) rings conn ***
--- *** ected by phosphorodiamidate linkages.    ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: pna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a sequence compo ***
--- *** sed of peptide nucleic acid (CHEBI:48021 ***
--- *** ), a chemical consisting of nucleobases  ***
--- *** bound to a backbone composed of repeatin ***
--- *** g N-(2-aminoethyl)-glycine units linked  ***
--- *** by peptide bonds. The purine and pyrimid ***
--- *** ine bases are linked to the backbone by  ***
--- *** methylene carbonyl bonds.                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: enzymatic ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing the sequence of  ***
--- *** a transcript that has catalytic activity ***
--- ***  with or without an associated ribonucle ***
--- *** oprotein.                                ***
--- ************************************************
---

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

--- ************************************************
--- *** relation: ribozymic ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing the sequence of  ***
--- *** a transcript that has catalytic activity ***
--- ***  even without an associated ribonucleopr ***
--- *** otein.                                   ***
--- ************************************************
---

CREATE VIEW ribozymic AS
  SELECT
    feature_id AS ribozymic_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'ribozymic';

--- ************************************************
--- *** relation: pseudouridylation_guide_snorna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A snoRNA that specifies the site of pseu ***
--- *** douridylation in an RNA molecule by base ***
--- ***  pairing with a short sequence around th ***
--- *** e target residue.                        ***
--- ************************************************
---

CREATE VIEW pseudouridylation_guide_snorna AS
  SELECT
    feature_id AS pseudouridylation_guide_snorna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'pseudouridylation_guide_snoRNA';

--- ************************************************
--- *** relation: lna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a sequence consi ***
--- *** sting of nucleobases attached to a repea ***
--- *** ting unit made of 'locked' deoxyribose r ***
--- *** ings connected to a phosphate backbone.  ***
--- *** The deoxyribose unit's conformation is ' ***
--- *** locked' by a 2'-C,4'-C-oxymethylene link ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW lna AS
  SELECT
    feature_id AS lna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'LNA';

--- ************************************************
--- *** relation: lna_oligo ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An oligo composed of LNA residues.       ***
--- ************************************************
---

CREATE VIEW lna_oligo AS
  SELECT
    feature_id AS lna_oligo_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'LNA_oligo';

--- ************************************************
--- *** relation: tna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a sequence consi ***
--- *** sting of nucleobases attached to a repea ***
--- *** ting unit made of threose rings connecte ***
--- *** d to a phosphate backbone.               ***
--- ************************************************
---

CREATE VIEW tna AS
  SELECT
    feature_id AS tna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'TNA';

--- ************************************************
--- *** relation: tna_oligo ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An oligo composed of TNA residues.       ***
--- ************************************************
---

CREATE VIEW tna_oligo AS
  SELECT
    feature_id AS tna_oligo_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'TNA_oligo';

--- ************************************************
--- *** relation: gna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a sequence consi ***
--- *** sting of nucleobases attached to a repea ***
--- *** ting unit made of an acyclic three-carbo ***
--- *** n propylene glycol connected to a phosph ***
--- *** ate backbone. It has two enantiomeric fo ***
--- *** rms, (R)-GNA and (S)-GNA.                ***
--- ************************************************
---

CREATE VIEW gna AS
  SELECT
    feature_id AS gna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'R_GNA' OR cvterm.name = 'S_GNA' OR cvterm.name = 'GNA';

--- ************************************************
--- *** relation: gna_oligo ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An oligo composed of GNA residues.       ***
--- ************************************************
---

CREATE VIEW gna_oligo AS
  SELECT
    feature_id AS gna_oligo_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'R_GNA_oligo' OR cvterm.name = 'S_GNA_oligo' OR cvterm.name = 'GNA_oligo';

--- ************************************************
--- *** relation: r_gna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a GNA sequence i ***
--- *** n the (R)-GNA enantiomer.                ***
--- ************************************************
---

CREATE VIEW r_gna AS
  SELECT
    feature_id AS r_gna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'R_GNA';

--- ************************************************
--- *** relation: r_gna_oligo ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An oligo composed of (R)-GNA residues.   ***
--- ************************************************
---

CREATE VIEW r_gna_oligo AS
  SELECT
    feature_id AS r_gna_oligo_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'R_GNA_oligo';

--- ************************************************
--- *** relation: s_gna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a GNA sequence i ***
--- *** n the (S)-GNA enantiomer.                ***
--- ************************************************
---

CREATE VIEW s_gna AS
  SELECT
    feature_id AS s_gna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'S_GNA';

--- ************************************************
--- *** relation: s_gna_oligo ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An oligo composed of (S)-GNA residues.   ***
--- ************************************************
---

CREATE VIEW s_gna_oligo AS
  SELECT
    feature_id AS s_gna_oligo_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'S_GNA_oligo';

--- ************************************************
--- *** relation: ds_dna_viral_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A ds_DNA_viral_sequence is a viral_seque ***
--- *** nce that is the sequence of a virus that ***
--- ***  exists as double stranded DNA.          ***
--- ************************************************
---

CREATE VIEW ds_dna_viral_sequence AS
  SELECT
    feature_id AS ds_dna_viral_sequence_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'ds_DNA_viral_sequence';

--- ************************************************
--- *** relation: ss_rna_viral_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A ss_RNA_viral_sequence is a viral_seque ***
--- *** nce that is the sequence of a virus that ***
--- ***  exists as single stranded RNA.          ***
--- ************************************************
---

CREATE VIEW ss_rna_viral_sequence AS
  SELECT
    feature_id AS ss_rna_viral_sequence_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'ss_RNA_viral_sequence';

--- ************************************************
--- *** relation: negative_sense_ssrna_viral_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A negative_sense_RNA_viral_sequence is a ***
--- ***  ss_RNA_viral_sequence that is the seque ***
--- *** nce of a single stranded RNA virus that  ***
--- *** is complementary to mRNA and must be con ***
--- *** verted to positive sense RNA by RNA poly ***
--- *** merase before translation.               ***
--- ************************************************
---

CREATE VIEW negative_sense_ssrna_viral_sequence AS
  SELECT
    feature_id AS negative_sense_ssrna_viral_sequence_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'negative_sense_ssRNA_viral_sequence';

--- ************************************************
--- *** relation: positive_sense_ssrna_viral_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A positive_sense_RNA_viral_sequence is a ***
--- ***  ss_RNA_viral_sequence that is the seque ***
--- *** nce of a single stranded RNA virus that  ***
--- *** can be immediately translated by the hos ***
--- *** t.                                       ***
--- ************************************************
---

CREATE VIEW positive_sense_ssrna_viral_sequence AS
  SELECT
    feature_id AS positive_sense_ssrna_viral_sequence_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'positive_sense_ssRNA_viral_sequence';

--- ************************************************
--- *** relation: ambisense_ssrna_viral_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A ambisense_RNA_virus is a ss_RNA_viral_ ***
--- *** sequence that is the sequence of a singl ***
--- *** e stranded RNA virus with both messenger ***
--- ***  and anti messenger polarity.            ***
--- ************************************************
---

CREATE VIEW ambisense_ssrna_viral_sequence AS
  SELECT
    feature_id AS ambisense_ssrna_viral_sequence_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'ambisense_ssRNA_viral_sequence';

--- ************************************************
--- *** relation: rna_polymerase_promoter ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region (DNA) to which RNA polymerase b ***
--- *** inds, to begin transcription.            ***
--- ************************************************
---

CREATE VIEW rna_polymerase_promoter AS
  SELECT
    feature_id AS rna_polymerase_promoter_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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_II_core_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 = 'bacterial_RNApol_promoter_sigma_70' OR cvterm.name = 'bacterial_RNApol_promoter_sigma54' OR cvterm.name = 'SP6_RNA_Polymerase_Promoter' OR cvterm.name = 'T3_RNA_Polymerase_Promoter' OR cvterm.name = 'T7_RNA_Polymerase_Promoter' OR cvterm.name = 'RNA_polymerase_promoter';

--- ************************************************
--- *** relation: phage_rna_polymerase_promoter ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region (DNA) to which Bacteriophage RN ***
--- *** A polymerase binds, to begin transcripti ***
--- *** on.                                      ***
--- ************************************************
---

CREATE VIEW phage_rna_polymerase_promoter AS
  SELECT
    feature_id AS phage_rna_polymerase_promoter_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'SP6_RNA_Polymerase_Promoter' OR cvterm.name = 'T3_RNA_Polymerase_Promoter' OR cvterm.name = 'T7_RNA_Polymerase_Promoter' OR cvterm.name = 'Phage_RNA_Polymerase_Promoter';

--- ************************************************
--- *** relation: sp6_rna_polymerase_promoter ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region (DNA) to which the SP6 RNA poly ***
--- *** merase binds, to begin transcription.    ***
--- ************************************************
---

CREATE VIEW sp6_rna_polymerase_promoter AS
  SELECT
    feature_id AS sp6_rna_polymerase_promoter_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'SP6_RNA_Polymerase_Promoter';

--- ************************************************
--- *** relation: t3_rna_polymerase_promoter ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A DNA sequence to which the T3 RNA polym ***
--- *** erase binds, to begin transcription.     ***
--- ************************************************
---

CREATE VIEW t3_rna_polymerase_promoter AS
  SELECT
    feature_id AS t3_rna_polymerase_promoter_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'T3_RNA_Polymerase_Promoter';

--- ************************************************
--- *** relation: t7_rna_polymerase_promoter ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region (DNA) to which the T7 RNA polym ***
--- *** erase binds, to begin transcription.     ***
--- ************************************************
---

CREATE VIEW t7_rna_polymerase_promoter AS
  SELECT
    feature_id AS t7_rna_polymerase_promoter_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'T7_RNA_Polymerase_Promoter';

--- ************************************************
--- *** relation: five_prime_est ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An EST read from the 5' end of a transcr ***
--- *** ipt that usually codes for a protein. Th ***
--- *** ese regions tend to be conserved across  ***
--- *** species and do not change much within a  ***
--- *** gene family.                             ***
--- ************************************************
---

CREATE VIEW five_prime_est AS
  SELECT
    feature_id AS five_prime_est_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_prime_EST';

--- ************************************************
--- *** relation: three_prime_est ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An EST read from the 3' end of a transcr ***
--- *** ipt. They are more likely to fall within ***
--- ***  non-coding, or untranslated regions(UTR ***
--- *** s).                                      ***
--- ************************************************
---

CREATE VIEW three_prime_est AS
  SELECT
    feature_id AS three_prime_est_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'three_prime_EST';

--- ************************************************
--- *** relation: translational_frameshift ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The region of mRNA (not divisible by 3 b ***
--- *** ases) that is skipped during the process ***
--- ***  of translational frameshifting (GO:0006 ***
--- *** 452), causing the reading frame to be di ***
--- *** fferent.                                 ***
--- ************************************************
---

CREATE VIEW translational_frameshift AS
  SELECT
    feature_id AS translational_frameshift_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'plus_1_translational_frameshift' OR cvterm.name = 'plus_2_translational_frameshift' OR cvterm.name = 'translational_frameshift';

--- ************************************************
--- *** relation: plus_1_translational_frameshift ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The region of mRNA 1 base long that is s ***
--- *** kipped during the process of translation ***
--- *** al frameshifting (GO:0006452), causing t ***
--- *** he reading frame to be different.        ***
--- ************************************************
---

CREATE VIEW plus_1_translational_frameshift AS
  SELECT
    feature_id AS plus_1_translational_frameshift_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'plus_1_translational_frameshift';

--- ************************************************
--- *** relation: plus_2_translational_frameshift ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The region of mRNA 2 bases long that is  ***
--- *** skipped during the process of translatio ***
--- *** nal frameshifting (GO:0006452), causing  ***
--- *** the reading frame to be different.       ***
--- ************************************************
---

CREATE VIEW plus_2_translational_frameshift AS
  SELECT
    feature_id AS plus_2_translational_frameshift_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'plus_2_translational_frameshift';

--- ************************************************
--- *** relation: group_iii_intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Group III introns are introns found in t ***
--- *** he mRNA of the plastids of euglenoid pro ***
--- *** tists. They are spliced by a two step tr ***
--- *** ansesterification with bulged adenosine  ***
--- *** as initiating nucleophile.               ***
--- ************************************************
---

CREATE VIEW group_iii_intron AS
  SELECT
    feature_id AS group_iii_intron_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'group_III_intron';

--- ************************************************
--- *** relation: noncoding_region_of_exon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The maximal intersection of exon and UTR ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW noncoding_region_of_exon AS
  SELECT
    feature_id AS noncoding_region_of_exon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'three_prime_coding_exon_noncoding_region' OR cvterm.name = 'five_prime_coding_exon_noncoding_region' OR cvterm.name = 'noncoding_region_of_exon';

--- ************************************************
--- *** relation: coding_region_of_exon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The region of an exon that encodes for p ***
--- *** rotein sequence.                         ***
--- ************************************************
---

CREATE VIEW coding_region_of_exon AS
  SELECT
    feature_id AS coding_region_of_exon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_prime_coding_exon_coding_region' OR cvterm.name = 'three_prime_coding_exon_coding_region' OR cvterm.name = 'coding_region_of_exon';

--- ************************************************
--- *** relation: endonuclease_spliced_intron ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An intron that spliced via endonucleolyt ***
--- *** ic cleavage and ligation rather than tra ***
--- *** nsesterification.                        ***
--- ************************************************
---

CREATE VIEW endonuclease_spliced_intron AS
  SELECT
    feature_id AS endonuclease_spliced_intron_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'archaeal_intron' OR cvterm.name = 'tRNA_intron' OR cvterm.name = 'endonuclease_spliced_intron';

--- ************************************************
--- *** relation: protein_coding_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW protein_coding_gene AS
  SELECT
    feature_id AS protein_coding_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'protein_coding_gene';

--- ************************************************
--- *** relation: transgenic_insertion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An insertion that derives from another o ***
--- *** rganism, via the use of recombinant DNA  ***
--- *** technology.                              ***
--- ************************************************
---

CREATE VIEW transgenic_insertion AS
  SELECT
    feature_id AS transgenic_insertion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'transgenic_insertion';

--- ************************************************
--- *** relation: retrogene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW retrogene AS
  SELECT
    feature_id AS retrogene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'retrogene';

--- ************************************************
--- *** relation: silenced_by_rna_interference ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing an epigenetic pr ***
--- *** ocess where a gene is inactivated by RNA ***
--- ***  interference.                           ***
--- ************************************************
---

CREATE VIEW silenced_by_rna_interference AS
  SELECT
    feature_id AS silenced_by_rna_interference_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'silenced_by_RNA_interference';

--- ************************************************
--- *** relation: silenced_by_histone_modification ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing an epigenetic pr ***
--- *** ocess where a gene is inactivated by his ***
--- *** tone modification.                       ***
--- ************************************************
---

CREATE VIEW silenced_by_histone_modification AS
  SELECT
    feature_id AS silenced_by_histone_modification_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'silenced_by_histone_methylation' OR cvterm.name = 'silenced_by_histone_deacetylation' OR cvterm.name = 'silenced_by_histone_modification';

--- ************************************************
--- *** relation: silenced_by_histone_methylation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing an epigenetic pr ***
--- *** ocess where a gene is inactivated by his ***
--- *** tone methylation.                        ***
--- ************************************************
---

CREATE VIEW silenced_by_histone_methylation AS
  SELECT
    feature_id AS silenced_by_histone_methylation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'silenced_by_histone_methylation';

--- ************************************************
--- *** relation: silenced_by_histone_deacetylation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing an epigenetic pr ***
--- *** ocess where a gene is inactivated by his ***
--- *** tone deacetylation.                      ***
--- ************************************************
---

CREATE VIEW silenced_by_histone_deacetylation AS
  SELECT
    feature_id AS silenced_by_histone_deacetylation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'silenced_by_histone_deacetylation';

--- ************************************************
--- *** relation: gene_silenced_by_rna_interference ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is silenced by RNA interfere ***
--- *** nce.                                     ***
--- ************************************************
---

CREATE VIEW gene_silenced_by_rna_interference AS
  SELECT
    feature_id AS gene_silenced_by_rna_interference_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gene_silenced_by_RNA_interference';

--- ************************************************
--- *** relation: gene_silenced_by_histone_modification ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is silenced by histone modif ***
--- *** ication.                                 ***
--- ************************************************
---

CREATE VIEW gene_silenced_by_histone_modification AS
  SELECT
    feature_id AS gene_silenced_by_histone_modification_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gene_silenced_by_histone_methylation' OR cvterm.name = 'gene_silenced_by_histone_deacetylation' OR cvterm.name = 'gene_silenced_by_histone_modification';

--- ************************************************
--- *** relation: gene_silenced_by_histone_methylation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is silenced by histone methy ***
--- *** lation.                                  ***
--- ************************************************
---

CREATE VIEW gene_silenced_by_histone_methylation AS
  SELECT
    feature_id AS gene_silenced_by_histone_methylation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gene_silenced_by_histone_methylation';

--- ************************************************
--- *** relation: gene_silenced_by_histone_deacetylation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that is silenced by histone deace ***
--- *** tylation.                                ***
--- ************************************************
---

CREATE VIEW gene_silenced_by_histone_deacetylation AS
  SELECT
    feature_id AS gene_silenced_by_histone_deacetylation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gene_silenced_by_histone_deacetylation';

--- ************************************************
--- *** relation: dihydrouridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A modified RNA base in which the 5,6-dih ***
--- *** ydrouracil is bound to the ribose ring.  ***
--- ************************************************
---

CREATE VIEW dihydrouridine AS
  SELECT
    feature_id AS dihydrouridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'dihydrouridine';

--- ************************************************
--- *** relation: pseudouridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A modified RNA base in which the 5- posi ***
--- *** tion of the uracil is bound to the ribos ***
--- *** e ring instead of the 4- position.       ***
--- ************************************************
---

CREATE VIEW pseudouridine AS
  SELECT
    feature_id AS pseudouridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'pseudouridine';

--- ************************************************
--- *** relation: inosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A modified RNA base in which hypoxanthin ***
--- *** e is bound to the ribose ring.           ***
--- ************************************************
---

CREATE VIEW inosine AS
  SELECT
    feature_id AS inosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'inosine';

--- ************************************************
--- *** relation: seven_methylguanine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A modified RNA base in which guanine is  ***
--- *** methylated at the 7- position.           ***
--- ************************************************
---

CREATE VIEW seven_methylguanine AS
  SELECT
    feature_id AS seven_methylguanine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'seven_methylguanine';

--- ************************************************
--- *** relation: ribothymidine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A modified RNA base in which thymine is  ***
--- *** bound to the ribose ring.                ***
--- ************************************************
---

CREATE VIEW ribothymidine AS
  SELECT
    feature_id AS ribothymidine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'ribothymidine';

--- ************************************************
--- *** relation: methylinosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A modified RNA base in which methylhypox ***
--- *** anthine is bound to the ribose ring.     ***
--- ************************************************
---

CREATE VIEW methylinosine AS
  SELECT
    feature_id AS methylinosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'methylinosine';

--- ************************************************
--- *** relation: mobile ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute describing a feature that h ***
--- *** as either intra-genome or intracellular  ***
--- *** mobility.                                ***
--- ************************************************
---

CREATE VIEW mobile AS
  SELECT
    feature_id AS mobile_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'mobile';

--- ************************************************
--- *** relation: replicon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region containing at least one unique  ***
--- *** origin of replication and a unique termi ***
--- *** nation site.                             ***
--- ************************************************
---

CREATE VIEW replicon AS
  SELECT
    feature_id AS replicon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = '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 = 'targeting_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 = 'replicon';

--- ************************************************
--- *** relation: base ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A base is a sequence feature that corres ***
--- *** ponds to a single unit of a nucleotide p ***
--- *** olymer.                                  ***
--- ************************************************
---

CREATE VIEW base AS
  SELECT
    feature_id AS base_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_RNA_base_feature' 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 = 'base';

--- ************************************************
--- *** relation: amino_acid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence feature that corresponds to a ***
--- ***  single amino acid residue in a polypept ***
--- *** ide.                                     ***
--- ************************************************
---

CREATE VIEW amino_acid AS
  SELECT
    feature_id AS amino_acid_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'arginine' 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 = 'amino_acid';

--- ************************************************
--- *** relation: major_tss ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW major_tss AS
  SELECT
    feature_id AS major_tss_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'major_TSS';

--- ************************************************
--- *** relation: minor_tss ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW minor_tss AS
  SELECT
    feature_id AS minor_tss_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'minor_TSS';

--- ************************************************
--- *** relation: tss_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The region of a gene from the 5' most TS ***
--- *** S to the 3' TSS.                         ***
--- ************************************************
---

CREATE VIEW tss_region AS
  SELECT
    feature_id AS tss_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'TSS_region';

--- ************************************************
--- *** relation: encodes_alternate_transcription_start_sites ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW encodes_alternate_transcription_start_sites AS
  SELECT
    feature_id AS encodes_alternate_transcription_start_sites_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'encodes_alternate_transcription_start_sites';

--- ************************************************
--- *** relation: mirna_primary_transcript_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A part of an miRNA primary_transcript.   ***
--- ************************************************
---

CREATE VIEW mirna_primary_transcript_region AS
  SELECT
    feature_id AS mirna_primary_transcript_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'pre_miRNA' OR cvterm.name = 'miRNA_stem' OR cvterm.name = 'miRNA_loop' OR cvterm.name = 'miRNA_antiguide' OR cvterm.name = 'miRNA_primary_transcript_region';

--- ************************************************
--- *** relation: pre_mirna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The 60-70 nucleotide region remain after ***
--- ***  Drosha processing of the primary transc ***
--- *** ript, that folds back upon itself to for ***
--- *** m a hairpin sructure.                    ***
--- ************************************************
---

CREATE VIEW pre_mirna AS
  SELECT
    feature_id AS pre_mirna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'pre_miRNA';

--- ************************************************
--- *** relation: mirna_stem ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The stem of the hairpin loop formed by f ***
--- *** olding of the pre-miRNA.                 ***
--- ************************************************
---

CREATE VIEW mirna_stem AS
  SELECT
    feature_id AS mirna_stem_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'miRNA_stem';

--- ************************************************
--- *** relation: mirna_loop ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The loop of the hairpin loop formed by f ***
--- *** olding of the pre-miRNA.                 ***
--- ************************************************
---

CREATE VIEW mirna_loop AS
  SELECT
    feature_id AS mirna_loop_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'miRNA_loop';

--- ************************************************
--- *** relation: synthetic_oligo ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An oligo composed of synthetic nucleotid ***
--- *** es.                                      ***
--- ************************************************
---

CREATE VIEW synthetic_oligo AS
  SELECT
    feature_id AS synthetic_oligo_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'synthetic_oligo';

--- ************************************************
--- *** relation: assembly ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of the genome of known length t ***
--- *** hat is composed by ordering and aligning ***
--- ***  two or more different regions.          ***
--- ************************************************
---

CREATE VIEW assembly AS
  SELECT
    feature_id AS assembly_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'assembly';

--- ************************************************
--- *** relation: fragment_assembly ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A fragment assembly is a genome assembly ***
--- ***  that orders overlapping fragments of th ***
--- *** e genome based on landmark sequences. Th ***
--- *** e base pair distance between the landmar ***
--- *** ks is known allowing additivity of lengt ***
--- *** hs.                                      ***
--- ************************************************
---

CREATE VIEW fragment_assembly AS
  SELECT
    feature_id AS fragment_assembly_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'fingerprint_map' OR cvterm.name = 'STS_map' OR cvterm.name = 'RH_map' OR cvterm.name = 'fragment_assembly';

--- ************************************************
--- *** relation: fingerprint_map ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A fingerprint_map is a physical map comp ***
--- *** osed of restriction fragments.           ***
--- ************************************************
---

CREATE VIEW fingerprint_map AS
  SELECT
    feature_id AS fingerprint_map_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'fingerprint_map';

--- ************************************************
--- *** relation: sts_map ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An STS map is a physical map organized b ***
--- *** y the unique STS landmarks.              ***
--- ************************************************
---

CREATE VIEW sts_map AS
  SELECT
    feature_id AS sts_map_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'STS_map';

--- ************************************************
--- *** relation: rh_map ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A radiation hybrid map is a physical map ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW rh_map AS
  SELECT
    feature_id AS rh_map_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'RH_map';

--- ************************************************
--- *** relation: sonicate_fragment ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A DNA fragment generated by sonication.  ***
--- *** Sonication is a technique used to sheer  ***
--- *** DNA into smaller fragments.              ***
--- ************************************************
---

CREATE VIEW sonicate_fragment AS
  SELECT
    feature_id AS sonicate_fragment_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sonicate_fragment';

--- ************************************************
--- *** relation: polyploid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of chromosome variation where the ***
--- ***  chromosome complement is an exact multi ***
--- *** ple of the haploid number and is greater ***
--- ***  than the diploid number.                ***
--- ************************************************
---

CREATE VIEW polyploid AS
  SELECT
    feature_id AS polyploid_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'autopolyploid' OR cvterm.name = 'allopolyploid' OR cvterm.name = 'polyploid';

--- ************************************************
--- *** relation: autopolyploid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A polyploid where the multiple chromosom ***
--- *** e set was derived from the same organism ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW autopolyploid AS
  SELECT
    feature_id AS autopolyploid_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'autopolyploid';

--- ************************************************
--- *** relation: allopolyploid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A polyploid where the multiple chromosom ***
--- *** e set was derived from a different organ ***
--- *** ism.                                     ***
--- ************************************************
---

CREATE VIEW allopolyploid AS
  SELECT
    feature_id AS allopolyploid_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'allopolyploid';

--- ************************************************
--- *** relation: homing_endonuclease_binding_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The binding site (recognition site) of a ***
--- ***  homing endonuclease. The binding site i ***
--- *** s typically large.                       ***
--- ************************************************
---

CREATE VIEW homing_endonuclease_binding_site AS
  SELECT
    feature_id AS homing_endonuclease_binding_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'homing_endonuclease_binding_site';

--- ************************************************
--- *** relation: octamer_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence element characteristic of som ***
--- *** e RNA polymerase II promoters with seque ***
--- *** nce ATTGCAT that binds Pou-domain transc ***
--- *** ription factors.                         ***
--- ************************************************
---

CREATE VIEW octamer_motif AS
  SELECT
    feature_id AS octamer_motif_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'octamer_motif';

--- ************************************************
--- *** relation: apicoplast_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome originating in an apicoplas ***
--- *** t.                                       ***
--- ************************************************
---

CREATE VIEW apicoplast_chromosome AS
  SELECT
    feature_id AS apicoplast_chromosome_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'apicoplast_chromosome';

--- ************************************************
--- *** relation: sequence_collection ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A collection of discontinuous sequences. ***
--- ************************************************
---

CREATE VIEW sequence_collection AS
  SELECT
    feature_id AS sequence_collection_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'kinetoplast' OR cvterm.name = 'genome' OR cvterm.name = 'contig_collection' OR cvterm.name = 'peptide_collection' OR cvterm.name = 'variant_collection' OR cvterm.name = 'kinetoplast' OR cvterm.name = 'reference_genome' OR cvterm.name = 'variant_genome' OR cvterm.name = 'chromosomally_aberrant_genome' OR cvterm.name = 'chromosome_variation' OR cvterm.name = 'allele' OR cvterm.name = 'haplotype' OR cvterm.name = 'genotype' OR cvterm.name = 'diplotype' OR cvterm.name = 'assortment_derived_variation' OR cvterm.name = 'chromosome_number_variation' OR cvterm.name = 'chromosome_structure_variation' OR cvterm.name = 'assortment_derived_duplication' OR cvterm.name = 'assortment_derived_deficiency_plus_duplication' OR cvterm.name = 'assortment_derived_deficiency' OR cvterm.name = 'assortment_derived_aneuploid' OR 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 = 'free_chromosome_arm' OR cvterm.name = 'chromosomal_transposition' OR cvterm.name = 'aneuploid_chromosome' OR cvterm.name = 'intrachromosomal_mutation' OR cvterm.name = 'interchromosomal_mutation' OR cvterm.name = 'chromosomal_duplication' 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 = 'unoriented_intrachromosomal_transposition' OR cvterm.name = 'deficient_interchromosomal_transposition' OR cvterm.name = 'inverted_interchromosomal_transposition' OR cvterm.name = 'uninverted_interchromosomal_transposition' OR cvterm.name = 'unoriented_interchromosomal_transposition' OR cvterm.name = 'inversion_derived_aneuploid_chromosome' 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 = 'deficient_intrachromosomal_transposition' 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 = 'inverted_intrachromosomal_transposition' 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 = 'bipartite_duplication' OR cvterm.name = 'deficient_intrachromosomal_transposition' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'uninverted_intrachromosomal_transposition' OR cvterm.name = 'unoriented_intrachromosomal_transposition' 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 = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'deficient_interchromosomal_transposition' OR cvterm.name = 'inverted_interchromosomal_transposition' OR cvterm.name = 'uninverted_interchromosomal_transposition' OR cvterm.name = 'unoriented_interchromosomal_transposition' 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 = 'bipartite_duplication' OR cvterm.name = 'deficient_intrachromosomal_transposition' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'uninverted_intrachromosomal_transposition' OR cvterm.name = 'unoriented_intrachromosomal_transposition' 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 = '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 = 'polymorphic_sequence_variant' OR cvterm.name = 'sequence_collection';

--- ************************************************
--- *** relation: overlapping_feature_set ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A continuous region of sequence composed ***
--- ***  of the overlapping of multiple sequence ***
--- *** _features, which ultimately provides evi ***
--- *** dence for another sequence_feature.      ***
--- ************************************************
---

CREATE VIEW overlapping_feature_set AS
  SELECT
    feature_id AS overlapping_feature_set_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'overlapping_EST_set' OR cvterm.name = 'overlapping_feature_set';

--- ************************************************
--- *** relation: overlapping_est_set ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A continous experimental result region e ***
--- *** xtending the length of multiple overlapp ***
--- *** ing EST's.                               ***
--- ************************************************
---

CREATE VIEW overlapping_est_set AS
  SELECT
    feature_id AS overlapping_est_set_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'overlapping_EST_set';

--- ************************************************
--- *** relation: ncrna_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW ncrna_gene AS
  SELECT
    feature_id AS ncrna_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'rRNA_gene' OR cvterm.name = 'piRNA_gene' OR cvterm.name = 'RNase_P_RNA_gene' OR cvterm.name = 'RNase_MRP_RNA_gene' OR cvterm.name = 'lincRNA_gene' OR cvterm.name = 'telomerase_RNA_gene' OR cvterm.name = 'ncRNA_gene';

--- ************************************************
--- *** relation: grna_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW grna_gene AS
  SELECT
    feature_id AS grna_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gRNA_gene';

--- ************************************************
--- *** relation: mirna_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW mirna_gene AS
  SELECT
    feature_id AS mirna_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'miRNA_gene';

--- ************************************************
--- *** relation: scrna_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW scrna_gene AS
  SELECT
    feature_id AS scrna_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'scRNA_gene';

--- ************************************************
--- *** relation: snorna_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW snorna_gene AS
  SELECT
    feature_id AS snorna_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'snoRNA_gene';

--- ************************************************
--- *** relation: snrna_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW snrna_gene AS
  SELECT
    feature_id AS snrna_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'snRNA_gene';

--- ************************************************
--- *** relation: srp_rna_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW srp_rna_gene AS
  SELECT
    feature_id AS srp_rna_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'SRP_RNA_gene';

--- ************************************************
--- *** relation: strna_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW strna_gene AS
  SELECT
    feature_id AS strna_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'stRNA_gene';

--- ************************************************
--- *** relation: tmrna_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW tmrna_gene AS
  SELECT
    feature_id AS tmrna_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'tmRNA_gene';

--- ************************************************
--- *** relation: trna_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW trna_gene AS
  SELECT
    feature_id AS trna_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'tRNA_gene';

--- ************************************************
--- *** relation: modified_adenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A modified adenine is an adenine base fe ***
--- *** ature that has been altered.             ***
--- ************************************************
---

CREATE VIEW modified_adenosine AS
  SELECT
    feature_id AS modified_adenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'modified_adenosine';

--- ************************************************
--- *** relation: modified_inosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A modified inosine is an inosine base fe ***
--- *** ature that has been altered.             ***
--- ************************************************
---

CREATE VIEW modified_inosine AS
  SELECT
    feature_id AS modified_inosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'modified_inosine';

--- ************************************************
--- *** relation: modified_cytidine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A modified cytidine is a cytidine base f ***
--- *** eature which has been altered.           ***
--- ************************************************
---

CREATE VIEW modified_cytidine AS
  SELECT
    feature_id AS modified_cytidine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'modified_cytidine';

--- ************************************************
--- *** relation: modified_guanosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW modified_guanosine AS
  SELECT
    feature_id AS modified_guanosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'modified_guanosine';

--- ************************************************
--- *** relation: modified_uridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW modified_uridine AS
  SELECT
    feature_id AS modified_uridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'modified_uridine';

--- ************************************************
--- *** relation: one_methylinosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 1-methylinosine is a modified insosine.  ***
--- ************************************************
---

CREATE VIEW one_methylinosine AS
  SELECT
    feature_id AS one_methylinosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'one_methylinosine';

--- ************************************************
--- *** relation: one_two_prime_o_dimethylinosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 1,2'-O-dimethylinosine is a modified ino ***
--- *** sine.                                    ***
--- ************************************************
---

CREATE VIEW one_two_prime_o_dimethylinosine AS
  SELECT
    feature_id AS one_two_prime_o_dimethylinosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'one_two_prime_O_dimethylinosine';

--- ************************************************
--- *** relation: two_prime_o_methylinosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 2'-O-methylinosine is a modified inosine ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW two_prime_o_methylinosine AS
  SELECT
    feature_id AS two_prime_o_methylinosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'two_prime_O_methylinosine';

--- ************************************************
--- *** relation: three_methylcytidine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 3-methylcytidine is a modified cytidine. ***
--- ************************************************
---

CREATE VIEW three_methylcytidine AS
  SELECT
    feature_id AS three_methylcytidine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'three_methylcytidine';

--- ************************************************
--- *** relation: five_methylcytidine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5-methylcytidine is a modified cytidine. ***
--- ************************************************
---

CREATE VIEW five_methylcytidine AS
  SELECT
    feature_id AS five_methylcytidine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_methylcytidine';

--- ************************************************
--- *** relation: two_prime_o_methylcytidine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 2'-O-methylcytidine is a modified cytidi ***
--- *** ne.                                      ***
--- ************************************************
---

CREATE VIEW two_prime_o_methylcytidine AS
  SELECT
    feature_id AS two_prime_o_methylcytidine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'two_prime_O_methylcytidine';

--- ************************************************
--- *** relation: two_thiocytidine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 2-thiocytidine is a modified cytidine.   ***
--- ************************************************
---

CREATE VIEW two_thiocytidine AS
  SELECT
    feature_id AS two_thiocytidine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'two_thiocytidine';

--- ************************************************
--- *** relation: n4_acetylcytidine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N4-acetylcytidine is a modified cytidine ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW n4_acetylcytidine AS
  SELECT
    feature_id AS n4_acetylcytidine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N4_acetylcytidine';

--- ************************************************
--- *** relation: five_formylcytidine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5-formylcytidine is a modified cytidine. ***
--- ************************************************
---

CREATE VIEW five_formylcytidine AS
  SELECT
    feature_id AS five_formylcytidine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_formylcytidine';

--- ************************************************
--- *** relation: five_two_prime_o_dimethylcytidine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5,2'-O-dimethylcytidine is a modified cy ***
--- *** tidine.                                  ***
--- ************************************************
---

CREATE VIEW five_two_prime_o_dimethylcytidine AS
  SELECT
    feature_id AS five_two_prime_o_dimethylcytidine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_two_prime_O_dimethylcytidine';

--- ************************************************
--- *** relation: n4_acetyl_2_prime_o_methylcytidine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N4-acetyl-2'-O-methylcytidine is a modif ***
--- *** ied cytidine.                            ***
--- ************************************************
---

CREATE VIEW n4_acetyl_2_prime_o_methylcytidine AS
  SELECT
    feature_id AS n4_acetyl_2_prime_o_methylcytidine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N4_acetyl_2_prime_O_methylcytidine';

--- ************************************************
--- *** relation: lysidine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Lysidine is a modified cytidine.         ***
--- ************************************************
---

CREATE VIEW lysidine AS
  SELECT
    feature_id AS lysidine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'lysidine';

--- ************************************************
--- *** relation: n4_methylcytidine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N4-methylcytidine is a modified cytidine ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW n4_methylcytidine AS
  SELECT
    feature_id AS n4_methylcytidine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N4_methylcytidine';

--- ************************************************
--- *** relation: n4_2_prime_o_dimethylcytidine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N4,2'-O-dimethylcytidine is a modified c ***
--- *** ytidine.                                 ***
--- ************************************************
---

CREATE VIEW n4_2_prime_o_dimethylcytidine AS
  SELECT
    feature_id AS n4_2_prime_o_dimethylcytidine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N4_2_prime_O_dimethylcytidine';

--- ************************************************
--- *** relation: five_hydroxymethylcytidine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5-hydroxymethylcytidine is a modified cy ***
--- *** tidine.                                  ***
--- ************************************************
---

CREATE VIEW five_hydroxymethylcytidine AS
  SELECT
    feature_id AS five_hydroxymethylcytidine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_hydroxymethylcytidine';

--- ************************************************
--- *** relation: five_formyl_two_prime_o_methylcytidine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5-formyl-2'-O-methylcytidine is a modifi ***
--- *** ed cytidine.                             ***
--- ************************************************
---

CREATE VIEW five_formyl_two_prime_o_methylcytidine AS
  SELECT
    feature_id AS five_formyl_two_prime_o_methylcytidine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_formyl_two_prime_O_methylcytidine';

--- ************************************************
--- *** relation: n4_n4_2_prime_o_trimethylcytidine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N4_N4_2_prime_O_trimethylcytidine is a m ***
--- *** odified cytidine.                        ***
--- ************************************************
---

CREATE VIEW n4_n4_2_prime_o_trimethylcytidine AS
  SELECT
    feature_id AS n4_n4_2_prime_o_trimethylcytidine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N4_N4_2_prime_O_trimethylcytidine';

--- ************************************************
--- *** relation: one_methyladenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 1_methyladenosine is a modified adenosin ***
--- *** e.                                       ***
--- ************************************************
---

CREATE VIEW one_methyladenosine AS
  SELECT
    feature_id AS one_methyladenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'one_methyladenosine';

--- ************************************************
--- *** relation: two_methyladenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 2_methyladenosine is a modified adenosin ***
--- *** e.                                       ***
--- ************************************************
---

CREATE VIEW two_methyladenosine AS
  SELECT
    feature_id AS two_methyladenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'two_methyladenosine';

--- ************************************************
--- *** relation: n6_methyladenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N6_methyladenosine is a modified adenosi ***
--- *** ne.                                      ***
--- ************************************************
---

CREATE VIEW n6_methyladenosine AS
  SELECT
    feature_id AS n6_methyladenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N6_methyladenosine';

--- ************************************************
--- *** relation: two_prime_o_methyladenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 2prime_O_methyladenosine is a modified a ***
--- *** denosine.                                ***
--- ************************************************
---

CREATE VIEW two_prime_o_methyladenosine AS
  SELECT
    feature_id AS two_prime_o_methyladenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'two_prime_O_methyladenosine';

--- ************************************************
--- *** relation: two_methylthio_n6_methyladenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 2_methylthio_N6_methyladenosine is a mod ***
--- *** ified adenosine.                         ***
--- ************************************************
---

CREATE VIEW two_methylthio_n6_methyladenosine AS
  SELECT
    feature_id AS two_methylthio_n6_methyladenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'two_methylthio_N6_methyladenosine';

--- ************************************************
--- *** relation: n6_isopentenyladenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N6_isopentenyladenosine is a modified ad ***
--- *** enosine.                                 ***
--- ************************************************
---

CREATE VIEW n6_isopentenyladenosine AS
  SELECT
    feature_id AS n6_isopentenyladenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N6_isopentenyladenosine';

--- ************************************************
--- *** relation: two_methylthio_n6_isopentenyladenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 2_methylthio_N6_isopentenyladenosine is  ***
--- *** a modified adenosine.                    ***
--- ************************************************
---

CREATE VIEW two_methylthio_n6_isopentenyladenosine AS
  SELECT
    feature_id AS two_methylthio_n6_isopentenyladenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'two_methylthio_N6_isopentenyladenosine';

--- ************************************************
--- *** relation: n6_cis_hydroxyisopentenyl_adenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N6_cis_hydroxyisopentenyl_adenosine is a ***
--- ***  modified adenosine.                     ***
--- ************************************************
---

CREATE VIEW n6_cis_hydroxyisopentenyl_adenosine AS
  SELECT
    feature_id AS n6_cis_hydroxyisopentenyl_adenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N6_cis_hydroxyisopentenyl_adenosine';

--- ************************************************
--- *** relation: two_methylthio_n6_cis_hydroxyisopentenyl_adenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 2_methylthio_N6_cis_hydroxyisopentenyl_a ***
--- *** denosine is a modified adenosine.        ***
--- ************************************************
---

CREATE VIEW two_methylthio_n6_cis_hydroxyisopentenyl_adenosine AS
  SELECT
    feature_id AS two_methylthio_n6_cis_hydroxyisopentenyl_adenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'two_methylthio_N6_cis_hydroxyisopentenyl_adenosine';

--- ************************************************
--- *** relation: n6_glycinylcarbamoyladenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N6_glycinylcarbamoyladenosine is a modif ***
--- *** ied adenosine.                           ***
--- ************************************************
---

CREATE VIEW n6_glycinylcarbamoyladenosine AS
  SELECT
    feature_id AS n6_glycinylcarbamoyladenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N6_glycinylcarbamoyladenosine';

--- ************************************************
--- *** relation: n6_threonylcarbamoyladenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N6_threonylcarbamoyladenosine is a modif ***
--- *** ied adenosine.                           ***
--- ************************************************
---

CREATE VIEW n6_threonylcarbamoyladenosine AS
  SELECT
    feature_id AS n6_threonylcarbamoyladenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N6_threonylcarbamoyladenosine';

--- ************************************************
--- *** relation: two_methylthio_n6_threonyl_carbamoyladenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 2_methylthio_N6_threonyl_carbamoyladenos ***
--- *** ine is a modified adenosine.             ***
--- ************************************************
---

CREATE VIEW two_methylthio_n6_threonyl_carbamoyladenosine AS
  SELECT
    feature_id AS two_methylthio_n6_threonyl_carbamoyladenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'two_methylthio_N6_threonyl_carbamoyladenosine';

--- ************************************************
--- *** relation: n6_methyl_n6_threonylcarbamoyladenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N6_methyl_N6_threonylcarbamoyladenosine  ***
--- *** is a modified adenosine.                 ***
--- ************************************************
---

CREATE VIEW n6_methyl_n6_threonylcarbamoyladenosine AS
  SELECT
    feature_id AS n6_methyl_n6_threonylcarbamoyladenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N6_methyl_N6_threonylcarbamoyladenosine';

--- ************************************************
--- *** relation: n6_hydroxynorvalylcarbamoyladenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N6_hydroxynorvalylcarbamoyladenosine is  ***
--- *** a modified adenosine.                    ***
--- ************************************************
---

CREATE VIEW n6_hydroxynorvalylcarbamoyladenosine AS
  SELECT
    feature_id AS n6_hydroxynorvalylcarbamoyladenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N6_hydroxynorvalylcarbamoyladenosine';

--- ************************************************
--- *** relation: two_methylthio_n6_hydroxynorvalyl_carbamoyladenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 2_methylthio_N6_hydroxynorvalyl_carbamoy ***
--- *** ladenosine is a modified adenosine.      ***
--- ************************************************
---

CREATE VIEW two_methylthio_n6_hydroxynorvalyl_carbamoyladenosine AS
  SELECT
    feature_id AS two_methylthio_n6_hydroxynorvalyl_carbamoyladenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'two_methylthio_N6_hydroxynorvalyl_carbamoyladenosine';

--- ************************************************
--- *** relation: two_prime_o_riboA_phosphate ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 2prime_O_ribosyladenosine_phosphate is a ***
--- ***  modified adenosine.                     ***
--- ************************************************
---

CREATE VIEW two_prime_o_riboA_phosphate AS
  SELECT
    feature_id AS two_prime_o_riboA_phosphate_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'two_prime_O_ribosyladenosine_phosphate';

--- ************************************************
--- *** relation: n6_n6_dimethyladenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N6_N6_dimethyladenosine is a modified ad ***
--- *** enosine.                                 ***
--- ************************************************
---

CREATE VIEW n6_n6_dimethyladenosine AS
  SELECT
    feature_id AS n6_n6_dimethyladenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N6_N6_dimethyladenosine';

--- ************************************************
--- *** relation: n6_2_prime_o_dimethyladenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N6_2prime_O_dimethyladenosine is a modif ***
--- *** ied adenosine.                           ***
--- ************************************************
---

CREATE VIEW n6_2_prime_o_dimethyladenosine AS
  SELECT
    feature_id AS n6_2_prime_o_dimethyladenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N6_2_prime_O_dimethyladenosine';

--- ************************************************
--- *** relation: n6_n6_2_prime_o_trimethyladenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N6_N6_2prime_O_trimethyladenosine is a m ***
--- *** odified adenosine.                       ***
--- ************************************************
---

CREATE VIEW n6_n6_2_prime_o_trimethyladenosine AS
  SELECT
    feature_id AS n6_n6_2_prime_o_trimethyladenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N6_N6_2_prime_O_trimethyladenosine';

--- ************************************************
--- *** relation: one_two_prime_o_dimethyladenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 1,2'-O-dimethyladenosine is a modified a ***
--- *** denosine.                                ***
--- ************************************************
---

CREATE VIEW one_two_prime_o_dimethyladenosine AS
  SELECT
    feature_id AS one_two_prime_o_dimethyladenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'one_two_prime_O_dimethyladenosine';

--- ************************************************
--- *** relation: n6_acetyladenosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N6_acetyladenosine is a modified adenosi ***
--- *** ne.                                      ***
--- ************************************************
---

CREATE VIEW n6_acetyladenosine AS
  SELECT
    feature_id AS n6_acetyladenosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N6_acetyladenosine';

--- ************************************************
--- *** relation: seven_deazaguanosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 7-deazaguanosine is a moddified guanosin ***
--- *** e.                                       ***
--- ************************************************
---

CREATE VIEW seven_deazaguanosine AS
  SELECT
    feature_id AS seven_deazaguanosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'seven_deazaguanosine';

--- ************************************************
--- *** relation: queuosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Queuosine is a modified 7-deazoguanosine ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW queuosine AS
  SELECT
    feature_id AS queuosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'queuosine';

--- ************************************************
--- *** relation: epoxyqueuosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Epoxyqueuosine is a modified 7-deazoguan ***
--- *** osine.                                   ***
--- ************************************************
---

CREATE VIEW epoxyqueuosine AS
  SELECT
    feature_id AS epoxyqueuosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'epoxyqueuosine';

--- ************************************************
--- *** relation: galactosyl_queuosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Galactosyl_queuosine is a modified 7-dea ***
--- *** zoguanosine.                             ***
--- ************************************************
---

CREATE VIEW galactosyl_queuosine AS
  SELECT
    feature_id AS galactosyl_queuosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'galactosyl_queuosine';

--- ************************************************
--- *** relation: mannosyl_queuosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Mannosyl_queuosine is a modified 7-deazo ***
--- *** guanosine.                               ***
--- ************************************************
---

CREATE VIEW mannosyl_queuosine AS
  SELECT
    feature_id AS mannosyl_queuosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'mannosyl_queuosine';

--- ************************************************
--- *** relation: seven_cyano_seven_deazaguanosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 7_cyano_7_deazaguanosine is a modified 7 ***
--- *** -deazoguanosine.                         ***
--- ************************************************
---

CREATE VIEW seven_cyano_seven_deazaguanosine AS
  SELECT
    feature_id AS seven_cyano_seven_deazaguanosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'seven_cyano_seven_deazaguanosine';

--- ************************************************
--- *** relation: seven_aminomethyl_seven_deazaguanosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 7_aminomethyl_7_deazaguanosine is a modi ***
--- *** fied 7-deazoguanosine.                   ***
--- ************************************************
---

CREATE VIEW seven_aminomethyl_seven_deazaguanosine AS
  SELECT
    feature_id AS seven_aminomethyl_seven_deazaguanosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'seven_aminomethyl_seven_deazaguanosine';

--- ************************************************
--- *** relation: archaeosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Archaeosine is a modified 7-deazoguanosi ***
--- *** ne.                                      ***
--- ************************************************
---

CREATE VIEW archaeosine AS
  SELECT
    feature_id AS archaeosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'archaeosine';

--- ************************************************
--- *** relation: one_methylguanosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 1_methylguanosine is a modified guanosin ***
--- *** e base feature.                          ***
--- ************************************************
---

CREATE VIEW one_methylguanosine AS
  SELECT
    feature_id AS one_methylguanosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'one_methylguanosine';

--- ************************************************
--- *** relation: n2_methylguanosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N2_methylguanosine is a modified guanosi ***
--- *** ne base feature.                         ***
--- ************************************************
---

CREATE VIEW n2_methylguanosine AS
  SELECT
    feature_id AS n2_methylguanosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N2_methylguanosine';

--- ************************************************
--- *** relation: seven_methylguanosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 7_methylguanosine is a modified guanosin ***
--- *** e base feature.                          ***
--- ************************************************
---

CREATE VIEW seven_methylguanosine AS
  SELECT
    feature_id AS seven_methylguanosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'seven_methylguanosine';

--- ************************************************
--- *** relation: two_prime_o_methylguanosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 2prime_O_methylguanosine is a modified g ***
--- *** uanosine base feature.                   ***
--- ************************************************
---

CREATE VIEW two_prime_o_methylguanosine AS
  SELECT
    feature_id AS two_prime_o_methylguanosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'two_prime_O_methylguanosine';

--- ************************************************
--- *** relation: n2_n2_dimethylguanosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N2_N2_dimethylguanosine is a modified gu ***
--- *** anosine base feature.                    ***
--- ************************************************
---

CREATE VIEW n2_n2_dimethylguanosine AS
  SELECT
    feature_id AS n2_n2_dimethylguanosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N2_N2_dimethylguanosine';

--- ************************************************
--- *** relation: n2_2_prime_o_dimethylguanosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N2_2prime_O_dimethylguanosine is a modif ***
--- *** ied guanosine base feature.              ***
--- ************************************************
---

CREATE VIEW n2_2_prime_o_dimethylguanosine AS
  SELECT
    feature_id AS n2_2_prime_o_dimethylguanosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N2_2_prime_O_dimethylguanosine';

--- ************************************************
--- *** relation: n2_n2_2_prime_o_trimethylguanosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N2_N2_2prime_O_trimethylguanosine is a m ***
--- *** odified guanosine base feature.          ***
--- ************************************************
---

CREATE VIEW n2_n2_2_prime_o_trimethylguanosine AS
  SELECT
    feature_id AS n2_n2_2_prime_o_trimethylguanosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N2_N2_2_prime_O_trimethylguanosine';

--- ************************************************
--- *** relation: two_prime_o_ribosylguanosine_phosphate ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 2prime_O_ribosylguanosine_phosphate is a ***
--- ***  modified guanosine base feature.        ***
--- ************************************************
---

CREATE VIEW two_prime_o_ribosylguanosine_phosphate AS
  SELECT
    feature_id AS two_prime_o_ribosylguanosine_phosphate_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'two_prime_O_ribosylguanosine_phosphate';

--- ************************************************
--- *** relation: wybutosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Wybutosine is a modified guanosine base  ***
--- *** feature.                                 ***
--- ************************************************
---

CREATE VIEW wybutosine AS
  SELECT
    feature_id AS wybutosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'wybutosine';

--- ************************************************
--- *** relation: peroxywybutosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Peroxywybutosine is a modified guanosine ***
--- ***  base feature.                           ***
--- ************************************************
---

CREATE VIEW peroxywybutosine AS
  SELECT
    feature_id AS peroxywybutosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'peroxywybutosine';

--- ************************************************
--- *** relation: hydroxywybutosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Hydroxywybutosine is a modified guanosin ***
--- *** e base feature.                          ***
--- ************************************************
---

CREATE VIEW hydroxywybutosine AS
  SELECT
    feature_id AS hydroxywybutosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'hydroxywybutosine';

--- ************************************************
--- *** relation: undermodified_hydroxywybutosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Undermodified_hydroxywybutosine is a mod ***
--- *** ified guanosine base feature.            ***
--- ************************************************
---

CREATE VIEW undermodified_hydroxywybutosine AS
  SELECT
    feature_id AS undermodified_hydroxywybutosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'undermodified_hydroxywybutosine';

--- ************************************************
--- *** relation: wyosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Wyosine is a modified guanosine base fea ***
--- *** ture.                                    ***
--- ************************************************
---

CREATE VIEW wyosine AS
  SELECT
    feature_id AS wyosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'wyosine';

--- ************************************************
--- *** relation: methylwyosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Methylwyosine is a modified guanosine ba ***
--- *** se feature.                              ***
--- ************************************************
---

CREATE VIEW methylwyosine AS
  SELECT
    feature_id AS methylwyosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'methylwyosine';

--- ************************************************
--- *** relation: n2_7_dimethylguanosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N2_7_dimethylguanosine is a modified gua ***
--- *** nosine base feature.                     ***
--- ************************************************
---

CREATE VIEW n2_7_dimethylguanosine AS
  SELECT
    feature_id AS n2_7_dimethylguanosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N2_7_dimethylguanosine';

--- ************************************************
--- *** relation: n2_n2_7_trimethylguanosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N2_N2_7_trimethylguanosine is a modified ***
--- ***  guanosine base feature.                 ***
--- ************************************************
---

CREATE VIEW n2_n2_7_trimethylguanosine AS
  SELECT
    feature_id AS n2_n2_7_trimethylguanosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N2_N2_7_trimethylguanosine';

--- ************************************************
--- *** relation: one_two_prime_o_dimethylguanosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 1_2prime_O_dimethylguanosine is a modifi ***
--- *** ed guanosine base feature.               ***
--- ************************************************
---

CREATE VIEW one_two_prime_o_dimethylguanosine AS
  SELECT
    feature_id AS one_two_prime_o_dimethylguanosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'one_two_prime_O_dimethylguanosine';

--- ************************************************
--- *** relation: four_demethylwyosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 4_demethylwyosine is a modified guanosin ***
--- *** e base feature.                          ***
--- ************************************************
---

CREATE VIEW four_demethylwyosine AS
  SELECT
    feature_id AS four_demethylwyosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'four_demethylwyosine';

--- ************************************************
--- *** relation: isowyosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Isowyosine is a modified guanosine base  ***
--- *** feature.                                 ***
--- ************************************************
---

CREATE VIEW isowyosine AS
  SELECT
    feature_id AS isowyosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'isowyosine';

--- ************************************************
--- *** relation: n2_7_2prirme_o_trimethylguanosine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** N2_7_2prirme_O_trimethylguanosine is a m ***
--- *** odified guanosine base feature.          ***
--- ************************************************
---

CREATE VIEW n2_7_2prirme_o_trimethylguanosine AS
  SELECT
    feature_id AS n2_7_2prirme_o_trimethylguanosine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'N2_7_2prirme_O_trimethylguanosine';

--- ************************************************
--- *** relation: five_methyluridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_methyluridine is a modified uridine ba ***
--- *** se feature.                              ***
--- ************************************************
---

CREATE VIEW five_methyluridine AS
  SELECT
    feature_id AS five_methyluridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_methyluridine';

--- ************************************************
--- *** relation: two_prime_o_methyluridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 2prime_O_methyluridine is a modified uri ***
--- *** dine base feature.                       ***
--- ************************************************
---

CREATE VIEW two_prime_o_methyluridine AS
  SELECT
    feature_id AS two_prime_o_methyluridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'two_prime_O_methyluridine';

--- ************************************************
--- *** relation: five_two_prime_o_dimethyluridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_2_prime_O_dimethyluridine is a modifie ***
--- *** d uridine base feature.                  ***
--- ************************************************
---

CREATE VIEW five_two_prime_o_dimethyluridine AS
  SELECT
    feature_id AS five_two_prime_o_dimethyluridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_two_prime_O_dimethyluridine';

--- ************************************************
--- *** relation: one_methylpseudouridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 1_methylpseudouridine is a modified urid ***
--- *** ine base feature.                        ***
--- ************************************************
---

CREATE VIEW one_methylpseudouridine AS
  SELECT
    feature_id AS one_methylpseudouridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'one_methylpseudouridine';

--- ************************************************
--- *** relation: two_prime_o_methylpseudouridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 2prime_O_methylpseudouridine is a modifi ***
--- *** ed uridine base feature.                 ***
--- ************************************************
---

CREATE VIEW two_prime_o_methylpseudouridine AS
  SELECT
    feature_id AS two_prime_o_methylpseudouridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'two_prime_O_methylpseudouridine';

--- ************************************************
--- *** relation: two_thiouridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 2_thiouridine is a modified uridine base ***
--- ***  feature.                                ***
--- ************************************************
---

CREATE VIEW two_thiouridine AS
  SELECT
    feature_id AS two_thiouridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'two_thiouridine';

--- ************************************************
--- *** relation: four_thiouridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 4_thiouridine is a modified uridine base ***
--- ***  feature.                                ***
--- ************************************************
---

CREATE VIEW four_thiouridine AS
  SELECT
    feature_id AS four_thiouridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'four_thiouridine';

--- ************************************************
--- *** relation: five_methyl_2_thiouridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_methyl_2_thiouridine is a modified uri ***
--- *** dine base feature.                       ***
--- ************************************************
---

CREATE VIEW five_methyl_2_thiouridine AS
  SELECT
    feature_id AS five_methyl_2_thiouridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_methyl_2_thiouridine';

--- ************************************************
--- *** relation: two_thio_two_prime_o_methyluridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 2_thio_2prime_O_methyluridine is a modif ***
--- *** ied uridine base feature.                ***
--- ************************************************
---

CREATE VIEW two_thio_two_prime_o_methyluridine AS
  SELECT
    feature_id AS two_thio_two_prime_o_methyluridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'two_thio_two_prime_O_methyluridine';

--- ************************************************
--- *** relation: three_three_amino_three_carboxypropyl_uridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 3_3_amino_3_carboxypropyl_uridine is a m ***
--- *** odified uridine base feature.            ***
--- ************************************************
---

CREATE VIEW three_three_amino_three_carboxypropyl_uridine AS
  SELECT
    feature_id AS three_three_amino_three_carboxypropyl_uridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'three_three_amino_three_carboxypropyl_uridine';

--- ************************************************
--- *** relation: five_hydroxyuridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_hydroxyuridine is a modified uridine b ***
--- *** ase feature.                             ***
--- ************************************************
---

CREATE VIEW five_hydroxyuridine AS
  SELECT
    feature_id AS five_hydroxyuridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_hydroxyuridine';

--- ************************************************
--- *** relation: five_methoxyuridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_methoxyuridine is a modified uridine b ***
--- *** ase feature.                             ***
--- ************************************************
---

CREATE VIEW five_methoxyuridine AS
  SELECT
    feature_id AS five_methoxyuridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_methoxyuridine';

--- ************************************************
--- *** relation: uridine_five_oxyacetic_acid ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Uridine_5_oxyacetic_acid is a modified u ***
--- *** ridine base feature.                     ***
--- ************************************************
---

CREATE VIEW uridine_five_oxyacetic_acid AS
  SELECT
    feature_id AS uridine_five_oxyacetic_acid_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'uridine_five_oxyacetic_acid';

--- ************************************************
--- *** relation: uridine_five_oxyacetic_acid_methyl_ester ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Uridine_5_oxyacetic_acid_methyl_ester is ***
--- ***  a modified uridine base feature.        ***
--- ************************************************
---

CREATE VIEW uridine_five_oxyacetic_acid_methyl_ester AS
  SELECT
    feature_id AS uridine_five_oxyacetic_acid_methyl_ester_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'uridine_five_oxyacetic_acid_methyl_ester';

--- ************************************************
--- *** relation: five_carboxyhydroxymethyl_uridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_carboxyhydroxymethyl_uridine is a modi ***
--- *** fied uridine base feature.               ***
--- ************************************************
---

CREATE VIEW five_carboxyhydroxymethyl_uridine AS
  SELECT
    feature_id AS five_carboxyhydroxymethyl_uridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_carboxyhydroxymethyl_uridine';

--- ************************************************
--- *** relation: five_carboxyhydroxymethyl_uridine_methyl_ester ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_carboxyhydroxymethyl_uridine_methyl_es ***
--- *** ter is a modified uridine base feature.  ***
--- ************************************************
---

CREATE VIEW five_carboxyhydroxymethyl_uridine_methyl_ester AS
  SELECT
    feature_id AS five_carboxyhydroxymethyl_uridine_methyl_ester_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_carboxyhydroxymethyl_uridine_methyl_ester';

--- ************************************************
--- *** relation: five_methoxycarbonylmethyluridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Five_methoxycarbonylmethyluridine is a m ***
--- *** odified uridine base feature.            ***
--- ************************************************
---

CREATE VIEW five_methoxycarbonylmethyluridine AS
  SELECT
    feature_id AS five_methoxycarbonylmethyluridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_methoxycarbonylmethyluridine';

--- ************************************************
--- *** relation: five_methoxycarbonylmethyl_two_prime_o_methyluridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Five_methoxycarbonylmethyl_2_prime_O_met ***
--- *** hyluridine is a modified uridine base fe ***
--- *** ature.                                   ***
--- ************************************************
---

CREATE VIEW five_methoxycarbonylmethyl_two_prime_o_methyluridine AS
  SELECT
    feature_id AS five_methoxycarbonylmethyl_two_prime_o_methyluridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_methoxycarbonylmethyl_two_prime_O_methyluridine';

--- ************************************************
--- *** relation: five_mcm_2_thiouridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_methoxycarbonylmethyl_2_thiouridine is ***
--- ***  a modified uridine base feature.        ***
--- ************************************************
---

CREATE VIEW five_mcm_2_thiouridine AS
  SELECT
    feature_id AS five_mcm_2_thiouridine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_methoxycarbonylmethyl_two_thiouridine';

--- ************************************************
--- *** relation: five_aminomethyl_two_thiouridine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** 5_aminomethyl_2_thiouridine is a modifie ***
--- *** d uridine base feature.                  ***
--- ************************************************
---

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 binding site that, in the nucleotide m ***
--- *** olecule, interacts selectively and non-c ***
--- *** ovalently with polypeptide residues of 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 = 'ASPE_primer' OR cvterm.name = 'dCAPS_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 = 'targeting_vector' 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 = '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 = 'high_identity_region' OR cvterm.name = 'mathematically_defined_repeat' OR cvterm.name = 'experimentally_defined_binding_region' 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 = 'paired_end_fragment' OR cvterm.name = 'read_pair' 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 = 'YAC_end' OR cvterm.name = 'clone_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 = 'RR_tract' OR cvterm.name = 'homologous_region' OR cvterm.name = 'centromere_DNA_Element_I' OR cvterm.name = 'centromere_DNA_Element_II' OR cvterm.name = 'centromere_DNA_Element_III' OR cvterm.name = 'X_element' OR cvterm.name = 'U_box' OR cvterm.name = 'regional_centromere_central_core' 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 = 'assembly_error_correction' OR cvterm.name = 'base_call_error_correction' 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 = 'contig_collection' 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 = 'CHiP_seq_region' 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 = 'pseudogene' 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 = 'repeat_region' OR cvterm.name = 'insertion' OR cvterm.name = 'gene' OR cvterm.name = 'repeat_unit' OR cvterm.name = 'QTL' 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 = 'genetic_marker' OR cvterm.name = 'sequence_motif' OR cvterm.name = 'restriction_enzyme_recognition_site' OR cvterm.name = 'restriction_enzyme_single_strand_overhang' OR cvterm.name = 'epigenetically_modified_region' OR cvterm.name = 'open_chromatin_region' 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 = 'recombination_signal_sequence' 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 = 'processed_pseudogene' OR cvterm.name = 'non_processed_pseudogene' OR cvterm.name = 'pseudogene_by_unequal_crossing_over' OR cvterm.name = 'nuclear_mt_pseudogene' OR cvterm.name = 'cassette_pseudogene' OR cvterm.name = 'duplicated_pseudogene' OR cvterm.name = 'unitary_pseudogene' OR cvterm.name = 'protein_binding_site' OR cvterm.name = 'epitope' OR cvterm.name = 'nucleotide_binding_site' OR cvterm.name = 'metal_binding_site' OR cvterm.name = 'ligand_binding_site' OR cvterm.name = 'protein_protein_contact' OR cvterm.name = 'nucleotide_to_protein_binding_site' 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 = 'miRNA_target_site' OR cvterm.name = 'DNA_binding_site' OR cvterm.name = 'primer_binding_site' OR cvterm.name = 'polypeptide_DNA_contact' OR cvterm.name = 'polypeptide_metal_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_ligand_contact' 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 = '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 = 'X_element_combinatorial_repeat' OR cvterm.name = 'Y_prime_element' OR cvterm.name = 'telomeric_repeat' OR cvterm.name = 'nested_repeat' OR cvterm.name = 'centromeric_repeat' 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 = 'nested_tandem_repeat' OR cvterm.name = 'regional_centromere_inner_repeat_region' OR cvterm.name = 'regional_centromere_outer_repeat_region' OR cvterm.name = 'transgenic_insertion' OR cvterm.name = 'duplication' OR cvterm.name = 'tandem_duplication' OR cvterm.name = 'direct_tandem_duplication' OR cvterm.name = 'inverted_tandem_duplication' 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_with_non_canonical_start_codon' 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 = 'rRNA_gene' OR cvterm.name = 'piRNA_gene' OR cvterm.name = 'RNase_P_RNA_gene' OR cvterm.name = 'RNase_MRP_RNA_gene' OR cvterm.name = 'lincRNA_gene' OR cvterm.name = 'telomerase_RNA_gene' OR cvterm.name = 'cryptogene' OR cvterm.name = 'gene_with_start_codon_CUG' 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 = 'point_centromere' OR cvterm.name = 'regional_centromere' 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 = 'processed_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 = 'tasiRNA_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 = 'edited_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 = 'tasiRNA' 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 = 'transcription_regulatory_region' OR cvterm.name = 'translation_regulatory_region' OR cvterm.name = 'recombination_regulatory_region' OR cvterm.name = 'replication_regulatory_region' 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 = 'intronic_regulatory_region' 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 = 'operator' OR cvterm.name = 'bacterial_RNApol_promoter' OR cvterm.name = 'bacterial_terminator' OR cvterm.name = 'bacterial_RNApol_promoter_sigma_70' OR cvterm.name = 'bacterial_RNApol_promoter_sigma54' 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 = 'ISRE' 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_II_core_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 = 'bacterial_RNApol_promoter_sigma_70' OR cvterm.name = 'bacterial_RNApol_promoter_sigma54' 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 = 'silencer' OR cvterm.name = 'enhancer_bound_by_factor' OR cvterm.name = 'shadow_enhancer' OR cvterm.name = 'splice_enhancer' OR cvterm.name = 'intronic_splice_enhancer' OR cvterm.name = 'exonic_splice_enhancer' OR cvterm.name = 'attenuator' 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 = 'ribosome_entry_site' OR cvterm.name = 'UTR' OR cvterm.name = 'CDS' 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 = 'internal_ribosome_entry_site' OR cvterm.name = 'Shine_Dalgarno_sequence' OR cvterm.name = 'kozak_sequence' OR cvterm.name = 'internal_Shine_Dalgarno_sequence' 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 = 'upstream_AUG_codon' OR cvterm.name = 'AU_rich_element' OR cvterm.name = 'Bruno_response_element' OR cvterm.name = 'iron_responsive_element' OR cvterm.name = 'coding_start' OR cvterm.name = 'coding_end' OR cvterm.name = 'codon' 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 = '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 = 'cryptic_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 = 'SL3_acceptor_site' OR cvterm.name = 'SL4_acceptor_site' OR cvterm.name = 'SL5_acceptor_site' OR cvterm.name = 'SL6_acceptor_site' OR cvterm.name = 'SL7_acceptor_site' OR cvterm.name = 'SL8_acceptor_site' OR cvterm.name = 'SL9_acceptor_site' OR cvterm.name = 'SL10_accceptor_site' OR cvterm.name = 'SL11_acceptor_site' OR cvterm.name = 'SL12_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 = 'peptide_localization_signal' 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 = 'transit_peptide' OR cvterm.name = 'nuclear_localization_signal' OR cvterm.name = 'endosomal_localization_signal' OR cvterm.name = 'lysosomal_localization_signal' OR cvterm.name = 'nuclear_export_signal' OR cvterm.name = 'nuclear_rim_localization_signal' OR cvterm.name = 'cleaved_initiator_methionine' 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 = 'histone_modification' OR cvterm.name = 'histone_methylation_site' OR cvterm.name = 'histone_acetylation_site' OR cvterm.name = 'histone_ubiqitination_site' OR cvterm.name = 'histone_acylation_region' OR cvterm.name = 'H4K20_monomethylation_site' OR cvterm.name = 'H2BK5_monomethylation_site' OR cvterm.name = 'H3K27_methylation_site' OR cvterm.name = 'H3K36_methylation_site' OR cvterm.name = 'H3K4_methylation_site' OR cvterm.name = 'H3K79_methylation_site' OR cvterm.name = 'H3K9_methylation_site' OR cvterm.name = 'H3K27_monomethylation_site' OR cvterm.name = 'H3K27_trimethylation_site' OR cvterm.name = 'H3K27_dimethylation_site' OR cvterm.name = 'H3K36_monomethylation_site' OR cvterm.name = 'H3K36_dimethylation_site' OR cvterm.name = 'H3K36_trimethylation_site' OR cvterm.name = 'H3K4_monomethylation_site' OR cvterm.name = 'H3K4_trimethylation' OR cvterm.name = 'H3K4_dimethylation_site' OR cvterm.name = 'H3K79_monomethylation_site' OR cvterm.name = 'H3K79_dimethylation_site' OR cvterm.name = 'H3K79_trimethylation_site' OR cvterm.name = 'H3K9_trimethylation_site' OR cvterm.name = 'H3K9_monomethylation_site' OR cvterm.name = 'H3K9_dimethylation_site' OR cvterm.name = 'H3K9_acetylation_site' OR cvterm.name = 'H3K14_acetylation_site' OR cvterm.name = 'H3K18_acetylation_site' OR cvterm.name = 'H3K23_acylation site' OR cvterm.name = 'H3K27_acylation_site' OR cvterm.name = 'H4K16_acylation_site' OR cvterm.name = 'H4K5_acylation_site' OR cvterm.name = 'H4K8_acylation site' OR cvterm.name = 'H2B_ubiquitination_site' OR cvterm.name = 'H4K_acylation_region' 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 = 'pseudogenic_gene_segment' OR cvterm.name = 'mobile_intron' OR cvterm.name = 'extrachromosomal_mobile_genetic_element' OR cvterm.name = 'integrated_mobile_genetic_element' OR cvterm.name = 'natural_transposable_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 = '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 = 'nested_transposon' OR cvterm.name = 'LTR_retrotransposon' OR cvterm.name = 'non_LTR_retrotransposon' 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 = 'p_element' 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 = '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 = 'targeting_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 = '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 = '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 = 'arginine' 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 = 'heritable_phenotypic_marker' OR cvterm.name = 'DArT_marker' OR cvterm.name = 'nucleotide_motif' OR cvterm.name = 'DNA_motif' OR cvterm.name = 'RNA_motif' OR cvterm.name = 'PSE_motif' OR cvterm.name = 'CAAT_signal' OR cvterm.name = 'minus_10_signal' OR cvterm.name = 'minus_35_signal' OR cvterm.name = 'DRE_motif' OR cvterm.name = 'E_box_motif' OR cvterm.name = 'INR1_motif' OR cvterm.name = 'GAGA_motif' OR cvterm.name = 'octamer_motif' OR cvterm.name = 'retinoic_acid_responsive_element' OR cvterm.name = 'promoter_element' OR cvterm.name = 'DCE_SI' OR cvterm.name = 'DCE_SII' OR cvterm.name = 'DCE_SIII' OR cvterm.name = 'minus_12_signal' OR cvterm.name = 'minus_24_signal' OR cvterm.name = 'GC_rich_promoter_region' 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 = 'core_promoter_element' OR cvterm.name = 'regulatory_promoter_element' OR cvterm.name = 'INR_motif' OR cvterm.name = 'DPE_motif' OR cvterm.name = 'BREu_motif' OR cvterm.name = 'TATA_box' OR cvterm.name = 'A_box' OR cvterm.name = 'B_box' OR cvterm.name = 'C_box' OR cvterm.name = 'MTE' OR cvterm.name = 'BREd_motif' OR cvterm.name = 'DCE' OR cvterm.name = 'intermediate_element' OR cvterm.name = 'RNA_polymerase_II_TATA_box' OR cvterm.name = 'RNA_polymerase_III_TATA_box' OR cvterm.name = 'A_box_type_1' OR cvterm.name = 'A_box_type_2' OR cvterm.name = 'proximal_promoter_element' OR cvterm.name = 'distal_promoter_element' 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 = 'blunt_end_restriction_enzyme_cleavage_site' OR cvterm.name = 'sticky_end_restriction_enzyme_cleavage_site' OR cvterm.name = 'modified_base' OR cvterm.name = 'epigenetically_modified_gene' OR cvterm.name = 'histone_modification' OR cvterm.name = 'methylated_base_feature' OR cvterm.name = 'methylated_C' OR cvterm.name = 'methylated_A' 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 = 'histone_methylation_site' OR cvterm.name = 'histone_acetylation_site' OR cvterm.name = 'histone_ubiqitination_site' OR cvterm.name = 'histone_acylation_region' OR cvterm.name = 'H4K20_monomethylation_site' OR cvterm.name = 'H2BK5_monomethylation_site' OR cvterm.name = 'H3K27_methylation_site' OR cvterm.name = 'H3K36_methylation_site' OR cvterm.name = 'H3K4_methylation_site' OR cvterm.name = 'H3K79_methylation_site' OR cvterm.name = 'H3K9_methylation_site' OR cvterm.name = 'H3K27_monomethylation_site' OR cvterm.name = 'H3K27_trimethylation_site' OR cvterm.name = 'H3K27_dimethylation_site' OR cvterm.name = 'H3K36_monomethylation_site' OR cvterm.name = 'H3K36_dimethylation_site' OR cvterm.name = 'H3K36_trimethylation_site' OR cvterm.name = 'H3K4_monomethylation_site' OR cvterm.name = 'H3K4_trimethylation' OR cvterm.name = 'H3K4_dimethylation_site' OR cvterm.name = 'H3K79_monomethylation_site' OR cvterm.name = 'H3K79_dimethylation_site' OR cvterm.name = 'H3K79_trimethylation_site' OR cvterm.name = 'H3K9_trimethylation_site' OR cvterm.name = 'H3K9_monomethylation_site' OR cvterm.name = 'H3K9_dimethylation_site' OR cvterm.name = 'H3K9_acetylation_site' OR cvterm.name = 'H3K14_acetylation_site' OR cvterm.name = 'H3K18_acetylation_site' OR cvterm.name = 'H3K23_acylation site' OR cvterm.name = 'H3K27_acylation_site' OR cvterm.name = 'H4K16_acylation_site' OR cvterm.name = 'H4K5_acylation_site' OR cvterm.name = 'H4K8_acylation site' OR cvterm.name = 'H2B_ubiquitination_site' OR cvterm.name = 'H4K_acylation_region' OR cvterm.name = 'operon' OR cvterm.name = 'mating_type_region' 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 = 'MNP' OR cvterm.name = 'SNV' OR cvterm.name = 'complex_substitution' OR cvterm.name = 'simple_sequence_length_variation' OR cvterm.name = 'SNP' OR cvterm.name = 'point_mutation' 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_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 = 'non_LTR_retrotransposon_polymeric_tract' OR cvterm.name = 'LTR_component' OR cvterm.name = 'repeat_fragment' OR cvterm.name = 'transposon_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 = 'SL3_acceptor_site' OR cvterm.name = 'SL4_acceptor_site' OR cvterm.name = 'SL5_acceptor_site' OR cvterm.name = 'SL6_acceptor_site' OR cvterm.name = 'SL7_acceptor_site' OR cvterm.name = 'SL8_acceptor_site' OR cvterm.name = 'SL9_acceptor_site' OR cvterm.name = 'SL10_accceptor_site' OR cvterm.name = 'SL11_acceptor_site' OR cvterm.name = 'SL12_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 binding site that, in the molecule, in ***
--- *** teracts selectively and non-covalently w ***
--- *** ith 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 = 'polypeptide_DNA_contact' OR cvterm.name = 'DNA_binding_site';

--- ************************************************
--- *** 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: 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 inactive form which may recombine  ***
--- *** at a telomeric locus to form a functiona ***
--- *** l 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: arginine ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW arginine AS
  SELECT
    feature_id AS arginine_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'arginine';

--- ************************************************
--- *** 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 binding site that, in an insulator reg ***
--- *** ion of a nucleotide molecule, interacts  ***
--- *** selectively and non-covalently with poly ***
--- *** peptide residues.                        ***
--- ************************************************
---

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 binding site that, in the enhancer reg ***
--- *** ion of a nucleotide molecule, interacts  ***
--- *** selectively and non-covalently with poly ***
--- *** peptide residues.                        ***
--- ************************************************
---

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_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 a highly 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: snv ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** SNVs are single nucleotide positions in  ***
--- *** genomic DNA at which different sequence  ***
--- *** alternatives exist.                      ***
--- ************************************************
---

CREATE VIEW snv AS
  SELECT
    feature_id AS snv_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'SNP' OR cvterm.name = 'point_mutation' 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 = 'SNV';

--- ************************************************
--- *** relation: x_element_combinatorial_repeat ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An X element combinatorial repeat is a r ***
--- *** epeat region located between the X eleme ***
--- *** nt and the telomere or adjacent Y' eleme ***
--- *** nt.                                      ***
--- ************************************************
---

CREATE VIEW x_element_combinatorial_repeat AS
  SELECT
    feature_id AS x_element_combinatorial_repeat_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'X_element_combinatorial_repeat';

--- ************************************************
--- *** relation: y_prime_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A Y' element is a repeat region (SO:0000 ***
--- *** 657) located adjacent to telomeric repea ***
--- *** ts or X element combinatorial repeats, e ***
--- *** ither as a single copy or tandem repeat  ***
--- *** of two to four copies.                   ***
--- ************************************************
---

CREATE VIEW y_prime_element AS
  SELECT
    feature_id AS y_prime_element_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'Y_prime_element';

--- ************************************************
--- *** relation: standard_draft ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The status of a whole genome sequence, w ***
--- *** here the data is minimally filtered or u ***
--- *** n-filtered, from any number of sequencin ***
--- *** g platforms, and is assembled into conti ***
--- *** gs. Genome sequence of this quality may  ***
--- *** harbour regions of poor quality and can  ***
--- *** be relatively incomplete.                ***
--- ************************************************
---

CREATE VIEW standard_draft AS
  SELECT
    feature_id AS standard_draft_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'standard_draft';

--- ************************************************
--- *** relation: high_quality_draft ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The status of a whole genome sequence, w ***
--- *** here overall coverage represents at leas ***
--- *** t 90 percent of the genome.              ***
--- ************************************************
---

CREATE VIEW high_quality_draft AS
  SELECT
    feature_id AS high_quality_draft_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'high_quality_draft';

--- ************************************************
--- *** relation: improved_high_quality_draft ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The status of a whole genome sequence, w ***
--- *** here additional work has been performed, ***
--- ***  using either manual or automated method ***
--- *** s, such as gap resolution.               ***
--- ************************************************
---

CREATE VIEW improved_high_quality_draft AS
  SELECT
    feature_id AS improved_high_quality_draft_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'improved_high_quality_draft';

--- ************************************************
--- *** relation: annotation_directed_improved_draft ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The status of a whole genome sequence,wh ***
--- *** ere annotation, and verification of codi ***
--- *** ng regions has occurred.                 ***
--- ************************************************
---

CREATE VIEW annotation_directed_improved_draft AS
  SELECT
    feature_id AS annotation_directed_improved_draft_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'annotation_directed_improved_draft';

--- ************************************************
--- *** relation: noncontiguous_finished ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The status of a whole genome sequence, w ***
--- *** here the assembly is high quality, closu ***
--- *** re approaches have been successful for m ***
--- *** ost gaps, misassemblies and low quality  ***
--- *** regions.                                 ***
--- ************************************************
---

CREATE VIEW noncontiguous_finished AS
  SELECT
    feature_id AS noncontiguous_finished_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'noncontiguous_finished';

--- ************************************************
--- *** relation: finished_genome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The status of a whole genome sequence, w ***
--- *** ith less than 1 error per 100,000 base p ***
--- *** airs.                                    ***
--- ************************************************
---

CREATE VIEW finished_genome AS
  SELECT
    feature_id AS finished_genome_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'finished_genome';

--- ************************************************
--- *** relation: intronic_regulatory_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A regulatory region that is part of an i ***
--- *** ntron.                                   ***
--- ************************************************
---

CREATE VIEW intronic_regulatory_region AS
  SELECT
    feature_id AS intronic_regulatory_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'intronic_regulatory_region';

--- ************************************************
--- *** relation: centromere_dna_element_i ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A centromere DNA Element I (CDEI) is a c ***
--- *** onserved region, part of the centromere, ***
--- ***  consisting of a consensus region compos ***
--- *** ed of 8-11bp which enables binding by th ***
--- *** e centromere binding factor 1(Cbf1p).    ***
--- ************************************************
---

CREATE VIEW centromere_dna_element_i AS
  SELECT
    feature_id AS centromere_dna_element_i_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'centromere_DNA_Element_I';

--- ************************************************
--- *** relation: centromere_dna_element_ii ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A centromere DNA Element II (CDEII) is p ***
--- *** art a conserved region of the centromere ***
--- *** , consisting of a consensus region that  ***
--- *** is AT-rich and ~ 75-100 bp in length.    ***
--- ************************************************
---

CREATE VIEW centromere_dna_element_ii AS
  SELECT
    feature_id AS centromere_dna_element_ii_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'centromere_DNA_Element_II';

--- ************************************************
--- *** relation: centromere_dna_element_iii ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A centromere DNA Element I (CDEI) is a c ***
--- *** onserved region, part of the centromere, ***
--- ***  consisting of a consensus region that c ***
--- *** onsists of a 25-bp which enables binding ***
--- ***  by the centromere DNA binding factor 3  ***
--- *** (CBF3) complex.                          ***
--- ************************************************
---

CREATE VIEW centromere_dna_element_iii AS
  SELECT
    feature_id AS centromere_dna_element_iii_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'centromere_DNA_Element_III';

--- ************************************************
--- *** relation: telomeric_repeat ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The telomeric repeat is a repeat region, ***
--- ***  part of the chromosome, which in yeast, ***
--- ***  is a G-rich terminal sequence of the fo ***
--- *** rm (TG(1-3))n or more precisely ((TG)(1- ***
--- *** 6)TG(2-3))n.                             ***
--- ************************************************
---

CREATE VIEW telomeric_repeat AS
  SELECT
    feature_id AS telomeric_repeat_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'telomeric_repeat';

--- ************************************************
--- *** relation: x_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The X element is a conserved region, of  ***
--- *** the telomere, of ~475 bp that contains a ***
--- *** n ARS sequence and in most cases an Abf1 ***
--- *** p binding site.                          ***
--- ************************************************
---

CREATE VIEW x_element AS
  SELECT
    feature_id AS x_element_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'X_element';

--- ************************************************
--- *** relation: yac_end ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of sequence from the end of a Y ***
--- *** AC clone that may provide a highly speci ***
--- *** fic marker.                              ***
--- ************************************************
---

CREATE VIEW yac_end AS
  SELECT
    feature_id AS yac_end_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'YAC_end';

--- ************************************************
--- *** relation: whole_genome_sequence_status ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The status of whole genome sequence.     ***
--- ************************************************
---

CREATE VIEW whole_genome_sequence_status AS
  SELECT
    feature_id AS whole_genome_sequence_status_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'standard_draft' OR cvterm.name = 'high_quality_draft' OR cvterm.name = 'improved_high_quality_draft' OR cvterm.name = 'annotation_directed_improved_draft' OR cvterm.name = 'noncontiguous_finished' OR cvterm.name = 'finished_genome' OR cvterm.name = 'whole_genome_sequence_status';

--- ************************************************
--- *** relation: heritable_phenotypic_marker ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A biological_region characterized as a s ***
--- *** ingle heritable trait in a phenotype scr ***
--- *** een. The heritable phenotype may be mapp ***
--- *** ed to a chromosome but generally has not ***
--- ***  been characterized to a specific gene l ***
--- *** ocus.                                    ***
--- ************************************************
---

CREATE VIEW heritable_phenotypic_marker AS
  SELECT
    feature_id AS heritable_phenotypic_marker_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'heritable_phenotypic_marker';

--- ************************************************
--- *** relation: peptide_collection ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A collection of peptide sequences.       ***
--- ************************************************
---

CREATE VIEW peptide_collection AS
  SELECT
    feature_id AS peptide_collection_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'peptide_collection';

--- ************************************************
--- *** relation: high_identity_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An experimental feature with high sequen ***
--- *** ce identity to another sequence.         ***
--- ************************************************
---

CREATE VIEW high_identity_region AS
  SELECT
    feature_id AS high_identity_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'high_identity_region';

--- ************************************************
--- *** relation: processed_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript for which no open reading f ***
--- *** rame has been identified and for which n ***
--- *** o other function has been determined.    ***
--- ************************************************
---

CREATE VIEW processed_transcript AS
  SELECT
    feature_id AS processed_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'processed_transcript';

--- ************************************************
--- *** relation: assortment_derived_variation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome variation derived from an e ***
--- *** vent during meiosis.                     ***
--- ************************************************
---

CREATE VIEW assortment_derived_variation AS
  SELECT
    feature_id AS assortment_derived_variation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'assortment_derived_duplication' OR cvterm.name = 'assortment_derived_deficiency_plus_duplication' OR cvterm.name = 'assortment_derived_deficiency' OR cvterm.name = 'assortment_derived_aneuploid' OR cvterm.name = 'assortment_derived_variation';

--- ************************************************
--- *** relation: reference_genome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A collection of sequences (often chromos ***
--- *** omes) taken as the standard for a given  ***
--- *** organism and genome assembly.            ***
--- ************************************************
---

CREATE VIEW reference_genome AS
  SELECT
    feature_id AS reference_genome_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'reference_genome';

--- ************************************************
--- *** relation: variant_genome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A collection of sequences (often chromos ***
--- *** omes) of an individual.                  ***
--- ************************************************
---

CREATE VIEW variant_genome AS
  SELECT
    feature_id AS variant_genome_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'chromosomally_aberrant_genome' OR cvterm.name = 'variant_genome';

--- ************************************************
--- *** relation: variant_collection ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A collection of one or more sequences of ***
--- ***  an individual.                          ***
--- ************************************************
---

CREATE VIEW variant_collection AS
  SELECT
    feature_id AS variant_collection_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'chromosome_variation' OR cvterm.name = 'allele' OR cvterm.name = 'haplotype' OR cvterm.name = 'genotype' OR cvterm.name = 'diplotype' OR cvterm.name = 'assortment_derived_variation' OR cvterm.name = 'chromosome_number_variation' OR cvterm.name = 'chromosome_structure_variation' OR cvterm.name = 'assortment_derived_duplication' OR cvterm.name = 'assortment_derived_deficiency_plus_duplication' OR cvterm.name = 'assortment_derived_deficiency' OR cvterm.name = 'assortment_derived_aneuploid' OR 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 = 'free_chromosome_arm' OR cvterm.name = 'chromosomal_transposition' OR cvterm.name = 'aneuploid_chromosome' OR cvterm.name = 'intrachromosomal_mutation' OR cvterm.name = 'interchromosomal_mutation' OR cvterm.name = 'chromosomal_duplication' 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 = 'unoriented_intrachromosomal_transposition' OR cvterm.name = 'deficient_interchromosomal_transposition' OR cvterm.name = 'inverted_interchromosomal_transposition' OR cvterm.name = 'uninverted_interchromosomal_transposition' OR cvterm.name = 'unoriented_interchromosomal_transposition' OR cvterm.name = 'inversion_derived_aneuploid_chromosome' 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 = 'deficient_intrachromosomal_transposition' 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 = 'inverted_intrachromosomal_transposition' 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 = 'bipartite_duplication' OR cvterm.name = 'deficient_intrachromosomal_transposition' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'uninverted_intrachromosomal_transposition' OR cvterm.name = 'unoriented_intrachromosomal_transposition' 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 = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'deficient_interchromosomal_transposition' OR cvterm.name = 'inverted_interchromosomal_transposition' OR cvterm.name = 'uninverted_interchromosomal_transposition' OR cvterm.name = 'unoriented_interchromosomal_transposition' 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 = 'bipartite_duplication' OR cvterm.name = 'deficient_intrachromosomal_transposition' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'uninverted_intrachromosomal_transposition' OR cvterm.name = 'unoriented_intrachromosomal_transposition' 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 = '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 = 'polymorphic_sequence_variant' OR cvterm.name = 'variant_collection';

--- ************************************************
--- *** relation: alteration_attribute ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW alteration_attribute AS
  SELECT
    feature_id AS alteration_attribute_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'chromosomal_variation_attribute' OR cvterm.name = 'insertion_attribute' OR cvterm.name = 'inversion_attribute' OR cvterm.name = 'translocaton_attribute' OR cvterm.name = 'duplication_attribute' OR cvterm.name = 'intrachromosomal' OR cvterm.name = 'interchromosomal' OR cvterm.name = 'tandem' OR cvterm.name = 'direct' OR cvterm.name = 'inverted' OR cvterm.name = 'pericentric' OR cvterm.name = 'paracentric' OR cvterm.name = 'reciprocal' OR cvterm.name = 'insertional' OR cvterm.name = 'free' OR cvterm.name = 'alteration_attribute';

--- ************************************************
--- *** relation: chromosomal_variation_attribute ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW chromosomal_variation_attribute AS
  SELECT
    feature_id AS chromosomal_variation_attribute_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'intrachromosomal' OR cvterm.name = 'interchromosomal' OR cvterm.name = 'chromosomal_variation_attribute';

--- ************************************************
--- *** relation: intrachromosomal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW intrachromosomal AS
  SELECT
    feature_id AS intrachromosomal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'intrachromosomal';

--- ************************************************
--- *** relation: interchromosomal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW interchromosomal AS
  SELECT
    feature_id AS interchromosomal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'interchromosomal';

--- ************************************************
--- *** relation: insertion_attribute ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A quality of a chromosomal insertion,.   ***
--- ************************************************
---

CREATE VIEW insertion_attribute AS
  SELECT
    feature_id AS insertion_attribute_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'tandem' OR cvterm.name = 'direct' OR cvterm.name = 'inverted' OR cvterm.name = 'insertion_attribute';

--- ************************************************
--- *** relation: tandem ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW tandem AS
  SELECT
    feature_id AS tandem_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'tandem';

--- ************************************************
--- *** relation: direct ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A quality of an insertion where the inse ***
--- *** rt is not in a cytologically inverted or ***
--- *** ientation.                               ***
--- ************************************************
---

CREATE VIEW direct AS
  SELECT
    feature_id AS direct_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'direct';

--- ************************************************
--- *** relation: inverted ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A quality of an insertion where the inse ***
--- *** rt is in a cytologically inverted orient ***
--- *** ation.                                   ***
--- ************************************************
---

CREATE VIEW inverted AS
  SELECT
    feature_id AS inverted_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'inverted';

--- ************************************************
--- *** relation: free ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The quality of a duplication where the n ***
--- *** ew region exists independently of the or ***
--- *** iginal.                                  ***
--- ************************************************
---

CREATE VIEW free AS
  SELECT
    feature_id AS free_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'free';

--- ************************************************
--- *** relation: inversion_attribute ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW inversion_attribute AS
  SELECT
    feature_id AS inversion_attribute_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'pericentric' OR cvterm.name = 'paracentric' OR cvterm.name = 'inversion_attribute';

--- ************************************************
--- *** relation: pericentric ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW pericentric AS
  SELECT
    feature_id AS pericentric_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'pericentric';

--- ************************************************
--- *** relation: paracentric ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW paracentric AS
  SELECT
    feature_id AS paracentric_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'paracentric';

--- ************************************************
--- *** relation: translocaton_attribute ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW translocaton_attribute AS
  SELECT
    feature_id AS translocaton_attribute_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'reciprocal' OR cvterm.name = 'insertional' OR cvterm.name = 'translocaton_attribute';

--- ************************************************
--- *** relation: reciprocal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW reciprocal AS
  SELECT
    feature_id AS reciprocal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'reciprocal';

--- ************************************************
--- *** relation: insertional ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW insertional AS
  SELECT
    feature_id AS insertional_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'insertional';

--- ************************************************
--- *** relation: duplication_attribute ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW duplication_attribute AS
  SELECT
    feature_id AS duplication_attribute_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'free' OR cvterm.name = 'duplication_attribute';

--- ************************************************
--- *** relation: chromosomally_aberrant_genome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW chromosomally_aberrant_genome AS
  SELECT
    feature_id AS chromosomally_aberrant_genome_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'chromosomally_aberrant_genome';

--- ************************************************
--- *** relation: assembly_error_correction ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of sequence where the final nuc ***
--- *** leotide assignment differs from the orig ***
--- *** inal assembly due to an improvement that ***
--- ***  replaces a mistake.                     ***
--- ************************************************
---

CREATE VIEW assembly_error_correction AS
  SELECT
    feature_id AS assembly_error_correction_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'assembly_error_correction';

--- ************************************************
--- *** relation: base_call_error_correction ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of sequence where the final nuc ***
--- *** leotide assignment is different from tha ***
--- *** t given by the base caller due to an imp ***
--- *** rovement that replaces a mistake.        ***
--- ************************************************
---

CREATE VIEW base_call_error_correction AS
  SELECT
    feature_id AS base_call_error_correction_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'base_call_error_correction';

--- ************************************************
--- *** relation: peptide_localization_signal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of peptide sequence used to tar ***
--- *** get the polypeptide molecule to a specif ***
--- *** ic organelle.                            ***
--- ************************************************
---

CREATE VIEW peptide_localization_signal AS
  SELECT
    feature_id AS peptide_localization_signal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'signal_peptide' OR cvterm.name = 'transit_peptide' OR cvterm.name = 'nuclear_localization_signal' OR cvterm.name = 'endosomal_localization_signal' OR cvterm.name = 'lysosomal_localization_signal' OR cvterm.name = 'nuclear_export_signal' OR cvterm.name = 'nuclear_rim_localization_signal' OR cvterm.name = 'peptide_localization_signal';

--- ************************************************
--- *** relation: nuclear_localization_signal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A polypeptide region that targets a poly ***
--- *** peptide to the nucleus.                  ***
--- ************************************************
---

CREATE VIEW nuclear_localization_signal AS
  SELECT
    feature_id AS nuclear_localization_signal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'nuclear_localization_signal';

--- ************************************************
--- *** relation: endosomal_localization_signal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A polypeptide region that targets a poly ***
--- *** peptide to the endosome.                 ***
--- ************************************************
---

CREATE VIEW endosomal_localization_signal AS
  SELECT
    feature_id AS endosomal_localization_signal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'endosomal_localization_signal';

--- ************************************************
--- *** relation: lysosomal_localization_signal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A polypeptide region that targets a poly ***
--- *** peptide to the lysosome.                 ***
--- ************************************************
---

CREATE VIEW lysosomal_localization_signal AS
  SELECT
    feature_id AS lysosomal_localization_signal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'lysosomal_localization_signal';

--- ************************************************
--- *** relation: nuclear_export_signal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A polypeptide region that targets a poly ***
--- *** peptide to he cytoplasm.                 ***
--- ************************************************
---

CREATE VIEW nuclear_export_signal AS
  SELECT
    feature_id AS nuclear_export_signal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'nuclear_export_signal';

--- ************************************************
--- *** relation: recombination_signal_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region recognized by a recombinase.    ***
--- ************************************************
---

CREATE VIEW recombination_signal_sequence AS
  SELECT
    feature_id AS recombination_signal_sequence_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'recombination_signal_sequence';

--- ************************************************
--- *** relation: cryptic_splice_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A splice site that is in part of the tra ***
--- *** nscript not normally spliced. They occur ***
--- ***  via mutation or transcriptional error.  ***
--- ************************************************
---

CREATE VIEW cryptic_splice_site AS
  SELECT
    feature_id AS cryptic_splice_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'cryptic_splice_site';

--- ************************************************
--- *** relation: nuclear_rim_localization_signal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A polypeptide region that targets a poly ***
--- *** peptide to the nuclear rim.              ***
--- ************************************************
---

CREATE VIEW nuclear_rim_localization_signal AS
  SELECT
    feature_id AS nuclear_rim_localization_signal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'nuclear_rim_localization_signal';

--- ************************************************
--- *** relation: p_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A P_element is a DNA transposon responsi ***
--- *** ble for hybrid dysgenesis.               ***
--- ************************************************
---

CREATE VIEW p_element AS
  SELECT
    feature_id AS p_element_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'p_element';

--- ************************************************
--- *** relation: functional_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant in which the function ***
--- ***  of a gene product is altered with respe ***
--- *** ct to a reference.                       ***
--- ************************************************
---

CREATE VIEW functional_variant AS
  SELECT
    feature_id AS functional_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'transcript_function_variant' OR cvterm.name = 'translational_product_function_variant' OR cvterm.name = 'level_of_transcript_variant' OR cvterm.name = 'transcript_processing_variant' OR cvterm.name = 'transcript_stability_variant' OR cvterm.name = 'transcription_variant' OR cvterm.name = 'decreased_transcript_level_variant' OR cvterm.name = 'increased_transcript_level_variant' OR cvterm.name = 'editing_variant' OR cvterm.name = 'polyadenylation_variant' OR cvterm.name = 'increased_polyadenylation_variant' OR cvterm.name = 'decreased_polyadenylation_variant' OR cvterm.name = 'decreased_transcript_stability_variant' OR cvterm.name = 'increased_transcript_stability_variant' OR cvterm.name = 'rate_of_transcription_variant' OR cvterm.name = 'increased_transcription_rate_variant' OR cvterm.name = 'decreased_transcription_rate_variant' OR cvterm.name = 'translational_product_level_variant' OR cvterm.name = 'polypeptide_function_variant' OR cvterm.name = 'decreased_translational_product_level' OR cvterm.name = 'increased_translational_product_level' OR cvterm.name = 'polypeptide_gain_of_function_variant' OR cvterm.name = 'polypeptide_localization_variant' OR cvterm.name = 'polypeptide_loss_of_function_variant' OR cvterm.name = 'polypeptide_post_translational_processing_variant' OR cvterm.name = 'inactive_ligand_binding_site' OR cvterm.name = 'polypeptide_partial_loss_of_function' OR cvterm.name = 'inactive_catalytic_site' OR cvterm.name = 'functional_variant';

--- ************************************************
--- *** relation: structural_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that changes one or m ***
--- *** ore sequence features.                   ***
--- ************************************************
---

CREATE VIEW structural_variant AS
  SELECT
    feature_id AS structural_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'silent_mutation' OR cvterm.name = 'copy_number_change' OR cvterm.name = 'gene_variant' OR cvterm.name = 'regulatory_region_variant' OR cvterm.name = 'intergenic_variant' OR cvterm.name = 'upstream_gene_variant' OR cvterm.name = 'downstream_gene_variant' OR cvterm.name = 'gene_fusion' OR cvterm.name = 'splicing_variant' OR cvterm.name = 'transcript_variant' OR cvterm.name = 'translational_product_structure_variant' OR cvterm.name = 'cryptic_splice_site_variant' OR cvterm.name = 'exon_loss' OR cvterm.name = 'intron_gain' OR cvterm.name = 'splice_region_variant' OR cvterm.name = 'cryptic_splice_acceptor' OR cvterm.name = 'cryptic_splice_donor' OR cvterm.name = 'complex_change_in_transcript' OR cvterm.name = 'transcript_secondary_structure_variant' OR cvterm.name = 'nc_transcript_variant' OR cvterm.name = 'NMD_transcript_variant' OR cvterm.name = 'UTR_variant' OR cvterm.name = 'intron_variant' OR cvterm.name = 'exon_variant' OR cvterm.name = 'compensatory_transcript_secondary_structure_variant' OR cvterm.name = 'mature_miRNA_variant' OR cvterm.name = '5_prime_UTR_variant' OR cvterm.name = '3_prime_UTR_variant' OR cvterm.name = 'splice_site_variant' OR cvterm.name = 'splice_acceptor_variant' OR cvterm.name = 'splice_donor_variant' OR cvterm.name = 'splice_donor_5th_base_variant' OR cvterm.name = 'coding_sequence_variant' OR cvterm.name = 'non_coding_exon_variant' OR cvterm.name = 'codon_variant' OR cvterm.name = 'frameshift_variant' OR cvterm.name = 'inframe_variant' OR cvterm.name = 'initiator_codon_change' OR cvterm.name = 'non_synonymous_codon' OR cvterm.name = 'synonymous_codon' OR cvterm.name = 'terminal_codon_variant' OR cvterm.name = 'stop_gained' OR cvterm.name = 'missense_codon' OR cvterm.name = 'conservative_missense_codon' OR cvterm.name = 'non_conservative_missense_codon' OR cvterm.name = 'terminator_codon_variant' OR cvterm.name = 'incomplete_terminal_codon_variant' OR cvterm.name = 'stop_retained_variant' OR cvterm.name = 'stop_lost' OR cvterm.name = 'frame_restoring_variant' OR cvterm.name = 'minus_1_frameshift_variant' OR cvterm.name = 'minus_2_frameshift_variant' OR cvterm.name = 'plus_1_frameshift_variant' OR cvterm.name = 'plus_2_frameshift variant' OR cvterm.name = 'inframe_codon_gain' OR cvterm.name = 'inframe_codon_loss' OR cvterm.name = '3D_polypeptide_structure_variant' OR cvterm.name = 'complex_change_of_translational_product_variant' OR cvterm.name = 'polypeptide_sequence_variant' OR cvterm.name = 'complex_3D_structural_variant' OR cvterm.name = 'conformational_change_variant' OR cvterm.name = 'amino_acid_deletion' OR cvterm.name = 'amino_acid_insertion' OR cvterm.name = 'amino_acid_substitution' OR cvterm.name = 'elongated_polypeptide' OR cvterm.name = 'polypeptide_fusion' OR cvterm.name = 'polypeptide_truncation' OR cvterm.name = 'conservative_amino_acid_substitution' OR cvterm.name = 'non_conservative_amino_acid_substitution' OR cvterm.name = 'elongated_polypeptide_C_terminal' OR cvterm.name = 'elongated_polypeptide_N_terminal' OR cvterm.name = 'elongated_in_frame_polypeptide_C_terminal' OR cvterm.name = 'elongated_out_of_frame_polypeptide_C_terminal' OR cvterm.name = 'elongated_in_frame_polypeptide_N_terminal_elongation' OR cvterm.name = 'elongated_out_of_frame_polypeptide_N_terminal' OR cvterm.name = 'TF_binding_site_variant' OR cvterm.name = '5KB_upstream_variant' OR cvterm.name = '2KB_upstream_variant' OR cvterm.name = '5KB_downstream_variant' OR cvterm.name = '500B_downstream_variant' OR cvterm.name = 'structural_variant';

--- ************************************************
--- *** relation: transcript_function_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant which alters the func ***
--- *** tioning of a transcript with respect to  ***
--- *** a reference sequence.                    ***
--- ************************************************
---

CREATE VIEW transcript_function_variant AS
  SELECT
    feature_id AS transcript_function_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'level_of_transcript_variant' OR cvterm.name = 'transcript_processing_variant' OR cvterm.name = 'transcript_stability_variant' OR cvterm.name = 'transcription_variant' OR cvterm.name = 'decreased_transcript_level_variant' OR cvterm.name = 'increased_transcript_level_variant' OR cvterm.name = 'editing_variant' OR cvterm.name = 'polyadenylation_variant' OR cvterm.name = 'increased_polyadenylation_variant' OR cvterm.name = 'decreased_polyadenylation_variant' OR cvterm.name = 'decreased_transcript_stability_variant' OR cvterm.name = 'increased_transcript_stability_variant' OR cvterm.name = 'rate_of_transcription_variant' OR cvterm.name = 'increased_transcription_rate_variant' OR cvterm.name = 'decreased_transcription_rate_variant' OR cvterm.name = 'transcript_function_variant';

--- ************************************************
--- *** relation: translational_product_function_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that affects the func ***
--- *** tioning of a translational product with  ***
--- *** respect to a reference sequence.         ***
--- ************************************************
---

CREATE VIEW translational_product_function_variant AS
  SELECT
    feature_id AS translational_product_function_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'translational_product_level_variant' OR cvterm.name = 'polypeptide_function_variant' OR cvterm.name = 'decreased_translational_product_level' OR cvterm.name = 'increased_translational_product_level' OR cvterm.name = 'polypeptide_gain_of_function_variant' OR cvterm.name = 'polypeptide_localization_variant' OR cvterm.name = 'polypeptide_loss_of_function_variant' OR cvterm.name = 'polypeptide_post_translational_processing_variant' OR cvterm.name = 'inactive_ligand_binding_site' OR cvterm.name = 'polypeptide_partial_loss_of_function' OR cvterm.name = 'inactive_catalytic_site' OR cvterm.name = 'translational_product_function_variant';

--- ************************************************
--- *** relation: level_of_transcript_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant which alters the leve ***
--- *** l of a transcript.                       ***
--- ************************************************
---

CREATE VIEW level_of_transcript_variant AS
  SELECT
    feature_id AS level_of_transcript_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'decreased_transcript_level_variant' OR cvterm.name = 'increased_transcript_level_variant' OR cvterm.name = 'level_of_transcript_variant';

--- ************************************************
--- *** relation: decreased_transcript_level_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that increases the le ***
--- *** vel of mature, spliced and processed RNA ***
--- ***  with respect to a reference sequence.   ***
--- ************************************************
---

CREATE VIEW decreased_transcript_level_variant AS
  SELECT
    feature_id AS decreased_transcript_level_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'decreased_transcript_level_variant';

--- ************************************************
--- *** relation: increased_transcript_level_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that increases the le ***
--- *** vel of mature, spliced and processed RNA ***
--- ***  with respect to a reference sequence.   ***
--- ************************************************
---

CREATE VIEW increased_transcript_level_variant AS
  SELECT
    feature_id AS increased_transcript_level_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'increased_transcript_level_variant';

--- ************************************************
--- *** relation: transcript_processing_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that affects the post ***
--- ***  transcriptional processing of a transcr ***
--- *** ipt with respect to a reference sequence ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW transcript_processing_variant AS
  SELECT
    feature_id AS transcript_processing_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'editing_variant' OR cvterm.name = 'polyadenylation_variant' OR cvterm.name = 'increased_polyadenylation_variant' OR cvterm.name = 'decreased_polyadenylation_variant' OR cvterm.name = 'transcript_processing_variant';

--- ************************************************
--- *** relation: editing_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript processing variant whereby  ***
--- *** the process of editing is disrupted with ***
--- ***  respect to the reference.               ***
--- ************************************************
---

CREATE VIEW editing_variant AS
  SELECT
    feature_id AS editing_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'editing_variant';

--- ************************************************
--- *** relation: polyadenylation_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that changes polyaden ***
--- *** ylation with respect to a reference sequ ***
--- *** ence.                                    ***
--- ************************************************
---

CREATE VIEW polyadenylation_variant AS
  SELECT
    feature_id AS polyadenylation_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'increased_polyadenylation_variant' OR cvterm.name = 'decreased_polyadenylation_variant' OR cvterm.name = 'polyadenylation_variant';

--- ************************************************
--- *** relation: transcript_stability_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A variant that changes the stability of  ***
--- *** a transcript with respect to a reference ***
--- ***  sequence.                               ***
--- ************************************************
---

CREATE VIEW transcript_stability_variant AS
  SELECT
    feature_id AS transcript_stability_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'decreased_transcript_stability_variant' OR cvterm.name = 'increased_transcript_stability_variant' OR cvterm.name = 'transcript_stability_variant';

--- ************************************************
--- *** relation: decreased_transcript_stability_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that decreases transc ***
--- *** ript stability with respect to a referen ***
--- *** ce sequence.                             ***
--- ************************************************
---

CREATE VIEW decreased_transcript_stability_variant AS
  SELECT
    feature_id AS decreased_transcript_stability_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'decreased_transcript_stability_variant';

--- ************************************************
--- *** relation: increased_transcript_stability_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that increases transc ***
--- *** ript stability with respect to a referen ***
--- *** ce sequence.                             ***
--- ************************************************
---

CREATE VIEW increased_transcript_stability_variant AS
  SELECT
    feature_id AS increased_transcript_stability_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'increased_transcript_stability_variant';

--- ************************************************
--- *** relation: transcription_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A variant that changes alters the transc ***
--- *** ription of a transcript with respect to  ***
--- *** a reference sequence.                    ***
--- ************************************************
---

CREATE VIEW transcription_variant AS
  SELECT
    feature_id AS transcription_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'rate_of_transcription_variant' OR cvterm.name = 'increased_transcription_rate_variant' OR cvterm.name = 'decreased_transcription_rate_variant' OR cvterm.name = 'transcription_variant';

--- ************************************************
--- *** relation: rate_of_transcription_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that changes the rate ***
--- ***  of transcription with respect to a refe ***
--- *** rence sequence.                          ***
--- ************************************************
---

CREATE VIEW rate_of_transcription_variant AS
  SELECT
    feature_id AS rate_of_transcription_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'increased_transcription_rate_variant' OR cvterm.name = 'decreased_transcription_rate_variant' OR cvterm.name = 'rate_of_transcription_variant';

--- ************************************************
--- *** relation: increased_transcription_rate_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that increases the ra ***
--- *** te of transcription with respect to a re ***
--- *** ference sequence.                        ***
--- ************************************************
---

CREATE VIEW increased_transcription_rate_variant AS
  SELECT
    feature_id AS increased_transcription_rate_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'increased_transcription_rate_variant';

--- ************************************************
--- *** relation: decreased_transcription_rate_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that decreases the ra ***
--- *** te of transcription with respect to a re ***
--- *** ference sequence.                        ***
--- ************************************************
---

CREATE VIEW decreased_transcription_rate_variant AS
  SELECT
    feature_id AS decreased_transcription_rate_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'decreased_transcription_rate_variant';

--- ************************************************
--- *** relation: translational_product_level_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A functional variant that changes the tr ***
--- *** anslational product level with respect t ***
--- *** o a reference sequence.                  ***
--- ************************************************
---

CREATE VIEW translational_product_level_variant AS
  SELECT
    feature_id AS translational_product_level_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'decreased_translational_product_level' OR cvterm.name = 'increased_translational_product_level' OR cvterm.name = 'translational_product_level_variant';

--- ************************************************
--- *** relation: polypeptide_function_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant which changes polypep ***
--- *** tide functioning with respect to a refer ***
--- *** ence sequence.                           ***
--- ************************************************
---

CREATE VIEW polypeptide_function_variant AS
  SELECT
    feature_id AS polypeptide_function_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polypeptide_gain_of_function_variant' OR cvterm.name = 'polypeptide_localization_variant' OR cvterm.name = 'polypeptide_loss_of_function_variant' OR cvterm.name = 'polypeptide_post_translational_processing_variant' OR cvterm.name = 'inactive_ligand_binding_site' OR cvterm.name = 'polypeptide_partial_loss_of_function' OR cvterm.name = 'inactive_catalytic_site' OR cvterm.name = 'polypeptide_function_variant';

--- ************************************************
--- *** relation: decreased_translational_product_level ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant which decreases the t ***
--- *** ranslational product level with respect  ***
--- *** to a reference sequence.                 ***
--- ************************************************
---

CREATE VIEW decreased_translational_product_level AS
  SELECT
    feature_id AS decreased_translational_product_level_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'decreased_translational_product_level';

--- ************************************************
--- *** relation: increased_translational_product_level ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant which increases the t ***
--- *** ranslational product level with respect  ***
--- *** to a reference sequence.                 ***
--- ************************************************
---

CREATE VIEW increased_translational_product_level AS
  SELECT
    feature_id AS increased_translational_product_level_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'increased_translational_product_level';

--- ************************************************
--- *** relation: polypeptide_gain_of_function_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant which causes gain of  ***
--- *** polypeptide function with respect to a r ***
--- *** eference sequence.                       ***
--- ************************************************
---

CREATE VIEW polypeptide_gain_of_function_variant AS
  SELECT
    feature_id AS polypeptide_gain_of_function_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polypeptide_gain_of_function_variant';

--- ************************************************
--- *** relation: polypeptide_localization_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant which changes the loc ***
--- *** alization of a polypeptide with respect  ***
--- *** to a reference sequence.                 ***
--- ************************************************
---

CREATE VIEW polypeptide_localization_variant AS
  SELECT
    feature_id AS polypeptide_localization_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polypeptide_localization_variant';

--- ************************************************
--- *** relation: polypeptide_loss_of_function_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that causes the loss  ***
--- *** of a polypeptide function with respect t ***
--- *** o a reference sequence.                  ***
--- ************************************************
---

CREATE VIEW polypeptide_loss_of_function_variant AS
  SELECT
    feature_id AS polypeptide_loss_of_function_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'inactive_ligand_binding_site' OR cvterm.name = 'polypeptide_partial_loss_of_function' OR cvterm.name = 'inactive_catalytic_site' OR cvterm.name = 'polypeptide_loss_of_function_variant';

--- ************************************************
--- *** relation: inactive_ligand_binding_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that causes the inact ***
--- *** ivation of a ligand binding site with re ***
--- *** spect to a reference sequence.           ***
--- ************************************************
---

CREATE VIEW inactive_ligand_binding_site AS
  SELECT
    feature_id AS inactive_ligand_binding_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'inactive_catalytic_site' OR cvterm.name = 'inactive_ligand_binding_site';

--- ************************************************
--- *** relation: polypeptide_partial_loss_of_function ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that causes some but  ***
--- *** not all loss of polypeptide function wit ***
--- *** h respect to a reference sequence.       ***
--- ************************************************
---

CREATE VIEW polypeptide_partial_loss_of_function AS
  SELECT
    feature_id AS polypeptide_partial_loss_of_function_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polypeptide_partial_loss_of_function';

--- ************************************************
--- *** relation: polypeptide_post_translational_processing_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that causes a change  ***
--- *** in post translational processing of the  ***
--- *** peptide with respect to a reference sequ ***
--- *** ence.                                    ***
--- ************************************************
---

CREATE VIEW polypeptide_post_translational_processing_variant AS
  SELECT
    feature_id AS polypeptide_post_translational_processing_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polypeptide_post_translational_processing_variant';

--- ************************************************
--- *** relation: copy_number_change ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant where copies of a fea ***
--- *** ture (CNV) are either increased or decre ***
--- *** ased.                                    ***
--- ************************************************
---

CREATE VIEW copy_number_change AS
  SELECT
    feature_id AS copy_number_change_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'copy_number_change';

--- ************************************************
--- *** relation: gene_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant where the structure o ***
--- *** f the gene is changed.                   ***
--- ************************************************
---

CREATE VIEW gene_variant AS
  SELECT
    feature_id AS gene_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gene_fusion' OR cvterm.name = 'splicing_variant' OR cvterm.name = 'transcript_variant' OR cvterm.name = 'translational_product_structure_variant' OR cvterm.name = 'cryptic_splice_site_variant' OR cvterm.name = 'exon_loss' OR cvterm.name = 'intron_gain' OR cvterm.name = 'splice_region_variant' OR cvterm.name = 'cryptic_splice_acceptor' OR cvterm.name = 'cryptic_splice_donor' OR cvterm.name = 'complex_change_in_transcript' OR cvterm.name = 'transcript_secondary_structure_variant' OR cvterm.name = 'nc_transcript_variant' OR cvterm.name = 'NMD_transcript_variant' OR cvterm.name = 'UTR_variant' OR cvterm.name = 'intron_variant' OR cvterm.name = 'exon_variant' OR cvterm.name = 'compensatory_transcript_secondary_structure_variant' OR cvterm.name = 'mature_miRNA_variant' OR cvterm.name = '5_prime_UTR_variant' OR cvterm.name = '3_prime_UTR_variant' OR cvterm.name = 'splice_site_variant' OR cvterm.name = 'splice_acceptor_variant' OR cvterm.name = 'splice_donor_variant' OR cvterm.name = 'splice_donor_5th_base_variant' OR cvterm.name = 'coding_sequence_variant' OR cvterm.name = 'non_coding_exon_variant' OR cvterm.name = 'codon_variant' OR cvterm.name = 'frameshift_variant' OR cvterm.name = 'inframe_variant' OR cvterm.name = 'initiator_codon_change' OR cvterm.name = 'non_synonymous_codon' OR cvterm.name = 'synonymous_codon' OR cvterm.name = 'terminal_codon_variant' OR cvterm.name = 'stop_gained' OR cvterm.name = 'missense_codon' OR cvterm.name = 'conservative_missense_codon' OR cvterm.name = 'non_conservative_missense_codon' OR cvterm.name = 'terminator_codon_variant' OR cvterm.name = 'incomplete_terminal_codon_variant' OR cvterm.name = 'stop_retained_variant' OR cvterm.name = 'stop_lost' OR cvterm.name = 'frame_restoring_variant' OR cvterm.name = 'minus_1_frameshift_variant' OR cvterm.name = 'minus_2_frameshift_variant' OR cvterm.name = 'plus_1_frameshift_variant' OR cvterm.name = 'plus_2_frameshift variant' OR cvterm.name = 'inframe_codon_gain' OR cvterm.name = 'inframe_codon_loss' OR cvterm.name = '3D_polypeptide_structure_variant' OR cvterm.name = 'complex_change_of_translational_product_variant' OR cvterm.name = 'polypeptide_sequence_variant' OR cvterm.name = 'complex_3D_structural_variant' OR cvterm.name = 'conformational_change_variant' OR cvterm.name = 'amino_acid_deletion' OR cvterm.name = 'amino_acid_insertion' OR cvterm.name = 'amino_acid_substitution' OR cvterm.name = 'elongated_polypeptide' OR cvterm.name = 'polypeptide_fusion' OR cvterm.name = 'polypeptide_truncation' OR cvterm.name = 'conservative_amino_acid_substitution' OR cvterm.name = 'non_conservative_amino_acid_substitution' OR cvterm.name = 'elongated_polypeptide_C_terminal' OR cvterm.name = 'elongated_polypeptide_N_terminal' OR cvterm.name = 'elongated_in_frame_polypeptide_C_terminal' OR cvterm.name = 'elongated_out_of_frame_polypeptide_C_terminal' OR cvterm.name = 'elongated_in_frame_polypeptide_N_terminal_elongation' OR cvterm.name = 'elongated_out_of_frame_polypeptide_N_terminal' OR cvterm.name = 'gene_variant';

--- ************************************************
--- *** relation: gene_fusion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant whereby a two genes h ***
--- *** ave become joined.                       ***
--- ************************************************
---

CREATE VIEW gene_fusion AS
  SELECT
    feature_id AS gene_fusion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gene_fusion';

--- ************************************************
--- *** relation: regulatory_region_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant located within a regu ***
--- *** latory region.                           ***
--- ************************************************
---

CREATE VIEW regulatory_region_variant AS
  SELECT
    feature_id AS regulatory_region_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'TF_binding_site_variant' OR cvterm.name = 'regulatory_region_variant';

--- ************************************************
--- *** relation: stop_retained_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant where at least one ba ***
--- *** se in the terminator codon is changed, b ***
--- *** ut the terminator remains.               ***
--- ************************************************
---

CREATE VIEW stop_retained_variant AS
  SELECT
    feature_id AS stop_retained_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'stop_retained_variant';

--- ************************************************
--- *** relation: splicing_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that changes the proc ***
--- *** ess of splicing.                         ***
--- ************************************************
---

CREATE VIEW splicing_variant AS
  SELECT
    feature_id AS splicing_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'cryptic_splice_site_variant' OR cvterm.name = 'exon_loss' OR cvterm.name = 'intron_gain' OR cvterm.name = 'splice_region_variant' OR cvterm.name = 'cryptic_splice_acceptor' OR cvterm.name = 'cryptic_splice_donor' OR cvterm.name = 'splicing_variant';

--- ************************************************
--- *** relation: cryptic_splice_site_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant causing a new (functi ***
--- *** onal) splice site.                       ***
--- ************************************************
---

CREATE VIEW cryptic_splice_site_variant AS
  SELECT
    feature_id AS cryptic_splice_site_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'cryptic_splice_acceptor' OR cvterm.name = 'cryptic_splice_donor' OR cvterm.name = 'cryptic_splice_site_variant';

--- ************************************************
--- *** relation: cryptic_splice_acceptor ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant whereby a new splice  ***
--- *** site is created due to the activation of ***
--- ***  a new acceptor.                         ***
--- ************************************************
---

CREATE VIEW cryptic_splice_acceptor AS
  SELECT
    feature_id AS cryptic_splice_acceptor_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'cryptic_splice_acceptor';

--- ************************************************
--- *** relation: cryptic_splice_donor ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant whereby a new splice  ***
--- *** site is created due to the activation of ***
--- ***  a new donor.                            ***
--- ************************************************
---

CREATE VIEW cryptic_splice_donor AS
  SELECT
    feature_id AS cryptic_splice_donor_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'cryptic_splice_donor';

--- ************************************************
--- *** relation: exon_loss ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant whereby an exon is lo ***
--- *** st from the transcript.                  ***
--- ************************************************
---

CREATE VIEW exon_loss AS
  SELECT
    feature_id AS exon_loss_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'exon_loss';

--- ************************************************
--- *** relation: intron_gain ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant whereby an intron is  ***
--- *** gained by the processed transcript; usua ***
--- *** lly a result of an alteration of the don ***
--- *** or or acceptor.                          ***
--- ************************************************
---

CREATE VIEW intron_gain AS
  SELECT
    feature_id AS intron_gain_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'intron_gain';

--- ************************************************
--- *** relation: splice_acceptor_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A splice variant that changes the 2 base ***
--- ***  region at the 3' end of an intron.      ***
--- ************************************************
---

CREATE VIEW splice_acceptor_variant AS
  SELECT
    feature_id AS splice_acceptor_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'splice_acceptor_variant';

--- ************************************************
--- *** relation: splice_donor_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A splice variant that changes the2 base  ***
--- *** region at the 5' end of an intron.       ***
--- ************************************************
---

CREATE VIEW splice_donor_variant AS
  SELECT
    feature_id AS splice_donor_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'splice_donor_variant';

--- ************************************************
--- *** relation: transcript_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that changes the stru ***
--- *** cture of the transcript.                 ***
--- ************************************************
---

CREATE VIEW transcript_variant AS
  SELECT
    feature_id AS transcript_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'complex_change_in_transcript' OR cvterm.name = 'transcript_secondary_structure_variant' OR cvterm.name = 'nc_transcript_variant' OR cvterm.name = 'NMD_transcript_variant' OR cvterm.name = 'UTR_variant' OR cvterm.name = 'intron_variant' OR cvterm.name = 'exon_variant' OR cvterm.name = 'compensatory_transcript_secondary_structure_variant' OR cvterm.name = 'mature_miRNA_variant' OR cvterm.name = '5_prime_UTR_variant' OR cvterm.name = '3_prime_UTR_variant' OR cvterm.name = 'splice_site_variant' OR cvterm.name = 'splice_acceptor_variant' OR cvterm.name = 'splice_donor_variant' OR cvterm.name = 'splice_donor_5th_base_variant' OR cvterm.name = 'coding_sequence_variant' OR cvterm.name = 'non_coding_exon_variant' OR cvterm.name = 'codon_variant' OR cvterm.name = 'frameshift_variant' OR cvterm.name = 'inframe_variant' OR cvterm.name = 'initiator_codon_change' OR cvterm.name = 'non_synonymous_codon' OR cvterm.name = 'synonymous_codon' OR cvterm.name = 'terminal_codon_variant' OR cvterm.name = 'stop_gained' OR cvterm.name = 'missense_codon' OR cvterm.name = 'conservative_missense_codon' OR cvterm.name = 'non_conservative_missense_codon' OR cvterm.name = 'terminator_codon_variant' OR cvterm.name = 'incomplete_terminal_codon_variant' OR cvterm.name = 'stop_retained_variant' OR cvterm.name = 'stop_lost' OR cvterm.name = 'frame_restoring_variant' OR cvterm.name = 'minus_1_frameshift_variant' OR cvterm.name = 'minus_2_frameshift_variant' OR cvterm.name = 'plus_1_frameshift_variant' OR cvterm.name = 'plus_2_frameshift variant' OR cvterm.name = 'inframe_codon_gain' OR cvterm.name = 'inframe_codon_loss' OR cvterm.name = 'transcript_variant';

--- ************************************************
--- *** relation: complex_change_in_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript variant with a complex INDE ***
--- *** L- Insertion or deletion that spans an e ***
--- *** xon/intron border or a coding sequence/U ***
--- *** TR border.                               ***
--- ************************************************
---

CREATE VIEW complex_change_in_transcript AS
  SELECT
    feature_id AS complex_change_in_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'complex_change_in_transcript';

--- ************************************************
--- *** relation: stop_lost ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant where at least one ba ***
--- *** se of the terminator codon (stop) is cha ***
--- *** nged, resulting in an elongated transcri ***
--- *** pt.                                      ***
--- ************************************************
---

CREATE VIEW stop_lost AS
  SELECT
    feature_id AS stop_lost_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'stop_lost';

--- ************************************************
--- *** relation: coding_sequence_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that changes the codi ***
--- *** ng sequence.                             ***
--- ************************************************
---

CREATE VIEW coding_sequence_variant AS
  SELECT
    feature_id AS coding_sequence_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'codon_variant' OR cvterm.name = 'frameshift_variant' OR cvterm.name = 'inframe_variant' OR cvterm.name = 'initiator_codon_change' OR cvterm.name = 'non_synonymous_codon' OR cvterm.name = 'synonymous_codon' OR cvterm.name = 'terminal_codon_variant' OR cvterm.name = 'stop_gained' OR cvterm.name = 'missense_codon' OR cvterm.name = 'conservative_missense_codon' OR cvterm.name = 'non_conservative_missense_codon' OR cvterm.name = 'terminator_codon_variant' OR cvterm.name = 'incomplete_terminal_codon_variant' OR cvterm.name = 'stop_retained_variant' OR cvterm.name = 'stop_lost' OR cvterm.name = 'frame_restoring_variant' OR cvterm.name = 'minus_1_frameshift_variant' OR cvterm.name = 'minus_2_frameshift_variant' OR cvterm.name = 'plus_1_frameshift_variant' OR cvterm.name = 'plus_2_frameshift variant' OR cvterm.name = 'inframe_codon_gain' OR cvterm.name = 'inframe_codon_loss' OR cvterm.name = 'coding_sequence_variant';

--- ************************************************
--- *** relation: codon_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that changes at least ***
--- ***  one base in a codon.                    ***
--- ************************************************
---

CREATE VIEW codon_variant AS
  SELECT
    feature_id AS codon_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'initiator_codon_change' OR cvterm.name = 'non_synonymous_codon' OR cvterm.name = 'synonymous_codon' OR cvterm.name = 'terminal_codon_variant' OR cvterm.name = 'stop_gained' OR cvterm.name = 'missense_codon' OR cvterm.name = 'conservative_missense_codon' OR cvterm.name = 'non_conservative_missense_codon' OR cvterm.name = 'terminator_codon_variant' OR cvterm.name = 'incomplete_terminal_codon_variant' OR cvterm.name = 'stop_retained_variant' OR cvterm.name = 'stop_lost' OR cvterm.name = 'codon_variant';

--- ************************************************
--- *** relation: initiator_codon_change ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A codon variant that changes at least on ***
--- *** e base of the first codon of a transcrip ***
--- *** t.                                       ***
--- ************************************************
---

CREATE VIEW initiator_codon_change AS
  SELECT
    feature_id AS initiator_codon_change_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'initiator_codon_change';

--- ************************************************
--- *** relation: non_synonymous_codon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant whereby at least one  ***
--- *** base of a codon is changed resulting in  ***
--- *** a codon that encodes for a different ami ***
--- *** no acid or stop codon.                   ***
--- ************************************************
---

CREATE VIEW non_synonymous_codon AS
  SELECT
    feature_id AS non_synonymous_codon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'stop_gained' OR cvterm.name = 'missense_codon' OR cvterm.name = 'conservative_missense_codon' OR cvterm.name = 'non_conservative_missense_codon' OR cvterm.name = 'non_synonymous_codon';

--- ************************************************
--- *** relation: conservative_missense_codon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant whereby at least one  ***
--- *** base of a codon is changed resulting in  ***
--- *** a codon that encodes for a different but ***
--- ***  similar amino acid. These variants may  ***
--- *** or may not be deleterious.               ***
--- ************************************************
---

CREATE VIEW conservative_missense_codon AS
  SELECT
    feature_id AS conservative_missense_codon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'conservative_missense_codon';

--- ************************************************
--- *** relation: non_conservative_missense_codon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant whereby at least one  ***
--- *** base of a codon is changed resulting in  ***
--- *** a codon that encodes for an amino acid w ***
--- *** ith different biochemical properties.    ***
--- ************************************************
---

CREATE VIEW non_conservative_missense_codon AS
  SELECT
    feature_id AS non_conservative_missense_codon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'non_conservative_missense_codon';

--- ************************************************
--- *** relation: stop_gained ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant whereby at least one  ***
--- *** base of a codon is changed, resulting in ***
--- ***  a premature stop codon, leading to a sh ***
--- *** ortened transcript.                      ***
--- ************************************************
---

CREATE VIEW stop_gained AS
  SELECT
    feature_id AS stop_gained_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'stop_gained';

--- ************************************************
--- *** relation: synonymous_codon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant whereby a base of a c ***
--- *** odon is changed, but there is no resulti ***
--- *** ng change to the encoded amino acid.     ***
--- ************************************************
---

CREATE VIEW synonymous_codon AS
  SELECT
    feature_id AS synonymous_codon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'synonymous_codon';

--- ************************************************
--- *** relation: frameshift_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant which causes a disrup ***
--- *** tion of the translational reading frame, ***
--- ***  because the number of nucleotides inser ***
--- *** ted or deleted is not a multiple of thre ***
--- *** e.                                       ***
--- ************************************************
---

CREATE VIEW frameshift_variant AS
  SELECT
    feature_id AS frameshift_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'frame_restoring_variant' OR cvterm.name = 'minus_1_frameshift_variant' OR cvterm.name = 'minus_2_frameshift_variant' OR cvterm.name = 'plus_1_frameshift_variant' OR cvterm.name = 'plus_2_frameshift variant' OR cvterm.name = 'frameshift_variant';

--- ************************************************
--- *** relation: terminator_codon_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant whereby at least one  ***
--- *** of the bases in the terminator codon is  ***
--- *** changed.                                 ***
--- ************************************************
---

CREATE VIEW terminator_codon_variant AS
  SELECT
    feature_id AS terminator_codon_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'stop_retained_variant' OR cvterm.name = 'stop_lost' OR cvterm.name = 'terminator_codon_variant';

--- ************************************************
--- *** relation: frame_restoring_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that reverts the sequ ***
--- *** ence of a previous frameshift mutation b ***
--- *** ack to the initial frame.                ***
--- ************************************************
---

CREATE VIEW frame_restoring_variant AS
  SELECT
    feature_id AS frame_restoring_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'frame_restoring_variant';

--- ************************************************
--- *** relation: minus_1_frameshift_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant which causes a disrup ***
--- *** tion of the translational reading frame, ***
--- ***  by shifting one base ahead.             ***
--- ************************************************
---

CREATE VIEW minus_1_frameshift_variant AS
  SELECT
    feature_id AS minus_1_frameshift_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'minus_1_frameshift_variant';

--- ************************************************
--- *** relation: minus_2_frameshift_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW minus_2_frameshift_variant AS
  SELECT
    feature_id AS minus_2_frameshift_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'minus_2_frameshift_variant';

--- ************************************************
--- *** relation: plus_1_frameshift_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant which causes a disrup ***
--- *** tion of the translational reading frame, ***
--- ***  by shifting one base backward.          ***
--- ************************************************
---

CREATE VIEW plus_1_frameshift_variant AS
  SELECT
    feature_id AS plus_1_frameshift_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'plus_1_frameshift_variant';

--- ************************************************
--- *** relation: plus_2_frameshift_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW plus_2_frameshift_variant AS
  SELECT
    feature_id AS plus_2_frameshift_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'plus_2_frameshift variant';

--- ************************************************
--- *** relation: transcript_secondary_structure_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant within a transcript t ***
--- *** hat changes the secondary structure of t ***
--- *** he RNA product.                          ***
--- ************************************************
---

CREATE VIEW transcript_secondary_structure_variant AS
  SELECT
    feature_id AS transcript_secondary_structure_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'compensatory_transcript_secondary_structure_variant' OR cvterm.name = 'transcript_secondary_structure_variant';

--- ************************************************
--- *** relation: compensatory_transcript_secondary_structure_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A secondary structure variant that compe ***
--- *** nsate for the change made by a previous  ***
--- *** variant.                                 ***
--- ************************************************
---

CREATE VIEW compensatory_transcript_secondary_structure_variant AS
  SELECT
    feature_id AS compensatory_transcript_secondary_structure_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'compensatory_transcript_secondary_structure_variant';

--- ************************************************
--- *** relation: translational_product_structure_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant within the transcript ***
--- ***  that changes the structure of the trans ***
--- *** lational product.                        ***
--- ************************************************
---

CREATE VIEW translational_product_structure_variant AS
  SELECT
    feature_id AS translational_product_structure_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = '3D_polypeptide_structure_variant' OR cvterm.name = 'complex_change_of_translational_product_variant' OR cvterm.name = 'polypeptide_sequence_variant' OR cvterm.name = 'complex_3D_structural_variant' OR cvterm.name = 'conformational_change_variant' OR cvterm.name = 'amino_acid_deletion' OR cvterm.name = 'amino_acid_insertion' OR cvterm.name = 'amino_acid_substitution' OR cvterm.name = 'elongated_polypeptide' OR cvterm.name = 'polypeptide_fusion' OR cvterm.name = 'polypeptide_truncation' OR cvterm.name = 'conservative_amino_acid_substitution' OR cvterm.name = 'non_conservative_amino_acid_substitution' OR cvterm.name = 'elongated_polypeptide_C_terminal' OR cvterm.name = 'elongated_polypeptide_N_terminal' OR cvterm.name = 'elongated_in_frame_polypeptide_C_terminal' OR cvterm.name = 'elongated_out_of_frame_polypeptide_C_terminal' OR cvterm.name = 'elongated_in_frame_polypeptide_N_terminal_elongation' OR cvterm.name = 'elongated_out_of_frame_polypeptide_N_terminal' OR cvterm.name = 'translational_product_structure_variant';

--- ************************************************
--- *** relation: threed_polypeptide_structure_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that changes the resu ***
--- *** lting polypeptide structure.             ***
--- ************************************************
---

CREATE VIEW threed_polypeptide_structure_variant AS
  SELECT
    feature_id AS threed_polypeptide_structure_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'complex_3D_structural_variant' OR cvterm.name = 'conformational_change_variant' OR cvterm.name = '3D_polypeptide_structure_variant';

--- ************************************************
--- *** relation: complex_3d_structural_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that changes the resu ***
--- *** lting polypeptide structure.             ***
--- ************************************************
---

CREATE VIEW complex_3d_structural_variant AS
  SELECT
    feature_id AS complex_3d_structural_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'complex_3D_structural_variant';

--- ************************************************
--- *** relation: conformational_change_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant in the CDS region tha ***
--- *** t causes a conformational change in the  ***
--- *** resulting polypeptide sequence.          ***
--- ************************************************
---

CREATE VIEW conformational_change_variant AS
  SELECT
    feature_id AS conformational_change_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'conformational_change_variant';

--- ************************************************
--- *** relation: complex_change_of_translational_product_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW complex_change_of_translational_product_variant AS
  SELECT
    feature_id AS complex_change_of_translational_product_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'complex_change_of_translational_product_variant';

--- ************************************************
--- *** relation: polypeptide_sequence_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant with in the CDS that  ***
--- *** causes a change in the resulting polypep ***
--- *** tide sequence.                           ***
--- ************************************************
---

CREATE VIEW polypeptide_sequence_variant AS
  SELECT
    feature_id AS polypeptide_sequence_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'amino_acid_deletion' OR cvterm.name = 'amino_acid_insertion' OR cvterm.name = 'amino_acid_substitution' OR cvterm.name = 'elongated_polypeptide' OR cvterm.name = 'polypeptide_fusion' OR cvterm.name = 'polypeptide_truncation' OR cvterm.name = 'conservative_amino_acid_substitution' OR cvterm.name = 'non_conservative_amino_acid_substitution' OR cvterm.name = 'elongated_polypeptide_C_terminal' OR cvterm.name = 'elongated_polypeptide_N_terminal' OR cvterm.name = 'elongated_in_frame_polypeptide_C_terminal' OR cvterm.name = 'elongated_out_of_frame_polypeptide_C_terminal' OR cvterm.name = 'elongated_in_frame_polypeptide_N_terminal_elongation' OR cvterm.name = 'elongated_out_of_frame_polypeptide_N_terminal' OR cvterm.name = 'polypeptide_sequence_variant';

--- ************************************************
--- *** relation: amino_acid_deletion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant within a CDS resultin ***
--- *** g in the loss of an amino acid from the  ***
--- *** resulting polypeptide.                   ***
--- ************************************************
---

CREATE VIEW amino_acid_deletion AS
  SELECT
    feature_id AS amino_acid_deletion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'amino_acid_deletion';

--- ************************************************
--- *** relation: amino_acid_insertion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant within a CDS resultin ***
--- *** g in the gain of an amino acid to the re ***
--- *** sulting polypeptide.                     ***
--- ************************************************
---

CREATE VIEW amino_acid_insertion AS
  SELECT
    feature_id AS amino_acid_insertion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'amino_acid_insertion';

--- ************************************************
--- *** relation: amino_acid_substitution ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant of a codon resulting  ***
--- *** in the substitution of one amino acid fo ***
--- *** r another in the resulting polypeptide.  ***
--- ************************************************
---

CREATE VIEW amino_acid_substitution AS
  SELECT
    feature_id AS amino_acid_substitution_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'conservative_amino_acid_substitution' OR cvterm.name = 'non_conservative_amino_acid_substitution' OR cvterm.name = 'amino_acid_substitution';

--- ************************************************
--- *** relation: conservative_amino_acid_substitution ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant of a codon causing th ***
--- *** e substitution of a similar amino acid f ***
--- *** or another in the resulting polypeptide. ***
--- ************************************************
---

CREATE VIEW conservative_amino_acid_substitution AS
  SELECT
    feature_id AS conservative_amino_acid_substitution_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'conservative_amino_acid_substitution';

--- ************************************************
--- *** relation: non_conservative_amino_acid_substitution ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant of a codon causing th ***
--- *** e substitution of a non conservative ami ***
--- *** no acid for another in the resulting pol ***
--- *** ypeptide.                                ***
--- ************************************************
---

CREATE VIEW non_conservative_amino_acid_substitution AS
  SELECT
    feature_id AS non_conservative_amino_acid_substitution_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'non_conservative_amino_acid_substitution';

--- ************************************************
--- *** relation: elongated_polypeptide ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant with in the CDS that  ***
--- *** causes elongation of the resulting polyp ***
--- *** eptide sequence.                         ***
--- ************************************************
---

CREATE VIEW elongated_polypeptide AS
  SELECT
    feature_id AS elongated_polypeptide_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'elongated_polypeptide_C_terminal' OR cvterm.name = 'elongated_polypeptide_N_terminal' OR cvterm.name = 'elongated_in_frame_polypeptide_C_terminal' OR cvterm.name = 'elongated_out_of_frame_polypeptide_C_terminal' OR cvterm.name = 'elongated_in_frame_polypeptide_N_terminal_elongation' OR cvterm.name = 'elongated_out_of_frame_polypeptide_N_terminal' OR cvterm.name = 'elongated_polypeptide';

--- ************************************************
--- *** relation: elongated_polypeptide_c_terminal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant with in the CDS that  ***
--- *** causes elongation of the resulting polyp ***
--- *** eptide sequence at the C terminus.       ***
--- ************************************************
---

CREATE VIEW elongated_polypeptide_c_terminal AS
  SELECT
    feature_id AS elongated_polypeptide_c_terminal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'elongated_in_frame_polypeptide_C_terminal' OR cvterm.name = 'elongated_out_of_frame_polypeptide_C_terminal' OR cvterm.name = 'elongated_polypeptide_C_terminal';

--- ************************************************
--- *** relation: elongated_polypeptide_n_terminal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant with in the CDS that  ***
--- *** causes elongation of the resulting polyp ***
--- *** eptide sequence at the N terminus.       ***
--- ************************************************
---

CREATE VIEW elongated_polypeptide_n_terminal AS
  SELECT
    feature_id AS elongated_polypeptide_n_terminal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'elongated_in_frame_polypeptide_N_terminal_elongation' OR cvterm.name = 'elongated_out_of_frame_polypeptide_N_terminal' OR cvterm.name = 'elongated_polypeptide_N_terminal';

--- ************************************************
--- *** relation: elongated_in_frame_polypeptide_c_terminal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant with in the CDS that  ***
--- *** causes in frame elongation of the result ***
--- *** ing polypeptide sequence at the C termin ***
--- *** us.                                      ***
--- ************************************************
---

CREATE VIEW elongated_in_frame_polypeptide_c_terminal AS
  SELECT
    feature_id AS elongated_in_frame_polypeptide_c_terminal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'elongated_in_frame_polypeptide_C_terminal';

--- ************************************************
--- *** relation: elongated_out_of_frame_polypeptide_c_terminal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant with in the CDS that  ***
--- *** causes out of frame elongation of the re ***
--- *** sulting polypeptide sequence at the C te ***
--- *** rminus.                                  ***
--- ************************************************
---

CREATE VIEW elongated_out_of_frame_polypeptide_c_terminal AS
  SELECT
    feature_id AS elongated_out_of_frame_polypeptide_c_terminal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'elongated_out_of_frame_polypeptide_C_terminal';

--- ************************************************
--- *** relation: elongated_in_frame_polypeptide_n_terminal_elongation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant with in the CDS that  ***
--- *** causes in frame elongation of the result ***
--- *** ing polypeptide sequence at the N termin ***
--- *** us.                                      ***
--- ************************************************
---

CREATE VIEW elongated_in_frame_polypeptide_n_terminal_elongation AS
  SELECT
    feature_id AS elongated_in_frame_polypeptide_n_terminal_elongation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'elongated_in_frame_polypeptide_N_terminal_elongation';

--- ************************************************
--- *** relation: elongated_out_of_frame_polypeptide_n_terminal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant with in the CDS that  ***
--- *** causes out of frame elongation of the re ***
--- *** sulting polypeptide sequence at the N te ***
--- *** rminus.                                  ***
--- ************************************************
---

CREATE VIEW elongated_out_of_frame_polypeptide_n_terminal AS
  SELECT
    feature_id AS elongated_out_of_frame_polypeptide_n_terminal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'elongated_out_of_frame_polypeptide_N_terminal';

--- ************************************************
--- *** relation: polypeptide_fusion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that causes a fusion  ***
--- *** of two polypeptide sequences.            ***
--- ************************************************
---

CREATE VIEW polypeptide_fusion AS
  SELECT
    feature_id AS polypeptide_fusion_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polypeptide_fusion';

--- ************************************************
--- *** relation: polypeptide_truncation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant of the CD that causes ***
--- ***  a truncation of the resulting polypepti ***
--- *** de.                                      ***
--- ************************************************
---

CREATE VIEW polypeptide_truncation AS
  SELECT
    feature_id AS polypeptide_truncation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polypeptide_truncation';

--- ************************************************
--- *** relation: inactive_catalytic_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that causes the inact ***
--- *** ivation of a catalytic site with respect ***
--- ***  to a reference sequence.                ***
--- ************************************************
---

CREATE VIEW inactive_catalytic_site AS
  SELECT
    feature_id AS inactive_catalytic_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'inactive_catalytic_site';

--- ************************************************
--- *** relation: nc_transcript_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript variant of a non coding RNA ***
--- ***  gene.                                   ***
--- ************************************************
---

CREATE VIEW nc_transcript_variant AS
  SELECT
    feature_id AS nc_transcript_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'mature_miRNA_variant' OR cvterm.name = 'nc_transcript_variant';

--- ************************************************
--- *** relation: mature_mirna_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript variant located with the se ***
--- *** quence of the mature miRNA.              ***
--- ************************************************
---

CREATE VIEW mature_mirna_variant AS
  SELECT
    feature_id AS mature_mirna_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'mature_miRNA_variant';

--- ************************************************
--- *** relation: nmd_transcript_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A variant in a transcript that is the ta ***
--- *** rget of NMD.                             ***
--- ************************************************
---

CREATE VIEW nmd_transcript_variant AS
  SELECT
    feature_id AS nmd_transcript_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'NMD_transcript_variant';

--- ************************************************
--- *** relation: utr_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript variant that is located wit ***
--- *** hin the UTR.                             ***
--- ************************************************
---

CREATE VIEW utr_variant AS
  SELECT
    feature_id AS utr_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = '5_prime_UTR_variant' OR cvterm.name = '3_prime_UTR_variant' OR cvterm.name = 'UTR_variant';

--- ************************************************
--- *** relation: five_prime_utr_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A UTR variant of the 5' UTR.             ***
--- ************************************************
---

CREATE VIEW five_prime_utr_variant AS
  SELECT
    feature_id AS five_prime_utr_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = '5_prime_UTR_variant';

--- ************************************************
--- *** relation: three_prime_utr_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A UTR variant of the 3' UTR.             ***
--- ************************************************
---

CREATE VIEW three_prime_utr_variant AS
  SELECT
    feature_id AS three_prime_utr_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = '3_prime_UTR_variant';

--- ************************************************
--- *** relation: terminal_codon_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A codon variant that changes at least on ***
--- *** e base of the last codon of the transcri ***
--- *** pt.                                      ***
--- ************************************************
---

CREATE VIEW terminal_codon_variant AS
  SELECT
    feature_id AS terminal_codon_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'terminator_codon_variant' OR cvterm.name = 'incomplete_terminal_codon_variant' OR cvterm.name = 'stop_retained_variant' OR cvterm.name = 'stop_lost' OR cvterm.name = 'terminal_codon_variant';

--- ************************************************
--- *** relation: incomplete_terminal_codon_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant where at least one ba ***
--- *** se of the final codon of an incompletely ***
--- ***  annotated transcript is changed.        ***
--- ************************************************
---

CREATE VIEW incomplete_terminal_codon_variant AS
  SELECT
    feature_id AS incomplete_terminal_codon_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'incomplete_terminal_codon_variant';

--- ************************************************
--- *** relation: intron_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript variant occurring within an ***
--- ***  intron.                                 ***
--- ************************************************
---

CREATE VIEW intron_variant AS
  SELECT
    feature_id AS intron_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'splice_site_variant' OR cvterm.name = 'splice_acceptor_variant' OR cvterm.name = 'splice_donor_variant' OR cvterm.name = 'splice_donor_5th_base_variant' OR cvterm.name = 'intron_variant';

--- ************************************************
--- *** relation: intergenic_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant located in the interg ***
--- *** enic region, between genes.              ***
--- ************************************************
---

CREATE VIEW intergenic_variant AS
  SELECT
    feature_id AS intergenic_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'intergenic_variant';

--- ************************************************
--- *** relation: splice_site_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that changes the firs ***
--- *** t two or last two bases of an intron, or ***
--- ***  the 5th base from the start of the intr ***
--- *** on in the orientation of the transcript. ***
--- ************************************************
---

CREATE VIEW splice_site_variant AS
  SELECT
    feature_id AS splice_site_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'splice_acceptor_variant' OR cvterm.name = 'splice_donor_variant' OR cvterm.name = 'splice_donor_5th_base_variant' OR cvterm.name = 'splice_site_variant';

--- ************************************************
--- *** relation: splice_region_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant in which a change has ***
--- ***  occurred within the region of the splic ***
--- *** e site, either within 1-3 bases of the e ***
--- *** xon or 3-8 bases of the intron.          ***
--- ************************************************
---

CREATE VIEW splice_region_variant AS
  SELECT
    feature_id AS splice_region_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'splice_region_variant';

--- ************************************************
--- *** relation: upstream_gene_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant located 5' of a gene. ***
--- ************************************************
---

CREATE VIEW upstream_gene_variant AS
  SELECT
    feature_id AS upstream_gene_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = '5KB_upstream_variant' OR cvterm.name = '2KB_upstream_variant' OR cvterm.name = 'upstream_gene_variant';

--- ************************************************
--- *** relation: downstream_gene_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant located 3' of a gene. ***
--- ************************************************
---

CREATE VIEW downstream_gene_variant AS
  SELECT
    feature_id AS downstream_gene_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = '5KB_downstream_variant' OR cvterm.name = '500B_downstream_variant' OR cvterm.name = 'downstream_gene_variant';

--- ************************************************
--- *** relation: fivekb_downstream_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant located within 5 KB o ***
--- *** f the end of a gene.                     ***
--- ************************************************
---

CREATE VIEW fivekb_downstream_variant AS
  SELECT
    feature_id AS fivekb_downstream_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = '500B_downstream_variant' OR cvterm.name = '5KB_downstream_variant';

--- ************************************************
--- *** relation: fivehundred_b_downstream_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant located within a half ***
--- ***  KB of the end of a gene.                ***
--- ************************************************
---

CREATE VIEW fivehundred_b_downstream_variant AS
  SELECT
    feature_id AS fivehundred_b_downstream_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = '500B_downstream_variant';

--- ************************************************
--- *** relation: fivekb_upstream_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant located within 5KB 5' ***
--- ***  of a gene.                              ***
--- ************************************************
---

CREATE VIEW fivekb_upstream_variant AS
  SELECT
    feature_id AS fivekb_upstream_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = '2KB_upstream_variant' OR cvterm.name = '5KB_upstream_variant';

--- ************************************************
--- *** relation: twokb_upstream_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant located within 2KB 5' ***
--- ***  of a gene.                              ***
--- ************************************************
---

CREATE VIEW twokb_upstream_variant AS
  SELECT
    feature_id AS twokb_upstream_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = '2KB_upstream_variant';

--- ************************************************
--- *** relation: rrna_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that encodes for ribosomal RNA.   ***
--- ************************************************
---

CREATE VIEW rrna_gene AS
  SELECT
    feature_id AS rrna_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'rRNA_gene';

--- ************************************************
--- *** relation: pirna_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that encodes for an piwi associat ***
--- *** ed RNA.                                  ***
--- ************************************************
---

CREATE VIEW pirna_gene AS
  SELECT
    feature_id AS pirna_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'piRNA_gene';

--- ************************************************
--- *** relation: rnase_p_rna_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that encodes an RNase P RNA.      ***
--- ************************************************
---

CREATE VIEW rnase_p_rna_gene AS
  SELECT
    feature_id AS rnase_p_rna_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'RNase_P_RNA_gene';

--- ************************************************
--- *** relation: rnase_mrp_rna_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that encodes a RNase_MRP_RNA.     ***
--- ************************************************
---

CREATE VIEW rnase_mrp_rna_gene AS
  SELECT
    feature_id AS rnase_mrp_rna_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'RNase_MRP_RNA_gene';

--- ************************************************
--- *** relation: lincrna_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene that encodes large intervening no ***
--- *** n-coding RNA.                            ***
--- ************************************************
---

CREATE VIEW lincrna_gene AS
  SELECT
    feature_id AS lincrna_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'lincRNA_gene';

--- ************************************************
--- *** relation: mathematically_defined_repeat ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A mathematically defined repeat (MDR) is ***
--- ***  a experimental feature that is determin ***
--- *** ed by querying overlapping oligomers of  ***
--- *** length k against a database of shotgun s ***
--- *** equence data and identifying regions in  ***
--- *** the query sequence that exceed a statist ***
--- *** ically determined threshold of repetitiv ***
--- *** eness.                                   ***
--- ************************************************
---

CREATE VIEW mathematically_defined_repeat AS
  SELECT
    feature_id AS mathematically_defined_repeat_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'mathematically_defined_repeat';

--- ************************************************
--- *** relation: telomerase_rna_gene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A telomerase RNA gene is a non coding RN ***
--- *** A gene the RNA product of which is a com ***
--- *** ponent of telomerase.                    ***
--- ************************************************
---

CREATE VIEW telomerase_rna_gene AS
  SELECT
    feature_id AS telomerase_rna_gene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'telomerase_RNA_gene';

--- ************************************************
--- *** relation: targeting_vector ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An engineered vector that is able to tak ***
--- *** e part in homologous recombination in a  ***
--- *** host with the intent of introducing site ***
--- ***  specific genomic modifications.         ***
--- ************************************************
---

CREATE VIEW targeting_vector AS
  SELECT
    feature_id AS targeting_vector_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'targeting_vector';

--- ************************************************
--- *** relation: genetic_marker ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A measurable sequence feature that varie ***
--- *** s within a population.                   ***
--- ************************************************
---

CREATE VIEW genetic_marker AS
  SELECT
    feature_id AS genetic_marker_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'heritable_phenotypic_marker' OR cvterm.name = 'DArT_marker' OR cvterm.name = 'genetic_marker';

--- ************************************************
--- *** relation: dart_marker ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A genetic marker, discovered using Diver ***
--- *** sity Arrays Technology (DArT) technology ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW dart_marker AS
  SELECT
    feature_id AS dart_marker_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'DArT_marker';

--- ************************************************
--- *** relation: kozak_sequence ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of ribosome entry site, specific  ***
--- *** to Eukaryotic organisms that overlaps pa ***
--- *** rt of both 5' UTR and CDS sequence.      ***
--- ************************************************
---

CREATE VIEW kozak_sequence AS
  SELECT
    feature_id AS kozak_sequence_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'kozak_sequence';

--- ************************************************
--- *** relation: nested_transposon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transposon that is disrupted by the in ***
--- *** sertion of another element.              ***
--- ************************************************
---

CREATE VIEW nested_transposon AS
  SELECT
    feature_id AS nested_transposon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'nested_transposon';

--- ************************************************
--- *** relation: nested_repeat ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A repeat that is disrupted by the insert ***
--- *** ion of another element.                  ***
--- ************************************************
---

CREATE VIEW nested_repeat AS
  SELECT
    feature_id AS nested_repeat_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'nested_tandem_repeat' OR cvterm.name = 'nested_repeat';

--- ************************************************
--- *** relation: inframe_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant which does not cause  ***
--- *** a disruption of the translational readin ***
--- *** g frame.                                 ***
--- ************************************************
---

CREATE VIEW inframe_variant AS
  SELECT
    feature_id AS inframe_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'inframe_codon_gain' OR cvterm.name = 'inframe_codon_loss' OR cvterm.name = 'inframe_variant';

--- ************************************************
--- *** relation: inframe_codon_gain ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant which gains a codon,  ***
--- *** and does not cause a disruption of the t ***
--- *** ranslational reading frame.              ***
--- ************************************************
---

CREATE VIEW inframe_codon_gain AS
  SELECT
    feature_id AS inframe_codon_gain_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'inframe_codon_gain';

--- ************************************************
--- *** relation: inframe_codon_loss ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant which loses a codon,  ***
--- *** and does not cause a disruption of the t ***
--- *** ranslational reading frame.              ***
--- ************************************************
---

CREATE VIEW inframe_codon_loss AS
  SELECT
    feature_id AS inframe_codon_loss_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'inframe_codon_loss';

--- ************************************************
--- *** relation: retinoic_acid_responsive_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcription factor binding site of v ***
--- *** ariable direct repeats of the sequence P ***
--- *** uGGTCA spaced by five nucleotides (DR5)  ***
--- *** found in the promoters of retinoic acid- ***
--- *** responsive genes, to which retinoic acid ***
--- ***  receptors bind.                         ***
--- ************************************************
---

CREATE VIEW retinoic_acid_responsive_element AS
  SELECT
    feature_id AS retinoic_acid_responsive_element_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'retinoic_acid_responsive_element';

--- ************************************************
--- *** relation: nucleotide_to_protein_binding_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A binding site that, in the nucleotide m ***
--- *** olecule, interacts selectively and non-c ***
--- *** ovalently with polypeptide residues.     ***
--- ************************************************
---

CREATE VIEW nucleotide_to_protein_binding_site AS
  SELECT
    feature_id AS nucleotide_to_protein_binding_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'nucleotide_to_protein_binding_site';

--- ************************************************
--- *** relation: nucleotide_binding_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A binding site that, in the molecule, in ***
--- *** teracts selectively and non-covalently w ***
--- *** ith nucleotide residues.                 ***
--- ************************************************
---

CREATE VIEW nucleotide_binding_site AS
  SELECT
    feature_id AS nucleotide_binding_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'miRNA_target_site' OR cvterm.name = 'DNA_binding_site' OR cvterm.name = 'primer_binding_site' OR cvterm.name = 'polypeptide_DNA_contact' OR cvterm.name = 'nucleotide_binding_site';

--- ************************************************
--- *** relation: metal_binding_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A binding site that, in the molecule, in ***
--- *** teracts selectively and non-covalently w ***
--- *** ith metal ions.                          ***
--- ************************************************
---

CREATE VIEW metal_binding_site AS
  SELECT
    feature_id AS metal_binding_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polypeptide_metal_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 = 'metal_binding_site';

--- ************************************************
--- *** relation: ligand_binding_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A binding site that, in the molecule, in ***
--- *** teracts selectively and non-covalently w ***
--- *** ith a small molecule such as a drug, or  ***
--- *** hormone.                                 ***
--- ************************************************
---

CREATE VIEW ligand_binding_site AS
  SELECT
    feature_id AS ligand_binding_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polypeptide_ligand_contact' OR cvterm.name = 'ligand_binding_site';

--- ************************************************
--- *** relation: nested_tandem_repeat ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An NTR is a nested repeat of two distinc ***
--- *** t tandem motifs interspersed with each o ***
--- *** ther.                                    ***
--- ************************************************
---

CREATE VIEW nested_tandem_repeat AS
  SELECT
    feature_id AS nested_tandem_repeat_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'nested_tandem_repeat';

--- ************************************************
--- *** relation: promoter_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW promoter_element AS
  SELECT
    feature_id AS promoter_element_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'GC_rich_promoter_region' 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 = 'core_promoter_element' OR cvterm.name = 'regulatory_promoter_element' OR cvterm.name = 'INR_motif' OR cvterm.name = 'DPE_motif' OR cvterm.name = 'BREu_motif' OR cvterm.name = 'TATA_box' OR cvterm.name = 'A_box' OR cvterm.name = 'B_box' OR cvterm.name = 'C_box' OR cvterm.name = 'MTE' OR cvterm.name = 'BREd_motif' OR cvterm.name = 'DCE' OR cvterm.name = 'intermediate_element' OR cvterm.name = 'RNA_polymerase_II_TATA_box' OR cvterm.name = 'RNA_polymerase_III_TATA_box' OR cvterm.name = 'A_box_type_1' OR cvterm.name = 'A_box_type_2' OR cvterm.name = 'proximal_promoter_element' OR cvterm.name = 'distal_promoter_element' OR cvterm.name = 'promoter_element';

--- ************************************************
--- *** relation: core_promoter_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW core_promoter_element AS
  SELECT
    feature_id AS core_promoter_element_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'INR_motif' OR cvterm.name = 'DPE_motif' OR cvterm.name = 'BREu_motif' OR cvterm.name = 'TATA_box' OR cvterm.name = 'A_box' OR cvterm.name = 'B_box' OR cvterm.name = 'C_box' OR cvterm.name = 'MTE' OR cvterm.name = 'BREd_motif' OR cvterm.name = 'DCE' OR cvterm.name = 'intermediate_element' OR cvterm.name = 'RNA_polymerase_II_TATA_box' OR cvterm.name = 'RNA_polymerase_III_TATA_box' OR cvterm.name = 'A_box_type_1' OR cvterm.name = 'A_box_type_2' OR cvterm.name = 'core_promoter_element';

--- ************************************************
--- *** relation: rna_polymerase_ii_tata_box ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A TATA box core promoter of a gene trans ***
--- *** cribed by RNA polymerase II.             ***
--- ************************************************
---

CREATE VIEW rna_polymerase_ii_tata_box AS
  SELECT
    feature_id AS rna_polymerase_ii_tata_box_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'RNA_polymerase_II_TATA_box';

--- ************************************************
--- *** relation: rna_polymerase_iii_tata_box ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A TATA box core promoter of a gene trans ***
--- *** cribed by RNA polymerase III.            ***
--- ************************************************
---

CREATE VIEW rna_polymerase_iii_tata_box AS
  SELECT
    feature_id AS rna_polymerase_iii_tata_box_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'RNA_polymerase_III_TATA_box';

--- ************************************************
--- *** relation: bred_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A core TRNA polymerase II promoter eleme ***
--- *** nt with consensus (G/A)T(T/G/A)(T/A)(G/T ***
--- *** )(T/G)(T/G).                             ***
--- ************************************************
---

CREATE VIEW bred_motif AS
  SELECT
    feature_id AS bred_motif_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'BREd_motif';

--- ************************************************
--- *** relation: dce ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A discontinuous core element of RNA poly ***
--- *** merase II transcribed genes, situated do ***
--- *** wnstream of the TSS. It is composed of t ***
--- *** hree sub elements: SI, SII and SIII.     ***
--- ************************************************
---

CREATE VIEW dce AS
  SELECT
    feature_id AS dce_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'DCE';

--- ************************************************
--- *** relation: dce_si ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sub element of the DCE core promoter e ***
--- *** lement, with consensus sequence CTTC.    ***
--- ************************************************
---

CREATE VIEW dce_si AS
  SELECT
    feature_id AS dce_si_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'DCE_SI';

--- ************************************************
--- *** relation: dce_sii ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sub element of the DCE core promoter e ***
--- *** lement with consensus sequence CTGT.     ***
--- ************************************************
---

CREATE VIEW dce_sii AS
  SELECT
    feature_id AS dce_sii_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'DCE_SII';

--- ************************************************
--- *** relation: dce_siii ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sub element of the DCE core promoter e ***
--- *** lement with consensus sequence AGC.      ***
--- ************************************************
---

CREATE VIEW dce_siii AS
  SELECT
    feature_id AS dce_siii_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'DCE_SIII';

--- ************************************************
--- *** relation: proximal_promoter_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW proximal_promoter_element AS
  SELECT
    feature_id AS proximal_promoter_element_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'proximal_promoter_element';

--- ************************************************
--- *** relation: rnapol_ii_core_promoter ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The minimal portion of the promoter requ ***
--- *** ired to properly initiate transcription  ***
--- *** in RNA polymerase II transcribed genes.  ***
--- ************************************************
---

CREATE VIEW rnapol_ii_core_promoter AS
  SELECT
    feature_id AS rnapol_ii_core_promoter_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'RNApol_II_core_promoter';

--- ************************************************
--- *** relation: distal_promoter_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW distal_promoter_element AS
  SELECT
    feature_id AS distal_promoter_element_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'distal_promoter_element';

--- ************************************************
--- *** relation: bacterial_rnapol_promoter_sigma_70 ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW bacterial_rnapol_promoter_sigma_70 AS
  SELECT
    feature_id AS bacterial_rnapol_promoter_sigma_70_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'bacterial_RNApol_promoter_sigma_70';

--- ************************************************
--- *** relation: bacterial_rnapol_promoter_sigma54 ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW bacterial_rnapol_promoter_sigma54 AS
  SELECT
    feature_id AS bacterial_rnapol_promoter_sigma54_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'bacterial_RNApol_promoter_sigma54';

--- ************************************************
--- *** relation: minus_12_signal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A conserved region about 12-bp upstream  ***
--- *** of the start point of bacterial transcri ***
--- *** ption units, involved with sigma factor  ***
--- *** 54.                                      ***
--- ************************************************
---

CREATE VIEW minus_12_signal AS
  SELECT
    feature_id AS minus_12_signal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'minus_12_signal';

--- ************************************************
--- *** relation: minus_24_signal ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A conserved region about 12-bp upstream  ***
--- *** of the start point of bacterial transcri ***
--- *** ption units, involved with sigma factor  ***
--- *** 54.                                      ***
--- ************************************************
---

CREATE VIEW minus_24_signal AS
  SELECT
    feature_id AS minus_24_signal_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'minus_24_signal';

--- ************************************************
--- *** relation: a_box_type_1 ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An A box within an RNA polymerase III ty ***
--- *** pe 1 promoter.                           ***
--- ************************************************
---

CREATE VIEW a_box_type_1 AS
  SELECT
    feature_id AS a_box_type_1_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'A_box_type_1';

--- ************************************************
--- *** relation: a_box_type_2 ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An A box within an RNA polymerase III ty ***
--- *** pe 2 promoter.                           ***
--- ************************************************
---

CREATE VIEW a_box_type_2 AS
  SELECT
    feature_id AS a_box_type_2_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'A_box_type_2';

--- ************************************************
--- *** relation: intermediate_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A core promoter region of RNA polymerase ***
--- ***  III type 1 promoters.                   ***
--- ************************************************
---

CREATE VIEW intermediate_element AS
  SELECT
    feature_id AS intermediate_element_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'intermediate_element';

--- ************************************************
--- *** relation: regulatory_promoter_element ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A promoter element that is not part of t ***
--- *** he core promoter, but provides the promo ***
--- *** ter with a specific regulatory region.   ***
--- ************************************************
---

CREATE VIEW regulatory_promoter_element AS
  SELECT
    feature_id AS regulatory_promoter_element_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'proximal_promoter_element' OR cvterm.name = 'distal_promoter_element' OR cvterm.name = 'regulatory_promoter_element';

--- ************************************************
--- *** relation: transcription_regulatory_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A regulatory region that is involved in  ***
--- *** the control of the process of transcript ***
--- *** ion.                                     ***
--- ************************************************
---

CREATE VIEW transcription_regulatory_region AS
  SELECT
    feature_id AS transcription_regulatory_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE 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 = 'intronic_regulatory_region' 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 = 'operator' OR cvterm.name = 'bacterial_RNApol_promoter' OR cvterm.name = 'bacterial_terminator' OR cvterm.name = 'bacterial_RNApol_promoter_sigma_70' OR cvterm.name = 'bacterial_RNApol_promoter_sigma54' 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 = 'ISRE' 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_II_core_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 = 'bacterial_RNApol_promoter_sigma_70' OR cvterm.name = 'bacterial_RNApol_promoter_sigma54' 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 = 'silencer' OR cvterm.name = 'enhancer_bound_by_factor' OR cvterm.name = 'shadow_enhancer' OR cvterm.name = 'splice_enhancer' OR cvterm.name = 'intronic_splice_enhancer' OR cvterm.name = 'exonic_splice_enhancer' OR cvterm.name = 'transcription_regulatory_region';

--- ************************************************
--- *** relation: translation_regulatory_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A regulatory region that is involved in  ***
--- *** the control of the process of translatio ***
--- *** n.                                       ***
--- ************************************************
---

CREATE VIEW translation_regulatory_region AS
  SELECT
    feature_id AS translation_regulatory_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'attenuator' OR cvterm.name = 'translation_regulatory_region';

--- ************************************************
--- *** relation: recombination_regulatory_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A regulatory region that is involved in  ***
--- *** the control of the process of recombinat ***
--- *** ion.                                     ***
--- ************************************************
---

CREATE VIEW recombination_regulatory_region AS
  SELECT
    feature_id AS recombination_regulatory_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'recombination_regulatory_region';

--- ************************************************
--- *** relation: replication_regulatory_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A regulatory region that is involved in  ***
--- *** the control of the process of nucleotide ***
--- ***  replication.                            ***
--- ************************************************
---

CREATE VIEW replication_regulatory_region AS
  SELECT
    feature_id AS replication_regulatory_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'replication_regulatory_region';

--- ************************************************
--- *** relation: sequence_motif ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence motif is a nucleotide or amin ***
--- *** o-acid sequence pattern that may have bi ***
--- *** ological significance.                   ***
--- ************************************************
---

CREATE VIEW sequence_motif AS
  SELECT
    feature_id AS sequence_motif_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'nucleotide_motif' OR cvterm.name = 'DNA_motif' OR cvterm.name = 'RNA_motif' OR cvterm.name = 'PSE_motif' OR cvterm.name = 'CAAT_signal' OR cvterm.name = 'minus_10_signal' OR cvterm.name = 'minus_35_signal' OR cvterm.name = 'DRE_motif' OR cvterm.name = 'E_box_motif' OR cvterm.name = 'INR1_motif' OR cvterm.name = 'GAGA_motif' OR cvterm.name = 'octamer_motif' OR cvterm.name = 'retinoic_acid_responsive_element' OR cvterm.name = 'promoter_element' OR cvterm.name = 'DCE_SI' OR cvterm.name = 'DCE_SII' OR cvterm.name = 'DCE_SIII' OR cvterm.name = 'minus_12_signal' OR cvterm.name = 'minus_24_signal' OR cvterm.name = 'GC_rich_promoter_region' 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 = 'core_promoter_element' OR cvterm.name = 'regulatory_promoter_element' OR cvterm.name = 'INR_motif' OR cvterm.name = 'DPE_motif' OR cvterm.name = 'BREu_motif' OR cvterm.name = 'TATA_box' OR cvterm.name = 'A_box' OR cvterm.name = 'B_box' OR cvterm.name = 'C_box' OR cvterm.name = 'MTE' OR cvterm.name = 'BREd_motif' OR cvterm.name = 'DCE' OR cvterm.name = 'intermediate_element' OR cvterm.name = 'RNA_polymerase_II_TATA_box' OR cvterm.name = 'RNA_polymerase_III_TATA_box' OR cvterm.name = 'A_box_type_1' OR cvterm.name = 'A_box_type_2' OR cvterm.name = 'proximal_promoter_element' OR cvterm.name = 'distal_promoter_element' 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 = 'sequence_motif';

--- ************************************************
--- *** relation: experimental_feature_attribute ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An attribute of an experimentally derive ***
--- *** d feature.                               ***
--- ************************************************
---

CREATE VIEW experimental_feature_attribute AS
  SELECT
    feature_id AS experimental_feature_attribute_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'score' OR cvterm.name = 'quality_value' OR cvterm.name = 'experimental_feature_attribute';

--- ************************************************
--- *** relation: score ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The score of an experimentally derived f ***
--- *** eature such as a p-value.                ***
--- ************************************************
---

CREATE VIEW score AS
  SELECT
    feature_id AS score_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'score';

--- ************************************************
--- *** relation: quality_value ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An experimental feature attribute that d ***
--- *** efines the quality of the feature in a q ***
--- *** uantitative way, such as a phred quality ***
--- ***  score.                                  ***
--- ************************************************
---

CREATE VIEW quality_value AS
  SELECT
    feature_id AS quality_value_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'quality_value';

--- ************************************************
--- *** relation: restriction_enzyme_recognition_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The nucleotide region (usually a palindr ***
--- *** ome) that is recognized by a restriction ***
--- ***  enzyme. This may or may not be equal to ***
--- ***  the restriction enzyme binding site.    ***
--- ************************************************
---

CREATE VIEW restriction_enzyme_recognition_site AS
  SELECT
    feature_id AS restriction_enzyme_recognition_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'blunt_end_restriction_enzyme_cleavage_site' OR cvterm.name = 'sticky_end_restriction_enzyme_cleavage_site' OR cvterm.name = 'restriction_enzyme_recognition_site';

--- ************************************************
--- *** relation: restriction_enzyme_cleavage_junction ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The boundary at which a restriction enzy ***
--- *** me breaks the nucleotide sequence.       ***
--- ************************************************
---

CREATE VIEW restriction_enzyme_cleavage_junction AS
  SELECT
    feature_id AS restriction_enzyme_cleavage_junction_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'blunt_end_restriction_enzyme_cleavage_junction' OR cvterm.name = 'single_strand_restriction_enzyme_cleavage_site' OR cvterm.name = 'five_prime_restriction_enzyme_junction' OR cvterm.name = 'three_prime_restriction_enzyme_junction' OR cvterm.name = 'restriction_enzyme_cleavage_junction';

--- ************************************************
--- *** relation: five_prime_restriction_enzyme_junction ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The restriction enzyme cleavage junction ***
--- ***  on the 5' strand of the nucleotide sequ ***
--- *** ence.                                    ***
--- ************************************************
---

CREATE VIEW five_prime_restriction_enzyme_junction AS
  SELECT
    feature_id AS five_prime_restriction_enzyme_junction_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_prime_restriction_enzyme_junction';

--- ************************************************
--- *** relation: three_prime_restriction_enzyme_junction ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW three_prime_restriction_enzyme_junction AS
  SELECT
    feature_id AS three_prime_restriction_enzyme_junction_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'three_prime_restriction_enzyme_junction';

--- ************************************************
--- *** relation: blunt_end_restriction_enzyme_cleavage_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW blunt_end_restriction_enzyme_cleavage_site AS
  SELECT
    feature_id AS blunt_end_restriction_enzyme_cleavage_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'blunt_end_restriction_enzyme_cleavage_site';

--- ************************************************
--- *** relation: sticky_end_restriction_enzyme_cleavage_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW sticky_end_restriction_enzyme_cleavage_site AS
  SELECT
    feature_id AS sticky_end_restriction_enzyme_cleavage_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'sticky_end_restriction_enzyme_cleavage_site';

--- ************************************************
--- *** relation: blunt_end_restriction_enzyme_cleavage_junction ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A restriction enzyme cleavage site where ***
--- ***  both strands are cut at the same positi ***
--- *** on.                                      ***
--- ************************************************
---

CREATE VIEW blunt_end_restriction_enzyme_cleavage_junction AS
  SELECT
    feature_id AS blunt_end_restriction_enzyme_cleavage_junction_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'blunt_end_restriction_enzyme_cleavage_junction';

--- ************************************************
--- *** relation: single_strand_restriction_enzyme_cleavage_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A restriction enzyme cleavage site where ***
--- *** by only one strand is cut.               ***
--- ************************************************
---

CREATE VIEW single_strand_restriction_enzyme_cleavage_site AS
  SELECT
    feature_id AS single_strand_restriction_enzyme_cleavage_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'five_prime_restriction_enzyme_junction' OR cvterm.name = 'three_prime_restriction_enzyme_junction' OR cvterm.name = 'single_strand_restriction_enzyme_cleavage_site';

--- ************************************************
--- *** relation: restriction_enzyme_single_strand_overhang ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A terminal region of DNA sequence where  ***
--- *** the end of the region is not blunt ended ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW restriction_enzyme_single_strand_overhang AS
  SELECT
    feature_id AS restriction_enzyme_single_strand_overhang_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'restriction_enzyme_single_strand_overhang';

--- ************************************************
--- *** relation: experimentally_defined_binding_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region that has been implicated in bin ***
--- *** ding although the exact coordinates of b ***
--- *** inding may be unknown.                   ***
--- ************************************************
---

CREATE VIEW experimentally_defined_binding_region AS
  SELECT
    feature_id AS experimentally_defined_binding_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'CHiP_seq_region' OR cvterm.name = 'experimentally_defined_binding_region';

--- ************************************************
--- *** relation: chip_seq_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of sequence identified by CHiP  ***
--- *** seq technology to contain a protein bind ***
--- *** ing site.                                ***
--- ************************************************
---

CREATE VIEW chip_seq_region AS
  SELECT
    feature_id AS chip_seq_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'CHiP_seq_region';

--- ************************************************
--- *** relation: aspe_primer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** "A primer containing an SNV at the 3' en ***
--- *** d for accurate genotyping.               ***
--- ************************************************
---

CREATE VIEW aspe_primer AS
  SELECT
    feature_id AS aspe_primer_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'ASPE_primer';

--- ************************************************
--- *** relation: dcaps_primer ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primer with one or more mis-matches to ***
--- ***  the DNA template corresponding to a pos ***
--- *** ition within a restriction enzyme recogn ***
--- *** ition site.                              ***
--- ************************************************
---

CREATE VIEW dcaps_primer AS
  SELECT
    feature_id AS dcaps_primer_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'dCAPS_primer';

--- ************************************************
--- *** relation: histone_modification ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Histone modification is a post translati ***
--- *** onally modified region whereby residues  ***
--- *** of the histone protein are modified by m ***
--- *** ethylation, acetylation, phosphorylation ***
--- *** , ubiquitination, sumoylation, citrullin ***
--- *** ation, or ADP-ribosylation.              ***
--- ************************************************
---

CREATE VIEW histone_modification AS
  SELECT
    feature_id AS histone_modification_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'histone_methylation_site' OR cvterm.name = 'histone_acetylation_site' OR cvterm.name = 'histone_ubiqitination_site' OR cvterm.name = 'histone_acylation_region' OR cvterm.name = 'H4K20_monomethylation_site' OR cvterm.name = 'H2BK5_monomethylation_site' OR cvterm.name = 'H3K27_methylation_site' OR cvterm.name = 'H3K36_methylation_site' OR cvterm.name = 'H3K4_methylation_site' OR cvterm.name = 'H3K79_methylation_site' OR cvterm.name = 'H3K9_methylation_site' OR cvterm.name = 'H3K27_monomethylation_site' OR cvterm.name = 'H3K27_trimethylation_site' OR cvterm.name = 'H3K27_dimethylation_site' OR cvterm.name = 'H3K36_monomethylation_site' OR cvterm.name = 'H3K36_dimethylation_site' OR cvterm.name = 'H3K36_trimethylation_site' OR cvterm.name = 'H3K4_monomethylation_site' OR cvterm.name = 'H3K4_trimethylation' OR cvterm.name = 'H3K4_dimethylation_site' OR cvterm.name = 'H3K79_monomethylation_site' OR cvterm.name = 'H3K79_dimethylation_site' OR cvterm.name = 'H3K79_trimethylation_site' OR cvterm.name = 'H3K9_trimethylation_site' OR cvterm.name = 'H3K9_monomethylation_site' OR cvterm.name = 'H3K9_dimethylation_site' OR cvterm.name = 'H3K9_acetylation_site' OR cvterm.name = 'H3K14_acetylation_site' OR cvterm.name = 'H3K18_acetylation_site' OR cvterm.name = 'H3K23_acylation site' OR cvterm.name = 'H3K27_acylation_site' OR cvterm.name = 'H4K16_acylation_site' OR cvterm.name = 'H4K5_acylation_site' OR cvterm.name = 'H4K8_acylation site' OR cvterm.name = 'H2B_ubiquitination_site' OR cvterm.name = 'H4K_acylation_region' OR cvterm.name = 'histone_modification';

--- ************************************************
--- *** relation: histone_methylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A histone modification site where the mo ***
--- *** dification is the methylation of the res ***
--- *** idue.                                    ***
--- ************************************************
---

CREATE VIEW histone_methylation_site AS
  SELECT
    feature_id AS histone_methylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H4K20_monomethylation_site' OR cvterm.name = 'H2BK5_monomethylation_site' OR cvterm.name = 'H3K27_methylation_site' OR cvterm.name = 'H3K36_methylation_site' OR cvterm.name = 'H3K4_methylation_site' OR cvterm.name = 'H3K79_methylation_site' OR cvterm.name = 'H3K9_methylation_site' OR cvterm.name = 'H3K27_monomethylation_site' OR cvterm.name = 'H3K27_trimethylation_site' OR cvterm.name = 'H3K27_dimethylation_site' OR cvterm.name = 'H3K36_monomethylation_site' OR cvterm.name = 'H3K36_dimethylation_site' OR cvterm.name = 'H3K36_trimethylation_site' OR cvterm.name = 'H3K4_monomethylation_site' OR cvterm.name = 'H3K4_trimethylation' OR cvterm.name = 'H3K4_dimethylation_site' OR cvterm.name = 'H3K79_monomethylation_site' OR cvterm.name = 'H3K79_dimethylation_site' OR cvterm.name = 'H3K79_trimethylation_site' OR cvterm.name = 'H3K9_trimethylation_site' OR cvterm.name = 'H3K9_monomethylation_site' OR cvterm.name = 'H3K9_dimethylation_site' OR cvterm.name = 'histone_methylation_site';

--- ************************************************
--- *** relation: histone_acetylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A histone modification where the modific ***
--- *** ation is the acylation of the residue.   ***
--- ************************************************
---

CREATE VIEW histone_acetylation_site AS
  SELECT
    feature_id AS histone_acetylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K9_acetylation_site' OR cvterm.name = 'H3K14_acetylation_site' OR cvterm.name = 'H3K18_acetylation_site' OR cvterm.name = 'H3K23_acylation site' OR cvterm.name = 'H3K27_acylation_site' OR cvterm.name = 'H4K16_acylation_site' OR cvterm.name = 'H4K5_acylation_site' OR cvterm.name = 'H4K8_acylation site' OR cvterm.name = 'histone_acetylation_site';

--- ************************************************
--- *** relation: h3k9_acetylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 9th residue (a lysine), from th ***
--- *** e start of the H3 histone protein is acy ***
--- *** lated.                                   ***
--- ************************************************
---

CREATE VIEW h3k9_acetylation_site AS
  SELECT
    feature_id AS h3k9_acetylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K9_acetylation_site';

--- ************************************************
--- *** relation: h3k14_acetylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 14th residue (a lysine), from t ***
--- *** he start of the H3 histone protein is ac ***
--- *** ylated.                                  ***
--- ************************************************
---

CREATE VIEW h3k14_acetylation_site AS
  SELECT
    feature_id AS h3k14_acetylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K14_acetylation_site';

--- ************************************************
--- *** relation: h3k4_monomethylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification, whereby  ***
--- *** the 4th residue (a lysine), from the sta ***
--- *** rt of the H3 protein is mono-methylated. ***
--- ************************************************
---

CREATE VIEW h3k4_monomethylation_site AS
  SELECT
    feature_id AS h3k4_monomethylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K4_monomethylation_site';

--- ************************************************
--- *** relation: h3k4_trimethylation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 4th residue (a lysine), from th ***
--- *** e start of the H3 protein is tri-methyla ***
--- *** ted.                                     ***
--- ************************************************
---

CREATE VIEW h3k4_trimethylation AS
  SELECT
    feature_id AS h3k4_trimethylation_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K4_trimethylation';

--- ************************************************
--- *** relation: h3k9_trimethylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 9th residue (a lysine), from th ***
--- *** e start of the H3 histone protein is tri ***
--- *** -methylated.                             ***
--- ************************************************
---

CREATE VIEW h3k9_trimethylation_site AS
  SELECT
    feature_id AS h3k9_trimethylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K9_trimethylation_site';

--- ************************************************
--- *** relation: h3k27_monomethylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 27th residue (a lysine), from t ***
--- *** he start of the H3 histone protein is mo ***
--- *** no-methylated.                           ***
--- ************************************************
---

CREATE VIEW h3k27_monomethylation_site AS
  SELECT
    feature_id AS h3k27_monomethylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K27_monomethylation_site';

--- ************************************************
--- *** relation: h3k27_trimethylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 27th residue (a lysine), from t ***
--- *** he start of the H3 histone protein is tr ***
--- *** i-methylated.                            ***
--- ************************************************
---

CREATE VIEW h3k27_trimethylation_site AS
  SELECT
    feature_id AS h3k27_trimethylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K27_trimethylation_site';

--- ************************************************
--- *** relation: h3k79_monomethylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 79th residue (a lysine), from t ***
--- *** he start of the H3 histone protein is mo ***
--- *** no- methylated.                          ***
--- ************************************************
---

CREATE VIEW h3k79_monomethylation_site AS
  SELECT
    feature_id AS h3k79_monomethylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K79_monomethylation_site';

--- ************************************************
--- *** relation: h3k79_dimethylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 79th residue (a lysine), from t ***
--- *** he start of the H3 histone protein is di ***
--- *** -methylated.                             ***
--- ************************************************
---

CREATE VIEW h3k79_dimethylation_site AS
  SELECT
    feature_id AS h3k79_dimethylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K79_dimethylation_site';

--- ************************************************
--- *** relation: h3k79_trimethylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 79th residue (a lysine), from t ***
--- *** he start of the H3 histone protein is tr ***
--- *** i-methylated.                            ***
--- ************************************************
---

CREATE VIEW h3k79_trimethylation_site AS
  SELECT
    feature_id AS h3k79_trimethylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K79_trimethylation_site';

--- ************************************************
--- *** relation: h4k20_monomethylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 20th residue (a lysine), from t ***
--- *** he start of the H34histone protein is mo ***
--- *** no-methylated.                           ***
--- ************************************************
---

CREATE VIEW h4k20_monomethylation_site AS
  SELECT
    feature_id AS h4k20_monomethylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H4K20_monomethylation_site';

--- ************************************************
--- *** relation: h2bk5_monomethylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 5th residue (a lysine), from th ***
--- *** e start of the H2B protein is methylated ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW h2bk5_monomethylation_site AS
  SELECT
    feature_id AS h2bk5_monomethylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H2BK5_monomethylation_site';

--- ************************************************
--- *** relation: isre ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An ISRE is a transcriptional cis regulat ***
--- *** ory region, containing the consensus reg ***
--- *** ion: YAGTTTC(A/T)YTTTYCC, responsible fo ***
--- *** r increased transcription via interferon ***
--- ***  binding.                                ***
--- ************************************************
---

CREATE VIEW isre AS
  SELECT
    feature_id AS isre_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'ISRE';

--- ************************************************
--- *** relation: histone_ubiqitination_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A histone modification site where ubiqui ***
--- *** tin may be added.                        ***
--- ************************************************
---

CREATE VIEW histone_ubiqitination_site AS
  SELECT
    feature_id AS histone_ubiqitination_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H2B_ubiquitination_site' OR cvterm.name = 'histone_ubiqitination_site';

--- ************************************************
--- *** relation: h2b_ubiquitination_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A histone modification site on H2B where ***
--- ***  ubiquitin may be added.                 ***
--- ************************************************
---

CREATE VIEW h2b_ubiquitination_site AS
  SELECT
    feature_id AS h2b_ubiquitination_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H2B_ubiquitination_site';

--- ************************************************
--- *** relation: h3k18_acetylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 14th residue (a lysine), from t ***
--- *** he start of the H3 histone protein is ac ***
--- *** ylated.                                  ***
--- ************************************************
---

CREATE VIEW h3k18_acetylation_site AS
  SELECT
    feature_id AS h3k18_acetylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K18_acetylation_site';

--- ************************************************
--- *** relation: h3k23_acylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification, whereby  ***
--- *** the 23rd residue (a lysine), from the st ***
--- *** art of the H3 histone protein is acylate ***
--- *** d.                                       ***
--- ************************************************
---

CREATE VIEW h3k23_acylation_site AS
  SELECT
    feature_id AS h3k23_acylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K23_acylation site';

--- ************************************************
--- *** relation: epigenetically_modified_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A biological region implicated in inheri ***
--- *** ted changes caused by mechanisms other t ***
--- *** han changes in the underlying DNA sequen ***
--- *** ce.                                      ***
--- ************************************************
---

CREATE VIEW epigenetically_modified_region AS
  SELECT
    feature_id AS epigenetically_modified_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'modified_base' OR cvterm.name = 'epigenetically_modified_gene' OR cvterm.name = 'histone_modification' OR cvterm.name = 'methylated_base_feature' OR cvterm.name = 'methylated_C' OR cvterm.name = 'methylated_A' 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 = 'histone_methylation_site' OR cvterm.name = 'histone_acetylation_site' OR cvterm.name = 'histone_ubiqitination_site' OR cvterm.name = 'histone_acylation_region' OR cvterm.name = 'H4K20_monomethylation_site' OR cvterm.name = 'H2BK5_monomethylation_site' OR cvterm.name = 'H3K27_methylation_site' OR cvterm.name = 'H3K36_methylation_site' OR cvterm.name = 'H3K4_methylation_site' OR cvterm.name = 'H3K79_methylation_site' OR cvterm.name = 'H3K9_methylation_site' OR cvterm.name = 'H3K27_monomethylation_site' OR cvterm.name = 'H3K27_trimethylation_site' OR cvterm.name = 'H3K27_dimethylation_site' OR cvterm.name = 'H3K36_monomethylation_site' OR cvterm.name = 'H3K36_dimethylation_site' OR cvterm.name = 'H3K36_trimethylation_site' OR cvterm.name = 'H3K4_monomethylation_site' OR cvterm.name = 'H3K4_trimethylation' OR cvterm.name = 'H3K4_dimethylation_site' OR cvterm.name = 'H3K79_monomethylation_site' OR cvterm.name = 'H3K79_dimethylation_site' OR cvterm.name = 'H3K79_trimethylation_site' OR cvterm.name = 'H3K9_trimethylation_site' OR cvterm.name = 'H3K9_monomethylation_site' OR cvterm.name = 'H3K9_dimethylation_site' OR cvterm.name = 'H3K9_acetylation_site' OR cvterm.name = 'H3K14_acetylation_site' OR cvterm.name = 'H3K18_acetylation_site' OR cvterm.name = 'H3K23_acylation site' OR cvterm.name = 'H3K27_acylation_site' OR cvterm.name = 'H4K16_acylation_site' OR cvterm.name = 'H4K5_acylation_site' OR cvterm.name = 'H4K8_acylation site' OR cvterm.name = 'H2B_ubiquitination_site' OR cvterm.name = 'H4K_acylation_region' OR cvterm.name = 'epigenetically_modified_region';

--- ************************************************
--- *** relation: h3k27_acylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 27th residue (a lysine), from t ***
--- *** he start of the H3 histone protein is ac ***
--- *** ylated.                                  ***
--- ************************************************
---

CREATE VIEW h3k27_acylation_site AS
  SELECT
    feature_id AS h3k27_acylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K27_acylation_site';

--- ************************************************
--- *** relation: h3k36_monomethylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 36th residue (a lysine), from t ***
--- *** he start of the H3 histone protein is mo ***
--- *** no-methylated.                           ***
--- ************************************************
---

CREATE VIEW h3k36_monomethylation_site AS
  SELECT
    feature_id AS h3k36_monomethylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K36_monomethylation_site';

--- ************************************************
--- *** relation: h3k36_dimethylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 36th residue (a lysine), from t ***
--- *** he start of the H3 histone protein is di ***
--- *** methylated.                              ***
--- ************************************************
---

CREATE VIEW h3k36_dimethylation_site AS
  SELECT
    feature_id AS h3k36_dimethylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K36_dimethylation_site';

--- ************************************************
--- *** relation: h3k36_trimethylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 36th residue (a lysine), from t ***
--- *** he start of the H3 histone protein is tr ***
--- *** i-methylated.                            ***
--- ************************************************
---

CREATE VIEW h3k36_trimethylation_site AS
  SELECT
    feature_id AS h3k36_trimethylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K36_trimethylation_site';

--- ************************************************
--- *** relation: h3k4_dimethylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 4th residue (a lysine), from th ***
--- *** e start of the H3 histone protein is di- ***
--- *** methylated.                              ***
--- ************************************************
---

CREATE VIEW h3k4_dimethylation_site AS
  SELECT
    feature_id AS h3k4_dimethylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K4_dimethylation_site';

--- ************************************************
--- *** relation: h3k27_dimethylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 27th residue (a lysine), from t ***
--- *** he start of the H3 histone protein is di ***
--- *** -methylated.                             ***
--- ************************************************
---

CREATE VIEW h3k27_dimethylation_site AS
  SELECT
    feature_id AS h3k27_dimethylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K27_dimethylation_site';

--- ************************************************
--- *** relation: h3k9_monomethylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 9th residue (a lysine), from th ***
--- *** e start of the H3 histone protein is mon ***
--- *** o-methylated.                            ***
--- ************************************************
---

CREATE VIEW h3k9_monomethylation_site AS
  SELECT
    feature_id AS h3k9_monomethylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K9_monomethylation_site';

--- ************************************************
--- *** relation: h3k9_dimethylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 9th residue (a lysine), from th ***
--- *** e start of the H3 histone protein may be ***
--- ***  dimethylated.                           ***
--- ************************************************
---

CREATE VIEW h3k9_dimethylation_site AS
  SELECT
    feature_id AS h3k9_dimethylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K9_dimethylation_site';

--- ************************************************
--- *** relation: h4k16_acylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 16th residue (a lysine), from t ***
--- *** he start of the H4 histone protein is ac ***
--- *** ylated.                                  ***
--- ************************************************
---

CREATE VIEW h4k16_acylation_site AS
  SELECT
    feature_id AS h4k16_acylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H4K16_acylation_site';

--- ************************************************
--- *** relation: h4k5_acylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 5th residue (a lysine), from th ***
--- *** e start of the H4 histone protein is acy ***
--- *** lated.                                   ***
--- ************************************************
---

CREATE VIEW h4k5_acylation_site AS
  SELECT
    feature_id AS h4k5_acylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H4K5_acylation_site';

--- ************************************************
--- *** relation: h4k8_acylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 8th residue (a lysine), from th ***
--- *** e start of the H4 histone protein is acy ***
--- *** lated.                                   ***
--- ************************************************
---

CREATE VIEW h4k8_acylation_site AS
  SELECT
    feature_id AS h4k8_acylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H4K8_acylation site';

--- ************************************************
--- *** relation: h3k27_methylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 27th residue (a lysine), from t ***
--- *** he start of the H3 histone protein is me ***
--- *** thylated.                                ***
--- ************************************************
---

CREATE VIEW h3k27_methylation_site AS
  SELECT
    feature_id AS h3k27_methylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K27_monomethylation_site' OR cvterm.name = 'H3K27_trimethylation_site' OR cvterm.name = 'H3K27_dimethylation_site' OR cvterm.name = 'H3K27_methylation_site';

--- ************************************************
--- *** relation: h3k36_methylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 36th residue (a lysine), from t ***
--- *** he start of the H3 histone protein is me ***
--- *** thylated.                                ***
--- ************************************************
---

CREATE VIEW h3k36_methylation_site AS
  SELECT
    feature_id AS h3k36_methylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K36_monomethylation_site' OR cvterm.name = 'H3K36_dimethylation_site' OR cvterm.name = 'H3K36_trimethylation_site' OR cvterm.name = 'H3K36_methylation_site';

--- ************************************************
--- *** relation: h3k4_methylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification, whereby  ***
--- *** the 4th residue (a lysine), from the sta ***
--- *** rt of the H3 protein is methylated.      ***
--- ************************************************
---

CREATE VIEW h3k4_methylation_site AS
  SELECT
    feature_id AS h3k4_methylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K4_monomethylation_site' OR cvterm.name = 'H3K4_trimethylation' OR cvterm.name = 'H3K4_dimethylation_site' OR cvterm.name = 'H3K4_methylation_site';

--- ************************************************
--- *** relation: h3k79_methylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 79th residue (a lysine), from t ***
--- *** he start of the H3 histone protein is me ***
--- *** thylated.                                ***
--- ************************************************
---

CREATE VIEW h3k79_methylation_site AS
  SELECT
    feature_id AS h3k79_methylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K79_monomethylation_site' OR cvterm.name = 'H3K79_dimethylation_site' OR cvterm.name = 'H3K79_trimethylation_site' OR cvterm.name = 'H3K79_methylation_site';

--- ************************************************
--- *** relation: h3k9_methylation_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A kind of histone modification site, whe ***
--- *** reby the 9th residue (a lysine), from th ***
--- *** e start of the H3 histone protein is met ***
--- *** hylated.                                 ***
--- ************************************************
---

CREATE VIEW h3k9_methylation_site AS
  SELECT
    feature_id AS h3k9_methylation_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H3K9_trimethylation_site' OR cvterm.name = 'H3K9_monomethylation_site' OR cvterm.name = 'H3K9_dimethylation_site' OR cvterm.name = 'H3K9_methylation_site';

--- ************************************************
--- *** relation: histone_acylation_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A histone modification, whereby the hist ***
--- *** one protein is acylated at multiple site ***
--- *** s in a region.                           ***
--- ************************************************
---

CREATE VIEW histone_acylation_region AS
  SELECT
    feature_id AS histone_acylation_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H4K_acylation_region' OR cvterm.name = 'histone_acylation_region';

--- ************************************************
--- *** relation: h4k_acylation_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of the H4 histone whereby multi ***
--- *** ple lysines are acylated.                ***
--- ************************************************
---

CREATE VIEW h4k_acylation_region AS
  SELECT
    feature_id AS h4k_acylation_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'H4K_acylation_region';

--- ************************************************
--- *** relation: gene_with_non_canonical_start_codon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene with a start codon other than AUG ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW gene_with_non_canonical_start_codon AS
  SELECT
    feature_id AS gene_with_non_canonical_start_codon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gene_with_start_codon_CUG' OR cvterm.name = 'gene_with_non_canonical_start_codon';

--- ************************************************
--- *** relation: gene_with_start_codon_cug ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene with a translational start codon  ***
--- *** of CUG.                                  ***
--- ************************************************
---

CREATE VIEW gene_with_start_codon_cug AS
  SELECT
    feature_id AS gene_with_start_codon_cug_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'gene_with_start_codon_CUG';

--- ************************************************
--- *** relation: pseudogenic_gene_segment ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A gene segment which when incorporated b ***
--- *** y somatic recombination in the final gen ***
--- *** e transcript results in a nonfunctional  ***
--- *** product.                                 ***
--- ************************************************
---

CREATE VIEW pseudogenic_gene_segment AS
  SELECT
    feature_id AS pseudogenic_gene_segment_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'pseudogenic_gene_segment';

--- ************************************************
--- *** relation: copy_number_gain ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence alteration whereby the copy n ***
--- *** umber of a given regions is greater than ***
--- ***  the reference sequence.                 ***
--- ************************************************
---

CREATE VIEW copy_number_gain AS
  SELECT
    feature_id AS copy_number_gain_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'copy_number_gain';

--- ************************************************
--- *** relation: copy_number_loss ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence alteration whereby the copy n ***
--- *** umber of a given region is less than the ***
--- ***  reference sequence.                     ***
--- ************************************************
---

CREATE VIEW copy_number_loss AS
  SELECT
    feature_id AS copy_number_loss_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'copy_number_loss';

--- ************************************************
--- *** relation: upd ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Uniparental disomy is a sequence_alterat ***
--- *** ion where a diploid individual receives  ***
--- *** two copies for all or part of a chromoso ***
--- *** me from one parent and no copies of the  ***
--- *** same chromosome or region from the other ***
--- ***  parent.                                 ***
--- ************************************************
---

CREATE VIEW upd AS
  SELECT
    feature_id AS upd_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'maternal_uniparental_disomy' OR cvterm.name = 'paternal_uniparental_disomy' OR cvterm.name = 'UPD';

--- ************************************************
--- *** relation: maternal_uniparental_disomy ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Uniparental disomy is a sequence_alterat ***
--- *** ion where a diploid individual receives  ***
--- *** two copies for all or part of a chromoso ***
--- *** me from the mother and no copies of the  ***
--- *** same chromosome or region from the fathe ***
--- *** r.                                       ***
--- ************************************************
---

CREATE VIEW maternal_uniparental_disomy AS
  SELECT
    feature_id AS maternal_uniparental_disomy_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'maternal_uniparental_disomy';

--- ************************************************
--- *** relation: paternal_uniparental_disomy ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** Uniparental disomy is a sequence_alterat ***
--- *** ion where a diploid individual receives  ***
--- *** two copies for all or part of a chromoso ***
--- *** me from the father and no copies of the  ***
--- *** same chromosome or region from the mothe ***
--- *** r.                                       ***
--- ************************************************
---

CREATE VIEW paternal_uniparental_disomy AS
  SELECT
    feature_id AS paternal_uniparental_disomy_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'paternal_uniparental_disomy';

--- ************************************************
--- *** relation: open_chromatin_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A DNA sequence that in the normal state  ***
--- *** of the chromosome corresponds to an unfo ***
--- *** lded, un-complexed stretch of double-str ***
--- *** anded DNA.                               ***
--- ************************************************
---

CREATE VIEW open_chromatin_region AS
  SELECT
    feature_id AS open_chromatin_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'open_chromatin_region';

--- ************************************************
--- *** relation: sl3_acceptor_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A SL2_acceptor_site which appends the SL ***
--- *** 3 RNA leader sequence to the 5' end of a ***
--- *** n mRNA. SL3 acceptor sites occur in gene ***
--- *** s in internal segments of polycistronic  ***
--- *** transcripts.                             ***
--- ************************************************
---

CREATE VIEW sl3_acceptor_site AS
  SELECT
    feature_id AS sl3_acceptor_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'SL3_acceptor_site';

--- ************************************************
--- *** relation: sl4_acceptor_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A SL2_acceptor_site which appends the SL ***
--- *** 4 RNA leader sequence to the 5' end of a ***
--- *** n mRNA. SL4 acceptor sites occur in gene ***
--- *** s in internal segments of polycistronic  ***
--- *** transcripts.                             ***
--- ************************************************
---

CREATE VIEW sl4_acceptor_site AS
  SELECT
    feature_id AS sl4_acceptor_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'SL4_acceptor_site';

--- ************************************************
--- *** relation: sl5_acceptor_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A SL2_acceptor_site which appends the SL ***
--- *** 5 RNA leader sequence to the 5' end of a ***
--- *** n mRNA. SL5 acceptor sites occur in gene ***
--- *** s in internal segments of polycistronic  ***
--- *** transcripts.                             ***
--- ************************************************
---

CREATE VIEW sl5_acceptor_site AS
  SELECT
    feature_id AS sl5_acceptor_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'SL5_acceptor_site';

--- ************************************************
--- *** relation: sl6_acceptor_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A SL2_acceptor_site which appends the SL ***
--- *** 6 RNA leader sequence to the 5' end of a ***
--- *** n mRNA. SL6 acceptor sites occur in gene ***
--- *** s in internal segments of polycistronic  ***
--- *** transcripts.                             ***
--- ************************************************
---

CREATE VIEW sl6_acceptor_site AS
  SELECT
    feature_id AS sl6_acceptor_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'SL6_acceptor_site';

--- ************************************************
--- *** relation: sl7_acceptor_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A SL2_acceptor_site which appends the SL ***
--- *** 7 RNA leader sequence to the 5' end of a ***
--- *** n mRNA. SL7 acceptor sites occur in gene ***
--- *** s in internal segments of polycistronic  ***
--- *** transcripts.                             ***
--- ************************************************
---

CREATE VIEW sl7_acceptor_site AS
  SELECT
    feature_id AS sl7_acceptor_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'SL7_acceptor_site';

--- ************************************************
--- *** relation: sl8_acceptor_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A SL2_acceptor_site which appends the SL ***
--- *** 8 RNA leader sequence to the 5' end of a ***
--- *** n mRNA. SL8 acceptor sites occur in gene ***
--- *** s in internal segments of polycistronic  ***
--- *** transcripts.                             ***
--- ************************************************
---

CREATE VIEW sl8_acceptor_site AS
  SELECT
    feature_id AS sl8_acceptor_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'SL8_acceptor_site';

--- ************************************************
--- *** relation: sl9_acceptor_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A SL2_acceptor_site which appends the SL ***
--- *** 9 RNA leader sequence to the 5' end of a ***
--- *** n mRNA. SL9 acceptor sites occur in gene ***
--- *** s in internal segments of polycistronic  ***
--- *** transcripts.                             ***
--- ************************************************
---

CREATE VIEW sl9_acceptor_site AS
  SELECT
    feature_id AS sl9_acceptor_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'SL9_acceptor_site';

--- ************************************************
--- *** relation: sl10_accceptor_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A SL2_acceptor_site which appends the SL ***
--- *** 10 RNA leader sequence to the 5' end of  ***
--- *** an mRNA. SL10 acceptor sites occur in ge ***
--- *** nes in internal segments of polycistroni ***
--- *** c transcripts.                           ***
--- ************************************************
---

CREATE VIEW sl10_accceptor_site AS
  SELECT
    feature_id AS sl10_accceptor_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'SL10_accceptor_site';

--- ************************************************
--- *** relation: sl11_acceptor_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A SL2_acceptor_site which appends the SL ***
--- *** 11 RNA leader sequence to the 5' end of  ***
--- *** an mRNA. SL11 acceptor sites occur in ge ***
--- *** nes in internal segments of polycistroni ***
--- *** c transcripts.                           ***
--- ************************************************
---

CREATE VIEW sl11_acceptor_site AS
  SELECT
    feature_id AS sl11_acceptor_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'SL11_acceptor_site';

--- ************************************************
--- *** relation: sl12_acceptor_site ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A SL2_acceptor_site which appends the SL ***
--- *** 12 RNA leader sequence to the 5' end of  ***
--- *** an mRNA. SL12 acceptor sites occur in ge ***
--- *** nes in internal segments of polycistroni ***
--- *** c transcripts.                           ***
--- ************************************************
---

CREATE VIEW sl12_acceptor_site AS
  SELECT
    feature_id AS sl12_acceptor_site_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'SL12_acceptor_site';

--- ************************************************
--- *** relation: duplicated_pseudogene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A pseudogene that arose via gene duplica ***
--- *** tion. Generally duplicated pseudogenes h ***
--- *** ave the same structure as the original g ***
--- *** ene, including intron-exon structure and ***
--- ***  some regulatory sequence.               ***
--- ************************************************
---

CREATE VIEW duplicated_pseudogene AS
  SELECT
    feature_id AS duplicated_pseudogene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'duplicated_pseudogene';

--- ************************************************
--- *** relation: unitary_pseudogene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A pseudogene, deactivated from original  ***
--- *** state by mutation, fixed in a population ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW unitary_pseudogene AS
  SELECT
    feature_id AS unitary_pseudogene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'unitary_pseudogene';

--- ************************************************
--- *** relation: non_processed_pseudogene ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A pseudogene that arose from a means oth ***
--- *** er than retrotransposition.              ***
--- ************************************************
---

CREATE VIEW non_processed_pseudogene AS
  SELECT
    feature_id AS non_processed_pseudogene_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'pseudogene_by_unequal_crossing_over' OR cvterm.name = 'nuclear_mt_pseudogene' OR cvterm.name = 'cassette_pseudogene' OR cvterm.name = 'duplicated_pseudogene' OR cvterm.name = 'unitary_pseudogene' OR cvterm.name = 'non_processed_pseudogene';

--- ************************************************
--- *** relation: variant_quality ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A dependent entity that inheres in a bea ***
--- *** rer, a sequence variant.                 ***
--- ************************************************
---

CREATE VIEW variant_quality AS
  SELECT
    feature_id AS variant_quality_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'variant_origin' OR cvterm.name = 'variant_frequency' OR cvterm.name = 'variant_phenotype' OR cvterm.name = 'maternal_variant' OR cvterm.name = 'paternal_variant' OR cvterm.name = 'somatic_variant' OR cvterm.name = 'germline_variant' OR cvterm.name = 'pedigree_specific_variant' OR cvterm.name = 'population_specific_variant' OR cvterm.name = 'de_novo_variant' OR cvterm.name = 'unique_variant' OR cvterm.name = 'rare_variant' OR cvterm.name = 'polymorphic_variant' OR cvterm.name = 'common_variant' OR cvterm.name = 'fixed_variant' OR cvterm.name = 'benign_variant' OR cvterm.name = 'disease_associated_variant' OR cvterm.name = 'disease_causing_variant' OR cvterm.name = 'lethal_variant' OR cvterm.name = 'quantitative_variant' OR cvterm.name = 'variant_quality';

--- ************************************************
--- *** relation: variant_origin ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A quality inhering in a variant by virtu ***
--- *** e of its origin.                         ***
--- ************************************************
---

CREATE VIEW variant_origin AS
  SELECT
    feature_id AS variant_origin_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'maternal_variant' OR cvterm.name = 'paternal_variant' OR cvterm.name = 'somatic_variant' OR cvterm.name = 'germline_variant' OR cvterm.name = 'pedigree_specific_variant' OR cvterm.name = 'population_specific_variant' OR cvterm.name = 'de_novo_variant' OR cvterm.name = 'variant_origin';

--- ************************************************
--- *** relation: variant_frequency ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A physical quality which inheres to the  ***
--- *** variant by virtue of the number instance ***
--- *** s of the variant within a population.    ***
--- ************************************************
---

CREATE VIEW variant_frequency AS
  SELECT
    feature_id AS variant_frequency_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'unique_variant' OR cvterm.name = 'rare_variant' OR cvterm.name = 'polymorphic_variant' OR cvterm.name = 'common_variant' OR cvterm.name = 'fixed_variant' OR cvterm.name = 'variant_frequency';

--- ************************************************
--- *** relation: unique_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A physical quality which inheres to the  ***
--- *** variant by virtue of the number instance ***
--- *** s of the variant within a population.    ***
--- ************************************************
---

CREATE VIEW unique_variant AS
  SELECT
    feature_id AS unique_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'unique_variant';

--- ************************************************
--- *** relation: rare_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW rare_variant AS
  SELECT
    feature_id AS rare_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'rare_variant';

--- ************************************************
--- *** relation: polymorphic_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW polymorphic_variant AS
  SELECT
    feature_id AS polymorphic_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'polymorphic_variant';

--- ************************************************
--- *** relation: common_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW common_variant AS
  SELECT
    feature_id AS common_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'common_variant';

--- ************************************************
--- *** relation: fixed_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW fixed_variant AS
  SELECT
    feature_id AS fixed_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'fixed_variant';

--- ************************************************
--- *** relation: variant_phenotype ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A quality inhering in a variant by virtu ***
--- *** e of its phenotype.                      ***
--- ************************************************
---

CREATE VIEW variant_phenotype AS
  SELECT
    feature_id AS variant_phenotype_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'benign_variant' OR cvterm.name = 'disease_associated_variant' OR cvterm.name = 'disease_causing_variant' OR cvterm.name = 'lethal_variant' OR cvterm.name = 'quantitative_variant' OR cvterm.name = 'variant_phenotype';

--- ************************************************
--- *** relation: benign_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW benign_variant AS
  SELECT
    feature_id AS benign_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'benign_variant';

--- ************************************************
--- *** relation: disease_associated_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW disease_associated_variant AS
  SELECT
    feature_id AS disease_associated_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'disease_associated_variant';

--- ************************************************
--- *** relation: disease_causing_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW disease_causing_variant AS
  SELECT
    feature_id AS disease_causing_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'disease_causing_variant';

--- ************************************************
--- *** relation: lethal_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW lethal_variant AS
  SELECT
    feature_id AS lethal_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'lethal_variant';

--- ************************************************
--- *** relation: quantitative_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW quantitative_variant AS
  SELECT
    feature_id AS quantitative_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'quantitative_variant';

--- ************************************************
--- *** relation: maternal_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW maternal_variant AS
  SELECT
    feature_id AS maternal_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'maternal_variant';

--- ************************************************
--- *** relation: paternal_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW paternal_variant AS
  SELECT
    feature_id AS paternal_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'paternal_variant';

--- ************************************************
--- *** relation: somatic_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW somatic_variant AS
  SELECT
    feature_id AS somatic_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'somatic_variant';

--- ************************************************
--- *** relation: germline_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW germline_variant AS
  SELECT
    feature_id AS germline_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'germline_variant';

--- ************************************************
--- *** relation: pedigree_specific_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW pedigree_specific_variant AS
  SELECT
    feature_id AS pedigree_specific_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'pedigree_specific_variant';

--- ************************************************
--- *** relation: population_specific_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW population_specific_variant AS
  SELECT
    feature_id AS population_specific_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'population_specific_variant';

--- ************************************************
--- *** relation: de_novo_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW de_novo_variant AS
  SELECT
    feature_id AS de_novo_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'de_novo_variant';

--- ************************************************
--- *** relation: tf_binding_site_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant located within a tran ***
--- *** scription factor binding site.           ***
--- ************************************************
---

CREATE VIEW tf_binding_site_variant AS
  SELECT
    feature_id AS tf_binding_site_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'TF_binding_site_variant';

--- ************************************************
--- *** relation: missense_codon ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant whereby at least one  ***
--- *** base of a codon is changed resulting in  ***
--- *** a codon that encodes for a different ami ***
--- *** no acid.                                 ***
--- ************************************************
---

CREATE VIEW missense_codon AS
  SELECT
    feature_id AS missense_codon_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'conservative_missense_codon' OR cvterm.name = 'non_conservative_missense_codon' OR cvterm.name = 'missense_codon';

--- ************************************************
--- *** relation: complex_structural_alteration ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A structural sequence alteration where t ***
--- *** here are multiple equally plausible expl ***
--- *** anations for the change.                 ***
--- ************************************************
---

CREATE VIEW complex_structural_alteration AS
  SELECT
    feature_id AS complex_structural_alteration_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'complex_structural_alteration';

--- ************************************************
--- *** relation: structural_alteration ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW structural_alteration AS
  SELECT
    feature_id AS structural_alteration_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'complex_structural_alteration' OR cvterm.name = 'structural_alteration';

--- ************************************************
--- *** relation: loss_of_heterozygosity ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- ************************************************
---

CREATE VIEW loss_of_heterozygosity AS
  SELECT
    feature_id AS loss_of_heterozygosity_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'loss_of_heterozygosity';

--- ************************************************
--- *** relation: splice_donor_5th_base_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that causes a change  ***
--- *** at the 5th base pair after the start of  ***
--- *** the intron in the orientation of the tra ***
--- *** nscript.                                 ***
--- ************************************************
---

CREATE VIEW splice_donor_5th_base_variant AS
  SELECT
    feature_id AS splice_donor_5th_base_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'splice_donor_5th_base_variant';

--- ************************************************
--- *** relation: u_box ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An U-box is a conserved T-rich region up ***
--- *** stream of a retroviral polypurine tract  ***
--- *** that is involved in PPT primer creation  ***
--- *** during reverse transcription.            ***
--- ************************************************
---

CREATE VIEW u_box AS
  SELECT
    feature_id AS u_box_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'U_box';

--- ************************************************
--- *** relation: mating_type_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A specialized region in the genomes of s ***
--- *** ome yeast and fungi, the genes of which  ***
--- *** regulate mating type.                    ***
--- ************************************************
---

CREATE VIEW mating_type_region AS
  SELECT
    feature_id AS mating_type_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'mating_type_region';

--- ************************************************
--- *** relation: paired_end_fragment ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An assembly region that has been sequenc ***
--- *** ed from both ends resulting in a read_pa ***
--- *** ir (mate_pair).                          ***
--- ************************************************
---

CREATE VIEW paired_end_fragment AS
  SELECT
    feature_id AS paired_end_fragment_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'paired_end_fragment';

--- ************************************************
--- *** relation: exon_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that changes exon seq ***
--- *** uence.                                   ***
--- ************************************************
---

CREATE VIEW exon_variant AS
  SELECT
    feature_id AS exon_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'coding_sequence_variant' OR cvterm.name = 'non_coding_exon_variant' OR cvterm.name = 'codon_variant' OR cvterm.name = 'frameshift_variant' OR cvterm.name = 'inframe_variant' OR cvterm.name = 'initiator_codon_change' OR cvterm.name = 'non_synonymous_codon' OR cvterm.name = 'synonymous_codon' OR cvterm.name = 'terminal_codon_variant' OR cvterm.name = 'stop_gained' OR cvterm.name = 'missense_codon' OR cvterm.name = 'conservative_missense_codon' OR cvterm.name = 'non_conservative_missense_codon' OR cvterm.name = 'terminator_codon_variant' OR cvterm.name = 'incomplete_terminal_codon_variant' OR cvterm.name = 'stop_retained_variant' OR cvterm.name = 'stop_lost' OR cvterm.name = 'frame_restoring_variant' OR cvterm.name = 'minus_1_frameshift_variant' OR cvterm.name = 'minus_2_frameshift_variant' OR cvterm.name = 'plus_1_frameshift_variant' OR cvterm.name = 'plus_2_frameshift variant' OR cvterm.name = 'inframe_codon_gain' OR cvterm.name = 'inframe_codon_loss' OR cvterm.name = 'exon_variant';

--- ************************************************
--- *** relation: non_coding_exon_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence variant that changes non-codi ***
--- *** ng exon sequence.                        ***
--- ************************************************
---

CREATE VIEW non_coding_exon_variant AS
  SELECT
    feature_id AS non_coding_exon_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'non_coding_exon_variant';

--- ************************************************
--- *** relation: clone_end ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A read from an end of the clone sequence ***
--- *** .                                        ***
--- ************************************************
---

CREATE VIEW clone_end AS
  SELECT
    feature_id AS clone_end_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'clone_end';

--- ************************************************
--- *** relation: point_centromere ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A point centromere is a relatively small ***
--- ***  centromere (about 125 bp DNA) in discre ***
--- *** te sequence, found in some yeast includi ***
--- *** ng S. cerevisiae.                        ***
--- ************************************************
---

CREATE VIEW point_centromere AS
  SELECT
    feature_id AS point_centromere_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'point_centromere';

--- ************************************************
--- *** relation: regional_centromere ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A regional centromere is a large modular ***
--- ***  centromere found in fission yeast and h ***
--- *** igher eukaryotes. It consist of a centra ***
--- *** l core region flanked by inverted inner  ***
--- *** and outer repeat regions.                ***
--- ************************************************
---

CREATE VIEW regional_centromere AS
  SELECT
    feature_id AS regional_centromere_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'regional_centromere';

--- ************************************************
--- *** relation: regional_centromere_central_core ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A conserved region within the central re ***
--- *** gion of a modular centromere, where the  ***
--- *** kinetochore is formed.                   ***
--- ************************************************
---

CREATE VIEW regional_centromere_central_core AS
  SELECT
    feature_id AS regional_centromere_central_core_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'regional_centromere_central_core';

--- ************************************************
--- *** relation: centromeric_repeat ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A repeat region found within the modular ***
--- ***  centromere.                             ***
--- ************************************************
---

CREATE VIEW centromeric_repeat AS
  SELECT
    feature_id AS centromeric_repeat_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'regional_centromere_inner_repeat_region' OR cvterm.name = 'regional_centromere_outer_repeat_region' OR cvterm.name = 'centromeric_repeat';

--- ************************************************
--- *** relation: regional_centromere_inner_repeat_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The inner repeat region of a modular cen ***
--- *** tromere. This region is adjacent to the  ***
--- *** central core, on each chromosome arm.    ***
--- ************************************************
---

CREATE VIEW regional_centromere_inner_repeat_region AS
  SELECT
    feature_id AS regional_centromere_inner_repeat_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'regional_centromere_inner_repeat_region';

--- ************************************************
--- *** relation: regional_centromere_outer_repeat_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The heterochromatic outer repeat region  ***
--- *** of a modular centromere. These repeats e ***
--- *** xist in tandem arrays on both chromosome ***
--- ***  arms.                                   ***
--- ************************************************
---

CREATE VIEW regional_centromere_outer_repeat_region AS
  SELECT
    feature_id AS regional_centromere_outer_repeat_region_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'regional_centromere_outer_repeat_region';

--- ************************************************
--- *** relation: tasirna ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** The sequence of a 21 nucleotide double s ***
--- *** tranded, polyadenylated non coding RNA,  ***
--- *** transcribed from the TAS gene.           ***
--- ************************************************
---

CREATE VIEW tasirna AS
  SELECT
    feature_id AS tasirna_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'tasiRNA';

--- ************************************************
--- *** relation: tasirna_primary_transcript ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A primary transcript encoding a tasiRNA. ***
--- ************************************************
---

CREATE VIEW tasirna_primary_transcript AS
  SELECT
    feature_id AS tasirna_primary_transcript_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'tasiRNA_primary_transcript';

--- ************************************************
--- *** relation: increased_polyadenylation_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript processing variant whereby  ***
--- *** polyadenylation of the encoded transcrip ***
--- *** t is increased with respect to the refer ***
--- *** ence.                                    ***
--- ************************************************
---

CREATE VIEW increased_polyadenylation_variant AS
  SELECT
    feature_id AS increased_polyadenylation_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'increased_polyadenylation_variant';

--- ************************************************
--- *** relation: decreased_polyadenylation_variant ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A transcript processing variant whereby  ***
--- *** polyadenylation of the encoded transcrip ***
--- *** t is decreased with respect to the refer ***
--- *** ence.                                    ***
--- ************************************************
---

CREATE VIEW decreased_polyadenylation_variant AS
  SELECT
    feature_id AS decreased_polyadenylation_variant_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'decreased_polyadenylation_variant';

--- ************************************************
--- *** relation: regulatory_region ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A region of sequence that is involved in ***
--- ***  the control of a biological process.    ***
--- ************************************************
---

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 = 'transcription_regulatory_region' OR cvterm.name = 'translation_regulatory_region' OR cvterm.name = 'recombination_regulatory_region' OR cvterm.name = 'replication_regulatory_region' 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 = 'intronic_regulatory_region' 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 = 'operator' OR cvterm.name = 'bacterial_RNApol_promoter' OR cvterm.name = 'bacterial_terminator' OR cvterm.name = 'bacterial_RNApol_promoter_sigma_70' OR cvterm.name = 'bacterial_RNApol_promoter_sigma54' 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 = 'ISRE' 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_II_core_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 = 'bacterial_RNApol_promoter_sigma_70' OR cvterm.name = 'bacterial_RNApol_promoter_sigma54' 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 = 'silencer' OR cvterm.name = 'enhancer_bound_by_factor' OR cvterm.name = 'shadow_enhancer' OR cvterm.name = 'splice_enhancer' OR cvterm.name = 'intronic_splice_enhancer' OR cvterm.name = 'exonic_splice_enhancer' OR cvterm.name = 'attenuator' 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 = 'mating_type_region' 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 = 'histone_modification' OR cvterm.name = 'histone_methylation_site' OR cvterm.name = 'histone_acetylation_site' OR cvterm.name = 'histone_ubiqitination_site' OR cvterm.name = 'histone_acylation_region' OR cvterm.name = 'H4K20_monomethylation_site' OR cvterm.name = 'H2BK5_monomethylation_site' OR cvterm.name = 'H3K27_methylation_site' OR cvterm.name = 'H3K36_methylation_site' OR cvterm.name = 'H3K4_methylation_site' OR cvterm.name = 'H3K79_methylation_site' OR cvterm.name = 'H3K9_methylation_site' OR cvterm.name = 'H3K27_monomethylation_site' OR cvterm.name = 'H3K27_trimethylation_site' OR cvterm.name = 'H3K27_dimethylation_site' OR cvterm.name = 'H3K36_monomethylation_site' OR cvterm.name = 'H3K36_dimethylation_site' OR cvterm.name = 'H3K36_trimethylation_site' OR cvterm.name = 'H3K4_monomethylation_site' OR cvterm.name = 'H3K4_trimethylation' OR cvterm.name = 'H3K4_dimethylation_site' OR cvterm.name = 'H3K79_monomethylation_site' OR cvterm.name = 'H3K79_dimethylation_site' OR cvterm.name = 'H3K79_trimethylation_site' OR cvterm.name = 'H3K9_trimethylation_site' OR cvterm.name = 'H3K9_monomethylation_site' OR cvterm.name = 'H3K9_dimethylation_site' OR cvterm.name = 'H3K9_acetylation_site' OR cvterm.name = 'H3K14_acetylation_site' OR cvterm.name = 'H3K18_acetylation_site' OR cvterm.name = 'H3K23_acylation site' OR cvterm.name = 'H3K27_acylation_site' OR cvterm.name = 'H4K16_acylation_site' OR cvterm.name = 'H4K5_acylation_site' OR cvterm.name = 'H4K8_acylation site' OR cvterm.name = 'H2B_ubiquitination_site' OR cvterm.name = 'H4K_acylation_region' 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 = 'cleaved_initiator_methionine' 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                      ***
--- ***                                          ***
--- *** A binding site that, in the polypeptide  ***
--- *** molecule, interacts selectively and non- ***
--- *** covalently with DNA.                     ***
--- ************************************************
---

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 = 'histone_modification' OR cvterm.name = 'histone_methylation_site' OR cvterm.name = 'histone_acetylation_site' OR cvterm.name = 'histone_ubiqitination_site' OR cvterm.name = 'histone_acylation_region' OR cvterm.name = 'H4K20_monomethylation_site' OR cvterm.name = 'H2BK5_monomethylation_site' OR cvterm.name = 'H3K27_methylation_site' OR cvterm.name = 'H3K36_methylation_site' OR cvterm.name = 'H3K4_methylation_site' OR cvterm.name = 'H3K79_methylation_site' OR cvterm.name = 'H3K9_methylation_site' OR cvterm.name = 'H3K27_monomethylation_site' OR cvterm.name = 'H3K27_trimethylation_site' OR cvterm.name = 'H3K27_dimethylation_site' OR cvterm.name = 'H3K36_monomethylation_site' OR cvterm.name = 'H3K36_dimethylation_site' OR cvterm.name = 'H3K36_trimethylation_site' OR cvterm.name = 'H3K4_monomethylation_site' OR cvterm.name = 'H3K4_trimethylation' OR cvterm.name = 'H3K4_dimethylation_site' OR cvterm.name = 'H3K79_monomethylation_site' OR cvterm.name = 'H3K79_dimethylation_site' OR cvterm.name = 'H3K79_trimethylation_site' OR cvterm.name = 'H3K9_trimethylation_site' OR cvterm.name = 'H3K9_monomethylation_site' OR cvterm.name = 'H3K9_dimethylation_site' OR cvterm.name = 'H3K9_acetylation_site' OR cvterm.name = 'H3K14_acetylation_site' OR cvterm.name = 'H3K18_acetylation_site' OR cvterm.name = 'H3K23_acylation site' OR cvterm.name = 'H3K27_acylation_site' OR cvterm.name = 'H4K16_acylation_site' OR cvterm.name = 'H4K5_acylation_site' OR cvterm.name = 'H4K8_acylation site' OR cvterm.name = 'H2B_ubiquitination_site' OR cvterm.name = 'H4K_acylation_region' 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                      ***
--- ***                                          ***
--- *** A sequence alteration where the length o ***
--- *** f the change in the variant is the same  ***
--- *** as that of the reference.                ***
--- ************************************************
---

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 = 'MNP' OR cvterm.name = 'SNV' OR cvterm.name = 'complex_substitution' OR cvterm.name = 'simple_sequence_length_variation' OR cvterm.name = 'SNP' OR cvterm.name = 'point_mutation' 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: 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 = 'complex_substitution';

--- ************************************************
--- *** 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 = '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                      ***
--- ***                                          ***
--- *** A chromosomal structure variation within ***
--- ***  a single chromosome.                    ***
--- ************************************************
---

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 = 'deficient_intrachromosomal_transposition' 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 = 'inverted_intrachromosomal_transposition' 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 = 'bipartite_duplication' OR cvterm.name = 'deficient_intrachromosomal_transposition' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'uninverted_intrachromosomal_transposition' OR cvterm.name = 'unoriented_intrachromosomal_transposition' 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 = 'deficient_intrachromosomal_transposition' 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 = 'chromosomal_deletion';

--- ************************************************
--- *** relation: chromosomal_inversion ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An interchromosomal mutation where a reg ***
--- *** ion of the chromosome is inverted with r ***
--- *** espect to wild type.                     ***
--- ************************************************
---

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 = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'chromosomal_inversion';

--- ************************************************
--- *** relation: interchromosomal_mutation ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosomal structure variation whereb ***
--- *** y more than one chromosome is involved.  ***
--- ************************************************
---

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 = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'deficient_interchromosomal_transposition' OR cvterm.name = 'inverted_interchromosomal_transposition' OR cvterm.name = 'uninverted_interchromosomal_transposition' OR cvterm.name = 'unoriented_interchromosomal_transposition' OR cvterm.name = 'interchromosomal_mutation';

--- ************************************************
--- *** relation: indel ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A sequence alteration which included an  ***
--- *** insertion and a deletion, affecting 2 or ***
--- ***  more bases.                             ***
--- ************************************************
---

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 = 'indel';

--- ************************************************
--- *** relation: 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 duplication AS
  SELECT
    feature_id AS duplication_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'tandem_duplication' OR cvterm.name = 'direct_tandem_duplication' OR cvterm.name = 'inverted_tandem_duplication' OR cvterm.name = '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 = 'bipartite_duplication' OR cvterm.name = 'deficient_intrachromosomal_transposition' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'uninverted_intrachromosomal_transposition' OR cvterm.name = 'unoriented_intrachromosomal_transposition' 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                      ***
--- ***                                          ***
--- *** A duplication that occurred within a chr ***
--- *** omosome.                                 ***
--- ************************************************
---

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 = 'bipartite_duplication' OR cvterm.name = 'deficient_intrachromosomal_transposition' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'uninverted_intrachromosomal_transposition' OR cvterm.name = 'unoriented_intrachromosomal_transposition' OR cvterm.name = 'intrachromosomal_duplication';

--- ************************************************
--- *** relation: direct_tandem_duplication ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A tandem duplication where the individua ***
--- *** l regions are in the same orientation.   ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** A tandem duplication where the individua ***
--- *** l regions are not in the same orientatio ***
--- *** n.                                       ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** A chromosome structure variation whereby ***
--- ***  a transposition occurred within a chrom ***
--- *** osome.                                   ***
--- ************************************************
---

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 = 'unoriented_intrachromosomal_transposition' OR cvterm.name = 'intrachromosomal_transposition';

--- ************************************************
--- *** relation: compound_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A chromosome structure variant where a m ***
--- *** onocentric element is caused by the fusi ***
--- *** on of two chromosome arms.               ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** A non reciprocal translocation whereby t ***
--- *** he participating chromosomes break at th ***
--- *** eir centromeres and the long arms fuse t ***
--- *** o form a single chromosome with a single ***
--- ***  centromere.                             ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** An interchromosomal mutation. Rearrangem ***
--- *** ents that alter the pairing of telomeres ***
--- ***  are classified as translocations.       ***
--- ************************************************
---

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 = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'chromosomal_translocation';

--- ************************************************
--- *** relation: ring_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** A ring chromosome is a chromosome whose  ***
--- *** arms have fused together to form a ring, ***
--- ***  often with the loss of the ends of the  ***
--- *** chromosome.                              ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** A chromosomal inversion that includes th ***
--- *** e centromere.                            ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** A chromosomal inversion that does not in ***
--- *** clude the centromere.                    ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** A chromosomal translocation with two bre ***
--- *** aks; two chromosome segments have simply ***
--- ***  been exchanged.                         ***
--- ************************************************
---

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: autosynaptic_chromosome ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An autosynaptic chromosome is the aneupl ***
--- *** oid product of recombination between a p ***
--- *** ericentric inversion and a cytologically ***
--- ***  wild-type chromosome.                   ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** A compound chromosome whereby two copies ***
--- ***  of the same chromosomal arm attached to ***
--- ***  a common centromere. The chromosome is  ***
--- *** diploid for the arm involved.            ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** A compound chromosome whereby two arms f ***
--- *** rom different chromosomes are connected  ***
--- *** through the centromere of one of them.   ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** A chromosome that occurred by the divisi ***
--- *** on of a larger chromosome.               ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** An autosynaptic chromosome carrying the  ***
--- *** two right (D = dextro) telomeres.        ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** LS is an autosynaptic chromosome carryin ***
--- *** g the two left (L = levo) telomeres.     ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** A chromosome structure variation whereby ***
--- ***  the duplicated sequences are carried as ***
--- ***  a free centric element.                 ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** A ring chromosome which is a copy of ano ***
--- *** ther chromosome.                         ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** A chromosome structure variant with 4 or ***
--- ***  more breakpoints.                       ***
--- ************************************************
---

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 chromosomal deletion whereby a translo ***
--- *** cation occurs in which one of the four b ***
--- *** roken ends loses a segment before re-joi ***
--- *** ning.                                    ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** A chromosomal translocation whereby the  ***
--- *** first two breaks are in the same chromos ***
--- *** ome, and the region between them is rejo ***
--- *** ined in inverted order to the other side ***
--- ***  of the first break, such that both side ***
--- *** s of break one are present on the same c ***
--- *** hromosome. The remaining free ends are j ***
--- *** oined as a translocation with those resu ***
--- *** lting 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 = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'inversion_cum_translocation';

--- ************************************************
--- *** relation: bipartite_duplication ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An interchromosomal mutation whereby the ***
--- ***  (large) region between the first two br ***
--- *** eaks listed is lost, and the two flankin ***
--- *** g segments (one of them centric) are joi ***
--- *** ned as a translocation to the free ends  ***
--- *** 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                      ***
--- ***                                          ***
--- *** A chromosomal translocation whereby thre ***
--- *** e breaks occurred in three different chr ***
--- *** omosomes. The centric segment resulting  ***
--- *** from the first break listed is joined to ***
--- ***  the acentric segment resulting from the ***
--- ***  second, 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                      ***
--- ***                                          ***
--- *** A chromosomal inversion caused by three  ***
--- *** breaks in the same chromosome; both cent ***
--- *** ral 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                      ***
--- ***                                          ***
--- *** An insertional duplication where a copy  ***
--- *** of the segment between the first two bre ***
--- *** aks listed is inserted at the third brea ***
--- *** k; the insertion is in cytologically the ***
--- ***  same orientation as its flanking segmen ***
--- *** ts.                                      ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** An insertional duplication where a copy  ***
--- *** of the segment between the first two bre ***
--- *** aks listed is inserted at the third brea ***
--- *** k; the insertion is in cytologically inv ***
--- *** erted orientation with respect to its fl ***
--- *** anking 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 (as oppo ***
--- *** sed to a free duplication).              ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** A chromosome structure variation whereby ***
--- ***  a transposition occurred between chromo ***
--- *** somes.                                   ***
--- ************************************************
---

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 = 'unoriented_interchromosomal_transposition' OR cvterm.name = 'interchromosomal_transposition';

--- ************************************************
--- *** relation: invert_inter_transposition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An interchromosomal transposition whereb ***
--- *** y a copy of the segment between the firs ***
--- *** t two breaks listed is inserted at the t ***
--- *** hird break; the insertion is in cytologi ***
--- *** cally inverted orientation with respect  ***
--- *** to its flanking segment.                 ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** An interchromosomal transition where the ***
--- ***  segment between the first two breaks li ***
--- *** sted is removed and inserted at the thir ***
--- *** d break; the insertion is in cytological ***
--- *** ly the same orientation as its flanking  ***
--- *** segments.                                ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** An intrachromosomal transposition whereb ***
--- *** y the segment between the first two brea ***
--- *** ks listed is removed and inserted at the ***
--- ***  third break; the insertion is in cytolo ***
--- *** gically inverted orientation with respec ***
--- *** t 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                      ***
--- ***                                          ***
--- *** An intrachromosomal transposition whereb ***
--- *** y the segment between the first two brea ***
--- *** ks listed is removed and inserted at the ***
--- ***  third break; the insertion is in cytolo ***
--- *** gically the same orientation as its flan ***
--- *** king 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                      ***
--- ***                                          ***
--- *** An insertional duplication where a copy  ***
--- *** of the segment between the first two bre ***
--- *** aks listed is inserted at the third brea ***
--- *** k; the orientation of the insertion 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: unoriented_interchromosomal_transposition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An interchromosomal transposition whereb ***
--- *** y a copy of the segment between the firs ***
--- *** t two breaks listed is inserted at the t ***
--- *** hird break; the orientation of the inser ***
--- *** tion with respect to its flanking segmen ***
--- *** ts is not recorded.                      ***
--- ************************************************
---

CREATE VIEW unoriented_interchromosomal_transposition AS
  SELECT
    feature_id AS unoriented_interchromosomal_transposition_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'unoriented_interchromosomal_transposition';

--- ************************************************
--- *** relation: unoriented_intrachromosomal_transposition ***
--- *** relation type: VIEW                      ***
--- ***                                          ***
--- *** An intrachromosomal transposition whereb ***
--- *** y the segment between the first two brea ***
--- *** ks listed is removed and inserted at the ***
--- ***  third break; the orientation of the ins ***
--- *** ertion with respect to its flanking segm ***
--- *** ents is not recorded.                    ***
--- ************************************************
---

CREATE VIEW unoriented_intrachromosomal_transposition AS
  SELECT
    feature_id AS unoriented_intrachromosomal_transposition_id,
    feature.*
  FROM
    feature INNER JOIN cvterm ON (feature.type_id = cvterm.cvterm_id)
  WHERE cvterm.name = 'unoriented_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                      ***
--- ***                                          ***
--- *** A chromosomal deletion whereby three bre ***
--- *** aks occur in the same chromosome; one ce ***
--- *** ntral region is lost, and the other is i ***
--- *** nverted.                                 ***
--- ************************************************
---

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                      ***
--- ***                                          ***
--- *** A duplication consisting of 2 identical  ***
--- *** adjacent regions.                        ***
--- ************************************************
---

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: 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 = 'chromosomal_transposition' OR cvterm.name = 'aneuploid_chromosome' OR cvterm.name = 'intrachromosomal_mutation' OR cvterm.name = 'interchromosomal_mutation' OR cvterm.name = 'chromosomal_duplication' 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 = 'unoriented_intrachromosomal_transposition' OR cvterm.name = 'deficient_interchromosomal_transposition' OR cvterm.name = 'inverted_interchromosomal_transposition' OR cvterm.name = 'uninverted_interchromosomal_transposition' OR cvterm.name = 'unoriented_interchromosomal_transposition' OR cvterm.name = 'inversion_derived_aneuploid_chromosome' 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 = 'deficient_intrachromosomal_transposition' 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 = 'inverted_intrachromosomal_transposition' 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 = 'bipartite_duplication' OR cvterm.name = 'deficient_intrachromosomal_transposition' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'uninverted_intrachromosomal_transposition' OR cvterm.name = 'unoriented_intrachromosomal_transposition' 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 = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'deficient_interchromosomal_transposition' OR cvterm.name = 'inverted_interchromosomal_transposition' OR cvterm.name = 'uninverted_interchromosomal_transposition' OR cvterm.name = 'unoriented_interchromosomal_transposition' 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 = 'bipartite_duplication' OR cvterm.name = 'deficient_intrachromosomal_transposition' OR cvterm.name = 'inverted_intrachromosomal_transposition' OR cvterm.name = 'uninverted_intrachromosomal_transposition' OR cvterm.name = 'unoriented_intrachromosomal_transposition' 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 = '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: 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 = 'pseudogenic_gene_segment' OR cvterm.name = 'gene_segment';

CREATE TABLE sequence_cv_lookup_table (sequence_cv_lookup_table_id serial not null, primary key(sequence_cv_lookup_table_id), original_cvterm_name varchar(1024), relation_name varchar(128));
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcription_variant','transcription_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('helitron','helitron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cleaved_initiator_methionine','cleaved_initiator_methionine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('epoxyqueuosine','epoxyqueuosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u4atac_snrna','u4atac_snrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('kinetoplast','kinetoplast');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('elongated_out_of_frame_polypeptide_n_terminal','elongated_out_of_frame_polypeptide_n_terminal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('shadow_enhancer','shadow_enhancer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('engineered','engineered');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rna_polymerase_ii_tata_box','rna_polymerase_ii_tata_box');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('seven_aminomethyl_seven_deazaguanosine','seven_aminomethyl_seven_deazaguanosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sequence_motif','sequence_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('low_complexity','low_complexity');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('est_match','est_match');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_nonamer','v_nonamer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('d_dj_j_c_cluster','d_dj_j_c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rrna_21s','rrna_21s');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('bound_by_factor','bound_by_factor');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_carboxymethyluridine','five_carboxymethyluridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dinucleotide_repeat_microsatellite_feature','dinucleotide_repeat_microsatellite_feature');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('two_methylthio_n6_methyladenosine','two_methylthio_n6_methyladenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('trans_spliced_mrna','trans_spliced_mrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('g_to_c_transversion','g_to_c_transversion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('heptamer_of_recombination_feature_of_vertebrate_immune_system_gene','heptamer_of_recombination_feature_of_vertebrate_im_sys_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('genotype','so_genotype');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cloned_region','cloned_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tmrna_coding_piece','tmrna_coding_piece');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rna_6s','rna_6s');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('x_element','x_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('minicircle','minicircle');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('grna_encoding','grna_encoding');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('endonuclease_spliced_intron','endonuclease_spliced_intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('insertional_duplication','insertional_duplication');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('databank_entry','databank_entry');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('glycine','glycine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('variant_phenotype','variant_phenotype');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_cluster','v_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sl12_acceptor_site','sl12_acceptor_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_nickel_ion_contact_site','polypeptide_nickel_ion_contact_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('circular_single_stranded_rna_chromosome','circular_single_stranded_rna_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('wc_base_pair','wc_base_pair');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pcr_product','pcr_product');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('3_prime_utr_variant','three_prime_utr_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_three_amino_three_carboxypropyl_uridine','three_three_amino_three_carboxypropyl_uridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('site_specific_recombination_target_region','site_specific_recombination_target_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_with_polycistronic_transcript','gene_with_polycistronic_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rescue','rescue');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nuclease_hypersensitive_site','nuclease_hypersensitive_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('upstream_gene_variant','upstream_gene_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mirna_loop','mirna_loop');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('double_stranded_cdna','double_stranded_cdna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_post_translational_processing_variant','polypeptide_post_translational_processing_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('2kb_upstream_variant','twokb_upstream_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('supported_by_domain_match','supported_by_domain_match');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('one_methylpseudouridine','one_methylpseudouridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n_terminal_region','n_terminal_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('blunt_end_restriction_enzyme_cleavage_site','blunt_end_restriction_enzyme_cleavage_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('experimental_result_region','experimental_result_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('methionine_trna_primary_transcript','methionine_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('utr','utr');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('non_terminal_residue','non_terminal_residue');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('member_of_regulon','member_of_regulon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('threonine_trna_primary_transcript','thr_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cds_supported_by_sequence_similarity_data','cds_supported_by_sequence_similarity_data');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_structural_region','polypeptide_structural_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('trna_gene','trna_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_tungsten_ion_contact_site','polypeptide_tungsten_ion_contact_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('beta_bulge_loop_six','beta_bulge_loop_six');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('d_dj_c_cluster','d_dj_c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sequence_location','sequence_location');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_nest_right_left_motif','polypeptide_nest_right_left_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('encodes_overlapping_polypeptides_different_start_and_stop','encodes_overlapping_polypeptides_different_start_and_stop');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('leucoplast_gene','leucoplast_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('y_rna','y_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('trans_spliced_transcript','trans_spliced_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inverted','inverted');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('splicing_regulatory_region','splicing_regulatory_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('branch_site','branch_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('beta_bulge_loop_five','beta_bulge_loop_five');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromosome_breakpoint','chromosome_breakpoint');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sequence_uncertainty','sequence_uncertainty');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n6_methyl_n6_threonylcarbamoyladenosine','n6_methyl_n6_threonylcarbamoyladenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_with_mrna_with_frameshift','gene_with_mrna_with_frameshift');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('compositionally_biased_region_of_peptide','compositionally_biased_region_of_peptide');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('vj_j_c_cluster','vj_j_c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pirna','pirna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('reverse_hoogsteen_base_pair','reverse_hoogsteen_base_pair');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tryptophanyl_trna','tryptophanyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polya_primed_cdna_clone','polya_primed_cdna_clone');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('leucoplast_chromosome','leucoplast_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('status','status');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ltr_retrotransposon','ltr_retrotransposon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rnase_p_rna','rnase_p_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('conjugative_transposon','conjugative_transposon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('improved_high_quality_draft','improved_high_quality_draft');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('copy_number_gain','copy_number_gain');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('linkage_group','linkage_group');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_with_trans_spliced_transcript','gene_with_trans_spliced_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sl8_acceptor_site','sl8_acceptor_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('peptide_coil','peptide_coil');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pyrrolysine_trna_primary_transcript','pyrrolysine_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_vj_c_cluster','v_vj_c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('phage_sequence','phage_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k79_methylation_site','h3k79_methylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('recoded','recoded');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transposon_fragment','transposon_fragment');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('vj_c_cluster','vj_c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('editing_domain','editing_domain');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_methylaminomethyluridine','five_methylaminomethyluridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('centromere_dna_element_ii','centromere_dna_element_ii');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('alteration_attribute','alteration_attribute');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('non_ltr_retrotransposon_polymeric_tract','non_ltr_retrotransposon_polymeric_tract');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transversion','transversion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tryptophan','tryptophan');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('recursive_splice_site','recursive_splice_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_fusion','polypeptide_fusion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('insulator_binding_site','insulator_binding_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('increased_polyadenylation_variant','increased_polyadenylation_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('proline_trna_primary_transcript','proline_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('repeat_fragment','repeat_fragment');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('blocked_reading_frame','blocked_reading_frame');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rrna_cleavage_snorna_primary_transcript','rrna_cleavage_snorna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n6_isopentenyladenosine','n6_isopentenyladenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_l_arginine','modified_l_arginine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_conserved_motif','polypeptide_conserved_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('paracentric','paracentric');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('t3_rna_polymerase_promoter','t3_rna_polymerase_promoter');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inversion_derived_bipartite_duplication','inversion_derived_bipartite_duplication');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('trans_splice_acceptor_site','trans_splice_acceptor_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('a_box_type_2','a_box_type_2');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rre_rna','rre_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('two_prime_o_ribosyladenosine_phosphate','two_prime_o_riboA_phosphate');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pac_end','pac_end');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('extramembrane_polypeptide_region','extramembrane_polypeptide_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('copy_number_change','copy_number_change');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('intein','intein');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('endosomal_localization_signal','endosomal_localization_signal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('twintron','twintron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('scrna_primary_transcript','scrna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_carboxymethylaminomethyl_two_prime_o_methyluridine','five_carboxymethylaminomethyl_two_prime_o_methyluridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('somatic_variant','somatic_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('duplication','duplication');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tmrna_encoding','tmrna_encoding');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_cobalt_ion_contact_site','polypeptide_cobalt_ion_contact_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('flanked','flanked');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inversion','inversion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ctg_start_codon','ctg_start_codon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tyrosine_trna_primary_transcript','tyrosine_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('eukaryotic_terminator','eukaryotic_terminator');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('frt_flanked','frt_flanked');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('spliceosomal_intron_region','spliceosomal_intron_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('coding_region_of_exon','coding_region_of_exon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cloned_cdna_insert','cloned_cdna_insert');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('decreased_transcription_rate_variant','decreased_transcription_rate_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_vdj_c_cluster','v_vdj_c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rnase_p_rna_gene','rnase_p_rna_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('translationally_regulated','translationally_regulated');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('histidyl_trna','histidyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sonicate_fragment','sonicate_fragment');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_with_recoded_mrna','gene_with_recoded_mrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('two_prime_o_methyluridine','two_prime_o_methyluridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cosmid','cosmid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('silenced_by_rna_interference','silenced_by_rna_interference');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('non_conservative_missense_codon','non_conservative_missense_codon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('snorna','snorna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mature_transcript','mature_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pseudouridylation_guide_snorna','pseudouridylation_guide_snorna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('c_gene','c_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('processed_transcript','processed_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('floxed_gene','floxed_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('spot_42_rna','spot_42_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cdna_clone','cdna_clone');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cryptic_splice_site','cryptic_splice_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pseudogenic_gene_segment','pseudogenic_gene_segment');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_ltr','three_prime_ltr');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('group_ii_intron','group_ii_intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rnase_mrp_rna_gene','rnase_mrp_rna_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('structural_alteration','structural_alteration');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pna_oligo','pna_oligo');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('insertion_sequence','insertion_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('junction','junction');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('paralogous','paralogous');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tna','tna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_isopentenylaminomethyl_two_thiouridine','five_isopentenylaminomethyl_two_thiouridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nested_tandem_repeat','nested_tandem_repeat');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('minus_1_frameshift','minus_1_frameshift');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('non_canonical_three_prime_splice_site','non_canonical_three_prime_splice_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_with_non_canonical_start_codon','gene_with_non_canonical_start_codon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pseudogenic_rrna','pseudogenic_rrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('serine_threonine_turn','serine_threonine_turn');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('j_gene','j_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k27_trimethylation_site','h3k27_trimethylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('strna_primary_transcript','strna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('internal_eliminated_sequence','internal_eliminated_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('allelically_excluded_gene','allelically_excluded_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('qtl','qtl');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_est','three_prime_est');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('bred_motif','bred_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('reverse','reverse');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mirna_encoding','mirna_encoding');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n2_n2_2_prime_o_trimethylguanosine','n2_n2_2_prime_o_trimethylguanosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('translational_product_function_variant','translational_product_function_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('encodes_alternate_transcription_start_sites','encodes_alternate_transcription_start_sites');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_array','gene_array');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tetranucleotide_repeat_microsatellite_feature','tetranuc_repeat_microsat');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_aminomethyl_two_thiouridine','five_aminomethyl_two_thiouridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('monocistronic_primary_transcript','monocistronic_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('snv','snv');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('direct','direct');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mobile_genetic_element','mobile_genetic_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_ligand_contact','polypeptide_ligand_contact');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('biomaterial_region','biomaterial_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transposable_element_flanking_region','transposable_element_flanking_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('symmetric_rna_internal_loop','symmetric_rna_internal_loop');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mrna_with_plus_1_frameshift','mrna_with_plus_1_frameshift');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcriptionally_regulated','transcriptionally_regulated');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_intron','five_prime_intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('vertebrate_immune_system_gene_recombination_feature','vertebrate_immune_system_gene_recombination_feature');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_carboxyhydroxymethyl_uridine_methyl_ester','five_carboxyhydroxymethyl_uridine_methyl_ester');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromosomal_transposition','chromosomal_transposition');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('proplastid_gene','proplastid_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('serine_trna_primary_transcript','serine_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('attp_site','attp_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('antisense','antisense');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('terminal_inverted_repeat_element','terminal_inverted_repeat_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('coiled_coil','coiled_coil');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_vdj_cluster','v_vdj_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('edited_transcript_by_a_to_i_substitution','edited_transcript_by_a_to_i_substitution');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('protein_coding_primary_transcript','protein_coding_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mite','mite');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cryptic_splice_site_variant','cryptic_splice_site_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('insertion','insertion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('secis_element','secis_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('maxicircle','maxicircle');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tss','tss');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pedigree_specific_variant','pedigree_specific_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cysteine','cysteine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ribothymidine','ribothymidine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('non_adjacent_residues','non_adjacent_residues');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('histone_modification','histone_modification');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('internal_ribosome_entry_site','internal_ribosome_entry_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('outron','outron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_repeat','polypeptide_repeat');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('clone_insert_start','clone_insert_start');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('attr_site','attr_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dmv3_motif','dmv3_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('capped_mrna','capped_mrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sequence_rearrangement_feature','sequence_rearrangement_feature');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('apicoplast_chromosome','apicoplast_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('beta_turn_type_six_a_two','beta_turn_type_six_a_two');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('invalidated','invalidated');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('valine','valine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('translationally_regulated_gene','translationally_regulated_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('amino_acid_insertion','amino_acid_insertion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('promoter_targeting_sequence','promoter_targeting_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polinton','polinton');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('engineered_tag','engineered_tag');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('non_coding_exon_variant','non_coding_exon_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_methylcytidine','five_methylcytidine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sl5_acceptor_site','sl5_acceptor_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('positively_autoregulated','positively_autoregulated');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pseudouridine','pseudouridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('amplification_origin','amplification_origin');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('unoriented_insertional_duplication','unorient_insert_dup');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcriptionally_constitutive','transcriptionally_constitutive');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('extrachromosomal_mobile_genetic_element','extrachromosomal_mobile_genetic_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('variant_origin','variant_origin');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('utr_region','utr_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mirna','mirna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tyrosine','tyrosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inr1_motif','inr1_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h2b_ubiquitination_site','h2b_ubiquitination_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n6_acetyladenosine','n6_acetyladenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cis_splice_site','cis_splice_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('floxed','floxed');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('beta_turn_right_handed_type_two','beta_turn_right_handed_type_two');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('utr_variant','utr_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('c_terminal_region','c_terminal_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcription_regulatory_region','transcription_regulatory_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_l_leucine','modified_l_leucine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_ltr_component','five_prime_ltr_component');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('histone_acylation_region','histone_acylation_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('vdj_c_cluster','vdj_c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromosome_part','chromosome_part');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcriptional_cis_regulatory_region','transcriptional_cis_regulatory_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('phenylalanyl_trna','phenylalanyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('insertion_site','insertion_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gc_rich_promoter_region','gc_rich_promoter_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('overlapping_est_set','overlapping_est_set');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('asx_turn_right_handed_type_two','asx_turn_right_handed_type_two');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('anticodon_loop','anticodon_loop');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dmv5_motif','dmv5_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sl1_acceptor_site','sl1_acceptor_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cds_region','cds_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('regulatory_region_variant','regulatory_region_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k9_dimethylation_site','h3k9_dimethylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('stop_gained','stop_gained');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('telomerase_rna_gene','telomerase_rna_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_dj_j_c_cluster','v_dj_j_c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('engineered_insert','engineered_insert');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('recombinationally_inverted_gene','recombinationally_inverted_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('microarray_oligo','microarray_oligo');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cassette_array_member','cassette_array_member');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('plus_1_frameshift_variant','plus_1_frameshift_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u12_snrna','u12_snrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('supported_by_est_or_cdna','supported_by_est_or_cdna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('minus_10_signal','minus_10_signal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('clone_insert_end','clone_insert_end');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inr_motif','inr_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_stem_loop_structure','three_prime_stem_loop_structure');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rflp_fragment','rflp_fragment');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('phage_rna_polymerase_promoter','phage_rna_polymerase_promoter');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pyrimidine_transition','pyrimidine_transition');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('intrinsically_unstructured_polypeptide_region','intrinsically_unstructured_polypeptide_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n2_2_prime_o_dimethylguanosine','n2_2_prime_o_dimethylguanosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('exon_loss','exon_loss');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('archaeal_intron','archaeal_intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('lna','lna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('exon_junction','exon_junction');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('t7_rna_polymerase_promoter','t7_rna_polymerase_promoter');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inverted_interchromosomal_transposition','invert_inter_transposition');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('episome','episome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('uninverted_insertional_duplication','uninvert_insert_dup');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('free','free');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sequence_difference','sequence_difference');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h4k5_acylation_site','h4k5_acylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_d_dj_c_cluster','v_d_dj_c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sequence_conflict','sequence_conflict');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nmd_transcript_variant','nmd_transcript_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tiling_path_clone','tiling_path_clone');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('group_iii_intron','group_iii_intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_glycine','modified_glycine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sequence_alteration','sequence_alteration');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polyploid','polyploid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mathematically_defined_repeat','mathematically_defined_repeat');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_silenced_by_dna_modification','gene_silenced_by_dna_modification');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_vj_j_cluster','v_vj_j_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('isoleucine_trna_primary_transcript','isoleucine_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rrna_small_subunit_primary_transcript','rrna_small_subunit_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ltr_component','ltr_component');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('plus_2_framshift','plus_2_framshift');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('translational_product_structure_variant','translational_product_structure_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('glutamic_acid_trna_primary_transcript','glutamic_acid_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_rearranged_at_dna_level','gene_rearranged_at_dna_level');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('edited_transcript','edited_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('invalidated_by_partial_processing','invalidated_by_partial_processing');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('increased_transcript_stability_variant','increased_transcript_stability_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sequencing_primer','sequencing_primer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cleaved_for_gpi_anchor_region','cleaved_for_gpi_anchor_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_l_cysteine','modified_l_cysteine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_utr','five_prime_utr');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('restriction_enzyme_recognition_site','restriction_enzyme_recognition_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('frt_site','frt_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('terminal_inverted_repeat','terminal_inverted_repeat');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('centromere_dna_element_i','centromere_dna_element_i');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transition','transition');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('deletion_junction','deletion_junction');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('beta_turn_right_handed_type_one','beta_turn_right_handed_type_one');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('two_prime_o_ribosylguanosine_phosphate','two_prime_o_ribosylguanosine_phosphate');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_carbamoylmethyl_two_prime_o_methyluridine','five_cm_2_prime_o_methU');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('internal_transcribed_spacer_region','internal_transcribed_spacer_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dicistronic','dicistronic');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('supported_by_sequence_similarity','supported_by_sequence_similarity');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('reverse_primer','reverse_primer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u3_three_prime_ltr_region','u3_three_prime_ltr_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('glutamine_trna_primary_transcript','glutamine_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rnapol_ii_promoter','rnapol_ii_promoter');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('overlapping','overlapping');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('alpha_beta_motif','alpha_beta_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('engineered_transposable_element','engineered_transposable_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('forward_primer','forward_primer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('attctn_site','attctn_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_d_recombination_signal_sequence','five_prime_d_recombination_signal_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u6_snrna','u6_snrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('recombinationally_rearranged_gene','recombinationally_rearranged_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n6_threonylcarbamoyladenosine','n6_threonylcarbamoyladenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_carbamoylmethyluridine','five_carbamoylmethyluridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cds_fragment','cds_fragment');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('genome','genome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('increased_translational_product_level','increased_translational_product_level');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('translational_product_level_variant','translational_product_level_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('promoter','promoter');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('protein_coding_gene','protein_coding_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u5_snrna','u5_snrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('wybutosine','wybutosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('methylwyosine','methylwyosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('large_subunit_rrna','large_subunit_rrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromosomally_aberrant_genome','chromosomally_aberrant_genome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n4_2_prime_o_dimethylcytidine','n4_2_prime_o_dimethylcytidine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('c_to_t_transition','c_to_t_transition');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('bidirectional_promoter','bidirectional_promoter');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('validated_cdna_clone','validated_cdna_clone');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('k_turn_rna_motif','k_turn_rna_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcribed_fragment','transcribed_fragment');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_ust','five_prime_ust');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_utr_intron','three_prime_utr_intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('retrogene','retrogene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pyrimidine_to_purine_transversion','pyrimidine_to_purine_transversion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sine_element','sine_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_rst','five_prime_rst');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('utr_intron','utr_intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('interchromosomal_transposition','interchromosomal_transposition');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rna_sequence_secondary_structure','rna_sequence_secondary_structure');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('complex_change_in_transcript','complex_change_in_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('engineered_foreign_transposable_element','engineered_foreign_transposable_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ds_rna_viral_sequence','ds_rna_viral_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('fosmid','fosmid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('complex_substitution','complex_substitution');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('validated','validated');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u2_snrna','u2_snrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('duplication_attribute','duplication_attribute');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('caat_signal','caat_signal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('c_cluster','c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('consensus_region','consensus_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('vertebrate_immune_system_gene_recombination_spacer','vertebrate_immune_system_gene_recombination_spacer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_restriction_enzyme_junction','three_prime_restriction_enzyme_junction');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_trap_construct','gene_trap_construct');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rna_aptamer','rna_aptamer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcriptionally_induced','transcriptionally_induced');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('intrachromosomal','intrachromosomal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nuclear_localization_signal','nuclear_localization_signal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rescue_region','rescue_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inversion_site_part','inversion_site_part');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('plus_2_frameshift variant','plus_2_frameshift_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('origin_of_replication','origin_of_replication');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('standard_draft','standard_draft');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k79_dimethylation_site','h3k79_dimethylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rna_internal_loop','rna_internal_loop');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ultracontig','ultracontig');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('peptidyl','peptidyl');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_region','polypeptide_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('epigenetically_modified_region','epigenetically_modified_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transgenic_insertion','transgenic_insertion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mirna_antiguide','mirna_antiguide');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rearranged_at_dna_level','rearranged_at_dna_level');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('intergenic_variant','intergenic_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_spacer','v_spacer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('strand_attribute','strand_attribute');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('stop_lost','stop_lost');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('alternatively_spliced','alternatively_spliced');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_formyl_two_prime_o_methylcytidine','five_formyl_two_prime_o_methylcytidine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('plasmid_location','plasmid_location');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('four_bp_start_codon','four_bp_start_codon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('increased_transcription_rate_variant','increased_transcription_rate_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('recombinationally_rearranged','recombinationally_rearranged');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('complex_3d_structural_variant','complex_3d_structural_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chimeric_cdna_clone','chimeric_cdna_clone');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tasirna_primary_transcript','tasirna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_with_dicistronic_transcript','gene_with_dicistronic_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_ltr_component','three_prime_ltr_component');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('retron','retron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('autopolyploid','autopolyploid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('phenylalanine','phenylalanine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('translation_regulatory_region','translation_regulatory_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transit_peptide','transit_peptide');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('amino_acid_deletion','amino_acid_deletion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rrna_28s','rrna_28s');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('one_two_prime_o_dimethylinosine','one_two_prime_o_dimethylinosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('threonine','threonine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('a_minor_rna_motif','a_minor_rna_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('j_cluster','j_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dce','dce');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('quantitative_variant','quantitative_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('lysosomal_localization_signal','lysosomal_localization_signal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('d_dj_cluster','d_dj_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromosome_arm','chromosome_arm');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('kinetoplast_gene','kinetoplast_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('line_element','line_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('solo_ltr','solo_ltr');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('external_transcribed_spacer_region','external_transcribed_spacer_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('non_transcribed_region','non_transcribed_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mirna_stem','mirna_stem');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dj_j_c_cluster','dj_j_c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('hyperploid','hyperploid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cryptic','cryptic');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k9_acetylation_site','h3k9_acetylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('alpha_helix','alpha_helix');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('fusion','fusion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('vdj_j_cluster','vdj_j_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('isowyosine','isowyosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('paracentric_inversion','paracentric_inversion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('homing_endonuclease_binding_site','homing_endonuclease_binding_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tna_oligo','tna_oligo');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mini_gene','mini_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('restriction_fragment','restriction_fragment');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('base_pair','base_pair');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inside_intron_antiparallel','inside_intron_antiparallel');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dna_binding_site','dna_binding_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_cytidine','modified_cytidine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('hydrophobic_region_of_peptide','hydrophobic_region_of_peptide');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polycistronic_primary_transcript','polycistronic_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_l_proline','modified_l_proline');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('overlapping_feature_set','overlapping_feature_set');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('asx_turn_left_handed_type_two','asx_turn_left_handed_type_two');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('interchromosomal_duplication','interchromosomal_duplication');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inframe_codon_loss','inframe_codon_loss');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('substitution','substitution');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('isoleucine','isoleucine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('functional_variant','functional_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_recoding_site','three_prime_recoding_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcript_stability_variant','transcript_stability_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('5kb_upstream_variant','fivekb_upstream_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('terminator_of_type_2_rnapol_iii_promoter','terminator_of_type_2_rnapol_iii_promoter');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('glycine_trna_primary_transcript','glycine_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('intron_variant','intron_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('regional_centromere_outer_repeat_region','regional_centromere_outer_repeat_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('replication_regulatory_region','replication_regulatory_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mating_type_region','mating_type_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_heptamer','v_heptamer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dispersed_repeat','dispersed_repeat');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('primer','primer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_domain','polypeptide_domain');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('wild_type','wild_type');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('fusion_gene','fusion_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcript_function_variant','transcript_function_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_member_region','gene_member_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('arginyl_trna','arginyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('compensatory_transcript_secondary_structure_variant','compensatory_transcript_secondary_structure_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('methylated_base_feature','methylated_base_feature');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('uninverted_intrachromosomal_transposition','uninvert_intra_transposition');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('scrna_gene','scrna_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rrna_18s','rrna_18s');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rnapol_iii_promoter_type_1','rnapol_iii_promoter_type_1');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('point_mutation','point_mutation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pseudoknot','pseudoknot');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('g_quartet','g_quartet');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('schellmann_loop','schellmann_loop');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_l_selenocysteine','modified_l_selenocysteine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pna','pna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_coding_exon','three_prime_coding_exon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('endogenous_retroviral_gene','endogenous_retroviral_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('vertebrate_immunoglobulin_t_cell_receptor_segment','vertebrate_immunoglobulin_t_cell_receptor_segment');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mrna_recoded_by_translational_bypass','mrna_recoded_by_translational_bypass');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('engineered_foreign_region','engineered_foreign_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('snorna_encoding','snorna_encoding');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_est','five_prime_est');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('foldback_element','foldback_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('srp_rna_encoding','srp_rna_encoding');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('d_j_c_cluster','d_j_c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dj_c_cluster','dj_c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('histone_ubiqitination_site','histone_ubiqitination_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('complex_structural_alteration','complex_structural_alteration');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rrna_encoding','rrna_encoding');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mrna_recoded_by_codon_redefinition','mrna_recoded_by_codon_redefinition');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_methyluridine','five_methyluridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polya_sequence','polya_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('metabolic_island','metabolic_island');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('homologous','homologous');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('immature_peptide_region','immature_peptide_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h2bk5_monomethylation_site','h2bk5_monomethylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sequence_attribute','sequence_attribute');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sirna','sirna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dart_marker','dart_marker');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nucleotide_motif','nucleotide_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('plus_1_translationally_frameshifted','plus_1_translationally_frameshifted');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('trna_intron','trna_intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_noncoding_exon','five_prime_noncoding_exon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dna_motif','dna_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('beta_strand','beta_strand');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ds_oligo','ds_oligo');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('one_methyladenosine','one_methyladenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('oxys_rna','oxys_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('asx_motif','asx_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_hydroxyuridine','five_hydroxyuridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('coding_exon','coding_exon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('plus_1_translational_frameshift','plus_1_translational_frameshift');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_formylcytidine','five_formylcytidine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k27_dimethylation_site','h3k27_dimethylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('spliced_leader_rna','spliced_leader_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mitochondrial_chromosome','mitochondrial_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_fragment','gene_fragment');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n2_7_2prirme_o_trimethylguanosine','n2_7_2prirme_o_trimethylguanosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('frameshift','frameshift');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('propeptide_cleavage_site','propeptide_cleavage_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_methyldihydrouridine','five_methyldihydrouridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('amino_acid','amino_acid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('translocation_breakpoint','translocation_breakpoint');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rrna_5_8s','rrna_5_8s');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('helix_turn_helix','helix_turn_helix');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('simple_sequence_length_variation','simple_sequence_length_variation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('methionine','methionine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_loss_of_function_variant','polypeptide_loss_of_function_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transposable_element_gene','transposable_element_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('whole_genome_sequence_status','whole_genome_sequence_status');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('genomic_island','genomic_island');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_segment','gene_segment');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('snrna_gene','snrna_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('engineered_region','engineered_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('common_variant','common_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cryptogene','cryptogene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_coding_exon_noncoding_region','three_prime_coding_exon_noncoding_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_silenced_by_rna_interference','gene_silenced_by_rna_interference');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('deficient_interchromosomal_transposition','d_interchr_transposition');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('natural_variant_site','natural_variant_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('assembly','assembly');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('major_tss','major_tss');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('trna','trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('encodes_overlapping_peptides','encodes_overlapping_peptides');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nc_conserved_region','nc_conserved_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('locus_control_region','locus_control_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('s_gna_oligo','s_gna_oligo');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dna_chromosome','dna_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('beta_turn_type_six_b','beta_turn_type_six_b');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('loss_of_heterozygosity','loss_of_heterozygosity');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('engineered_gene','engineered_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('wobble_base_pair','wobble_base_pair');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_amino_acid_feature','modified_amino_acid_feature');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('t_to_c_transition','t_to_c_transition');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('translocaton_attribute','translocaton_attribute');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('apicoplast_sequence','apicoplast_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('terminal_codon_variant','terminal_codon_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('irlinv_site','irlinv_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('synthetic_sequence','synthetic_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('encodes_1_polypeptide','encodes_1_polypeptide');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('group_iia_intron','group_iia_intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('telomere','telomere');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('interior_intron','interior_intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('edited_mrna','edited_mrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('catmat_right_handed_three','catmat_right_handed_three');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tandem_duplication','tandem_duplication');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tmrna_gene','tmrna_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pre_edited_region','pre_edited_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n6_hydroxynorvalylcarbamoyladenosine','n6_hydroxynorvalylcarbamoyladenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nucleomorphic_chromosome','nucleomorphic_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('fragmentary','fragmentary');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('single','single');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('binding_site','binding_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('seven_methylguanine','seven_methylguanine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('target_site_duplication','target_site_duplication');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('vdj_gene','vdj_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('bound_by_nucleic_acid','bound_by_nucleic_acid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('peptide_localization_signal','peptide_localization_signal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('catmat_right_handed_four','catmat_right_handed_four');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k27_acylation_site','h3k27_acylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('compound_chromosome','compound_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('coding_end','coding_end');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gap','gap');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ligand_binding_site','ligand_binding_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('upstream_aug_codon','upstream_aug_codon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pseudogenic_transcript','pseudogenic_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('satellite_dna','satellite_dna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('assortment_derived_deficiency_plus_duplication','assortment_derived_deficiency_plus_duplication');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transposable_element','transposable_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('endogenous_retroviral_sequence','endogenous_retroviral_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('microsatellite','microsatellite');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('encodes_different_polypeptides_different_stop','encodes_different_polypeptides_different_stop');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('primary_transcript','primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('consensus_mrna','consensus_mrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('membrane_peptide_loop','membrane_peptide_loop');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('foreign','so_foreign');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rho_independent_bacterial_terminator','rho_independent_bacterial_terminator');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u_box','u_box');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_silenced_by_histone_deacetylation','gene_silenced_by_histone_deacetylation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('vdj_j_c_cluster','vdj_j_c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cpg_island','cpg_island');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('haplotype','haplotype');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('two_prime_o_methylinosine','two_prime_o_methylinosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dna','dna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('circular_double_stranded_rna_chromosome','circular_double_stranded_rna_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mature_protein_region','mature_protein_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('b_box','b_box');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_zinc_ion_contact_site','polypeptide_zinc_ion_contact_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_subarray_member','gene_subarray_member');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_cassette','gene_cassette');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('oric','oric');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('deletion_breakpoint','deletion_breakpoint');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('insertion_attribute','insertion_attribute');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mrna_with_plus_2_frameshift','mrna_with_plus_2_frameshift');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chip_seq_region','chip_seq_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('asx_turn_right_handed_type_one','asx_turn_right_handed_type_one');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcribed_cluster','transcribed_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tyrosyl_trna','tyrosyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('orthologous','orthologous');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('s_gna','s_gna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('canonical_three_prime_splice_site','canonical_three_prime_splice_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('noncoding_exon','noncoding_exon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('lethal_variant','lethal_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('minor_tss','minor_tss');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_two_prime_o_dimethylcytidine','five_two_prime_o_dimethylcytidine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k36_trimethylation_site','h3k36_trimethylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('macronuclear_chromosome','macronuclear_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('deficient_translocation','deficient_translocation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('read_pair','read_pair');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcript_with_translational_frameshift','transcript_with_translational_frameshift');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('finished_genome','finished_genome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rnapol_iii_promoter_type_3','rnapol_iii_promoter_type_3');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dna_transposon','dna_transposon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('orf','orf');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('right_handed_peptide_helix','right_handed_peptide_helix');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_nest_left_right_motif','polypeptide_nest_left_right_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('topology_attribute','topology_attribute');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mirtron','mirtron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_motif','polypeptide_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sl9_acceptor_site','sl9_acceptor_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('proplastid_sequence','proplastid_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('negatively_autoregulated_gene','negatively_autoregulated_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('retinoic_acid_responsive_element','retinoic_acid_responsive_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('c_d_box_snorna_encoding','c_d_box_snorna_encoding');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sequence_assembly','sequence_assembly');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromoplast_gene','chromoplast_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dcaps_primer','dcaps_primer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_clip','five_prime_clip');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('golden_path','golden_path');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('splice_acceptor_variant','splice_acceptor_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('alanine','alanine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cleaved_peptide_region','cleaved_peptide_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_dj_j_cluster','v_dj_j_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pseudogenic_region','pseudogenic_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('terminator_codon_variant','terminator_codon_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('methylation_guide_snorna','methylation_guide_snorna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_vj_j_c_cluster','v_vj_j_c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('non_canonical_start_codon','non_canonical_start_codon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_with_mrna_recoded_by_translational_bypass','gene_with_mrna_recoded_by_translational_bypass');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_turn_motif','polypeptide_turn_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('autocatalytically_spliced_intron','autocatalytically_spliced_intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mobile','mobile');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tandem','tandem');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('intron','intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('clip','clip');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dye_terminator_read','dye_terminator_read');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dmv4_motif','dmv4_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('au_rich_element','au_rich_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inversion_breakpoint','inversion_breakpoint');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dce_siii','dce_siii');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_recoding_site','five_prime_recoding_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('non_protein_coding','non_protein_coding');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mobile_intron','mobile_intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('vertebrate_immunoglobulin_t_cell_receptor_rearranged_segment','vertebrate_immunoglobulin_t_cell_receptor_rearranged_segment');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('st_turn_right_handed_type_one','st_turn_right_handed_type_one');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rrna','rrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inside_intron_parallel','inside_intron_parallel');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('spliceosomal_intron','spliceosomal_intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('phagemid','phagemid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('editing_block','editing_block');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('fragment_assembly','fragment_assembly');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tmrna_acceptor_piece','tmrna_acceptor_piece');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('beta_turn_type_six','beta_turn_type_six');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_rst','three_prime_rst');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cysteine_trna_primary_transcript','cysteine_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('post_translationally_regulated_gene','post_translationally_regulated_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcriptionally_repressed','transcriptionally_repressed');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('crm','crm');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cointegrated_plasmid','cointegrated_plasmid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_sequencing_information','polypeptide_sequencing_information');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_d_spacer','three_prime_d_spacer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tiling_path_fragment','tiling_path_fragment');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('natural','so_natural');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pi_helix','pi_helix');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('possible_base_call_error','possible_base_call_error');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_truncation','polypeptide_truncation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k14_acetylation_site','h3k14_acetylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('adaptive_island','adaptive_island');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('uridine_five_oxyacetic_acid','uridine_five_oxyacetic_acid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sl7_acceptor_site','sl7_acceptor_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('plus_2_translational_frameshift','plus_2_translational_frameshift');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('stop_retained_variant','stop_retained_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('homologous_region','homologous_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('500b_downstream_variant','fivehundred_b_downstream_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('internal_utr','internal_utr');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('non_cytoplasmic_polypeptide_region','non_cytoplasmic_polypeptide_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('experimental_feature','experimental_feature');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nuclear_chromosome','nuclear_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('exemplar','exemplar');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rnapol_ii_core_promoter','rnapol_ii_core_promoter');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k9_methylation_site','h3k9_methylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('alanine_trna_primary_transcript','alanine_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('assortment_derived_variation','assortment_derived_variation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n2_n2_dimethylguanosine','n2_n2_dimethylguanosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rna_hook_turn','rna_hook_turn');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcribed_spacer_region','transcribed_spacer_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('plasmid_gene','plasmid_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u14_snorna','u14_snorna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('galactosyl_queuosine','galactosyl_queuosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cyanelle_gene','cyanelle_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('wild_type_rescue_gene','wild_type_rescue_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u12_intron','u12_intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('aptamer','aptamer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('recoded_mrna','recoded_mrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nested_transposon','nested_transposon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tf_binding_site_variant','tf_binding_site_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('macronuclear_sequence','macronuclear_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ust','ust');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('selenocysteine','selenocysteine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('elongated_out_of_frame_polypeptide_c_terminal','elongated_out_of_frame_polypeptide_c_terminal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_with_dicistronic_mrna','gene_with_dicistronic_mrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('match_part','match_part');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nucleomorphic_sequence','nucleomorphic_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('apicoplast_gene','apicoplast_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('regulon','regulon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('plasmid_vector','plasmid_vector');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_l_tryptophan','modified_l_tryptophan');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('free_chromosome_arm','free_chromosome_arm');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('srp_rna_primary_transcript','srp_rna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('asx_turn','asx_turn');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('anchor_binding_site','anchor_binding_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rrna_primary_transcript','rrna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('reading_frame','reading_frame');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k23_acylation site','h3k23_acylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('maternal_variant','maternal_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dhu_loop','dhu_loop');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n4_acetylcytidine','n4_acetylcytidine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('experimental_feature_attribute','experimental_feature_attribute');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('silenced_gene','silenced_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cloned_genomic_insert','cloned_genomic_insert');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('intron_gain','intron_gain');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dna_sequence_secondary_structure','dna_sequence_secondary_structure');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cdna_match','cdna_match');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_flanking_region','five_prime_flanking_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pyrrolysyl_trna','pyrrolysyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('two_methylthio_n6_cis_hydroxyisopentenyl_adenosine','two_methylthio_n6_cis_hydroxyisopentenyl_adenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('repeat_component','repeat_component');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('one_methyl_three_three_amino_three_carboxypropyl_pseudouridine','one_methyl_3_3_amino_three_carboxypropyl_pseudouridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rpra_rna','rpra_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nuclease_sensitive_site','nuclease_sensitive_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('conservative_amino_acid_substitution','conservative_amino_acid_substitution');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_coding_exon_noncoding_region','five_prime_coding_exon_noncoding_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rnapol_iii_promoter','rnapol_iii_promoter');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tryptophan_trna_primary_transcript','try_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('noncontiguous_finished','noncontiguous_finished');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('region','region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tf_binding_site','tf_binding_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('attl_site','attl_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('natural_plasmid','natural_plasmid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('upd','upd');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('conservative_missense_codon','conservative_missense_codon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n6_n6_dimethyladenosine','n6_n6_dimethyladenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('laevosynaptic_chromosome','laevosynaptic_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromosomal_structural_element','chromosomal_structural_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_cassette_array','gene_cassette_array');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('vertebrate_immunoglobulin_t_cell_receptor_gene_cluster','vertebrate_immunoglobulin_t_cell_receptor_gene_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('canonical_five_prime_splice_site','canonical_five_prime_splice_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('bound_by_protein','bound_by_protein');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sts_map','sts_map');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dnazyme','dnazyme');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('silent_mutation','silent_mutation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_d_j_cluster','v_d_j_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('distal_promoter_element','distal_promoter_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('bipartite_duplication','bipartite_duplication');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('hydroxywybutosine','hydroxywybutosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dihydrouridine','dihydrouridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_coding_exon_coding_region','five_prime_coding_exon_coding_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('beta_turn_left_handed_type_one','beta_turn_left_handed_type_one');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k4_trimethylation','h3k4_trimethylation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('recoded_codon','recoded_codon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('predicted','predicted');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('resolution_site','resolution_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('seven_cyano_seven_deazaguanosine','seven_cyano_seven_deazaguanosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('disease_associated_variant','disease_associated_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('conformational_switch','conformational_switch');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('regulated','regulated');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inverted_repeat','inverted_repeat');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('t_to_a_transversion','t_to_a_transversion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('attc_site','attc_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('two_methyladenosine','two_methyladenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cross_genome_match','cross_genome_match');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tandem_repeat','tandem_repeat');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('copy_number_loss','copy_number_loss');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('antisense_primary_transcript','antisense_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sequence_collection','sequence_collection');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_with_polyadenylated_mrna','gene_with_polyadenylated_mrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rnapol_i_promoter','rnapol_i_promoter');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_methyluridine','three_methyluridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('start_codon','start_codon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('retrotransposon','retrotransposon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('elongated_in_frame_polypeptide_c_terminal','elongated_in_frame_polypeptide_c_terminal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_gene','v_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chloroplast_dna','chloroplast_dna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('negative_sense_ssrna_viral_sequence','negative_sense_ssrna_viral_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('primer_binding_site','primer_binding_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('c_box','c_box');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('plasmid','plasmid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('biological_region','biological_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('g_to_a_transition','g_to_a_transition');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('non_canonical_five_prime_splice_site','non_canonical_five_prime_splice_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('c_d_box_snorna_primary_transcript','c_d_box_snorna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('trna_region','trna_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n6_cis_hydroxyisopentenyl_adenosine','n6_cis_hydroxyisopentenyl_adenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chloroplast_sequence','chloroplast_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('variant_frequency','variant_frequency');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('exon_region','exon_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('r_five_prime_ltr_region','r_five_prime_ltr_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_j_c_cluster','v_j_c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('r_three_prime_ltr_region','r_three_prime_ltr_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('snrna','snrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('one_methylinosine','one_methylinosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inframe_codon_gain','inframe_codon_gain');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('j_gene_recombination_feature','j_gene_recombination_feature');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_structural_motif','polypeptide_structural_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('conserved_region','conserved_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sl3_acceptor_site','sl3_acceptor_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('remark','remark');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('fixed_variant','fixed_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_dna_contact','polypeptide_dna_contact');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('codon','codon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rrna_23s','rrna_23s');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_gain_of_function_variant','polypeptide_gain_of_function_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mrna','mrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('glycyl_trna','glycyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cyanelle_sequence','cyanelle_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cds_independently_known','cds_independently_known');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('insulator','insulator');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('positive_sense_ssrna_viral_sequence','positive_sense_ssrna_viral_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sticky_end_restriction_enzyme_cleavage_site','sticky_end_restriction_enzyme_cleavage_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('expressed_sequence_match','expressed_sequence_match');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('possible_assembly_error','possible_assembly_error');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u3_snorna','u3_snorna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_manganese_ion_contact_site','polypeptide_manganese_ion_contact_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h4k16_acylation_site','h4k16_acylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('g_to_t_transversion','g_to_t_transversion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('recombination_feature_of_rearranged_gene','recombination_feature_of_rearranged_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_coding_exon_coding_region','three_prime_coding_exon_coding_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tmrna_primary_transcript','tmrna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('single_stranded_cdna','single_stranded_cdna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('experimentally_determined','experimentally_determined');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pseudogenic_exon','pseudogenic_exon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u2_intron','u2_intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromosome','chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('encodes_alternately_spliced_transcripts','encodes_alternately_spliced_transcripts');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('aberrant_processed_transcript','aberrant_processed_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('complex_change_of_translational_product_variant','complex_change_of_translational_product_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gna','gna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dsra_rna','dsra_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('intron_domain','intron_domain');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cds_predicted','cds_predicted');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_l_asparagine','modified_l_asparagine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inframe_variant','inframe_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_d_nonamer','five_prime_d_nonamer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sl2_acceptor_site','sl2_acceptor_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_localization_variant','polypeptide_localization_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dce_si','dce_si');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('snrna_primary_transcript','snrna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('translocation','translocation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k27_methylation_site','h3k27_methylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_l_phenylalanine','modified_l_phenylalanine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('lincrna','lincrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_l_valine','modified_l_valine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('yac','yac');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('signal_peptide','signal_peptide');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('r_ltr_region','r_ltr_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('srp_rna_gene','srp_rna_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('elongated_polypeptide_n_terminal','elongated_polypeptide_n_terminal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('recombination_hotspot','recombination_hotspot');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_dj_c_cluster','v_dj_c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('viral_sequence','viral_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_terminal_inverted_repeat','five_prime_terminal_inverted_repeat');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_methoxycarbonylmethyl_two_thiouridine','five_mcm_2_thiouridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('edited','edited');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('breu_motif','breu_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('coding_start','coding_start');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k9_monomethylation_site','h3k9_monomethylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_utr','three_prime_utr');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dpe1_motif','dpe1_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_l_tyrosine','modified_l_tyrosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_d_j_c_cluster','v_d_j_c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('silenced_by_histone_methylation','silenced_by_histone_methylation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('deficient_inversion','deficient_inversion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('decreased_transcript_level_variant','decreased_transcript_level_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('two_thiouridine','two_thiouridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polyadenylation_variant','polyadenylation_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rna_polymerase_iii_tata_box','rna_polymerase_iii_tata_box');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('two_thio_two_prime_o_methyluridine','two_thio_two_prime_o_methyluridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k18_acetylation_site','h3k18_acetylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('leucoplast_sequence','leucoplast_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cds','cds');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polya_signal_sequence','polya_signal_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('micronuclear_sequence','micronuclear_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('glutamyl_trna','glutamyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k27_monomethylation_site','h3k27_monomethylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('minus_2_frameshift_variant','minus_2_frameshift_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('strna_gene','strna_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('paternally_imprinted_gene','paternally_imprinted_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rna_chromosome','rna_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ndm3_motif','ndm3_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u1_snrna','u1_snrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_hydroxymethylcytidine','five_hydroxymethylcytidine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('recombination_feature','recombination_feature');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('encodes_disjoint_polypeptides','encodes_disjoint_polypeptides');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('post_translationally_regulated','post_translationally_regulated');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('engineered_fusion_gene','engineered_fusion_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_d_recombination_signal_sequence','three_prime_d_recombination_signal_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('intermediate','intermediate');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_calcium_ion_contact_site','polypeptide_calcium_ion_contact_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('syntenic_region','syntenic_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('variant_collection','variant_collection');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cryptic_splice_donor','cryptic_splice_donor');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('assembly_error_correction','assembly_error_correction');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sugar_edge_base_pair','sugar_edge_base_pair');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('engineered_foreign_gene','engineered_foreign_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k4_monomethylation_site','h3k4_monomethylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n4_acetyl_2_prime_o_methylcytidine','n4_acetyl_2_prime_o_methylcytidine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('predicted_by_ab_initio_computation','predicted_by_ab_initio_computation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_secondary_structure','polypeptide_secondary_structure');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ncrna_gene','ncrna_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rna_junction_loop','rna_junction_loop');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('haplotype_block','haplotype_block');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('oriv','oriv');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('peptide_collection','peptide_collection');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ambisense_ssrna_viral_sequence','ambisense_ssrna_viral_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('morpholino_oligo','morpholino_oligo');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('centromere','centromere');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('epigenetically_modified_gene','epigenetically_modified_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromosomal_inversion','chromosomal_inversion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('minus_35_signal','minus_35_signal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_two_prime_o_dimethyluridine','three_two_prime_o_dimethyluridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('four_thiouridine','four_thiouridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcription_end_site','transcription_end_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pirna_gene','pirna_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pre_mirna','pre_mirna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cysteinyl_trna','cysteinyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('catmat_left_handed_three','catmat_left_handed_three');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cryptic_splice_acceptor','cryptic_splice_acceptor');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('schellmann_loop_seven','schellmann_loop_seven');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_vdj_j_c_cluster','v_vdj_j_c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transposable_element_insertion_site','transposable_element_insertion_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('translocation_element','translocation_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mirna_primary_transcript_region','mirna_primary_transcript_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('orphan_cds','orphan_cds');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('monocistronic_mrna','monocistronic_mrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('natural_transposable_element','natural_transposable_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('golden_path_fragment','golden_path_fragment');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('lipoprotein_signal_peptide','lipoprotein_signal_peptide');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('arginine','arginine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('linear_double_stranded_rna_chromosome','linear_double_stranded_rna_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h4k8_acylation site','h4k8_acylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rrna_large_subunit_primary_transcript','rrna_large_subunit_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('irrinv_site','irrinv_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('plastid_sequence','plastid_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('base_call_error_correction','base_call_error_correction');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('integrated_plasmid','integrated_plasmid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_l_methionine','modified_l_methionine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('linear_single_stranded_rna_chromosome','linear_single_stranded_rna_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromoplast_sequence','chromoplast_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('proximal_promoter_element','proximal_promoter_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('contig_read','contig_read');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('promoter_trap_construct','promoter_trap_construct');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('stop_codon_redefined_as_selenocysteine','stop_codon_redefined_as_selenocysteine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('seven_methylguanosine','seven_methylguanosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gamma_turn','gamma_turn');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tmrna','tmrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('methionyl_trna','methionyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('synonymous_codon','synonymous_codon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cdna','cdna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sl4_acceptor_site','sl4_acceptor_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nuclease_binding_site','nuclease_binding_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('uridine_five_oxyacetic_acid_methyl_ester','uridine_five_oxyacetic_acid_methyl_ester');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_race_clone','three_prime_race_clone');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('circular_double_stranded_dna_chromosome','circular_double_stranded_dna_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('consensus','consensus');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('positively_autoregulated_gene','positively_autoregulated_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tss_region','tss_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_l_histidine','modified_l_histidine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('unitary_pseudogene','unitary_pseudogene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_metal_contact','polypeptide_metal_contact');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('integron','integron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('d_loop','d_loop');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('decayed_exon','decayed_exon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('recombination_signal_sequence','recombination_signal_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_inosine','modified_inosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_three_prime_overlap','three_prime_three_prime_overlap');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_j_cluster','v_j_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_five_prime_overlap','three_prime_five_prime_overlap');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('recombination_regulatory_region','recombination_regulatory_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('beta_bulge_loop','beta_bulge_loop');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('restriction_enzyme_cleavage_junction','restriction_enzyme_cleavage_junction');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('blunt_end_restriction_enzyme_cleavage_junction','blunt_end_restriction_enzyme_cleavage_junction');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('intergenic_region','intergenic_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dmv2_motif','dmv2_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('intrachromosomal_mutation','intrachromosomal_mutation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('antisense_rna','antisense_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sequence_feature','sequence_feature');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n6_glycinylcarbamoyladenosine','n6_glycinylcarbamoyladenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gamma_turn_classic','gamma_turn_classic');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_cis_splice_site','three_prime_cis_splice_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rapd','rapd');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inverted_ring_chromosome','inverted_ring_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cca_tail','cca_tail');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('linear_double_stranded_dna_chromosome','linear_double_stranded_dna_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u5_five_prime_ltr_region','u5_five_prime_ltr_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('bruno_response_element','bruno_response_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('t_to_g_transversion','t_to_g_transversion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('c_to_a_transversion','c_to_a_transversion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('macronucleus_destined_segment','macronucleus_destined_segment');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('distant_three_prime_recoding_signal','distant_three_prime_recoding_signal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pre_edited_mrna','pre_edited_mrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('p_element','p_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pac','pac');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_fusion','gene_fusion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('base','base');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('codon_redefined','codon_redefined');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polycistronic_mrna','polycistronic_mrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('codon_variant','codon_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_methoxycarbonylmethyl_two_prime_o_methyluridine','five_methoxycarbonylmethyl_two_prime_o_methyluridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('match','match');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_with_stop_codon_read_through','gene_with_stop_codon_read_through');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('asparaginyl_trna','asparaginyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('threonyl_trna','threonyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u3_five_prime_ltr_region','u3_five_prime_ltr_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_ltr','five_prime_ltr');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('vj_gene','vj_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rho_dependent_bacterial_terminator','rho_dependent_bacterial_terminator');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n2_methylguanosine','n2_methylguanosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_flanking_region','three_prime_flanking_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('genomically_contaminated_cdna_clone','genomically_contaminated_cdna_clone');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('internal_guide_sequence','internal_guide_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mirna_target_site','mirna_target_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u5_three_prime_ltr_region','u5_three_prime_ltr_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('undermodified_hydroxywybutosine','undermodified_hydroxywybutosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('introgressed_chromosome_region','introgressed_chromosome_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('translationally_frameshifted','translationally_frameshifted');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('trans_spliced','trans_spliced');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('methylation_guide_snorna_primary_transcript','methylation_guide_snorna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('leucine','leucine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromosomal_deletion','chromosomal_deletion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_isopentenylaminomethyl_uridine','five_isopentenylaminomethyl_uridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('stop_codon','stop_codon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('two_methylthio_n6_threonyl_carbamoyladenosine','two_methylthio_n6_threonyl_carbamoyladenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('decreased_polyadenylation_variant','decreased_polyadenylation_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('biochemical_region_of_peptide','biochemical_region_of_peptide');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('interband','interband');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dna_constraint_sequence','dna_constraint_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('clone_insert','clone_insert');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('snp','snp');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromoplast_chromosome','chromoplast_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rrna_25s','rrna_25s');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tata_box','tata_box');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('plastid_gene','plastid_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('asx_turn_left_handed_type_one','asx_turn_left_handed_type_one');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_uridine','modified_uridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dce_sii','dce_sii');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('intramembrane_polypeptide_region','intramembrane_polypeptide_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('lysyl_trna','lysyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rr_tract','rr_tract');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rrna_primary_transcript_region','rrna_primary_transcript_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h4k20_monomethylation_site','h4k20_monomethylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ds_dna_viral_sequence','ds_dna_viral_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('alternatively_spliced_transcript','alternatively_spliced_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_copper_ion_contact_site','polypeptide_copper_ion_contact_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('scrna_encoding','scrna_encoding');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromosomal_duplication','chromosomal_duplication');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('clone','clone');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_l_isoleucine','modified_l_isoleucine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_subarray','gene_subarray');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('hetero_compound_chromosome','hetero_compound_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dicistronic_transcript','dicistronic_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inactive_ligand_binding_site','inactive_ligand_binding_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('silenced_by_dna_methylation','silenced_by_dna_methylation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sl6_acceptor_site','sl6_acceptor_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('t_loop','t_loop');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('targeting_vector','targeting_vector');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('two_thiocytidine','two_thiocytidine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_l_serine','modified_l_serine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('srp_rna','srp_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_repeat_recoding_signal','three_prime_repeat_recoding_signal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rate_of_transcription_variant','rate_of_transcription_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('two_prime_o_methylguanosine','two_prime_o_methylguanosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_binding_motif','polypeptide_binding_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('recombinationally_rearranged_vertebrate_immune_system_gene','recombinationally_rearranged_vertebrate_immune_system_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('a_box','a_box');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('splicing_variant','splicing_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('one_methylguanosine','one_methylguanosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_l_glutamine','modified_l_glutamine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sequence_variant','sequence_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sequence_length_variation','sequence_length_variation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('strna_encoding','strna_encoding');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('plus_1_frameshift','plus_1_frameshift');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('topologically_defined_region','topologically_defined_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('edited_cds','edited_cds');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_silenced_by_histone_modification','gene_silenced_by_histone_modification');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('e_box_motif','e_box_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('paternal_uniparental_disomy','paternal_uniparental_disomy');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('small_subunit_rrna','small_subunit_rrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dnasei_hypersensitive_site','dnasei_hypersensitive_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_d_dj_j_c_cluster','v_d_dj_j_c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('compound_chromosome_arm','compound_chromosome_arm');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('score','score');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('feature_attribute','feature_attribute');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('protein_match','protein_match');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('downstream_gene_variant','downstream_gene_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sl10_accceptor_site','sl10_accceptor_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromosome_variation','chromosome_variation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('serine_threonine_motif','serine_threonine_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('a_box_type_1','a_box_type_1');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('allelically_excluded','allelically_excluded');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('assortment_derived_aneuploid','assortment_derived_aneuploid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rare_variant','rare_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_isopentenylaminomethyl_two_prime_o_methyluridine','five_isopentenylaminomethyl_two_prime_o_methyluridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('regional_centromere_central_core','regional_centromere_central_core');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gna_oligo','gna_oligo');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nc_transcript_variant','nc_transcript_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('copy_number_variation','copy_number_variation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('silenced','silenced');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_methylcytidine','three_methylcytidine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dexstrosynaptic_chromosome','dexstrosynaptic_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inverted_insertional_duplication','inverted_insertional_duplication');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rescue_mini_gene','rescue_mini_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('catmat_left_handed_four','catmat_left_handed_four');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('alternate_sequence_site','alternate_sequence_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_iron_ion_contact_site','polypeptide_iron_ion_contact_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('c_to_t_transition_at_pcpg_site','c_to_t_transition_at_pcpg_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_molybdenum_ion_contact_site','polypeptide_molybdenum_ion_contact_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('phenylalanine_trna_primary_transcript','phe_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('decreased_translational_product_level','decreased_translational_product_level');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h_aca_box_snorna_primary_transcript','h_aca_box_snorna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('r_gna','r_gna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('coding_sequence_variant','coding_sequence_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_partial_loss_of_function','polypeptide_partial_loss_of_function');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_restriction_enzyme_junction','five_prime_restriction_enzyme_junction');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('intrachromosomal_transposition','intrachromosomal_transposition');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('methylated_a','methylated_a');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rrna_16s','rrna_16s');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('disease_causing_variant','disease_causing_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n4_methylcytidine','n4_methylcytidine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('riboswitch','riboswitch');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('duplicated_pseudogene','duplicated_pseudogene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('assortment_derived_duplication','assortment_derived_duplication');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromosomal_regulatory_element','chromosomal_regulatory_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_five_prime_overlap','five_prime_five_prime_overlap');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_function_variant','polypeptide_function_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ribozymic','ribozymic');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inversion_derived_bipartite_deficiency','inversion_derived_bipartite_deficiency');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('invalidated_by_genomic_contamination','invalidated_by_genomic_contamination');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('variant_genome','variant_genome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('vj_j_cluster','vj_j_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromosome_number_variation','chromosome_number_variation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_attribute','gene_attribute');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('uag_stop_codon_signal','uag_stop_codon_signal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nucleotide_match','nucleotide_match');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mature_mirna_variant','mature_mirna_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('st_turn_left_handed_type_two','st_turn_left_handed_type_two');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('epigenetically_modified','epigenetically_modified');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inversion_derived_deficiency_plus_duplication','inversion_derived_deficiency_plus_duplication');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_methylaminomethyl_two_selenouridine','five_methylaminomethyl_two_selenouridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('aspartic_acid_trna_primary_transcript','aspartic_acid_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nuclear_mt_pseudogene','nuclear_mt_pseudogene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('exonic_splice_enhancer','exonic_splice_enhancer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u4_snrna','u4_snrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('csrb_rsmb_rna','csrb_rsmb_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('group_1_intron_homing_endonuclease_target_region','group_1_intron_homing_endonuclease_target_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('crispr','crispr');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('snorna_gene','snorna_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('trans_splice_junction','trans_splice_junction');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('flanking_three_prime_quadruplet_recoding_signal','flanking_three_prime_quadruplet_recoding_signal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_vdj_j_cluster','v_vdj_j_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cassette_pseudogene','cassette_pseudogene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('incomplete_terminal_codon_variant','incomplete_terminal_codon_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('silenced_by_histone_modification','silenced_by_histone_modification');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('proviral_gene','proviral_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_carboxyhydroxymethyl_uridine','five_carboxyhydroxymethyl_uridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mt_gene','mt_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('single_stranded_rna_chromosome','single_stranded_rna_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('recoding_stimulatory_region','recoding_stimulatory_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_taurinomethyluridine','five_taurinomethyluridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_l_threonine','modified_l_threonine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_d_dj_cluster','v_d_dj_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('synthetic_oligo','synthetic_oligo');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('purine_to_pyrimidine_transversion','purine_to_pyrimidine_transversion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('editing_variant','editing_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('antiparallel_beta_strand','antiparallel_beta_strand');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('central_hydrophobic_region_of_signal_peptide','central_hydrophobic_region_of_signal_peptide');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('integrated_mobile_genetic_element','integrated_mobile_genetic_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('parallel_beta_strand','parallel_beta_strand');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_dj_cluster','v_dj_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dre_motif','dre_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('non_ltr_retrotransposon','non_ltr_retrotransposon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('r_gna_oligo','r_gna_oligo');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('autoregulated','autoregulated');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_l_lysine','modified_l_lysine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('bac_end','bac_end');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pyrrolysine','pyrrolysine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('high_quality_draft','high_quality_draft');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('lysine','lysine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('elongated_polypeptide','elongated_polypeptide');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('unique_variant','unique_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('protein_protein_contact','protein_protein_contact');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inversion_attribute','inversion_attribute');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nucleotide_binding_site','nucleotide_binding_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('splice_site','splice_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('non_synonymous_codon','non_synonymous_codon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('5kb_downstream_variant','fivekb_downstream_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromosomal_translocation','chromosomal_translocation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('epitope','epitope');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('allele','allele');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n4_n4_2_prime_o_trimethylcytidine','n4_n4_2_prime_o_trimethylcytidine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u5_ltr_region','u5_ltr_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('paired_end_fragment','paired_end_fragment');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rescue_gene','rescue_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transgenic_transposable_element','transgenic_transposable_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_conserved_region','polypeptide_conserved_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sts','sts');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('a_to_c_transversion','a_to_c_transversion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('class_ii_rna','class_ii_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nonamer_of_recombination_feature_of_vertebrate_immune_system_gene','nonamer_of_recombination_feature_of_vertebrate_im_sys_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('unedited_region','unedited_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('lambda_vector','lambda_vector');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene','gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('alanyl_trna','alanyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('amino_acid_substitution','amino_acid_substitution');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('virtual_sequence','virtual_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('group_iib_intron','group_iib_intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('retrotransposed','retrotransposed');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mrna_with_minus_2_frameshift','mrna_with_minus_2_frameshift');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polymer_attribute','polymer_attribute');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('autosynaptic_chromosome','autosynaptic_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('peptide_helix','peptide_helix');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('partially_processed_cdna_clone','partially_processed_cdna_clone');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rst_match','rst_match');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('paternally_imprinted','paternally_imprinted');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('predicted_gene','predicted_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('x_element_combinatorial_repeat','x_element_combinatorial_repeat');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('robertsonian_fusion','robertsonian_fusion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('two_prime_o_methylpseudouridine','two_prime_o_methylpseudouridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pericentric_inversion','pericentric_inversion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('aspartyl_trna','aspartyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('strna','strna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_intron','three_prime_intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('linear','linear');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('j_nonamer','j_nonamer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('a_to_t_transversion','a_to_t_transversion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('idna','idna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n2_n2_7_trimethylguanosine','n2_n2_7_trimethylguanosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('complex_chromosomal_mutation','complex_chromosomal_mutation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inversion_derived_deficiency_plus_aneuploid','inversion_derived_deficiency_plus_aneuploid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k4_methylation_site','h3k4_methylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('asymmetric_rna_internal_loop','asymmetric_rna_internal_loop');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('deletion','deletion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k79_monomethylation_site','h3k79_monomethylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cyclic_translocation','cyclic_translocation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ars','ars');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('glutaminyl_trna','glutaminyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('allopolyploid','allopolyploid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('replicon','replicon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('two_prime_o_methylcytidine','two_prime_o_methylcytidine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('regional_centromere','regional_centromere');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('st_turn_left_handed_type_one','st_turn_left_handed_type_one');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('paralogous_region','paralogous_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mature_transcript_region','mature_transcript_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mrna_with_frameshift','mrna_with_frameshift');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('reference_genome','reference_genome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('unoriented_interchromosomal_transposition','unoriented_interchromosomal_transposition');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('d_dj_j_cluster','d_dj_j_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('maxicircle_gene','maxicircle_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('st_turn_right_handed_type_two','st_turn_right_handed_type_two');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('snrna_encoding','snrna_encoding');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('annotation_directed_improved_draft','annotation_directed_improved_draft');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_d_spacer','five_prime_d_spacer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('read','read');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('arginine_trna_primary_transcript','arg_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('oligo_u_tail','oligo_u_tail');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('recoding_pseudoknot','recoding_pseudoknot');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_methylaminomethyl_two_thiouridine','five_mam_2_thiouridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('monocistronic','monocistronic');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('3d_polypeptide_structure_variant','threed_polypeptide_structure_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transmembrane_polypeptide_region','transmembrane_polypeptide_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcript_processing_variant','transcript_processing_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('vector_replicon','vector_replicon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('maternal_uniparental_disomy','maternal_uniparental_disomy');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pyrosequenced_read','pyrosequenced_read');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('splice_site_variant','splice_site_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_magnesium_ion_contact_site','polypeptide_magnesium_ion_contact_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polycistronic_transcript','polycistronic_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polya_site','polya_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromosomal_variation_attribute','chromosomal_variation_attribute');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('free_duplication','free_duplication');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromosome_structure_variation','chromosome_structure_variation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_rna_base_feature','modified_rna_base_feature');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mutated_variant_site','mutated_variant_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gaga_motif','gaga_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('centromeric_repeat','centromeric_repeat');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rrna_gene','rrna_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('interchromosomal_mutation','interchromosomal_mutation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('prophage','prophage');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('syntenic','syntenic');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('engineered_foreign_repetitive_element','engineered_foreign_repetitive_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('translated_nucleotide_match','translated_nucleotide_match');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('exon_variant','exon_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h_aca_box_snorna','h_aca_box_snorna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('vault_rna','vault_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('orphan','orphan');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('linear_single_stranded_dna_chromosome','linear_single_stranded_dna_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('telomeric_repeat','telomeric_repeat');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('encodes_greater_than_1_polypeptide','encodes_greater_than_1_polypeptide');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('atti_site','atti_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_with_start_codon_cug','gene_with_start_codon_cug');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('silenced_by_histone_deacetylation','silenced_by_histone_deacetylation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('reagent','reagent');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromosome_fission','chromosome_fission');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ct_gene','ct_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('capped_primary_transcript','capped_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('methylinosine','methylinosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('j_spacer','j_spacer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('glutamine','glutamine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_guanosine','modified_guanosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n2_7_dimethylguanosine','n2_7_dimethylguanosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k79_trimethylation_site','h3k79_trimethylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_d_heptamer','three_prime_d_heptamer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('invalidated_cdna_clone','invalidated_cdna_clone');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('terminator','terminator');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('stem_loop','stem_loop');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_utr_intron','five_prime_utr_intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('unoriented_intrachromosomal_transposition','unoriented_intrachromosomal_transposition');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromosome_band','chromosome_band');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mini_exon_donor_rna','mini_exon_donor_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('aneuploid','aneuploid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_methyl_2_thiouridine','five_methyl_2_thiouridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_silenced_by_dna_methylation','gene_silenced_by_dna_methylation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('engineered_foreign_transposable_element_gene','engineered_foreign_transposable_element_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('processed_pseudogene','processed_pseudogene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('supercontig','supercontig');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('trna_encoding','trna_encoding');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('reciprocal_chromosomal_translocation','reciprocal_chromosomal_translocation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tasirna','tasirna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('hoogsteen_base_pair','hoogsteen_base_pair');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('regional_centromere_inner_repeat_region','regional_centromere_inner_repeat_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('yac_end','yac_end');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('purine_transition','purine_transition');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('c_d_box_snorna','c_d_box_snorna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('snorna_primary_transcript','snorna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_vj_cluster','v_vj_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('intronic_regulatory_region','intronic_regulatory_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u3_ltr_region','u3_ltr_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('attenuator','attenuator');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_noncoding_exon','three_prime_noncoding_exon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u14_snorna_primary_transcript','u14_snorna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('d_gene_recombination_feature','d_gene_recombination_feature');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mte','mte');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gcvb_rna','gcvb_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rst','rst');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('operator','operator');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ring_chromosome','ring_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ndm2_motif','ndm2_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k4_dimethylation_site','h3k4_dimethylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('selenocysteine_trna_primary_transcript','selenocysteine_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('edited_transcript_feature','edited_transcript_feature');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('stop_codon_redefined_as_pyrrolysine','stop_codon_redefined_as_pyrrolysine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('homo_compound_chromosome','homo_compound_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('foreign_gene','foreign_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('four_demethylwyosine','four_demethylwyosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('guide_rna','guide_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_methylpseudouridine','three_methylpseudouridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inversion_derived_aneuploid_chromosome','inversion_derived_aneuploid_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('decreased_transcript_stability_variant','decreased_transcript_stability_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('lincrna_gene','lincrna_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('specific_recombination_site','specific_recombination_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inosine','inosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('foreign_transposable_element','foreign_transposable_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('d_gene','d_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('bipartite_inversion','bipartite_inversion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('engineered_plasmid','engineered_plasmid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_group_regulatory_region','gene_group_regulatory_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('vd_gene','vd_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('regulatory_region','regulatory_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sl11_acceptor_site','sl11_acceptor_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('guide_rna_region','guide_rna_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_base','modified_base');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('elongated_polypeptide_c_terminal','elongated_polypeptide_c_terminal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_ten_helix','three_ten_helix');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('elongated_in_frame_polypeptide_n_terminal_elongation','elongated_in_frame_polypeptide_n_terminal_elongation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sarcin_like_rna_motif','sarcin_like_rna_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('minus_1_translationally_frameshifted','minus_1_translationally_frameshifted');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_l_alanine','modified_l_alanine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inversion_cum_translocation','inversion_cum_translocation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tag','tag');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('uninverted_interchromosomal_transposition','uninvert_inter_transposition');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cryptic_gene','cryptic_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pericentric','pericentric');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transgenic','transgenic');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('genomic_clone','genomic_clone');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chromosome_breakage_sequence','chromosome_breakage_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('d_j_cluster','d_j_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('beta_turn_type_six_a_one','beta_turn_type_six_a_one');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ribosome_entry_site','ribosome_entry_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('left_handed_peptide_helix','left_handed_peptide_helix');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dna_aptamer','dna_aptamer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('i_motif','i_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('deficient_intrachromosomal_transposition','d_intrachr_transposition');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('single_stranded_dna_chromosome','single_stranded_dna_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('methylated_c','methylated_c');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('clone_end','clone_end');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ligation_based_read','ligation_based_read');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('expressed_sequence_assembly','expressed_sequence_assembly');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_two_prime_o_dimethyluridine','five_two_prime_o_dimethyluridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('histidine_trna_primary_transcript','histidine_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('orthologous_region','orthologous_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('valine_trna_primary_transcript','valine_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('operon_member','operon_member');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('missense_codon','missense_codon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('bacterial_rnapol_promoter_sigma54','bacterial_rnapol_promoter_sigma54');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_group','gene_group');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('small_regulatory_ncrna','small_regulatory_ncrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('intrachromosomal_duplication','intrachromosomal_duplication');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('non_conservative_amino_acid_substitution','non_conservative_amino_acid_substitution');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('uaa_stop_codon_signal','uaa_stop_codon_signal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k36_methylation_site','h3k36_methylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcript_variant','transcript_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('minus_2_frameshift','minus_2_frameshift');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('organelle_sequence','organelle_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('initiator_codon_change','initiator_codon_change');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cryptic_prophage','cryptic_prophage');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('micf_rna','micf_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('direct_tandem_duplication','direct_tandem_duplication');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('conserved','conserved');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('telomerase_rna','telomerase_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u6atac_snrna','u6atac_snrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('attb_site','attb_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_array_member','gene_array_member');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polyadenylated_mrna','polyadenylated_mrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('symbiosis_island','symbiosis_island');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polymorphic_variant','polymorphic_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('splice_junction','splice_junction');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('fingerprint_map','fingerprint_map');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('single_strand_restriction_enzyme_cleavage_site','single_strand_restriction_enzyme_cleavage_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('wyosine','wyosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('uga_stop_codon_signal','uga_stop_codon_signal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('minus_24_signal','minus_24_signal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cytoplasmic_polypeptide_region','cytoplasmic_polypeptide_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h4k_acylation_region','h4k_acylation_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('one_two_prime_o_dimethylguanosine','one_two_prime_o_dimethylguanosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rh_map','rh_map');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('silenced_by_dna_modification','silenced_by_dna_modification');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inactive_catalytic_site','inactive_catalytic_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('anticodon','anticodon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('seven_deazaguanosine','seven_deazaguanosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('asparagine','asparagine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('probe','probe');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('defective_conjugative_transposon','defective_conjugative_transposon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('archaeosine','archaeosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('molecular_contact_region','molecular_contact_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nested_repeat','nested_repeat');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('membrane_structure','membrane_structure');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('contig_collection','contig_collection');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tetraloop','tetraloop');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('coding_conserved_region','coding_conserved_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('long_terminal_repeat','long_terminal_repeat');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('vertebrate_immune_system_gene_recombination_signal_feature','vertebrate_immune_system_gene_recombination_signal_feature');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('untranslated_region_polycistronic_mrna','untranslated_region_polycistronic_mrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('leucine_trna_primary_transcript','leucine_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('high_identity_region','high_identity_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('circular_single_stranded_dna_chromosome','circular_single_stranded_dna_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nuclear_rim_localization_signal','nuclear_rim_localization_signal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('isoleucyl_trna','isoleucyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('insertion_breakpoint','insertion_breakpoint');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('5_prime_utr_variant','five_prime_utr_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transgene','transgene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mrna_region','mrna_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcript_attribute','transcript_attribute');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('serine_threonine_staple_motif','serine_threonine_staple_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('protein_coding','protein_coding');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('enhancer_bound_by_factor','enhancer_bound_by_factor');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('recoded_by_translational_bypass','recoded_by_translational_bypass');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('operon','operon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('monocistronic_transcript','monocistronic_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('reciprocal','reciprocal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polyadenylated','polyadenylated');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('unigene_cluster','unigene_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('vertebrate_immunoglobulin_t_cell_receptor_rearranged_gene_cluster','vertebrate_ig_t_cell_receptor_rearranged_gene_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_cassette_member','gene_cassette_member');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('stop_codon_read_through','stop_codon_read_through');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_with_transcript_with_translational_frameshift','gene_with_transcript_with_translational_frameshift');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('variant_quality','variant_quality');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mnp','mnp');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('glutamic_acid','glutamic_acid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('y_prime_element','y_prime_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('beta_turn','beta_turn');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pathogenic_island','pathogenic_island');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ust_match','ust_match');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcript_bound_by_protein','transcript_bound_by_protein');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n6_methyladenosine','n6_methyladenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cyanelle_chromosome','cyanelle_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('orit','orit');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('maternally_imprinted','maternally_imprinted');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('chloroplast_chromosome','chloroplast_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('minicircle_gene','minicircle_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_catalytic_motif','polypeptide_catalytic_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rnapol_iii_promoter_type_2','rnapol_iii_promoter_type_2');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('no_output','no_output');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('interior_coding_exon','interior_coding_exon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_taurinomethyl_two_thiouridine','five_taurinomethyl_two_thiouridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k9_trimethylation_site','h3k9_trimethylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcript_secondary_structure_variant','transcript_secondary_structure_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide','polypeptide');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('splice_donor_5th_base_variant','splice_donor_5th_base_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polymerase_synthesis_read','polymerase_synthesis_read');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('enhancer_binding_site','enhancer_binding_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nucleotide_to_protein_binding_site','nucleotide_to_protein_binding_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('beta_turn_left_handed_type_two','beta_turn_left_handed_type_two');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('invalidated_by_genomic_polya_primed_cdna','invalidated_by_genomic_polya_primed_cdna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_with_edited_transcript','gene_with_edited_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dmv1_motif','dmv1_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('minus_12_signal','minus_12_signal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('post_translationally_modified_region','post_translationally_modified_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('proline','proline');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('flanking_region','flanking_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('two_methylthio_n6_isopentenyladenosine','two_methylthio_n6_isopentenyladenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypyrimidine_tract','polypyrimidine_tract');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_methoxyuridine','five_methoxyuridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_to_gene_feature','gene_to_gene_feature');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('bac_cloned_genomic_insert','bac_cloned_genomic_insert');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('j_heptamer','j_heptamer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_ust','three_prime_ust');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n6_2_prime_o_dimethyladenosine','n6_2_prime_o_dimethyladenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('trans_splice_site','trans_splice_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('de_novo_variant','de_novo_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('engineered_rescue_region','engineered_rescue_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nucleomorph_gene','nucleomorph_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mrna_attribute','mrna_attribute');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_three_prime_overlap','five_prime_three_prime_overlap');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('group_i_intron','group_i_intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('d_cluster','d_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('open_chromatin_region','open_chromatin_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('genomic_dna','genomic_dna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inside_intron','inside_intron');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('hammerhead_ribozyme','hammerhead_ribozyme');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_d_heptamer','five_prime_d_heptamer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('intronic_splice_enhancer','intronic_splice_enhancer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_adenosine','modified_adenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_carboxymethylaminomethyluridine','five_carboxymethylaminomethyluridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('repeat_region','repeat_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('repeat_unit','repeat_unit');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('double_stranded_dna_chromosome','double_stranded_dna_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('heritable_phenotypic_marker','heritable_phenotypic_marker');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('template_region','template_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('primary_transcript_region','primary_transcript_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mitochondrial_dna','mitochondrial_dna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcript_region','transcript_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('histone_acetylation_site','histone_acetylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ribozyme','ribozyme');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('matrix_attachment_site','matrix_attachment_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('imprinted','imprinted');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_sequence_variant','polypeptide_sequence_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('est','est');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rna_motif','rna_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_variation_site','polypeptide_variation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('class_i_rna','class_i_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('oligo','oligo');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('stop_codon_signal','stop_codon_signal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('hypoploid','hypoploid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('exemplar_mrna','exemplar_mrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('experimentally_defined_binding_region','experimentally_defined_binding_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('c_to_g_transversion','c_to_g_transversion');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('active_peptide','active_peptide');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mannosyl_queuosine','mannosyl_queuosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_with_stop_codon_redefined_as_pyrrolysine','gene_with_stop_codon_redefined_as_pyrrolysine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('queuosine','queuosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('lna_oligo','lna_oligo');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('independently_known','independently_known');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('proviral_region','proviral_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('capped','capped');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('minus_1_frameshift_variant','minus_1_frameshift_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('direction_attribute','direction_attribute');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('micronuclear_chromosome','micronuclear_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pseudogene_by_unequal_crossing_over','pseudogene_by_unequal_crossing_over');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('one_two_prime_o_dimethyladenosine','one_two_prime_o_dimethyladenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dpe_motif','dpe_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('frame_restoring_variant','frame_restoring_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('seryl_trna','seryl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('structural_variant','structural_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('regulatory_promoter_element','regulatory_promoter_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('integration_excision_site','integration_excision_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('noncoding_region_of_exon','noncoding_region_of_exon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rnase_mrp_rna','rnase_mrp_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nuclear_export_signal','nuclear_export_signal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_methoxycarbonylmethyluridine','five_methoxycarbonylmethyluridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('exon_of_single_exon_gene','exon_of_single_exon_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_with_dicistronic_primary_transcript','gene_with_dicistronic_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sequence_secondary_structure','sequence_secondary_structure');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('bacterial_rnapol_promoter_sigma_70','bacterial_rnapol_promoter_sigma_70');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tiling_path','tiling_path');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nuclear_sequence','nuclear_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('contig','contig');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('quality_value','quality_value');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('kozak_sequence','kozak_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('population_specific_variant','population_specific_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('catalytic_residue','catalytic_residue');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inversion_site','inversion_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('aspartic_acid','aspartic_acid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dif_site','dif_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mirna_gene','mirna_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('valyl_trna','valyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inverted_tandem_duplication','inverted_tandem_duplication');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cis_regulatory_frameshift_element','cis_regulatory_frameshift_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('minisatellite','minisatellite');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('assembly_component','assembly_component');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('low_complexity_region','low_complexity_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('morpholino_backbone','morpholino_backbone');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('designed_sequence','designed_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('n6_n6_2_prime_o_trimethyladenosine','n6_n6_2_prime_o_trimethyladenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rna_polymerase_promoter','rna_polymerase_promoter');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_gene_recombination_feature','v_gene_recombination_feature');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_carboxymethylaminomethyl_two_thiouridine','five_carboxymethylaminomethyl_two_thiouridine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('free_ring_duplication','free_ring_duplication');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('point_centromere','point_centromere');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dicistronic_mrna','dicistronic_mrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('interchromosomal','interchromosomal');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('uncharacterised_chromosomal_mutation','uncharacterised_chromosomal_mutation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_cis_splice_site','five_prime_cis_splice_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('octamer_motif','octamer_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('encodes_overlapping_peptides_different_start','encodes_overlapping_peptides_different_start');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ss_rna_viral_sequence','ss_rna_viral_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('indel','indel');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dicistronic_primary_transcript','dicistronic_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('protein_binding_site','protein_binding_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polycistronic','polycistronic');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('asparagine_trna_primary_transcript','asparagine_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('splice_enhancer','splice_enhancer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('aneuploid_chromosome','aneuploid_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('peroxywybutosine','peroxywybutosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_l_aspartic_acid','modified_l_aspartic_acid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('engineered_episome','engineered_episome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rnai_reagent','rnai_reagent');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rasirna','rasirna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('tmrna_region','tmrna_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('increased_transcript_level_variant','increased_transcript_level_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('bacterial_rnapol_promoter','bacterial_rnapol_promoter');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mitochondrial_sequence','mitochondrial_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('trinucleotide_repeat_microsatellite_feature','trinuc_repeat_microsat');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('post_translationally_regulated_by_protein_stability','post_translationally_regulated_by_protein_stability');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nc_primary_transcript','nc_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('iron_responsive_element','iron_responsive_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('v_d_dj_j_cluster','v_d_dj_j_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('forward','forward');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('proviral_location','proviral_location');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('histone_binding_site','histone_binding_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('promoter_element','promoter_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pse_motif','pse_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('beta_turn_type_eight','beta_turn_type_eight');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('double','double');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cds_supported_by_est_or_cdna_data','cds_supported_by_est_or_cdna_data');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('double_stranded_rna_chromosome','double_stranded_rna_chromosome');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('modified_l_glutamic_acid','modified_l_glutamic_acid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polypeptide_nest_motif','polypeptide_nest_motif');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('translational_frameshift','translational_frameshift');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_terminal_inverted_repeat','three_prime_terminal_inverted_repeat');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pseudogenic_trna','pseudogenic_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cap','cap');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_coding_exon','five_prime_coding_exon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('enzymatic','enzymatic');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('interior_exon','interior_exon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('genetic_marker','genetic_marker');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('a_to_g_transition','a_to_g_transition');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('two_methylthio_n6_hydroxynorvalyl_carbamoyladenosine','two_methylthio_n6_hydroxynorvalyl_carbamoyladenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('isre','isre');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('maternally_imprinted_gene','maternally_imprinted_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('circular','circular');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h_pseudoknot','h_pseudoknot');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('intermediate_element','intermediate_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcript','transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('pseudogene','pseudogene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('direct_repeat','direct_repeat');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('bacterial_terminator','bacterial_terminator');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('diplotype','diplotype');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('metal_binding_site','metal_binding_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dj_gene','dj_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('two_prime_o_methyladenosine','two_prime_o_methyladenosine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('splice_region_variant','splice_region_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('aspe_primer','aspe_primer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('restriction_enzyme_binding_site','restriction_enzyme_binding_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('bac','bac');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('dj_j_cluster','dj_j_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k36_dimethylation_site','h3k36_dimethylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('trans_splice_donor_site','trans_splice_donor_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_variant','gene_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('conformational_change_variant','conformational_change_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h3k36_monomethylation_site','h3k36_monomethylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nucleic_acid','nucleic_acid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('invalidated_by_chimeric_cdna','invalidated_by_chimeric_cdna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('histidine','histidine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_component_region','gene_component_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('primer_match','primer_match');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('trna_primary_transcript','trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('loxp_site','loxp_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('serine','serine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('propeptide','propeptide');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('five_prime_open_reading_frame','five_prime_open_reading_frame');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('schellmann_loop_six','schellmann_loop_six');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('shine_dalgarno_sequence','shine_dalgarno_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sp6_rna_polymerase_promoter','sp6_rna_polymerase_promoter');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('centromere_dna_element_iii','centromere_dna_element_iii');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('lysine_trna_primary_transcript','lysine_trna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('j_c_cluster','j_c_cluster');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('assortment_derived_deficiency','assortment_derived_deficiency');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mirna_primary_transcript','mirna_primary_transcript');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rrna_5s','rrna_5s');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('leucyl_trna','leucyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inverted_intrachromosomal_transposition','invert_intra_transposition');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('enzymatic_rna','enzymatic_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('germline_variant','germline_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('negatively_autoregulated','negatively_autoregulated');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('benign_variant','benign_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('anchor_region','anchor_region');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('exon','exon');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('beta_turn_type_six_a','beta_turn_type_six_a');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('random_sequence','random_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('partially_characterised_chromosomal_mutation','partially_characterised_chromosomal_mutation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rna','rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('core_promoter_element','core_promoter_element');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('restriction_enzyme_single_strand_overhang','restriction_enzyme_single_strand_overhang');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ss_oligo','ss_oligo');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('histone_methylation_site','histone_methylation_site');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('inversion_derived_duplication_plus_aneuploid','inversion_derived_duplication_plus_aneuploid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('transcript_bound_by_nucleic_acid','transcript_bound_by_nucleic_acid');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('intein_containing','intein_containing');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('h_aca_box_snorna_encoding','h_aca_box_snorna_encoding');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('rrna_cleavage_rna','rrna_cleavage_rna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('enhancer_trap_construct','enhancer_trap_construct');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gamma_turn_inverse','gamma_turn_inverse');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_d_nonamer','three_prime_d_nonamer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('paternal_variant','paternal_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('level_of_transcript_variant','level_of_transcript_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('selenocysteinyl_trna','selenocysteinyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_silenced_by_histone_methylation','gene_silenced_by_histone_methylation');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('u11_snrna','u11_snrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('scrna','scrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('gene_with_stop_codon_redefined_as_selenocysteine','gene_with_stop_codon_redefined_as_selenocysteine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('silencer','silencer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('sage_tag','sage_tag');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('mrna_with_minus_1_frameshift','mrna_with_minus_1_frameshift');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('nuclear_gene','nuclear_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('cds_supported_by_domain_match_data','cds_supported_by_domain_match_data');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('internal_shine_dalgarno_sequence','internal_shine_dalgarno_sequence');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('prolyl_trna','prolyl_trna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('lysidine','lysidine');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('beta_bulge','beta_bulge');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('post_translationally_regulated_by_protein_modification','post_translationally_regulated_by_protein_modification');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('splice_donor_variant','splice_donor_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('ncrna','ncrna');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('grna_gene','grna_gene');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('enhancer','enhancer');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('polymorphic_sequence_variant','polymorphic_sequence_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('three_prime_clip','three_prime_clip');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('frameshift_variant','frameshift_variant');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('insertional','insertional');
INSERT INTO sequence_cv_lookup_table (original_cvterm_name,relation_name) VALUES ('non_processed_pseudogene','non_processed_pseudogene');

CREATE INDEX sequence_cv_lookup_table_idx ON sequence_cv_lookup_table (original_cvterm_name);


SET search_path=public,pg_catalog;
-- DEPENDENCY:
--  chado/modules/bridges/sofa-bridge.sql

-- The standard Chado pattern for protein coding genes
-- is a feature of type 'gene' with 'mRNA' features as parts
-- REQUIRES: 'mrna' view from so-bridge.sql
CREATE OR REPLACE VIEW protein_coding_gene AS
 SELECT
  DISTINCT gene.*
 FROM
  feature AS gene
  INNER JOIN feature_relationship AS fr ON (gene.feature_id=fr.object_id)
  INNER JOIN so.mrna ON (mrna.feature_id=fr.subject_id);


-- introns are implicit from surrounding exons
-- combines intron features with location and parent transcript
-- the same intron appearing in multiple transcripts will appear
-- multiple times
CREATE VIEW intron_combined_view AS
 SELECT
  x1.feature_id         AS exon1_id,
  x2.feature_id         AS exon2_id,
  CASE WHEN l1.strand=-1  THEN l2.fmax ELSE l1.fmax END AS fmin,
  CASE WHEN l1.strand=-1  THEN l1.fmin ELSE l2.fmin END AS fmax,
  l1.strand             AS strand,
  l1.srcfeature_id      AS srcfeature_id,
  r1.rank               AS intron_rank,
  r1.object_id          AS transcript_id
 FROM
 cvterm
  INNER JOIN 
   feature                AS x1    ON (x1.type_id=cvterm.cvterm_id)
    INNER JOIN
     feature_relationship AS r1    ON (x1.feature_id=r1.subject_id)
    INNER JOIN
     featureloc           AS l1    ON (x1.feature_id=l1.feature_id)
  INNER JOIN
   feature                AS x2    ON (x2.type_id=cvterm.cvterm_id)
    INNER JOIN
     feature_relationship AS r2    ON (x2.feature_id=r2.subject_id)
    INNER JOIN
     featureloc           AS l2    ON (x2.feature_id=l2.feature_id)
 WHERE
  cvterm.name='exon'            AND
  (r2.rank - r1.rank) = 1       AND
  r1.object_id=r2.object_id     AND
  l1.strand = l2.strand         AND
  l1.srcfeature_id = l2.srcfeature_id         AND
  l1.locgroup=0                 AND
  l2.locgroup=0;

-- intron locations. intron IDs are the (exon1,exon2) ID pair
-- this means that introns may be counted twice if the start of
-- the 5' exon or the end of the 3' exon vary
-- introns shared by transcripts will not appear twice
CREATE VIEW intronloc_view AS
 SELECT DISTINCT
  exon1_id,
  exon2_id,
  fmin,
  fmax,
  strand,
  srcfeature_id
 FROM intron_combined_view;
CREATE OR REPLACE FUNCTION store_feature 
(INT,INT,INT,INT,
 INT,INT,VARCHAR,VARCHAR,INT,BOOLEAN)
 RETURNS INT AS 
'DECLARE
  v_srcfeature_id       ALIAS FOR $1;
  v_fmin                ALIAS FOR $2;
  v_fmax                ALIAS FOR $3;
  v_strand              ALIAS FOR $4;
  v_dbxref_id           ALIAS FOR $5;
  v_organism_id         ALIAS FOR $6;
  v_name                ALIAS FOR $7;
  v_uniquename          ALIAS FOR $8;
  v_type_id             ALIAS FOR $9;
  v_is_analysis         ALIAS FOR $10;
  v_feature_id          INT;
  v_featureloc_id       INT;
 BEGIN
    IF v_dbxref_id IS NULL THEN
      SELECT INTO v_feature_id feature_id
      FROM feature
      WHERE uniquename=v_uniquename     AND
            organism_id=v_organism_id   AND
            type_id=v_type_id;
    ELSE
      SELECT INTO v_feature_id feature_id
      FROM feature
      WHERE dbxref_id=v_dbxref_id;
    END IF;
    IF NOT FOUND THEN
      INSERT INTO feature
       ( dbxref_id           ,
         organism_id         ,
         name                ,
         uniquename          ,
         type_id             ,
         is_analysis         )
        VALUES
        ( v_dbxref_id           ,
          v_organism_id         ,
          v_name                ,
          v_uniquename          ,
          v_type_id             ,
          v_is_analysis         );
      v_feature_id = currval(''feature_feature_id_seq'');
    ELSE
      UPDATE feature SET
        dbxref_id   =  v_dbxref_id           ,
        organism_id =  v_organism_id         ,
        name        =  v_name                ,
        uniquename  =  v_uniquename          ,
        type_id     =  v_type_id             ,
        is_analysis =  v_is_analysis
      WHERE
        feature_id=v_feature_id;
    END IF;
  PERFORM store_featureloc(v_feature_id,
                           v_srcfeature_id,
                           v_fmin,
                           v_fmax,
                           v_strand,
                           0,
                           0);
  RETURN v_feature_id;
 END;
' LANGUAGE 'plpgsql';


CREATE OR REPLACE FUNCTION store_featureloc
(INT,INT,INT,INT,INT,INT,INT)
 RETURNS INT AS 
'DECLARE
  v_feature_id          ALIAS FOR $1;
  v_srcfeature_id       ALIAS FOR $2;
  v_fmin                ALIAS FOR $3;
  v_fmax                ALIAS FOR $4;
  v_strand              ALIAS FOR $5;
  v_rank                ALIAS FOR $6;
  v_locgroup            ALIAS FOR $7;
  v_featureloc_id       INT;
 BEGIN
    IF v_feature_id IS NULL THEN RAISE EXCEPTION ''feature_id cannot be null'';
    END IF;
    SELECT INTO v_featureloc_id featureloc_id
      FROM featureloc
      WHERE feature_id=v_feature_id     AND
            rank=v_rank                 AND
            locgroup=v_locgroup;
    IF NOT FOUND THEN
      INSERT INTO featureloc
        ( feature_id,
          srcfeature_id,
          fmin,
          fmax,
          strand,
          rank,
          locgroup)
        VALUES
        (  v_feature_id,
           v_srcfeature_id,
           v_fmin,
           v_fmax,
           v_strand,
           v_rank,
           v_locgroup);
      v_featureloc_id = currval(''featureloc_featureloc_id_seq'');
    ELSE
      UPDATE featureloc SET
        feature_id    =  v_feature_id,
        srcfeature_id =  v_srcfeature_id,
        fmin          =  v_fmin,
        fmax          =  v_fmax,
        strand        =  v_strand,
        rank          =  v_rank,
        locgroup      =  v_locgroup
      WHERE
        featureloc_id=v_featureloc_id;
    END IF;
  RETURN v_featureloc_id;
 END;
' LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION store_feature_synonym
(INT,VARCHAR,INT,BOOLEAN,BOOLEAN,INT)
 RETURNS INT AS 
'DECLARE
  v_feature_id          ALIAS FOR $1;
  v_syn                 ALIAS FOR $2;
  v_type_id             ALIAS FOR $3;
  v_is_current          ALIAS FOR $4;
  v_is_internal         ALIAS FOR $5;
  v_pub_id              ALIAS FOR $6;
  v_synonym_id          INT;
  v_feature_synonym_id  INT;
 BEGIN
    IF v_feature_id IS NULL THEN RAISE EXCEPTION ''feature_id cannot be null'';
    END IF;
    SELECT INTO v_synonym_id synonym_id
      FROM synonym
      WHERE name=v_syn                  AND
            type_id=v_type_id;
    IF NOT FOUND THEN
      INSERT INTO synonym
        ( name,
          synonym_sgml,
          type_id)
        VALUES
        ( v_syn,
          v_syn,
          v_type_id);
      v_synonym_id = currval(''synonym_synonym_id_seq'');
    END IF;
    SELECT INTO v_feature_synonym_id feature_synonym_id
        FROM feature_synonym
        WHERE feature_id=v_feature_id   AND
              synonym_id=v_synonym_id   AND
              pub_id=v_pub_id;
    IF NOT FOUND THEN
      INSERT INTO feature_synonym
        ( feature_id,
          synonym_id,
          pub_id,
          is_current,
          is_internal)
        VALUES
        ( v_feature_id,
          v_synonym_id,
          v_pub_id,
          v_is_current,
          v_is_internal);
      v_feature_synonym_id = currval(''feature_synonym_feature_synonym_id_seq'');
    ELSE
      UPDATE feature_synonym
        SET is_current=v_is_current, is_internal=v_is_internal
        WHERE feature_synonym_id=v_feature_synonym_id;
    END IF;
  RETURN v_feature_synonym_id;
 END;
' LANGUAGE 'plpgsql';



-- dependency_on: [sequtil,sequence-cv-helper]

CREATE OR REPLACE FUNCTION subsequence(bigint,bigint,bigint,INT)
 RETURNS TEXT AS
 'SELECT 
  CASE WHEN $4<0 
   THEN reverse_complement(substring(srcf.residues,CAST(($2+1) as int),CAST(($3-$2) as int)))
   ELSE substring(residues,CAST(($2+1) as int),CAST(($3-$2) as int))
  END AS residues
  FROM feature AS srcf
  WHERE
   srcf.feature_id=$1'
LANGUAGE 'sql';

CREATE OR REPLACE FUNCTION subsequence_by_featureloc(bigint)
 RETURNS TEXT AS
 'SELECT 
  CASE WHEN strand<0 
   THEN reverse_complement(substring(srcf.residues,CAST(fmin+1 as int),CAST((fmax-fmin) as int)))
   ELSE substring(srcf.residues,CAST(fmin+1 as int),CAST((fmax-fmin) as int))
  END AS residues
  FROM feature AS srcf
   INNER JOIN featureloc ON (srcf.feature_id=featureloc.srcfeature_id)
  WHERE
   featureloc_id=$1'
LANGUAGE 'sql';

CREATE OR REPLACE FUNCTION subsequence_by_feature(bigint,INT,INT)
 RETURNS TEXT AS
 'SELECT 
  CASE WHEN strand<0 
   THEN reverse_complement(substring(srcf.residues,CAST(fmin+1 as int),CAST((fmax-fmin) as int)))
   ELSE substring(srcf.residues,CAST(fmin+1 as int),CAST((fmax-fmin) as int))
  END AS residues
  FROM feature AS srcf
   INNER JOIN featureloc ON (srcf.feature_id=featureloc.srcfeature_id)
  WHERE
   featureloc.feature_id=$1 AND
   featureloc.rank=$2 AND
   featureloc.locgroup=$3'
LANGUAGE 'sql';

CREATE OR REPLACE FUNCTION subsequence_by_feature(bigint)
 RETURNS TEXT AS 'SELECT subsequence_by_feature($1,0,0)'
LANGUAGE 'sql';

-- based on subfeature sets:

-- constrained by feature_relationship.type_id
--   (allows user to construct queries that only get subsequences of
--    part_of subfeatures)

CREATE OR REPLACE FUNCTION subsequence_by_subfeatures(bigint,bigint,INT,INT)
 RETURNS TEXT AS '
DECLARE v_feature_id ALIAS FOR $1;
DECLARE v_rtype_id   ALIAS FOR $2;
DECLARE v_rank       ALIAS FOR $3;
DECLARE v_locgroup   ALIAS FOR $4;
DECLARE subseq       TEXT;
DECLARE seqrow       RECORD;
BEGIN 
  subseq = '''';
 FOR seqrow IN
   SELECT
    CASE WHEN strand<0 
     THEN reverse_complement(substring(srcf.residues,CAST(fmin+1 as int),CAST((fmax-fmin) as int)))
     ELSE substring(srcf.residues,CAST(fmin+1 as int),CAST((fmax-fmin) as int))
    END AS residues
    FROM feature AS srcf
     INNER JOIN featureloc ON (srcf.feature_id=featureloc.srcfeature_id)
     INNER JOIN feature_relationship AS fr
       ON (fr.subject_id=featureloc.feature_id)
    WHERE
     fr.object_id=v_feature_id AND
     fr.type_id=v_rtype_id AND
     featureloc.rank=v_rank AND
     featureloc.locgroup=v_locgroup
    ORDER BY fr.rank
  LOOP
   subseq = subseq  || seqrow.residues;
  END LOOP;
 RETURN subseq;
END
'
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION subsequence_by_subfeatures(bigint,bigint)
 RETURNS TEXT AS
 'SELECT subsequence_by_subfeatures($1,$2,0,0)'
LANGUAGE 'sql';

CREATE OR REPLACE FUNCTION subsequence_by_subfeatures(bigint)
 RETURNS TEXT AS
'
SELECT subsequence_by_subfeatures($1,get_feature_relationship_type_id(''part_of''),0,0)
'
LANGUAGE 'sql';


-- constrained by subfeature.type_id (eg exons of a transcript)
CREATE OR REPLACE FUNCTION subsequence_by_typed_subfeatures(bigint,bigint,INT,INT)
 RETURNS TEXT AS '
DECLARE v_feature_id ALIAS FOR $1;
DECLARE v_ftype_id   ALIAS FOR $2;
DECLARE v_rank       ALIAS FOR $3;
DECLARE v_locgroup   ALIAS FOR $4;
DECLARE subseq       TEXT;
DECLARE seqrow       RECORD;
BEGIN 
  subseq = '''';
 FOR seqrow IN
   SELECT
    CASE WHEN strand<0 
     THEN reverse_complement(substring(srcf.residues,CAST(fmin+1 as int),CAST((fmax-fmin) as int)))
     ELSE substring(srcf.residues,CAST(fmin+1 as int),CAST((fmax-fmin) as int))
    END AS residues
  FROM feature AS srcf
   INNER JOIN featureloc ON (srcf.feature_id=featureloc.srcfeature_id)
   INNER JOIN feature AS subf ON (subf.feature_id=featureloc.feature_id)
   INNER JOIN feature_relationship AS fr ON (fr.subject_id=subf.feature_id)
  WHERE
     fr.object_id=v_feature_id AND
     subf.type_id=v_ftype_id AND
     featureloc.rank=v_rank AND
     featureloc.locgroup=v_locgroup
  ORDER BY fr.rank
   LOOP
   subseq = subseq  || seqrow.residues;
  END LOOP;
 RETURN subseq;
END
'
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION subsequence_by_typed_subfeatures(bigint,bigint)
 RETURNS TEXT AS
 'SELECT subsequence_by_typed_subfeatures($1,$2,0,0)'
LANGUAGE 'sql';

 


CREATE OR REPLACE FUNCTION feature_subalignments(bigint) RETURNS SETOF featureloc AS '
DECLARE
  return_data featureloc%ROWTYPE;
  f_id ALIAS FOR $1;
  feature_data feature%rowtype;
  featureloc_data featureloc%rowtype;

  s text;

  fmin bigint;
  slen bigint;
BEGIN
  --RAISE NOTICE ''feature_id is %'', featureloc_data.feature_id;
  SELECT INTO feature_data * FROM feature WHERE feature_id = f_id;

  FOR featureloc_data IN SELECT * FROM featureloc WHERE feature_id = f_id LOOP

    --RAISE NOTICE ''fmin is %'', featureloc_data.fmin;

    return_data.feature_id      = f_id;
    return_data.srcfeature_id   = featureloc_data.srcfeature_id;
    return_data.is_fmin_partial = featureloc_data.is_fmin_partial;
    return_data.is_fmax_partial = featureloc_data.is_fmax_partial;
    return_data.strand          = featureloc_data.strand;
    return_data.phase           = featureloc_data.phase;
    return_data.residue_info    = featureloc_data.residue_info;
    return_data.locgroup        = featureloc_data.locgroup;
    return_data.rank            = featureloc_data.rank;

    s = feature_data.residues;
    fmin = featureloc_data.fmin;
    slen = char_length(s);

    WHILE char_length(s) LOOP
      --RAISE NOTICE ''residues is %'', s;

      --trim off leading match
      s = trim(leading ''|ATCGNatcgn'' from s);
      --if leading match detected
      IF slen > char_length(s) THEN
        return_data.fmin = fmin;
        return_data.fmax = featureloc_data.fmin + (slen - char_length(s));

        --if the string started with a match, return it,
        --otherwise, trim the gaps first (ie do not return this iteration)
        RETURN NEXT return_data;
      END IF;

      --trim off leading gap
      s = trim(leading ''-'' from s);

      fmin = featureloc_data.fmin + (slen - char_length(s));
    END LOOP;
  END LOOP;

  RETURN;

END;
' LANGUAGE 'plpgsql';
CREATE SCHEMA frange;
SET search_path = frange,public,pg_catalog;

CREATE TABLE featuregroup (
    featuregroup_id bigserial not null,
    primary key (featuregroup_id),

    subject_id bigint not null,
    foreign key (subject_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,

    object_id bigint not null,
    foreign key (object_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,

    group_id bigint not null,
    foreign key (group_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,

    srcfeature_id bigint null,
    foreign key (srcfeature_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,

    fmin bigint null,
    fmax bigint null,
    strand int null,
    is_root int not null default 0,

    constraint featuregroup_c1 unique (subject_id,object_id,group_id,srcfeature_id,fmin,fmax,strand)
);
CREATE INDEX featuregroup_idx1 ON featuregroup (subject_id);
CREATE INDEX featuregroup_idx2 ON featuregroup (object_id);
CREATE INDEX featuregroup_idx3 ON featuregroup (group_id);
CREATE INDEX featuregroup_idx4 ON featuregroup (srcfeature_id);
CREATE INDEX featuregroup_idx5 ON featuregroup (strand);
CREATE INDEX featuregroup_idx6 ON featuregroup (is_root);

CREATE OR REPLACE FUNCTION groupoverlaps(bigint, bigint, varchar) RETURNS setof featuregroup AS '
  SELECT g2.*
  FROM  featuregroup g1,
        featuregroup g2
  WHERE g1.is_root = 1
    AND ( g1.srcfeature_id = g2.srcfeature_id OR g2.srcfeature_id IS NULL )
    AND g1.group_id = g2.group_id
    AND g1.srcfeature_id = (SELECT feature_id FROM feature WHERE uniquename = $3)
    AND boxquery($1, $2) @ boxrange(g1.fmin,g2.fmax)
' LANGUAGE 'sql';

CREATE OR REPLACE FUNCTION groupcontains(bigint, bigint, varchar) RETURNS setof featuregroup AS '
  SELECT *
  FROM groupoverlaps($1,$2,$3)
  WHERE fmin <= $1 AND fmax >= $2
' LANGUAGE 'sql';

CREATE OR REPLACE FUNCTION groupinside(bigint, bigint, varchar) RETURNS setof featuregroup AS '
  SELECT *
  FROM groupoverlaps($1,$2,$3)
  WHERE fmin >= $1 AND fmax <= $2
' LANGUAGE 'sql';

CREATE OR REPLACE FUNCTION groupidentical(bigint, bigint, varchar) RETURNS setof featuregroup AS '
  SELECT *
  FROM groupoverlaps($1,$2,$3)
  WHERE fmin = $1 AND fmax = $2
' LANGUAGE 'sql';

CREATE OR REPLACE FUNCTION groupoverlaps(bigint, bigint) RETURNS setof featuregroup AS '
  SELECT *
  FROM featuregroup
  WHERE is_root = 1
    AND boxquery($1, $2) @ boxrange(fmin,fmax)
' LANGUAGE 'sql';

CREATE OR REPLACE FUNCTION groupoverlaps(_int8, _int8, _varchar) RETURNS setof featuregroup AS '
DECLARE
    mins alias for $1;
    maxs alias for $2;
    srcs alias for $3;
    f featuregroup%ROWTYPE;
    i int;
    s int;
BEGIN
    i := 1;
    FOR i in array_lower( mins, 1 ) .. array_upper( mins, 1 ) LOOP
        SELECT INTO s feature_id FROM feature WHERE uniquename = srcs[i];
        FOR f IN
            SELECT *
            FROM  featuregroup WHERE group_id IN (
                SELECT group_id FROM featuregroup
                WHERE (srcfeature_id = s OR srcfeature_id IS NULL)
                  AND group_id IN (
                      SELECT group_id FROM groupoverlaps( mins[i], maxs[i] )
                      WHERE  srcfeature_id = s
                  )
            )
        LOOP
            RETURN NEXT f;
        END LOOP;
    END LOOP;
    RETURN;
END;
' LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION groupcontains(_int8, _int8, _varchar) RETURNS setof featuregroup AS '
DECLARE
    mins alias for $1;
    maxs alias for $2;
    srcs alias for $3;
    f featuregroup%ROWTYPE;
    i int;
    s int;
BEGIN
    i := 1;
    FOR i in array_lower( mins, 1 ) .. array_upper( mins, 1 ) LOOP
        SELECT INTO s feature_id FROM feature WHERE uniquename = srcs[i];
        FOR f IN
            SELECT *
            FROM  featuregroup WHERE group_id IN (
                SELECT group_id FROM featuregroup
                WHERE (srcfeature_id = s OR srcfeature_id IS NULL)
                  AND fmin <= mins[i]
                  AND fmax >= maxs[i]
                  AND group_id IN (
                      SELECT group_id FROM groupoverlaps( mins[i], maxs[i] )
                      WHERE  srcfeature_id = s
                  )
            )
        LOOP
            RETURN NEXT f;
        END LOOP;
    END LOOP;
    RETURN;
END;
' LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION groupinside(_int8, _int8, _varchar) RETURNS setof featuregroup AS '
DECLARE
    mins alias for $1;
    maxs alias for $2;
    srcs alias for $3;
    f featuregroup%ROWTYPE;
    i int;
    s int;
BEGIN
    i := 1;
    FOR i in array_lower( mins, 1 ) .. array_upper( mins, 1 ) LOOP
        SELECT INTO s feature_id FROM feature WHERE uniquename = srcs[i];
        FOR f IN
            SELECT *
            FROM  featuregroup WHERE group_id IN (
                SELECT group_id FROM featuregroup
                WHERE (srcfeature_id = s OR srcfeature_id IS NULL)
                  AND fmin >= mins[i]
                  AND fmax <= maxs[i]
                  AND group_id IN (
                      SELECT group_id FROM groupoverlaps( mins[i], maxs[i] )
                      WHERE  srcfeature_id = s
                  )
            )
        LOOP
            RETURN NEXT f;
        END LOOP;
    END LOOP;
    RETURN;
END;
' LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION groupidentical(_int8, _int8, _varchar) RETURNS setof featuregroup AS '
DECLARE
    mins alias for $1;
    maxs alias for $2;
    srcs alias for $3;
    f featuregroup%ROWTYPE;
    i int;
    s int;
BEGIN
    i := 1;
    FOR i in array_lower( mins, 1 ) .. array_upper( mins, 1 ) LOOP
        SELECT INTO s feature_id FROM feature WHERE uniquename = srcs[i];
        FOR f IN
            SELECT *
            FROM  featuregroup WHERE group_id IN (
                SELECT group_id FROM featuregroup
                WHERE (srcfeature_id = s OR srcfeature_id IS NULL)
                  AND fmin = mins[i]
                  AND fmax = maxs[i]
                  AND group_id IN (
                      SELECT group_id FROM groupoverlaps( mins[i], maxs[i] )
                      WHERE  srcfeature_id = s
                  )
            )
        LOOP
            RETURN NEXT f;
        END LOOP;
    END LOOP;
    RETURN;
END;
' LANGUAGE 'plpgsql';

--functional index that depends on the above functions
CREATE INDEX bingroup_boxrange ON featuregroup USING gist (boxrange(fmin, fmax)) WHERE is_root = 1;

CREATE OR REPLACE FUNCTION _fill_featuregroup(bigint, bigint) RETURNS INTEGER AS '
DECLARE
    groupid alias for $1;
    parentid alias for $2;
    g featuregroup%ROWTYPE;
BEGIN
    FOR g IN
        SELECT DISTINCT 0, fr.subject_id, fr.object_id, groupid, fl.srcfeature_id, fl.fmin, fl.fmax, fl.strand, 0
        FROM  feature_relationship AS fr,
              featureloc AS fl
        WHERE fr.object_id = parentid
          AND fr.subject_id = fl.feature_id
    LOOP
        INSERT INTO featuregroup
            (subject_id, object_id, group_id, srcfeature_id, fmin, fmax, strand, is_root)
        VALUES
            (g.subject_id, g.object_id, g.group_id, g.srcfeature_id, g.fmin, g.fmax, g.strand, 0);
        PERFORM _fill_featuregroup(groupid,g.subject_id);
    END LOOP;
    RETURN 1;
END;
' LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION fill_featuregroup() RETURNS INTEGER AS '
DECLARE
    p featuregroup%ROWTYPE;
    l featureloc%ROWTYPE;
    isa bigint;
    -- c int;  the c variable isnt used
BEGIN
    TRUNCATE featuregroup;
    SELECT INTO isa cvterm_id FROM cvterm WHERE (name = ''isa'' OR name = ''is_a'');

    -- Recursion is the biggest performance killer for this function.
    -- We can dodge the first round of recursion using the "fr1 / GROUP BY" approach.
    -- Luckily, most feature graphs are only 2 levels deep, so most recursion is
    -- avoidable.

    RAISE NOTICE ''Loading root and singleton features.'';
    FOR p IN
        SELECT DISTINCT 0, f.feature_id, f.feature_id, f.feature_id, srcfeature_id, fmin, fmax, strand, 1
        FROM feature AS f
        LEFT JOIN feature_relationship ON (f.feature_id = object_id)
        LEFT JOIN featureloc           ON (f.feature_id = featureloc.feature_id)
        WHERE f.feature_id NOT IN ( SELECT subject_id FROM feature_relationship )
          AND srcfeature_id IS NOT NULL
    LOOP
        INSERT INTO featuregroup
            (subject_id, object_id, group_id, srcfeature_id, fmin, fmax, strand, is_root)
        VALUES
            (p.object_id, p.object_id, p.object_id, p.srcfeature_id, p.fmin, p.fmax, p.strand, 1);
    END LOOP;

    RAISE NOTICE ''Loading child features.  If your database contains grandchild'';
    RAISE NOTICE ''features, they will be loaded recursively and may take a long time.'';

    FOR p IN
        SELECT DISTINCT 0, fr0.subject_id, fr0.object_id, fr0.object_id, fl.srcfeature_id, fl.fmin, fl.fmax, fl.strand, count(fr1.subject_id)
        FROM  feature_relationship AS fr0
        LEFT JOIN feature_relationship AS fr1 ON ( fr0.subject_id = fr1.object_id),
        featureloc AS fl
        WHERE fr0.subject_id = fl.feature_id
          AND fr0.object_id IN (
                  SELECT f.feature_id
                  FROM feature AS f
                  LEFT JOIN feature_relationship ON (f.feature_id = object_id)
                  LEFT JOIN featureloc           ON (f.feature_id = featureloc.feature_id)
                  WHERE f.feature_id NOT IN ( SELECT subject_id FROM feature_relationship )
                    AND f.feature_id     IN ( SELECT object_id  FROM feature_relationship )
                    AND srcfeature_id IS NOT NULL
              )
        GROUP BY fr0.subject_id, fr0.object_id, fl.srcfeature_id, fl.fmin, fl.fmax, fl.strand
    LOOP
        INSERT INTO featuregroup
            (subject_id, object_id, group_id, srcfeature_id, fmin, fmax, strand, is_root)
        VALUES
            (p.subject_id, p.object_id, p.object_id, p.srcfeature_id, p.fmin, p.fmax, p.strand, 0);
        IF ( p.is_root > 0 ) THEN
            PERFORM _fill_featuregroup(p.subject_id,p.subject_id);
        END IF;
    END LOOP;

    RETURN 1;
END;   
' LANGUAGE 'plpgsql';

SET search_path = public,pg_catalog;
--- create ontology that has instantiated located_sequence_feature part of SO
--- way as it is written, the function can not be execute more than once in one connection
--- when you get error like ERROR:  relation with OID NNNNN does not exist
--- as this is not meant to execute >1 times in one session so it should never happen
--- except at testing and test failed
--- disconnect and try again, in other words, it can NOT be executed >1 time in one connection
--- if using EXECUTE, we can avoid this problem but code is hard to write and read (lots of ', escape char)

--NOTE: private, don't call directly as relying on having temp table tmpcvtr

--DROP TYPE soi_type CASCADE;
CREATE TYPE soi_type AS (
    type_id bigint,
    subject_id bigint,
    object_id bigint
);

CREATE OR REPLACE FUNCTION _fill_cvtermpath4soinode(BIGINT, BIGINT, BIGINT, BIGINT, INTEGER) RETURNS INTEGER AS
'
DECLARE
    origin alias for $1;
    child_id alias for $2;
    cvid alias for $3;
    typeid alias for $4;
    depth alias for $5;
    cterm soi_type%ROWTYPE;
    exist_c int;

BEGIN

    --RAISE NOTICE ''depth=% o=%, root=%, cv=%, t=%'', depth,origin,child_id,cvid,typeid;
    SELECT INTO exist_c count(*) FROM cvtermpath WHERE cv_id = cvid AND object_id = origin AND subject_id = child_id AND pathdistance = depth;
    --- longest path
    IF (exist_c > 0) THEN
        UPDATE cvtermpath SET pathdistance = depth WHERE cv_id = cvid AND object_id = origin AND subject_id = child_id;
    ELSE
        INSERT INTO cvtermpath (object_id, subject_id, cv_id, type_id, pathdistance) VALUES(origin, child_id, cvid, typeid, depth);
    END IF;

    FOR cterm IN SELECT tmp_type AS type_id, subject_id FROM tmpcvtr WHERE object_id = child_id LOOP
        PERFORM _fill_cvtermpath4soinode(origin, cterm.subject_id, cvid, cterm.type_id, depth+1);
    END LOOP;
    RETURN 1;
END;
'
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION _fill_cvtermpath4soi(BIGINT, BIGINT) RETURNS INTEGER AS
'
DECLARE
    rootid alias for $1;
    cvid alias for $2;
    ttype bigint;
    cterm soi_type%ROWTYPE;

BEGIN
    
    SELECT INTO ttype cvterm_id FROM cvterm WHERE name = ''isa'';
    --RAISE NOTICE ''got ttype %'',ttype;
    PERFORM _fill_cvtermpath4soinode(rootid, rootid, cvid, ttype, 0);
    FOR cterm IN SELECT tmp_type AS type_id, subject_id FROM tmpcvtr WHERE object_id = rootid LOOP
        PERFORM _fill_cvtermpath4soi(cterm.subject_id, cvid);
    END LOOP;
    RETURN 1;
END;   
'
LANGUAGE 'plpgsql';

--- use tmpcvtr to temp store soi (virtural ontology)
--- using tmp tables is faster than using recursive function to create feature type relationship
--- since it gets feature type rel set by set instead of one by one
--- and getting feature type rel is very expensive
--- call _fillcvtermpath4soi to create path for the virtual ontology

CREATE OR REPLACE FUNCTION create_soi() RETURNS INTEGER AS
'
DECLARE
    parent soi_type%ROWTYPE;
    isa_id cvterm.cvterm_id%TYPE;
    soi_term TEXT := ''soi'';
    soi_def TEXT := ''ontology of SO feature instantiated in database'';
    soi_cvid bigint;
    soiterm_id bigint;
    pcount INTEGER;
    count INTEGER := 0;
    cquery TEXT;
BEGIN

    SELECT INTO isa_id cvterm_id FROM cvterm WHERE name = ''isa'';

    SELECT INTO soi_cvid cv_id FROM cv WHERE name = soi_term;
    IF (soi_cvid > 0) THEN
        DELETE FROM cvtermpath WHERE cv_id = soi_cvid;
        DELETE FROM cvterm WHERE cv_id = soi_cvid;
    ELSE
        INSERT INTO cv (name, definition) VALUES(soi_term, soi_def);
    END IF;
    SELECT INTO soi_cvid cv_id FROM cv WHERE name = soi_term;
    INSERT INTO cvterm (name, cv_id) VALUES(soi_term, soi_cvid);
    SELECT INTO soiterm_id cvterm_id FROM cvterm WHERE name = soi_term;

    CREATE TEMP TABLE tmpcvtr (tmp_type BIGINT, type_id bigint, subject_id bigint, object_id bigint);
    CREATE UNIQUE INDEX u_tmpcvtr ON tmpcvtr(subject_id, object_id);

    INSERT INTO tmpcvtr (tmp_type, type_id, subject_id, object_id)
        SELECT DISTINCT isa_id, soiterm_id, f.type_id, soiterm_id FROM feature f, cvterm t
        WHERE f.type_id = t.cvterm_id AND f.type_id > 0;
    EXECUTE ''select * from tmpcvtr where type_id = '' || soiterm_id || '';'';
    get diagnostics pcount = row_count;
    raise notice ''all types in feature %'',pcount;
--- do it hard way, delete any child feature type from above (NOT IN clause did not work)
    FOR parent IN SELECT DISTINCT 0, t.cvterm_id, 0 FROM feature c, feature_relationship fr, cvterm t
            WHERE t.cvterm_id = c.type_id AND c.feature_id = fr.subject_id LOOP
        DELETE FROM tmpcvtr WHERE type_id = soiterm_id and object_id = soiterm_id
            AND subject_id = parent.subject_id;
    END LOOP;
    EXECUTE ''select * from tmpcvtr where type_id = '' || soiterm_id || '';'';
    get diagnostics pcount = row_count;
    raise notice ''all types in feature after delete child %'',pcount;

    --- create feature type relationship (store in tmpcvtr)
    CREATE TEMP TABLE tmproot (cv_id bigint not null, cvterm_id bigint not null, status INTEGER DEFAULT 0);
    cquery := ''SELECT * FROM tmproot tmp WHERE tmp.status = 0;'';
    ---temp use tmpcvtr to hold instantiated SO relationship for speed
    ---use soterm_id as type_id, will delete from tmpcvtr
    ---us tmproot for this as well
    INSERT INTO tmproot (cv_id, cvterm_id, status) SELECT DISTINCT soi_cvid, c.subject_id, 0 FROM tmpcvtr c
        WHERE c.object_id = soiterm_id;
    EXECUTE cquery;
    GET DIAGNOSTICS pcount = ROW_COUNT;
    WHILE (pcount > 0) LOOP
        RAISE NOTICE ''num child temp (to be inserted) in tmpcvtr: %'',pcount;
        INSERT INTO tmpcvtr (tmp_type, type_id, subject_id, object_id)
            SELECT DISTINCT fr.type_id, soiterm_id, c.type_id, p.cvterm_id FROM feature c, feature_relationship fr,
            tmproot p, feature pf, cvterm t WHERE c.feature_id = fr.subject_id AND fr.object_id = pf.feature_id
            AND p.cvterm_id = pf.type_id AND t.cvterm_id = c.type_id AND p.status = 0;
        UPDATE tmproot SET status = 1 WHERE status = 0;
        INSERT INTO tmproot (cv_id, cvterm_id, status)
            SELECT DISTINCT soi_cvid, c.type_id, 0 FROM feature c, feature_relationship fr,
            tmproot tmp, feature p, cvterm t WHERE c.feature_id = fr.subject_id AND fr.object_id = p.feature_id
            AND tmp.cvterm_id = p.type_id AND t.cvterm_id = c.type_id AND tmp.status = 1;
        UPDATE tmproot SET status = 2 WHERE status = 1;
        EXECUTE cquery;
        GET DIAGNOSTICS pcount = ROW_COUNT; 
    END LOOP;
    DELETE FROM tmproot;

    ---get transitive closure for soi
    PERFORM _fill_cvtermpath4soi(soiterm_id, soi_cvid);

    DROP TABLE tmpcvtr;
    DROP TABLE tmproot;

    RETURN 1;
END;
'
LANGUAGE 'plpgsql';

---bad precedence: change customed type name
---drop here to remove old function
--DROP TYPE feature_by_cvt_type CASCADE;
--DROP TYPE fxgsfids_type CASCADE;

--DROP TYPE feature_by_fx_type CASCADE;
CREATE TYPE feature_by_fx_type AS (
    feature_id bigint,
    depth INT
);

CREATE OR REPLACE FUNCTION get_sub_feature_ids(text) RETURNS SETOF feature_by_fx_type AS
'
DECLARE
    sql alias for $1;
    myrc feature_by_fx_type%ROWTYPE;
    myrc2 feature_by_fx_type%ROWTYPE;

BEGIN
    FOR myrc IN EXECUTE sql LOOP
        FOR myrc2 IN SELECT * FROM get_sub_feature_ids(myrc.feature_id) LOOP
            RETURN NEXT myrc2;
        END LOOP;
    END LOOP;
    RETURN;
END;
'
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION get_up_feature_ids(text) RETURNS SETOF feature_by_fx_type AS
'
DECLARE
    sql alias for $1;
    myrc feature_by_fx_type%ROWTYPE;
    myrc2 feature_by_fx_type%ROWTYPE;

BEGIN
    FOR myrc IN EXECUTE sql LOOP
        FOR myrc2 IN SELECT * FROM get_up_feature_ids(myrc.feature_id) LOOP
            RETURN NEXT myrc2;
        END LOOP;
    END LOOP;
    RETURN;
END;
'
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION get_feature_ids(text) RETURNS SETOF feature_by_fx_type AS
'
DECLARE
    sql alias for $1;
    myrc feature_by_fx_type%ROWTYPE;
    myrc2 feature_by_fx_type%ROWTYPE;
    myrc3 feature_by_fx_type%ROWTYPE;

BEGIN

    FOR myrc IN EXECUTE sql LOOP
        RETURN NEXT myrc;
        FOR myrc2 IN SELECT * FROM get_up_feature_ids(myrc.feature_id) LOOP
            RETURN NEXT myrc2;
        END LOOP;
        FOR myrc3 IN SELECT * FROM get_sub_feature_ids(myrc.feature_id) LOOP
            RETURN NEXT myrc3;
        END LOOP;
    END LOOP;
    RETURN;
END;
'
LANGUAGE 'plpgsql';


CREATE OR REPLACE FUNCTION get_sub_feature_ids(bigint) RETURNS SETOF feature_by_fx_type AS
'
DECLARE
    root alias for $1;
    myrc feature_by_fx_type%ROWTYPE;
    myrc2 feature_by_fx_type%ROWTYPE;

BEGIN
    FOR myrc IN SELECT DISTINCT subject_id AS feature_id FROM feature_relationship WHERE object_id = root LOOP
        RETURN NEXT myrc;
        FOR myrc2 IN SELECT * FROM get_sub_feature_ids(myrc.feature_id) LOOP
            RETURN NEXT myrc2;
        END LOOP;
    END LOOP;
    RETURN;
END;
'
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION get_up_feature_ids(bigint) RETURNS SETOF feature_by_fx_type AS
'
DECLARE
    leaf alias for $1;
    myrc feature_by_fx_type%ROWTYPE;
    myrc2 feature_by_fx_type%ROWTYPE;
BEGIN
    FOR myrc IN SELECT DISTINCT object_id AS feature_id FROM feature_relationship WHERE subject_id = leaf LOOP
        RETURN NEXT myrc;
        FOR myrc2 IN SELECT * FROM get_up_feature_ids(myrc.feature_id) LOOP
            RETURN NEXT myrc2;
        END LOOP;
    END LOOP;
    RETURN;
END;
'
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION get_sub_feature_ids(bigint, integer) RETURNS SETOF feature_by_fx_type AS
'
DECLARE
    root alias for $1;
    depth alias for $2;
    myrc feature_by_fx_type%ROWTYPE;
    myrc2 feature_by_fx_type%ROWTYPE;

BEGIN
    FOR myrc IN SELECT DISTINCT subject_id AS feature_id, depth FROM feature_relationship WHERE object_id = root LOOP
        RETURN NEXT myrc;
        FOR myrc2 IN SELECT * FROM get_sub_feature_ids(myrc.feature_id,depth+1) LOOP
            RETURN NEXT myrc2;
        END LOOP;
    END LOOP;
    RETURN;
END;
'
LANGUAGE 'plpgsql';

--- depth is reversed and meanless when union with results from get_sub_feature_ids
CREATE OR REPLACE FUNCTION get_up_feature_ids(bigint, integer) RETURNS SETOF feature_by_fx_type AS
'
DECLARE
    leaf alias for $1;
    depth alias for $2;
    myrc feature_by_fx_type%ROWTYPE;
    myrc2 feature_by_fx_type%ROWTYPE;
BEGIN
    FOR myrc IN SELECT DISTINCT object_id AS feature_id, depth FROM feature_relationship WHERE subject_id = leaf LOOP
        RETURN NEXT myrc;
        FOR myrc2 IN SELECT * FROM get_up_feature_ids(myrc.feature_id,depth+1) LOOP
            RETURN NEXT myrc2;
        END LOOP;
    END LOOP;
    RETURN;
END;
'
LANGUAGE 'plpgsql';

--- children feature ids only (not include itself--parent) for SO type and range (src)
CREATE OR REPLACE FUNCTION get_sub_feature_ids_by_type_src(cvterm.name%TYPE,feature.uniquename%TYPE,char(1)) RETURNS SETOF feature_by_fx_type AS
'
DECLARE
    gtype alias for $1;
    src alias for $2;
    is_an alias for $3;
    query text;
    myrc feature_by_fx_type%ROWTYPE;
    myrc2 feature_by_fx_type%ROWTYPE;

BEGIN

    query := ''SELECT DISTINCT f.feature_id FROM feature f INNER join cvterm t ON (f.type_id = t.cvterm_id)
        INNER join featureloc fl
        ON (f.feature_id = fl.feature_id) INNER join feature src ON (src.feature_id = fl.srcfeature_id)
        WHERE t.name = '' || quote_literal(gtype) || '' AND src.uniquename = '' || quote_literal(src)
        || '' AND f.is_analysis = '' || quote_literal(is_an) || '';'';
 
    IF (STRPOS(gtype, ''%'') > 0) THEN
        query := ''SELECT DISTINCT f.feature_id FROM feature f INNER join cvterm t ON (f.type_id = t.cvterm_id)
             INNER join featureloc fl
            ON (f.feature_id = fl.feature_id) INNER join feature src ON (src.feature_id = fl.srcfeature_id)
            WHERE t.name like '' || quote_literal(gtype) || '' AND src.uniquename = '' || quote_literal(src)
            || '' AND f.is_analysis = '' || quote_literal(is_an) || '';'';
    END IF;
    FOR myrc IN SELECT * FROM get_sub_feature_ids(query) LOOP
        RETURN NEXT myrc;
    END LOOP;
    RETURN;
END;
'
LANGUAGE 'plpgsql';

--- by SO type, usefull for tRNA, ncRNA, etc
CREATE OR REPLACE FUNCTION get_feature_ids_by_type(cvterm.name%TYPE, char(1)) RETURNS SETOF feature_by_fx_type AS
'
DECLARE
    gtype alias for $1;
    is_an alias for $2;
    query TEXT;
    myrc feature_by_fx_type%ROWTYPE;
    myrc2 feature_by_fx_type%ROWTYPE;

BEGIN

    query := ''SELECT DISTINCT f.feature_id 
        FROM feature f, cvterm t WHERE t.cvterm_id = f.type_id AND t.name = '' || quote_literal(gtype) ||
        '' AND f.is_analysis = '' || quote_literal(is_an) || '';'';
    IF (STRPOS(gtype, ''%'') > 0) THEN
        query := ''SELECT DISTINCT f.feature_id 
            FROM feature f, cvterm t WHERE t.cvterm_id = f.type_id AND t.name like ''
            || quote_literal(gtype) || '' AND f.is_analysis = '' || quote_literal(is_an) || '';'';
    END IF;

    FOR myrc IN SELECT * FROM get_feature_ids(query) LOOP
        RETURN NEXT myrc;
    END LOOP;
    RETURN;
END;
'
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION get_feature_ids_by_type_src(cvterm.name%TYPE, feature.uniquename%TYPE, char(1)) RETURNS SETOF feature_by_fx_type AS
'
DECLARE
    gtype alias for $1;
    src alias for $2;
    is_an alias for $3;
    query TEXT;
    myrc feature_by_fx_type%ROWTYPE;
    myrc2 feature_by_fx_type%ROWTYPE;

BEGIN

    query := ''SELECT DISTINCT f.feature_id 
        FROM feature f INNER join cvterm t ON (f.type_id = t.cvterm_id) INNER join featureloc fl
        ON (f.feature_id = fl.feature_id) INNER join feature src ON (src.feature_id = fl.srcfeature_id)
        WHERE t.name = '' || quote_literal(gtype) || '' AND src.uniquename = '' || quote_literal(src)
        || '' AND f.is_analysis = '' || quote_literal(is_an) || '';'';
 
    IF (STRPOS(gtype, ''%'') > 0) THEN
        query := ''SELECT DISTINCT f.feature_id 
            FROM feature f INNER join cvterm t ON (f.type_id = t.cvterm_id) INNER join featureloc fl
            ON (f.feature_id = fl.feature_id) INNER join feature src ON (src.feature_id = fl.srcfeature_id)
            WHERE t.name like '' || quote_literal(gtype) || '' AND src.uniquename = '' || quote_literal(src)
            || '' AND f.is_analysis = '' || quote_literal(is_an) || '';'';
    END IF;

    FOR myrc IN SELECT * FROM get_feature_ids(query) LOOP
        RETURN NEXT myrc;
    END LOOP;
    RETURN;
END;
'
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION get_feature_ids_by_type_name(cvterm.name%TYPE, feature.uniquename%TYPE, char(1)) RETURNS SETOF feature_by_fx_type AS
'
DECLARE
    gtype alias for $1;
    name alias for $2;
    is_an alias for $3;
    query TEXT;
    myrc feature_by_fx_type%ROWTYPE;
    myrc2 feature_by_fx_type%ROWTYPE;

BEGIN

    query := ''SELECT DISTINCT f.feature_id 
        FROM feature f INNER join cvterm t ON (f.type_id = t.cvterm_id)
        WHERE t.name = '' || quote_literal(gtype) || '' AND (f.uniquename = '' || quote_literal(name)
        || '' OR f.name = '' || quote_literal(name) || '') AND f.is_analysis = '' || quote_literal(is_an) || '';'';
 
    IF (STRPOS(name, ''%'') > 0) THEN
        query := ''SELECT DISTINCT f.feature_id 
            FROM feature f INNER join cvterm t ON (f.type_id = t.cvterm_id)
            WHERE t.name = '' || quote_literal(gtype) || '' AND (f.uniquename like '' || quote_literal(name)
            || '' OR f.name like '' || quote_literal(name) || '') AND f.is_analysis = '' || quote_literal(is_an) || '';'';
    END IF;

    FOR myrc IN SELECT * FROM get_feature_ids(query) LOOP
        RETURN NEXT myrc;
    END LOOP;
    RETURN;
END;
'
LANGUAGE 'plpgsql';

--- get all feature ids (including children) for feature that has an ontology term (say GO function)
CREATE OR REPLACE FUNCTION get_feature_ids_by_ont(cv.name%TYPE,cvterm.name%TYPE) RETURNS SETOF feature_by_fx_type AS
'
DECLARE
    aspect alias for $1;
    term alias for $2;
    query TEXT;
    myrc feature_by_fx_type%ROWTYPE;
    myrc2 feature_by_fx_type%ROWTYPE;

BEGIN

    query := ''SELECT DISTINCT fcvt.feature_id 
        FROM feature_cvterm fcvt, cv, cvterm t WHERE cv.cv_id = t.cv_id AND
        t.cvterm_id = fcvt.cvterm_id AND cv.name = '' || quote_literal(aspect) ||
        '' AND t.name = '' || quote_literal(term) || '';'';
    IF (STRPOS(term, ''%'') > 0) THEN
        query := ''SELECT DISTINCT fcvt.feature_id 
            FROM feature_cvterm fcvt, cv, cvterm t WHERE cv.cv_id = t.cv_id AND
            t.cvterm_id = fcvt.cvterm_id AND cv.name = '' || quote_literal(aspect) ||
            '' AND t.name like '' || quote_literal(term) || '';'';
    END IF;

    FOR myrc IN SELECT * FROM get_feature_ids(query) LOOP
        RETURN NEXT myrc;
    END LOOP;
    RETURN;
END;
'
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION get_feature_ids_by_ont_root(cv.name%TYPE,cvterm.name%TYPE) RETURNS SETOF feature_by_fx_type AS
'
DECLARE
    aspect alias for $1;
    term alias for $2;
    query TEXT;
    subquery TEXT;
    myrc feature_by_fx_type%ROWTYPE;
    myrc2 feature_by_fx_type%ROWTYPE;

BEGIN

    subquery := ''SELECT t.cvterm_id FROM cv, cvterm t WHERE cv.cv_id = t.cv_id 
        AND cv.name = '' || quote_literal(aspect) || '' AND t.name = '' || quote_literal(term) || '';'';
    IF (STRPOS(term, ''%'') > 0) THEN
        subquery := ''SELECT t.cvterm_id FROM cv, cvterm t WHERE cv.cv_id = t.cv_id 
            AND cv.name = '' || quote_literal(aspect) || '' AND t.name like '' || quote_literal(term) || '';'';
    END IF;
    query := ''SELECT DISTINCT fcvt.feature_id 
        FROM feature_cvterm fcvt INNER JOIN (SELECT cvterm_id FROM get_it_sub_cvterm_ids('' || quote_literal(subquery) || '')) AS ont ON (fcvt.cvterm_id = ont.cvterm_id);'';

    FOR myrc IN SELECT * FROM get_feature_ids(query) LOOP
        RETURN NEXT myrc;
    END LOOP;
    RETURN;
END;
'
LANGUAGE 'plpgsql';

--- get all feature ids (including children) for feature with the property (type, val)
CREATE OR REPLACE FUNCTION get_feature_ids_by_property(cvterm.name%TYPE,varchar) RETURNS SETOF feature_by_fx_type AS
'
DECLARE
    p_type alias for $1;
    p_val alias for $2;
    query TEXT;
    myrc feature_by_fx_type%ROWTYPE;
    myrc2 feature_by_fx_type%ROWTYPE;

BEGIN

    query := ''SELECT DISTINCT fprop.feature_id 
        FROM featureprop fprop, cvterm t WHERE t.cvterm_id = fprop.type_id AND t.name = '' ||
        quote_literal(p_type) || '' AND fprop.value = '' || quote_literal(p_val) || '';'';
    IF (STRPOS(p_val, ''%'') > 0) THEN
        query := ''SELECT DISTINCT fprop.feature_id 
            FROM featureprop fprop, cvterm t WHERE t.cvterm_id = fprop.type_id AND t.name = '' ||
            quote_literal(p_type) || '' AND fprop.value like '' || quote_literal(p_val) || '';'';
    END IF;

    FOR myrc IN SELECT * FROM get_feature_ids(query) LOOP
        RETURN NEXT myrc;
    END LOOP;
    RETURN;
END;
'
LANGUAGE 'plpgsql';

--- get all feature ids (including children) for feature with the property val
CREATE OR REPLACE FUNCTION get_feature_ids_by_propval(varchar) RETURNS SETOF feature_by_fx_type AS
'
DECLARE
    p_val alias for $1;
    query TEXT;
    myrc feature_by_fx_type%ROWTYPE;
    myrc2 feature_by_fx_type%ROWTYPE;

BEGIN

    query := ''SELECT DISTINCT fprop.feature_id 
        FROM featureprop fprop WHERE fprop.value = '' || quote_literal(p_val) || '';'';
    IF (STRPOS(p_val, ''%'') > 0) THEN
        query := ''SELECT DISTINCT fprop.feature_id 
            FROM featureprop fprop WHERE fprop.value like '' || quote_literal(p_val) || '';'';
    END IF;

    FOR myrc IN SELECT * FROM get_feature_ids(query) LOOP
        RETURN NEXT myrc;
    END LOOP;
    RETURN;
END;
'
LANGUAGE 'plpgsql';


---4 args: ptype, ctype, count, operator (valid SQL number comparison operator), and is_analysis 
---get feature ids for any node with type = ptype whose child node type = ctype
---and child node feature count comparing (using operator) to ccount
CREATE OR REPLACE FUNCTION get_feature_ids_by_child_count(cvterm.name%TYPE, cvterm.name%TYPE, INTEGER, varchar, char(1)) RETURNS SETOF feature_by_fx_type AS
'
DECLARE
    ptype alias for $1;
    ctype alias for $2;
    ccount alias for $3;
    operator alias for $4;
    is_an alias for $5;
    query TEXT;
    myrc feature_by_fx_type%ROWTYPE;
    myrc2 feature_by_fx_type %ROWTYPE;

BEGIN

    query := ''SELECT DISTINCT f.feature_id
        FROM feature f INNER join (select count(*) as c, p.feature_id FROM feature p
        INNER join cvterm pt ON (p.type_id = pt.cvterm_id) INNER join feature_relationship fr
        ON (p.feature_id = fr.object_id) INNER join feature c ON (c.feature_id = fr.subject_id)
        INNER join cvterm ct ON (c.type_id = ct.cvterm_id)
        WHERE pt.name = '' || quote_literal(ptype) || '' AND ct.name = '' || quote_literal(ctype)
        || '' AND p.is_analysis = '' || quote_literal(is_an) || '' group by p.feature_id) as cq
        ON (cq.feature_id = f.feature_id) WHERE cq.c '' || operator || ccount || '';'';
    ---RAISE NOTICE ''%'', query; 

    FOR myrc IN SELECT * FROM get_feature_ids(query) LOOP
        RETURN NEXT myrc;
    END LOOP;
    RETURN;
END;
'
LANGUAGE 'plpgsql';
-- $Id: companalysis.sql,v 1.37 2007-03-23 15:18:02 scottcain Exp $
-- ==========================================
-- Chado companalysis module
--
-- =================================================================
-- Dependencies:
--
-- :import feature from sequence
-- :import cvterm from cv
-- :import dbxref from db
-- :import pub from pub
-- =================================================================

-- ================================================
-- TABLE: analysis
-- ================================================

create table analysis (
    analysis_id bigserial not null,
    primary key (analysis_id),
    name varchar(255),
    description text,
    program varchar(255) not null,
    programversion varchar(255) not null,
    algorithm varchar(255),
    sourcename varchar(255),
    sourceversion varchar(255),
    sourceuri text,
    timeexecuted timestamp not null default current_timestamp,
    constraint analysis_c1 unique (program,programversion,sourcename)
);
COMMENT ON TABLE analysis IS 'An analysis is a particular type of a
    computational analysis; it may be a blast of one sequence against
    another, or an all by all blast, or a different kind of analysis
    altogether. It is a single unit of computation.';
COMMENT ON COLUMN analysis.name IS 'A way of grouping analyses. This
    should be a handy short identifier that can help people find an
    analysis they want. For instance "tRNAscan", "cDNA", "FlyPep",
    "SwissProt", and it should not be assumed to be unique. For instance, there may be lots of separate analyses done against a cDNA database.';
COMMENT ON COLUMN analysis.program IS 'Program name, e.g. blastx, blastp, sim4, genscan.';
COMMENT ON COLUMN analysis.programversion IS 'Version description, e.g. TBLASTX 2.0MP-WashU [09-Nov-2000].';
COMMENT ON COLUMN analysis.algorithm IS 'Algorithm name, e.g. blast.';
COMMENT ON COLUMN analysis.sourcename IS 'Source name, e.g. cDNA, SwissProt.';
COMMENT ON COLUMN analysis.sourceuri IS 'This is an optional, permanent URL or URI for the source of the  analysis. The idea is that someone could recreate the analysis directly by going to this URI and fetching the source data (e.g. the blast database, or the training model).';

-- ================================================
-- TABLE: analysisprop
-- ================================================

create table analysisprop (
    analysisprop_id bigserial not null,
    primary key (analysisprop_id),
    analysis_id bigint not null,
    foreign key (analysis_id) references analysis (analysis_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text,
    rank int not null default 0,
    constraint analysisprop_c1 unique (analysis_id,type_id,rank)
);
create index analysisprop_idx1 on analysisprop (analysis_id);
create index analysisprop_idx2 on analysisprop (type_id);

-- ================================================
-- TABLE: analysisfeature
-- ================================================

create table analysisfeature (
    analysisfeature_id bigserial not null,
    primary key (analysisfeature_id),
    feature_id bigint not null,
    foreign key (feature_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,
    analysis_id bigint not null,
    foreign key (analysis_id) references analysis (analysis_id) on delete cascade INITIALLY DEFERRED,
    rawscore double precision,
    normscore double precision,
    significance double precision,
    identity double precision,
    constraint analysisfeature_c1 unique (feature_id,analysis_id)
);
create index analysisfeature_idx1 on analysisfeature (feature_id);
create index analysisfeature_idx2 on analysisfeature (analysis_id);

COMMENT ON TABLE analysisfeature IS 'Computational analyses generate features (e.g. Genscan generates transcripts and exons; sim4 alignments generate similarity/match features). analysisfeatures are stored using the feature table from the sequence module. The analysisfeature table is used to decorate these features, with analysis specific attributes. A feature is an analysisfeature if and only if there is a corresponding entry in the analysisfeature table. analysisfeatures will have two or more featureloc entries,
 with rank indicating query/subject';
COMMENT ON COLUMN analysisfeature.identity IS 'Percent identity between the locations compared.  Note that these 4 metrics do not cover the full range of scores possible; it would be undesirable to list every score possible, as this should be kept extensible. instead, for non-standard scores, use the analysisprop table.';
COMMENT ON COLUMN analysisfeature.significance IS 'This is some kind of expectation or probability metric, representing the probability that the analysis would appear randomly given the model. As such, any program or person querying this table can assume the following semantics:
   * 0 <= significance <= n, where n is a positive number, theoretically unbounded but unlikely to be more than 10
  * low numbers are better than high numbers.';
COMMENT ON COLUMN analysisfeature.normscore IS 'This is the rawscore but
    semi-normalized. Complete normalization to allow comparison of
    features generated by different programs would be nice but too
    difficult. Instead the normalization should strive to enforce the
    following semantics: * normscores are floating point numbers >= 0,
    * high normscores are better than low one. For most programs, it would be sufficient to make the normscore the same as this rawscore, providing these semantics are satisfied.';
COMMENT ON COLUMN analysisfeature.rawscore IS 'This is the native score generated by the program; for example, the bitscore generated by blast, sim4 or genscan scores. One should not assume that high is necessarily better than low.';

-- ================================================
-- TABLE: analysisfeatureprop
-- ================================================

CREATE TABLE analysisfeatureprop (
    analysisfeatureprop_id bigserial PRIMARY KEY,
    analysisfeature_id bigint NOT NULL REFERENCES analysisfeature(analysisfeature_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
    type_id bigint NOT NULL REFERENCES cvterm(cvterm_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
    value TEXT,
    rank int NOT NULL,
    CONSTRAINT analysisfeature_id_type_id_rank UNIQUE(analysisfeature_id, type_id, rank)
);
create index analysisfeatureprop_idx1 on analysisfeatureprop (analysisfeature_id);
create index analysisfeatureprop_idx2 on analysisfeatureprop (type_id);

-- ================================================
-- TABLE: analysis_dbxref
-- ================================================

create table analysis_dbxref (
  analysis_dbxref_id bigserial not null,
  analysis_id bigint not null,
  dbxref_id bigint not null,
  primary key (analysis_dbxref_id),
  is_current boolean not null default 'true',
  foreign key (analysis_id) references analysis (analysis_id) on delete cascade INITIALLY DEFERRED,
  foreign key (dbxref_id) references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED,
  constraint analysis_dbxref_c1 unique (analysis_id,dbxref_id)
);
create index analysis_dbxref_idx1 on analysis_dbxref (analysis_id);
create index analysis_dbxref_idx2 on analysis_dbxref (dbxref_id);

COMMENT ON TABLE analysis_dbxref IS 'Links an analysis to dbxrefs.';

COMMENT ON COLUMN analysis_dbxref.is_current IS 'True if this dbxref 
is the most up to date accession in the corresponding db. Retired 
accessions should set this field to false';


-- ================================================
-- TABLE: analysis_cvterm
-- ================================================

create table analysis_cvterm (
  analysis_cvterm_id bigserial not null,
  analysis_id bigint not null,
  cvterm_id bigint not null,
  is_not boolean not null default false,
  rank integer not null default 0,
  primary key (analysis_cvterm_id),
  foreign key (analysis_id) references analysis (analysis_id) on delete cascade INITIALLY DEFERRED,
  foreign key (cvterm_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
  constraint analysis_cvterm_c1 unique (analysis_id,cvterm_id,rank)
);
create index analysis_cvterm_idx1 on analysis_cvterm (analysis_id);
create index analysis_cvterm_idx2 on analysis_cvterm (cvterm_id);

COMMENT ON TABLE analysis_cvterm IS 'Associate a term from a cv with an analysis.';

COMMENT ON COLUMN analysis_cvterm.is_not IS 'If this is set to true, then this 
annotation is interpreted as a NEGATIVE annotation - i.e. the analysis does 
NOT have the specified term.';

-- ================================================
-- TABLE: analysis_relationship
-- ================================================

create table analysis_relationship (
  analysis_relationship_id bigserial not null,
  subject_id bigint not null,
  object_id bigint not null,
  type_id bigint not null,
  value text null,
  rank int not null default 0,
  primary key (analysis_relationship_id),
  foreign key (subject_id) references analysis (analysis_id) on delete cascade INITIALLY DEFERRED,
  foreign key (object_id) references analysis (analysis_id) on delete cascade INITIALLY DEFERRED,
  foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
  constraint analysis_relationship_c1 unique (subject_id,object_id,type_id,rank)
);
create index analysis_relationship_idx1 on analysis_relationship (subject_id);
create index analysis_relationship_idx2 on analysis_relationship (object_id);
create index analysis_relationship_idx3 on analysis_relationship (type_id);

COMMENT ON COLUMN analysis_relationship.subject_id IS 'analysis_relationship.subject_id i
s the subject of the subj-predicate-obj sentence.';

COMMENT ON COLUMN analysis_relationship.object_id IS 'analysis_relationship.object_id 
is the object of the subj-predicate-obj sentence.';

COMMENT ON COLUMN analysis_relationship.type_id IS 'analysis_relationship.type_id 
is relationship type between subject and object. This is a cvterm, typically 
from the OBO relationship ontology, although other relationship types are allowed.';

COMMENT ON COLUMN analysis_relationship.rank IS 'analysis_relationship.rank is 
the ordering of subject analysiss with respect to the object analysis may be 
important where rank is used to order these; starts from zero.';

COMMENT ON COLUMN analysis_relationship.value IS 'analysis_relationship.value 
is for additional notes or comments.';

-- ================================================
-- TABLE: analysis_pub
-- ================================================

create table analysis_pub (
    analysis_pub_id bigserial not null,
    primary key (analysis_pub_id),
    analysis_id bigint not null,
    foreign key (analysis_id) references analysis (analysis_id) on delete cascade INITIALLY DEFERRED,
    pub_id bigint not null,
    foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
    constraint analysis_pub_c1 unique (analysis_id, pub_id)
);
create index analysis_pub_idx1 on analysis_pub (analysis_id);
create index analysis_pub_idx2 on analysis_pub (pub_id);

COMMENT ON TABLE analysis_pub IS 'Provenance. Linking table between analyses and the publications that mention them.';

CREATE OR REPLACE FUNCTION store_analysis (VARCHAR,VARCHAR,VARCHAR) 
  RETURNS BIGINT AS 
'DECLARE
   v_program            ALIAS FOR $1;
   v_programversion     ALIAS FOR $2;
   v_sourcename         ALIAS FOR $3;
   pkval                BIGINT;
 BEGIN
    SELECT INTO pkval analysis_id
      FROM analysis
      WHERE program=v_program AND
            programversion=v_programversion AND
            sourcename=v_sourcename;
    IF NOT FOUND THEN
      INSERT INTO analysis 
       (program,programversion,sourcename)
         VALUES
       (v_program,v_programversion,v_sourcename);
      RETURN currval(''analysis_analysis_id_seq'');
    END IF;
    RETURN pkval;
 END;
' LANGUAGE 'plpgsql';

--CREATE OR REPLACE FUNCTION store_analysisfeature
--()
--RETURNS INT AS
--'DECLARE
--  v_srcfeature_id       ALIAS FOR $1;
  
-- $Id: phenotype.sql,v 1.6 2007-04-27 16:09:46 emmert Exp $
-- ==========================================
-- Chado phenotype module
--
-- 05-31-2011
-- added 'name' column to phenotype. non-unique human readable field.
--
-- =================================================================
-- Dependencies:
--
-- :import cvterm from cv
-- :import feature from sequence
-- =================================================================

-- ================================================
-- TABLE: phenotype
-- ================================================

CREATE TABLE phenotype (
    phenotype_id bigserial NOT NULL,
    primary key (phenotype_id),
    uniquename TEXT NOT NULL,
    name TEXT default null,
    observable_id bigint,
    FOREIGN KEY (observable_id) REFERENCES cvterm (cvterm_id) ON DELETE CASCADE,
    attr_id bigint,
    FOREIGN KEY (attr_id) REFERENCES cvterm (cvterm_id) ON DELETE SET NULL,
    value TEXT,
    cvalue_id bigint,
    FOREIGN KEY (cvalue_id) REFERENCES cvterm (cvterm_id) ON DELETE SET NULL,
    assay_id bigint,
    FOREIGN KEY (assay_id) REFERENCES cvterm (cvterm_id) ON DELETE SET NULL,
    CONSTRAINT phenotype_c1 UNIQUE (uniquename)
);
CREATE INDEX phenotype_idx1 ON phenotype (cvalue_id);
CREATE INDEX phenotype_idx2 ON phenotype (observable_id);
CREATE INDEX phenotype_idx3 ON phenotype (attr_id);

COMMENT ON TABLE phenotype IS 'A phenotypic statement, or a single
atomic phenotypic observation, is a controlled sentence describing
observable effects of non-wild type function. E.g. Obs=eye, attribute=color, cvalue=red.';
COMMENT ON COLUMN phenotype.observable_id IS 'The entity: e.g. anatomy_part, biological_process.';
COMMENT ON COLUMN phenotype.attr_id IS 'Phenotypic attribute (quality, property, attribute, character) - drawn from PATO.';
COMMENT ON COLUMN phenotype.value IS 'Value of attribute - unconstrained free text. Used only if cvalue_id is not appropriate.';
COMMENT ON COLUMN phenotype.cvalue_id IS 'Phenotype attribute value (state).';
COMMENT ON COLUMN phenotype.assay_id IS 'Evidence type.';


-- ================================================
-- TABLE: phenotype_cvterm
-- ================================================

CREATE TABLE phenotype_cvterm (
    phenotype_cvterm_id bigserial NOT NULL,
    primary key (phenotype_cvterm_id),
    phenotype_id bigint NOT NULL,
    FOREIGN KEY (phenotype_id) REFERENCES phenotype (phenotype_id) ON DELETE CASCADE,
    cvterm_id bigint NOT NULL,
    FOREIGN KEY (cvterm_id) REFERENCES cvterm (cvterm_id) ON DELETE CASCADE,
    rank int not null default 0,
    CONSTRAINT phenotype_cvterm_c1 UNIQUE (phenotype_id, cvterm_id, rank)
);
CREATE INDEX phenotype_cvterm_idx1 ON phenotype_cvterm (phenotype_id);
CREATE INDEX phenotype_cvterm_idx2 ON phenotype_cvterm (cvterm_id);

COMMENT ON TABLE phenotype_cvterm IS 'phenotype to cvterm associations.';


-- ================================================
-- TABLE: feature_phenotype
-- ================================================

CREATE TABLE feature_phenotype (
    feature_phenotype_id bigserial NOT NULL,
    primary key (feature_phenotype_id),
    feature_id bigint NOT NULL,
    FOREIGN KEY (feature_id) REFERENCES feature (feature_id) ON DELETE CASCADE,
    phenotype_id bigint NOT NULL,
    FOREIGN KEY (phenotype_id) REFERENCES phenotype (phenotype_id) ON DELETE CASCADE,
    CONSTRAINT feature_phenotype_c1 UNIQUE (feature_id,phenotype_id)       
);
CREATE INDEX feature_phenotype_idx1 ON feature_phenotype (feature_id);
CREATE INDEX feature_phenotype_idx2 ON feature_phenotype (phenotype_id);

COMMENT ON TABLE feature_phenotype IS 'Linking table between features and phenotypes.';


-- ================================================
-- TABLE: phenotypeprop
-- ================================================

create table phenotypeprop (
       phenotypeprop_id bigserial not null,
       primary key (phenotypeprop_id),
       phenotype_id bigint not null,
       foreign key (phenotype_id) references phenotype (phenotype_id) on delete cascade INITIALLY DEFERRED,
       type_id bigint not null,
       foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
       value text null,
       rank int not null default 0,
       constraint phenotypeprop_c1 unique (phenotype_id,type_id,rank)
);
create index phenotypeprop_idx1 on phenotypeprop (phenotype_id);
create index phenotypeprop_idx2 on phenotypeprop (type_id);

COMMENT ON TABLE phenotypeprop IS 'A phenotype can have any number of slot-value property tags attached to it. This is an alternative to hardcoding a list of columns in the relational schema, and is completely extensible. There is a unique constraint, phenotypeprop_c1, for the combination of phenotype_id, rank, and type_id. Multivalued property-value pairs must be differentiated by rank.';
-- $Id: genetic.sql,v 1.31 2008-08-25 19:53:14 scottcain Exp $
-- ==========================================
-- Chado genetics module
--
-- changes 2011-05-31
--   added type_id to genotype (can be null for backward compatibility)
--   added genotypeprop table
-- 2006-04-11
--   split out phenotype tables into phenotype module
--
-- redesigned 2003-10-28
--
-- changes 2003-11-10:
--   incorporating suggestions to make everything a gcontext; use 
--   gcontext_relationship to make some gcontexts derivable from others. we 
--   would incorporate environment this way - just add the environment 
--   descriptors as properties of the child gcontext
--
-- changes 2004-06 (Documented by DE: 10-MAR-2005):
--   Many, including rename of gcontext to genotype,  split 
--   phenstatement into phenstatement & phenotype, created environment
--
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ============
-- DEPENDENCIES
-- ============
-- :import feature from sequence
-- :import phenotype from phenotype
-- :import cvterm from cv
-- :import pub from pub
-- :import dbxref from db
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- ================================================
-- TABLE: genotype
-- ================================================
create table genotype (
    genotype_id bigserial not null,
    primary key (genotype_id),
    name text,
    uniquename text not null,
    description text,
    type_id bigint NOT NULL,
    FOREIGN KEY (type_id) REFERENCES cvterm (cvterm_id) ON DELETE CASCADE,
    constraint genotype_c1 unique (uniquename)
);
create index genotype_idx1 on genotype(uniquename);
create index genotype_idx2 on genotype(name);

COMMENT ON TABLE genotype IS 'Genetic context. A genotype is defined by a collection of features, mutations, balancers, deficiencies, haplotype blocks, or engineered constructs.';

COMMENT ON COLUMN genotype.uniquename IS 'The unique name for a genotype; 
typically derived from the features making up the genotype.';

COMMENT ON COLUMN genotype.name IS 'Optional alternative name for a genotype, 
for display purposes.';

-- ===============================================
-- TABLE: feature_genotype
-- ================================================
create table feature_genotype (
    feature_genotype_id bigserial not null,
    primary key (feature_genotype_id),
    feature_id bigint not null,
    foreign key (feature_id) references feature (feature_id) on delete cascade,
    genotype_id bigint not null,
    foreign key (genotype_id) references genotype (genotype_id) on delete cascade,
    chromosome_id bigint,
    foreign key (chromosome_id) references feature (feature_id) on delete set null,
    rank int not null,
    cgroup    int not null,
    cvterm_id bigint not null,
    foreign key (cvterm_id) references cvterm (cvterm_id) on delete cascade,
    constraint feature_genotype_c1 unique (feature_id, genotype_id, cvterm_id, chromosome_id, rank, cgroup)
);
create index feature_genotype_idx1 on feature_genotype (feature_id);
create index feature_genotype_idx2 on feature_genotype (genotype_id);

COMMENT ON TABLE feature_genotype IS NULL;
COMMENT ON COLUMN feature_genotype.rank IS 'rank can be used for
n-ploid organisms or to preserve order.';
COMMENT ON COLUMN feature_genotype.cgroup IS 'Spatially distinguishable
group. group can be used for distinguishing the chromosomal groups,
for example (RNAi products and so on can be treated as different
groups, as they do not fall on a particular chromosome).';
COMMENT ON COLUMN feature_genotype.chromosome_id IS 'A feature of SO type "chromosome".';

-- ================================================
-- TABLE: environment
-- ================================================
create table environment (
    environment_id bigserial not NULL,
    primary key  (environment_id),
    uniquename text not null,
    description text,
    constraint environment_c1 unique (uniquename)
);
create index environment_idx1 on environment(uniquename);

COMMENT ON TABLE environment IS 'The environmental component of a phenotype description.';


-- ================================================
-- TABLE: environment_cvterm
-- ================================================
create table environment_cvterm (
    environment_cvterm_id bigserial not null,
    primary key  (environment_cvterm_id),
    environment_id bigint not null,
    foreign key (environment_id) references environment (environment_id) on delete cascade,
    cvterm_id bigint not null,
    foreign key (cvterm_id) references cvterm (cvterm_id) on delete cascade,
    constraint environment_cvterm_c1 unique (environment_id, cvterm_id)
);
create index environment_cvterm_idx1 on environment_cvterm (environment_id);
create index environment_cvterm_idx2 on environment_cvterm (cvterm_id);

COMMENT ON TABLE environment_cvterm IS NULL;

-- ================================================
-- TABLE: phenstatement
-- ================================================
CREATE TABLE phenstatement (
    phenstatement_id bigserial NOT NULL,
    primary key (phenstatement_id),
    genotype_id bigint NOT NULL,
    FOREIGN KEY (genotype_id) REFERENCES genotype (genotype_id) ON DELETE CASCADE,
    environment_id bigint NOT NULL,
    FOREIGN KEY (environment_id) REFERENCES environment (environment_id) ON DELETE CASCADE,
    phenotype_id bigint NOT NULL,
    FOREIGN KEY (phenotype_id) REFERENCES phenotype (phenotype_id) ON DELETE CASCADE,
    type_id bigint NOT NULL,
    FOREIGN KEY (type_id) REFERENCES cvterm (cvterm_id) ON DELETE CASCADE,
    pub_id bigint NOT NULL,
    FOREIGN KEY (pub_id) REFERENCES pub (pub_id) ON DELETE CASCADE,
    CONSTRAINT phenstatement_c1 UNIQUE (genotype_id,phenotype_id,environment_id,type_id,pub_id)
);
CREATE INDEX phenstatement_idx1 ON phenstatement (genotype_id);
CREATE INDEX phenstatement_idx2 ON phenstatement (phenotype_id);

COMMENT ON TABLE phenstatement IS 'Phenotypes are things like "larval lethal".  Phenstatements are things like "dpp-1 is recessive larval lethal". So essentially phenstatement is a linking table expressing the relationship between genotype, environment, and phenotype.';

-- ================================================
-- TABLE: phendesc
-- ================================================
CREATE TABLE phendesc (
    phendesc_id bigserial NOT NULL,
    primary key (phendesc_id),
    genotype_id bigint NOT NULL,
    FOREIGN KEY (genotype_id) REFERENCES genotype (genotype_id) ON DELETE CASCADE,
    environment_id bigint NOT NULL,
    FOREIGN KEY (environment_id) REFERENCES environment ( environment_id) ON DELETE CASCADE,
    description TEXT NOT NULL,
    type_id bigint NOT NULL,
        FOREIGN KEY (type_id) REFERENCES cvterm (cvterm_id) ON DELETE CASCADE,
    pub_id bigint NOT NULL,
    FOREIGN KEY (pub_id) REFERENCES pub (pub_id) ON DELETE CASCADE,
    CONSTRAINT phendesc_c1 UNIQUE (genotype_id,environment_id,type_id,pub_id)
);
CREATE INDEX phendesc_idx1 ON phendesc (genotype_id);
CREATE INDEX phendesc_idx2 ON phendesc (environment_id);
CREATE INDEX phendesc_idx3 ON phendesc (pub_id);

COMMENT ON TABLE phendesc IS 'A summary of a _set_ of phenotypic statements for any one gcontext made in any one publication.';

-- ================================================
-- TABLE: phenotype_comparison
-- ================================================
CREATE TABLE phenotype_comparison (
    phenotype_comparison_id bigserial NOT NULL,
    primary key (phenotype_comparison_id),
    genotype1_id bigint NOT NULL,
        FOREIGN KEY (genotype1_id) REFERENCES genotype (genotype_id) ON DELETE CASCADE,
    environment1_id bigint NOT NULL,
        FOREIGN KEY (environment1_id) REFERENCES environment (environment_id) ON DELETE CASCADE,
    genotype2_id bigint NOT NULL,
        FOREIGN KEY (genotype2_id) REFERENCES genotype (genotype_id) ON DELETE CASCADE,
    environment2_id bigint NOT NULL,
        FOREIGN KEY (environment2_id) REFERENCES environment (environment_id) ON DELETE CASCADE,
    phenotype1_id bigint NOT NULL,
        FOREIGN KEY (phenotype1_id) REFERENCES phenotype (phenotype_id) ON DELETE CASCADE,
    phenotype2_id bigint,
        FOREIGN KEY (phenotype2_id) REFERENCES phenotype (phenotype_id) ON DELETE CASCADE,
    pub_id bigint NOT NULL,
    FOREIGN KEY (pub_id) REFERENCES pub (pub_id) ON DELETE CASCADE,
    organism_id bigint NOT NULL,
    FOREIGN KEY (organism_id) REFERENCES organism (organism_id) ON DELETE CASCADE,
    CONSTRAINT phenotype_comparison_c1 UNIQUE (genotype1_id,environment1_id,genotype2_id,environment2_id,phenotype1_id,pub_id)
);
CREATE INDEX phenotype_comparison_idx1 on phenotype_comparison (genotype1_id);
CREATE INDEX phenotype_comparison_idx2 on phenotype_comparison (genotype2_id);
CREATE INDEX phenotype_comparison_idx4 on phenotype_comparison (pub_id);

COMMENT ON TABLE phenotype_comparison IS 'Comparison of phenotypes e.g., genotype1/environment1/phenotype1 "non-suppressible" with respect to genotype2/environment2/phenotype2.';

-- ================================================
-- TABLE: phenotype_comparison_cvterm
-- ================================================
CREATE TABLE phenotype_comparison_cvterm (
    phenotype_comparison_cvterm_id bigserial not null,
    primary key (phenotype_comparison_cvterm_id),
    phenotype_comparison_id bigint not null,
    FOREIGN KEY (phenotype_comparison_id) references phenotype_comparison (phenotype_comparison_id) on delete cascade,
    cvterm_id bigint not null,
    FOREIGN KEY (cvterm_id) references cvterm (cvterm_id) on delete cascade,
    pub_id bigint not null,
    FOREIGN KEY (pub_id) references pub (pub_id) on delete cascade,
    rank int not null default 0,
    CONSTRAINT phenotype_comparison_cvterm_c1 unique (phenotype_comparison_id, cvterm_id)
);
CREATE INDEX phenotype_comparison_cvterm_idx1 on phenotype_comparison_cvterm (phenotype_comparison_id);
CREATE INDEX  phenotype_comparison_cvterm_idx2 on phenotype_comparison_cvterm (cvterm_id);

-- ================================================
-- TABLE: genotypeprop
-- ================================================
create table genotypeprop (
    genotypeprop_id bigserial not null,
    primary key (genotypeprop_id),
    genotype_id bigint not null,
    foreign key (genotype_id) references genotype (genotype_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint genotypeprop_c1 unique (genotype_id,type_id,rank)
);
create index genotypeprop_idx1 on genotypeprop (genotype_id);
create index genotypeprop_idx2 on genotypeprop (type_id);
-- $Id: map.sql,v 1.14 2007-03-23 15:18:02 scottcain Exp $
-- ==========================================
-- Chado map module
--
-- =================================================================
-- Dependencies:
--
-- :import feature from sequence
-- :import cvterm from cv
-- :import pub from pub
-- :import contact from contact
-- :import dbxref from db
-- :import organism from organism
-- =================================================================

-- ================================================
-- TABLE: featuremap
-- ================================================

create table featuremap (
    featuremap_id bigserial not null,
    primary key (featuremap_id),
    name varchar(255),
    description text,
    unittype_id bigint null,
    foreign key (unittype_id) references cvterm (cvterm_id) on delete set null INITIALLY DEFERRED,
    constraint featuremap_c1 unique (name)
);

-- ================================================
-- TABLE: featurerange
-- ================================================

create table featurerange (
    featurerange_id bigserial not null,
    primary key (featurerange_id),
    featuremap_id bigint not null,
    foreign key (featuremap_id) references featuremap (featuremap_id) on delete cascade INITIALLY DEFERRED,
    feature_id bigint not null,
    foreign key (feature_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,
    leftstartf_id bigint not null,
    foreign key (leftstartf_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,
    leftendf_id bigint,
    foreign key (leftendf_id) references feature (feature_id) on delete set null INITIALLY DEFERRED,
    rightstartf_id bigint,
    foreign key (rightstartf_id) references feature (feature_id) on delete set null INITIALLY DEFERRED,
    rightendf_id bigint not null,
    foreign key (rightendf_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,
    rangestr varchar(255)
);
create index featurerange_idx1 on featurerange (featuremap_id);
create index featurerange_idx2 on featurerange (feature_id);
create index featurerange_idx3 on featurerange (leftstartf_id);
create index featurerange_idx4 on featurerange (leftendf_id);
create index featurerange_idx5 on featurerange (rightstartf_id);
create index featurerange_idx6 on featurerange (rightendf_id);

COMMENT ON TABLE featurerange IS 'In cases where the start and end of a mapped feature is a range, leftendf and rightstartf are populated. leftstartf_id, leftendf_id, rightstartf_id, rightendf_id are the ids of features with respect to which the feature is being mapped. These may be cytological bands.';
COMMENT ON COLUMN featurerange.featuremap_id IS 'featuremap_id is the id of the feature being mapped.';


-- ================================================
-- TABLE: featurepos
-- ================================================

create table featurepos (
    featurepos_id bigserial not null,
    primary key (featurepos_id),
    featuremap_id bigint not null,
    foreign key (featuremap_id) references featuremap (featuremap_id) on delete cascade INITIALLY DEFERRED,
    feature_id bigint not null,
    foreign key (feature_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,
    map_feature_id bigint not null,
    foreign key (map_feature_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,
    mappos float not null
);
create index featurepos_idx1 on featurepos (featuremap_id);
create index featurepos_idx2 on featurepos (feature_id);
create index featurepos_idx3 on featurepos (map_feature_id);

COMMENT ON COLUMN featurepos.map_feature_id IS 'map_feature_id
links to the feature (map) upon which the feature is being localized.';

-- ================================================
-- TABLE: featureposprop
-- ================================================

CREATE TABLE featureposprop (
    featureposprop_id bigserial primary key NOT NULL,
    featurepos_id bigint NOT NULL,
    type_id bigint NOT NULL,
    value text,
    rank integer DEFAULT 0 NOT NULL,
    CONSTRAINT featureposprop_c1 UNIQUE (featurepos_id, type_id, rank),
    FOREIGN KEY (featurepos_id) REFERENCES featurepos(featurepos_id) ON DELETE CASCADE,
    FOREIGN KEY (type_id) REFERENCES cvterm(cvterm_id) ON DELETE CASCADE
);

CREATE INDEX featureposprop_idx1 ON featureposprop USING btree (featurepos_id);
CREATE INDEX featureposprop_idx2 ON featureposprop USING btree (type_id);

COMMENT ON TABLE featureposprop IS 'Property or attribute of a featurepos record.';

-- ================================================
-- TABLE: featuremap_pub
-- ================================================

create table featuremap_pub (
    featuremap_pub_id bigserial not null,
    primary key (featuremap_pub_id),
    featuremap_id bigint not null,
    foreign key (featuremap_id) references featuremap (featuremap_id) on delete cascade INITIALLY DEFERRED,
    pub_id bigint not null,
    foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED
);
create index featuremap_pub_idx1 on featuremap_pub (featuremap_id);
create index featuremap_pub_idx2 on featuremap_pub (pub_id);

-- ================================================
-- TABLE: featuremapprop
-- ================================================

CREATE TABLE featuremapprop (
    featuremapprop_id bigserial primary key NOT NULL,
    featuremap_id bigint NOT NULL,
    type_id bigint NOT NULL,
    value text,
    rank integer DEFAULT 0 NOT NULL,
    FOREIGN KEY (featuremap_id) REFERENCES featuremap(featuremap_id) ON DELETE CASCADE,
    FOREIGN KEY (type_id) REFERENCES cvterm(cvterm_id) ON DELETE CASCADE,
    CONSTRAINT featuremapprop_c1 UNIQUE (featuremap_id, type_id, rank)
);
create index featuremapprop_idx1 on featuremapprop(featuremap_id);
create index featuremapprop_idx2 on featuremapprop(type_id);

COMMENT ON TABLE featuremapprop IS 'A featuremap can have any number of slot-value property 
tags attached to it. This is an alternative to hardcoding a list of columns in the 
relational schema, and is completely extensible.';

-- ================================================
-- TABLE: featuremap_contact
-- ================================================
CREATE TABLE featuremap_contact (
    featuremap_contact_id bigserial primary key NOT NULL,
    featuremap_id bigint NOT NULL,
    contact_id bigint NOT NULL,
    CONSTRAINT featuremap_contact_c1 UNIQUE (featuremap_id, contact_id),
    FOREIGN KEY (contact_id) REFERENCES contact(contact_id) ON DELETE CASCADE,
    FOREIGN KEY (featuremap_id) REFERENCES featuremap(featuremap_id) ON DELETE CASCADE
);

CREATE INDEX featuremap_contact_idx1 ON featuremap_contact USING btree (featuremap_id);
CREATE INDEX featuremap_contact_idx2 ON featuremap_contact USING btree (contact_id);

COMMENT ON TABLE featuremap_contact IS 'Links contact(s) with a featuremap.  Used to 
indicate a particular person or organization responsible for constrution of or 
that can provide more information on a particular featuremap.';


-- ================================================
-- TABLE: featuremap_dbxref
-- ================================================

CREATE TABLE featuremap_dbxref (
    featuremap_dbxref_id bigserial primary key NOT NULL,
    featuremap_id bigint NOT NULL,
    dbxref_id bigint NOT NULL,
    is_current boolean DEFAULT true NOT NULL,
    FOREIGN KEY (featuremap_id) REFERENCES featuremap(featuremap_id) ON DELETE CASCADE,
    FOREIGN KEY (dbxref_id) REFERENCES dbxref(dbxref_id) ON DELETE CASCADE
);

CREATE INDEX featuremap_dbxref_idx1 ON featuremap_dbxref USING btree (featuremap_id);
CREATE INDEX featuremap_dbxref_idx2 ON featuremap_dbxref USING btree (dbxref_id);

COMMENT ON TABLE feature_dbxref IS 'Links a feature to dbxrefs.';

COMMENT ON COLUMN feature_dbxref.is_current IS 'True if this secondary dbxref is 
the most up to date accession in the corresponding db. Retired accessions 
should set this field to false';


-- ================================================
-- TABLE: featuremap_organism
-- ================================================

CREATE TABLE featuremap_organism (
    featuremap_organism_id bigserial primary key NOT NULL,
    featuremap_id bigint NOT NULL,
    organism_id bigint NOT NULL,
    CONSTRAINT featuremap_organism_c1 UNIQUE (featuremap_id, organism_id),
    FOREIGN KEY (featuremap_id) REFERENCES featuremap(featuremap_id) ON DELETE CASCADE,
    FOREIGN KEY (organism_id) REFERENCES organism(organism_id) ON DELETE CASCADE
);

CREATE INDEX featuremap_organism_idx1 ON featuremap_organism USING btree (featuremap_id);
CREATE INDEX featuremap_organism_idx2 ON featuremap_organism USING btree (organism_id);

COMMENT ON TABLE featuremap_organism IS 'Links a featuremap to the organism(s) with which it is associated.';
-- $Id: phylogeny.sql,v 1.11 2007-04-12 17:00:30 briano Exp $
-- ==========================================
-- Chado phylogenetics module
--
-- Richard Bruskiewich
-- Chris Mungall
--
-- Initial design: 2004-05-27
--
-- ============
-- DEPENDENCIES
-- ============
-- :import feature from sequence
-- :import cvterm from cv
-- :import pub from pub
-- :import organism from organism
-- :import dbxref from db
-- :import analysis from companalysis
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- ================================================
-- TABLE: phylotree
-- ================================================

create table phylotree (
	phylotree_id bigserial not null,
	primary key (phylotree_id),
   dbxref_id bigint not null,
   foreign key (dbxref_id) references dbxref (dbxref_id) on delete cascade,
	name varchar(255) null,
	type_id bigint,
	foreign key (type_id) references cvterm (cvterm_id) on delete cascade,
	analysis_id bigint null,
   foreign key (analysis_id) references analysis (analysis_id) on delete cascade,
	comment text null,
	unique(phylotree_id)
);
create index phylotree_idx1 on phylotree (phylotree_id);

COMMENT ON TABLE phylotree IS 'Global anchor for phylogenetic tree.';
COMMENT ON COLUMN phylotree.type_id IS 'Type: protein, nucleotide, taxonomy, for example. The type should be any SO type, or "taxonomy".';


-- ================================================
-- TABLE: phylotree_pub
-- ================================================

create table phylotree_pub (
       phylotree_pub_id bigserial not null,
       primary key (phylotree_pub_id),
       phylotree_id bigint not null,
       foreign key (phylotree_id) references phylotree (phylotree_id) on delete cascade,
       pub_id bigint not null,
       foreign key (pub_id) references pub (pub_id) on delete cascade,
       unique(phylotree_id, pub_id)
);
create index phylotree_pub_idx1 on phylotree_pub (phylotree_id);
create index phylotree_pub_idx2 on phylotree_pub (pub_id);

COMMENT ON TABLE phylotree_pub IS 'Tracks citations global to the tree e.g. multiple sequence alignment supporting tree construction.';

-- ================================================
-- TABLE: phylotreeprop
-- ================================================

create table phylotreeprop (
  phylotreeprop_id bigserial not null,
  phylotree_id bigint not null,
  type_id bigint not null,
  value text null,
  rank int not null default 0,
  primary key (phylotreeprop_id),
  foreign key (phylotree_id) references phylotree (phylotree_id) on delete cascade INITIALLY DEFERRED,
  foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
  constraint phylotreeprop_c1 unique (phylotree_id,type_id,rank)
);
create index phylotreeprop_idx1 on phylotreeprop (phylotree_id);
create index phylotreeprop_idx2 on phylotreeprop (type_id);

COMMENT ON TABLE phylotreeprop IS 'A phylotree can have any number of slot-value property 
tags attached to it. This is an alternative to hardcoding a list of columns in the 
relational schema, and is completely extensible.';

COMMENT ON COLUMN phylotreeprop.type_id IS 'The name of the property/slot is a cvterm. 
The meaning of the property is defined in that cvterm.';

COMMENT ON COLUMN phylotreeprop.value IS 'The value of the property, represented as text. 
Numeric values are converted to their text representation. This is less efficient than 
using native database types, but is easier to query.';

COMMENT ON COLUMN phylotreeprop.rank IS 'Property-Value ordering. Any
phylotree can have multiple values for any particular property type 
these are ordered in a list using rank, counting from zero. For
properties that are single-valued rather than multi-valued, the
default 0 value should be used';

COMMENT ON INDEX phylotreeprop_c1 IS 'For any one phylotree, multivalued
property-value pairs must be differentiated by rank.';

-- ================================================
-- TABLE: phylonode
-- ================================================

create table phylonode (
       phylonode_id bigserial not null,
       primary key (phylonode_id),
       phylotree_id bigint not null,
       foreign key (phylotree_id) references phylotree (phylotree_id) on delete cascade,
       parent_phylonode_id bigint null,
       foreign key (parent_phylonode_id) references phylonode (phylonode_id) on delete cascade,
       left_idx int not null,
       right_idx int not null,
       type_id bigint,
       foreign key(type_id) references cvterm (cvterm_id) on delete cascade,
       feature_id bigint,
       foreign key (feature_id) references feature (feature_id) on delete cascade,
       label varchar(255) null,
       distance float  null,
--       Bootstrap float null.
       unique(phylotree_id, left_idx),
       unique(phylotree_id, right_idx)
);

CREATE INDEX phylonode_parent_phylonode_id_idx ON phylonode (parent_phylonode_id);

COMMENT ON TABLE phylonode IS 'This is the most pervasive
       element in the phylogeny module, cataloging the "phylonodes" of
       tree graphs. Edges are implied by the parent_phylonode_id
       reflexive closure. For all nodes in a nested set implementation the left and right index will be *between* the parents left and right indexes.';
COMMENT ON COLUMN phylonode.feature_id IS 'Phylonodes can have optional features attached to them e.g. a protein or nucleotide sequence usually attached to a leaf of the phylotree for non-leaf nodes, the feature may be a feature that is an instance of SO:match; this feature is the alignment of all leaf features beneath it.';
COMMENT ON COLUMN phylonode.type_id IS 'Type: e.g. root, interior, leaf.';
COMMENT ON COLUMN phylonode.parent_phylonode_id IS 'Root phylonode can have null parent_phylonode_id value.';


-- ================================================
-- TABLE: phylonode_dbxref
-- ================================================

create table phylonode_dbxref (
       phylonode_dbxref_id bigserial not null,
       primary key (phylonode_dbxref_id),

       phylonode_id bigint not null,
       foreign key (phylonode_id) references phylonode (phylonode_id) on delete cascade,
       dbxref_id bigint not null,
       foreign key (dbxref_id) references dbxref (dbxref_id) on delete cascade,

       unique(phylonode_id,dbxref_id)
);
create index phylonode_dbxref_idx1 on phylonode_dbxref (phylonode_id);
create index phylonode_dbxref_idx2 on phylonode_dbxref (dbxref_id);

COMMENT ON TABLE phylonode_dbxref IS 'For example, for orthology, paralogy group identifiers; could also be used for NCBI taxonomy; for sequences, refer to phylonode_feature, feature associated dbxrefs.';


-- ================================================
-- TABLE: phylonode_pub
-- ================================================

create table phylonode_pub (
       phylonode_pub_id bigserial not null,
       primary key (phylonode_pub_id),

       phylonode_id bigint not null,
       foreign key (phylonode_id) references phylonode (phylonode_id) on delete cascade,
       pub_id bigint not null,
       foreign key (pub_id) references pub (pub_id) on delete cascade,

       unique(phylonode_id, pub_id)
);
create index phylonode_pub_idx1 on phylonode_pub (phylonode_id);
create index phylonode_pub_idx2 on phylonode_pub (pub_id);

-- ================================================
-- TABLE: phylonode_organism
-- ================================================

create table phylonode_organism (
       phylonode_organism_id bigserial not null,
       primary key (phylonode_organism_id),

       phylonode_id bigint not null,
       foreign key (phylonode_id) references phylonode (phylonode_id) on delete cascade,
       organism_id bigint not null,
       foreign key (organism_id) references organism (organism_id) on delete cascade,

       unique(phylonode_id)
);
create index phylonode_organism_idx1 on phylonode_organism (phylonode_id);
create index phylonode_organism_idx2 on phylonode_organism (organism_id);

COMMENT ON TABLE phylonode_organism IS 'This linking table should only be used for nodes in taxonomy trees; it provides a mapping between the node and an organism. One node can have zero or one organisms, one organism can have zero or more nodes (although typically it should only have one in the standard NCBI taxonomy tree).';
COMMENT ON COLUMN phylonode_organism.phylonode_id IS 'One phylonode cannot refer to >1 organism.';


-- ================================================
-- TABLE: phylonodeprop
-- ================================================

create table phylonodeprop (
       phylonodeprop_id bigserial not null,
       primary key (phylonodeprop_id),

       phylonode_id bigint not null,
       foreign key (phylonode_id) references phylonode (phylonode_id) on delete cascade,
       type_id bigint not null,
       foreign key (type_id) references cvterm (cvterm_id) on delete cascade,

       value text not null default '',
-- It is not clear how useful the rank concept is here, leave it in for now.
       rank int not null default 0,

       unique(phylonode_id, type_id, value, rank)
);
create index phylonodeprop_idx1 on phylonodeprop (phylonode_id);
create index phylonodeprop_idx2 on phylonodeprop (type_id);

COMMENT ON COLUMN phylonodeprop.type_id IS 'type_id could designate phylonode hierarchy relationships, for example: species taxonomy (kingdom, order, family, genus, species), "ortholog/paralog", "fold/superfold", etc.';

-- ================================================
-- TABLE: phylonode_relationship
-- ================================================

create table phylonode_relationship (
       phylonode_relationship_id bigserial not null,
       primary key (phylonode_relationship_id),
       subject_id bigint not null,
       foreign key (subject_id) references phylonode (phylonode_id) on delete cascade,
       object_id bigint not null,
       foreign key (object_id) references phylonode (phylonode_id) on delete cascade,
       type_id bigint not null,
       foreign key (type_id) references cvterm (cvterm_id) on delete cascade,
       rank int,
       phylotree_id bigint not null,
       foreign key (phylotree_id) references phylotree (phylotree_id) on delete cascade,
       unique(subject_id, object_id, type_id)
);
create index phylonode_relationship_idx1 on phylonode_relationship (subject_id);
create index phylonode_relationship_idx2 on phylonode_relationship (object_id);
create index phylonode_relationship_idx3 on phylonode_relationship (type_id);

COMMENT ON TABLE phylonode_relationship IS 'This is for 
relationships that are not strictly hierarchical; for example,
horizontal gene transfer. Most phylogenetic trees are strictly
hierarchical, nevertheless it is here for completeness.';

CREATE OR REPLACE FUNCTION phylonode_depth(bigint)
 RETURNS FLOAT AS
 'DECLARE  id    ALIAS FOR $1;
  DECLARE  depth FLOAT := 0;
  DECLARE  curr_node phylonode%ROWTYPE;
  BEGIN
   SELECT INTO curr_node *
    FROM phylonode 
    WHERE phylonode_id=id;
   depth = depth + curr_node.distance;
   IF curr_node.parent_phylonode_id IS NULL
    THEN RETURN depth;
    ELSE RETURN depth + phylonode_depth(curr_node.parent_phylonode_id);
   END IF;
 END
'
LANGUAGE 'plpgsql';

CREATE OR REPLACE FUNCTION phylonode_height(bigint)
 RETURNS FLOAT AS
'
  SELECT coalesce(max(phylonode_height(phylonode_id) + distance), 0.0)
    FROM phylonode
    WHERE parent_phylonode_id = $1
'
LANGUAGE 'sql';

-- $Id: expression.sql,v 1.14 2007-03-23 15:18:02 scottcain Exp $
-- ==========================================
-- Chado expression module
--
-- =================================================================
-- Dependencies:
--
-- :import feature from sequence
-- :import cvterm from cv
-- :import pub from pub
-- =================================================================


-- ================================================
-- TABLE: expression
-- ================================================

create table expression (
       expression_id bigserial not null,
       primary key (expression_id),
       uniquename text not null,
       md5checksum character(32),
       description text,
       constraint expression_c1 unique (uniquename)       
);

COMMENT ON TABLE expression IS 'The expression table is essentially a bridge table.';


-- ================================================
-- TABLE: expression_cvterm
-- ================================================

create table expression_cvterm (
       expression_cvterm_id bigserial not null,
       primary key (expression_cvterm_id),
       expression_id bigint not null,
       foreign key (expression_id) references expression (expression_id) on delete cascade INITIALLY DEFERRED,
       cvterm_id bigint not null,
       foreign key (cvterm_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
       rank int not null default 0,
       cvterm_type_id bigint not null,
       foreign key (cvterm_type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
       constraint expression_cvterm_c1 unique (expression_id,cvterm_id,rank,cvterm_type_id)
);
create index expression_cvterm_idx1 on expression_cvterm (expression_id);
create index expression_cvterm_idx2 on expression_cvterm (cvterm_id);
create index expression_cvterm_idx3 on expression_cvterm (cvterm_type_id);


--================================================
-- TABLE: expression_cvtermprop
-- ================================================

create table expression_cvtermprop (
    expression_cvtermprop_id bigserial not null,
    primary key (expression_cvtermprop_id),
    expression_cvterm_id bigint not null,
    foreign key (expression_cvterm_id) references expression_cvterm (expression_cvterm_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint expression_cvtermprop_c1 unique (expression_cvterm_id,type_id,rank)
);
create index expression_cvtermprop_idx1 on expression_cvtermprop (expression_cvterm_id);
create index expression_cvtermprop_idx2 on expression_cvtermprop (type_id);

COMMENT ON TABLE expression_cvtermprop IS 'Extensible properties for
expression to cvterm associations. Examples: qualifiers.';

COMMENT ON COLUMN expression_cvtermprop.type_id IS 'The name of the
property/slot is a cvterm. The meaning of the property is defined in
that cvterm. For example, cvterms may come from the FlyBase miscellaneous cv.';

COMMENT ON COLUMN expression_cvtermprop.value IS 'The value of the
property, represented as text. Numeric values are converted to their
text representation. This is less efficient than using native database
types, but is easier to query.';

COMMENT ON COLUMN expression_cvtermprop.rank IS 'Property-Value
ordering. Any expression_cvterm can have multiple values for any particular
property type - these are ordered in a list using rank, counting from
zero. For properties that are single-valued rather than multi-valued,
the default 0 value should be used.';

-- ================================================
-- TABLE: expressionprop
-- ================================================

create table expressionprop (
    expressionprop_id bigserial not null,
    primary key (expressionprop_id),
    expression_id bigint not null,
    foreign key (expression_id) references expression (expression_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint expressionprop_c1 unique (expression_id,type_id,rank)
);
create index expressionprop_idx1 on expressionprop (expression_id);
create index expressionprop_idx2 on expressionprop (type_id);


-- ================================================
-- TABLE: expression_pub
-- ================================================

create table expression_pub (
       expression_pub_id bigserial not null,
       primary key (expression_pub_id),
       expression_id bigint not null,
       foreign key (expression_id) references expression (expression_id) on delete cascade INITIALLY DEFERRED,
       pub_id bigint not null,
       foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
       constraint expression_pub_c1 unique (expression_id,pub_id)       
);
create index expression_pub_idx1 on expression_pub (expression_id);
create index expression_pub_idx2 on expression_pub (pub_id);


-- ================================================
-- TABLE: feature_expression
-- ================================================

create table feature_expression (
       feature_expression_id bigserial not null,
       primary key (feature_expression_id),
       expression_id bigint not null,
       foreign key (expression_id) references expression (expression_id) on delete cascade INITIALLY DEFERRED,
       feature_id bigint not null,
       foreign key (feature_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,
       pub_id bigint not null,
       foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
       constraint feature_expression_c1 unique (expression_id,feature_id,pub_id)       
);
create index feature_expression_idx1 on feature_expression (expression_id);
create index feature_expression_idx2 on feature_expression (feature_id);
create index feature_expression_idx3 on feature_expression (pub_id);


-- ================================================
-- TABLE: feature_expressionprop
-- ================================================

create table feature_expressionprop (
       feature_expressionprop_id bigserial not null,
       primary key (feature_expressionprop_id),
       feature_expression_id bigint not null,
       foreign key (feature_expression_id) references feature_expression (feature_expression_id) on delete cascade INITIALLY DEFERRED,
       type_id bigint not null,
       foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
       value text null,
       rank int not null default 0,
       constraint feature_expressionprop_c1 unique (feature_expression_id,type_id,rank)
);
create index feature_expressionprop_idx1 on feature_expressionprop (feature_expression_id);
create index feature_expressionprop_idx2 on feature_expressionprop (type_id);

COMMENT ON TABLE feature_expressionprop IS 'Extensible properties for
feature_expression (comments, for example). Modeled on feature_cvtermprop.';


-- ================================================
-- TABLE: eimage
-- ================================================

create table eimage (
		eimage_id bigserial not null,
      primary key (eimage_id),
      eimage_data text,
      eimage_type varchar(255) not null,
      image_uri varchar(255)
);

COMMENT ON COLUMN eimage.eimage_data IS 'We expect images in eimage_data (e.g. JPEGs) to be uuencoded.';
COMMENT ON COLUMN eimage.eimage_type IS 'Describes the type of data in eimage_data.';


-- ================================================
-- TABLE: expression_image
-- ================================================

create table expression_image (
       expression_image_id bigserial not null,
       primary key (expression_image_id),
       expression_id bigint not null,
       foreign key (expression_id) references expression (expression_id) on delete cascade INITIALLY DEFERRED,
       eimage_id bigint not null,
       foreign key (eimage_id) references eimage (eimage_id) on delete cascade INITIALLY DEFERRED,
       constraint expression_image_c1 unique(expression_id,eimage_id)
);
create index expression_image_idx1 on expression_image (expression_id);
create index expression_image_idx2 on expression_image (eimage_id);
-- $Id: library.sql,v 1.10 2008-03-25 16:00:43 emmert Exp $
-- =================================================================
-- Dependencies:
--
-- :import feature from sequence
-- :import synonym from sequence
-- :import cvterm from cv
-- :import pub from pub
-- :import organism from organism
-- :import expression from expression
-- :import dbxref from db
-- :import contact from contact
-- =================================================================

-- ================================================
-- TABLE: library
-- ================================================

create table library (
    library_id bigserial not null,
    primary key (library_id),
    organism_id bigint not null,
    foreign key (organism_id) references organism (organism_id),
    name varchar(255),
    uniquename text not null,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id),
    is_obsolete int not null default 0,
    timeaccessioned timestamp not null default current_timestamp,
    timelastmodified timestamp not null default current_timestamp,
    constraint library_c1 unique (organism_id,uniquename,type_id)
);
create index library_name_ind1 on library(name);
create index library_idx1 on library (organism_id);
create index library_idx2 on library (type_id);
create index library_idx3 on library (uniquename);

COMMENT ON COLUMN library.type_id IS 'The type_id foreign key links to a controlled vocabulary of library types. Examples of this would be: "cDNA_library" or "genomic_library"';


-- ================================================
-- TABLE: library_synonym
-- ================================================

create table library_synonym (
    library_synonym_id bigserial not null,
    primary key (library_synonym_id),
    synonym_id bigint not null,
    foreign key (synonym_id) references synonym (synonym_id) on delete cascade INITIALLY DEFERRED,
    library_id bigint not null,
    foreign key (library_id) references library (library_id) on delete cascade INITIALLY DEFERRED,
    pub_id bigint not null,
    foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
    is_current boolean not null default 'true',
    is_internal boolean not null default 'false',
    constraint library_synonym_c1 unique (synonym_id,library_id,pub_id)
);
create index library_synonym_idx1 on library_synonym (synonym_id);
create index library_synonym_idx2 on library_synonym (library_id);
create index library_synonym_idx3 on library_synonym (pub_id);

COMMENT ON TABLE library_synonym IS 'Linking table between library and synonym.';

COMMENT ON COLUMN library_synonym.is_current IS 'The is_current bit indicates whether the linked synonym is the current -official- symbol for the linked library.';

COMMENT ON COLUMN library_synonym.pub_id IS 'The pub_id link is for
relating the usage of a given synonym to the publication in which it was used.';

COMMENT ON COLUMN library_synonym.is_internal IS 'Typically a synonym
exists so that somebody querying the database with an obsolete name
can find the object they are looking for under its current name.  If
the synonym has been used publicly and deliberately (e.g. in a paper), it my also be listed in reports as a synonym.   If the synonym was not used deliberately (e.g., there was a typo which went public), then the is_internal bit may be set to "true" so that it is known that the synonym is "internal" and should be queryable but should not be listed in reports as a valid synonym.';


-- ================================================
-- TABLE: library_pub
-- ================================================

create table library_pub (
    library_pub_id bigserial not null,
    primary key (library_pub_id),
    library_id bigint not null,
    foreign key (library_id) references library (library_id) on delete cascade INITIALLY DEFERRED,
    pub_id bigint not null,
    foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
    constraint library_pub_c1 unique (library_id,pub_id)
);
create index library_pub_idx1 on library_pub (library_id);
create index library_pub_idx2 on library_pub (pub_id);

COMMENT ON TABLE library_pub IS 'Attribution for a library.';


-- ================================================
-- TABLE: libraryprop
-- ================================================

create table libraryprop (
    libraryprop_id bigserial not null,
    primary key (libraryprop_id),
    library_id bigint not null,
    foreign key (library_id) references library (library_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id),
    value text null,
    rank int not null default 0,
    constraint libraryprop_c1 unique (library_id,type_id,rank)
);
create index libraryprop_idx1 on libraryprop (library_id);
create index libraryprop_idx2 on libraryprop (type_id);

COMMENT ON TABLE libraryprop IS 'Tag-value properties - follows standard chado model.';


-- ================================================
-- TABLE: libraryprop_pub
-- ================================================

create table libraryprop_pub (
    libraryprop_pub_id bigserial not null,
    primary key (libraryprop_pub_id),
    libraryprop_id bigint not null,
    foreign key (libraryprop_id) references libraryprop (libraryprop_id) on delete cascade INITIALLY DEFERRED,
    pub_id bigint not null,
    foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
    constraint libraryprop_pub_c1 unique (libraryprop_id,pub_id)
);
create index libraryprop_pub_idx1 on libraryprop_pub (libraryprop_id);
create index libraryprop_pub_idx2 on libraryprop_pub (pub_id);

COMMENT ON TABLE libraryprop_pub IS 'Attribution for libraryprop.';


-- ================================================
-- TABLE: library_cvterm
-- ================================================

create table library_cvterm (
    library_cvterm_id bigserial not null,
    primary key (library_cvterm_id),
    library_id bigint not null,
    foreign key (library_id) references library (library_id) on delete cascade INITIALLY DEFERRED,
    cvterm_id bigint not null,
    foreign key (cvterm_id) references cvterm (cvterm_id),
    pub_id bigint not null,
    foreign key (pub_id) references pub (pub_id),
    constraint library_cvterm_c1 unique (library_id,cvterm_id,pub_id)
);
create index library_cvterm_idx1 on library_cvterm (library_id);
create index library_cvterm_idx2 on library_cvterm (cvterm_id);
create index library_cvterm_idx3 on library_cvterm (pub_id);

COMMENT ON TABLE library_cvterm IS 'The table library_cvterm links a library to controlled vocabularies which describe the library.  For instance, there might be a link to the anatomy cv for "head" or "testes" for a head or testes library.';


-- ================================================
-- TABLE: library_feature
-- ================================================

create table library_feature (
    library_feature_id bigserial not null,
    primary key (library_feature_id),
    library_id bigint not null,
    foreign key (library_id) references library (library_id) on delete cascade INITIALLY DEFERRED,
    feature_id bigint not null,
    foreign key (feature_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,
    constraint library_feature_c1 unique (library_id,feature_id)
);
create index library_feature_idx1 on library_feature (library_id);
create index library_feature_idx2 on library_feature (feature_id);

COMMENT ON TABLE library_feature IS 'library_feature links a library to the clones which are contained in the library.  Examples of such linked features might be "cDNA_clone" or  "genomic_clone".';


-- ================================================
-- TABLE: library_dbxref
-- ================================================

create table library_dbxref (
    library_dbxref_id bigserial not null,
    primary key (library_dbxref_id),
    library_id bigint not null,
    foreign key (library_id) references library (library_id) on delete cascade INITIALLY DEFERRED,
    dbxref_id bigint not null,
    foreign key (dbxref_id) references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED,
    is_current boolean not null default 'true',
    constraint library_dbxref_c1 unique (library_id,dbxref_id)
);
create index library_dbxref_idx1 on library_dbxref (library_id);
create index library_dbxref_idx2 on library_dbxref (dbxref_id);

COMMENT ON TABLE library_dbxref IS 'Links a library to dbxrefs.';


-- ================================================
-- TABLE: library_expression
-- ================================================

create table library_expression (
    library_expression_id bigserial not null,
    primary key (library_expression_id),
    library_id bigint not null,
    foreign key (library_id) references library (library_id) on delete cascade INITIALLY DEFERRED,
    expression_id bigint not null,
    foreign key (expression_id) references expression (expression_id) on delete cascade INITIALLY DEFERRED,
    pub_id bigint not null,
    foreign key (pub_id) references pub (pub_id),
    constraint library_expression_c1 unique (library_id,expression_id)
);
create index library_expression_idx1 on library_expression (library_id);
create index library_expression_idx2 on library_expression (expression_id);
create index library_expression_idx3 on library_expression (pub_id);

COMMENT ON TABLE library_expression IS 'Links a library to expression statements.';


-- ================================================
-- TABLE: library_expressionprop
-- ================================================

create table library_expressionprop (
    library_expressionprop_id bigserial not null,
    primary key (library_expressionprop_id),
    library_expression_id bigint not null,
    foreign key (library_expression_id) references library_expression (library_expression_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id),
    value text null,
    rank int not null default 0,
    constraint library_expressionprop_c1 unique (library_expression_id,type_id,rank)
);
create index library_expressionprop_idx1 on library_expressionprop (library_expression_id);
create index library_expressionprop_idx2 on library_expressionprop (type_id);

COMMENT ON TABLE library_expressionprop IS 'Attributes of a library_expression relationship.';


-- ================================================
-- TABLE: library_featureprop
-- ================================================

create table library_featureprop (
    library_featureprop_id bigserial not null,
    primary key (library_featureprop_id),
    library_feature_id bigint not null,
    foreign key (library_feature_id) references library_feature (library_feature_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id),
    value text null,
    rank int not null default 0,
    constraint library_featureprop_c1 unique (library_feature_id,type_id,rank)
);
create index library_featureprop_idx1 on library_featureprop (library_feature_id);
create index library_featureprop_idx2 on library_featureprop (type_id);

COMMENT ON TABLE library_featureprop IS 'Attributes of a library_feature relationship.';

-- ================================================
-- TABLE: library_relationship
-- ================================================

create table library_relationship (
    library_relationship_id bigserial not null,
    primary key (library_relationship_id),
    subject_id bigint not null,
    foreign key (subject_id) references library (library_id) on delete cascade INITIALLY DEFERRED,
    object_id bigint not null,
    foreign key (object_id) references library (library_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id),
    constraint library_relationship_c1 unique (subject_id,object_id,type_id)
);
create index library_relationship_idx1 on library_relationship (subject_id);
create index library_relationship_idx2 on library_relationship (object_id);
create index library_relationship_idx3 on library_relationship (type_id);

COMMENT ON TABLE library_relationship IS 'Relationships between libraries.';


-- ================================================
-- TABLE: library_relationship_pub
-- ================================================

create table library_relationship_pub (
    library_relationship_pub_id bigserial not null,
    primary key (library_relationship_pub_id),
    library_relationship_id bigint not null,
    foreign key (library_relationship_id) references library_relationship (library_relationship_id) on delete cascade INITIALLY DEFERRED,
    pub_id bigint not null,
    foreign key (pub_id) references pub (pub_id),
    constraint library_relationship_pub_c1 unique (library_relationship_id,pub_id)
);
create index library_relationship_pub_idx1 on library_relationship_pub (library_relationship_id);
create index library_relationship_pub_idx2 on library_relationship_pub (pub_id);

COMMENT ON TABLE library_relationship_pub IS 'Provenance of library_relationship.';


-- ================================================
-- TABLE: library_contact
-- ================================================

CREATE TABLE library_contact (
    library_contact_id bigserial primary key NOT NULL,
    library_id bigint NOT NULL,
    contact_id bigint NOT NULL,
    CONSTRAINT library_contact_c1 UNIQUE (library_id, contact_id),
    FOREIGN KEY (library_id) REFERENCES library(library_id) ON DELETE CASCADE,
    FOREIGN KEY (contact_id) REFERENCES contact(contact_id) ON DELETE CASCADE
);

CREATE INDEX library_contact_idx1 ON library USING btree (library_id);
CREATE INDEX library_contact_idx2 ON contact USING btree (contact_id);

COMMENT ON TABLE library_contact IS 'Links contact(s) with a library.  Used to indicate a particular person or organization responsible for creation of or that can provide more information on a particular library.';

-- $Id: stock.sql,v 1.7 2007-03-23 15:18:03 scottcain Exp $
-- ==========================================
-- Chado stock module
--
-- DEPENDENCIES
-- ============
-- :import cvterm from cv
-- :import pub from pub
-- :import dbxref from db
-- :import organism from organism
-- :import genotype from genetic
-- :import contact from contact
-- :import feature from sequence
-- :import featuremap from map
-- ================================================
-- TABLE: stock
-- ================================================

create table stock (
       stock_id bigserial not null,
       primary key (stock_id),
       dbxref_id bigint,
       foreign key (dbxref_id) references dbxref (dbxref_id) on delete set null INITIALLY DEFERRED,
       organism_id bigint,
       foreign key (organism_id) references organism (organism_id) on delete cascade INITIALLY DEFERRED,
       name varchar(255),
       uniquename text not null,
       description text,
       type_id bigint not null,
       foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
       is_obsolete boolean not null default 'false',
       constraint stock_c1 unique (organism_id,uniquename,type_id)
);
create index stock_name_ind1 on stock (name);
create index stock_idx1 on stock (dbxref_id);
create index stock_idx2 on stock (organism_id);
create index stock_idx3 on stock (type_id);
create index stock_idx4 on stock (uniquename);

COMMENT ON TABLE stock IS 'Any stock can be globally identified by the
combination of organism, uniquename and stock type. A stock is the physical entities, either living or preserved, held by collections. Stocks belong to a collection; they have IDs, type, organism, description and may have a genotype.';
COMMENT ON COLUMN stock.dbxref_id IS 'The dbxref_id is an optional primary stable identifier for this stock. Secondary indentifiers and external dbxrefs go in table: stock_dbxref.';
COMMENT ON COLUMN stock.organism_id IS 'The organism_id is the organism to which the stock belongs. This column should only be left blank if the organism cannot be determined.';
COMMENT ON COLUMN stock.type_id IS 'The type_id foreign key links to a controlled vocabulary of stock types. The would include living stock, genomic DNA, preserved specimen. Secondary cvterms for stocks would go in stock_cvterm.';
COMMENT ON COLUMN stock.description IS 'The description is the genetic description provided in the stock list.';
COMMENT ON COLUMN stock.name IS 'The name is a human-readable local name for a stock.';


-- ================================================
-- TABLE: stock_pub
-- ================================================

create table stock_pub (
       stock_pub_id bigserial not null,
       primary key (stock_pub_id),
       stock_id bigint not null,
       foreign key (stock_id) references stock (stock_id)  on delete cascade INITIALLY DEFERRED,
       pub_id bigint not null,
       foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
       constraint stock_pub_c1 unique (stock_id,pub_id)
);
create index stock_pub_idx1 on stock_pub (stock_id);
create index stock_pub_idx2 on stock_pub (pub_id);

COMMENT ON TABLE stock_pub IS 'Provenance. Linking table between stocks and, for example, a stocklist computer file.';


-- ================================================
-- TABLE: stockprop
-- ================================================

create table stockprop (
       stockprop_id bigserial not null,
       primary key (stockprop_id),
       stock_id bigint not null,
       foreign key (stock_id) references stock (stock_id) on delete cascade INITIALLY DEFERRED,
       type_id bigint not null,
       foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
       value text null,
       rank int not null default 0,
       constraint stockprop_c1 unique (stock_id,type_id,rank)
);
create index stockprop_idx1 on stockprop (stock_id);
create index stockprop_idx2 on stockprop (type_id);

COMMENT ON TABLE stockprop IS 'A stock can have any number of
slot-value property tags attached to it. This is an alternative to
hardcoding a list of columns in the relational schema, and is
completely extensible. There is a unique constraint, stockprop_c1, for
the combination of stock_id, rank, and type_id. Multivalued property-value pairs must be differentiated by rank.';


-- ================================================
-- TABLE: stockprop_pub
-- ================================================

create table stockprop_pub (
     stockprop_pub_id bigserial not null,
     primary key (stockprop_pub_id),
     stockprop_id bigint not null,
     foreign key (stockprop_id) references stockprop (stockprop_id) on delete cascade INITIALLY DEFERRED,
     pub_id bigint not null,
     foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
     constraint stockprop_pub_c1 unique (stockprop_id,pub_id)
);
create index stockprop_pub_idx1 on stockprop_pub (stockprop_id);
create index stockprop_pub_idx2 on stockprop_pub (pub_id); 

COMMENT ON TABLE stockprop_pub IS 'Provenance. Any stockprop assignment can optionally be supported by a publication.';


-- ================================================
-- TABLE: stock_relationship
-- ================================================

create table stock_relationship (
       stock_relationship_id bigserial not null,
       primary key (stock_relationship_id),
       subject_id bigint not null,
       foreign key (subject_id) references stock (stock_id) on delete cascade INITIALLY DEFERRED,
       object_id bigint not null,
       foreign key (object_id) references stock (stock_id) on delete cascade INITIALLY DEFERRED,
       type_id bigint not null,
       foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
       value text null,
       rank int not null default 0,
       constraint stock_relationship_c1 unique (subject_id,object_id,type_id,rank)
);
create index stock_relationship_idx1 on stock_relationship (subject_id);
create index stock_relationship_idx2 on stock_relationship (object_id);
create index stock_relationship_idx3 on stock_relationship (type_id);

COMMENT ON COLUMN stock_relationship.subject_id IS 'stock_relationship.subject_id is the subject of the subj-predicate-obj sentence. This is typically the substock.';
COMMENT ON COLUMN stock_relationship.object_id IS 'stock_relationship.object_id is the object of the subj-predicate-obj sentence. This is typically the container stock.';
COMMENT ON COLUMN stock_relationship.type_id IS 'stock_relationship.type_id is relationship type between subject and object. This is a cvterm, typically from the OBO relationship ontology, although other relationship types are allowed.';
COMMENT ON COLUMN stock_relationship.rank IS 'stock_relationship.rank is the ordering of subject stocks with respect to the object stock may be important where rank is used to order these; starts from zero.';
COMMENT ON COLUMN stock_relationship.value IS 'stock_relationship.value is for additional notes or comments.';



-- ================================================
-- TABLE: stock_relationship_cvterm
-- ================================================

CREATE TABLE stock_relationship_cvterm (
	stock_relationship_cvterm_id bigserial NOT NULL,
	PRIMARY KEY (stock_relationship_cvterm_id),
	stock_relationship_id bigint NOT NULL,
	FOREIGN KEY (stock_relationship_id) references stock_relationship (stock_relationship_id) ON DELETE CASCADE INITIALLY DEFERRED,
	cvterm_id bigint NOT NULL,
	FOREIGN KEY (cvterm_id) REFERENCES cvterm (cvterm_id) ON DELETE RESTRICT,
	pub_id bigint,
	FOREIGN KEY (pub_id) REFERENCES pub (pub_id) ON DELETE RESTRICT
);
COMMENT ON TABLE stock_relationship_cvterm is 'For germplasm maintenance and pedigree data, stock_relationship. type_id will record cvterms such as "is a female parent of", "a parent for mutation", "is a group_id of", "is a source_id of", etc The cvterms for higher categories such as "generative", "derivative" or "maintenance" can be stored in table stock_relationship_cvterm';


-- ================================================
-- TABLE: stock_relationship_pub
-- ================================================

create table stock_relationship_pub (
      stock_relationship_pub_id bigserial not null,
      primary key (stock_relationship_pub_id),
      stock_relationship_id bigint not null,
      foreign key (stock_relationship_id) references stock_relationship (stock_relationship_id) on delete cascade INITIALLY DEFERRED,
      pub_id bigint not null,
      foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
      constraint stock_relationship_pub_c1 unique (stock_relationship_id,pub_id)
);
create index stock_relationship_pub_idx1 on stock_relationship_pub (stock_relationship_id);
create index stock_relationship_pub_idx2 on stock_relationship_pub (pub_id);

COMMENT ON TABLE stock_relationship_pub IS 'Provenance. Attach optional evidence to a stock_relationship in the form of a publication.';


-- ================================================
-- TABLE: stock_dbxref
-- ================================================

create table stock_dbxref (
     stock_dbxref_id bigserial not null,
     primary key (stock_dbxref_id),
     stock_id bigint not null,
     foreign key (stock_id) references stock (stock_id) on delete cascade INITIALLY DEFERRED,
     dbxref_id bigint not null,
     foreign key (dbxref_id) references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED,
     is_current boolean not null default 'true',
     constraint stock_dbxref_c1 unique (stock_id,dbxref_id)
);
create index stock_dbxref_idx1 on stock_dbxref (stock_id);
create index stock_dbxref_idx2 on stock_dbxref (dbxref_id);

COMMENT ON TABLE stock_dbxref IS 'stock_dbxref links a stock to dbxrefs. This is for secondary identifiers; primary identifiers should use stock.dbxref_id.';
COMMENT ON COLUMN stock_dbxref.is_current IS 'The is_current boolean indicates whether the linked dbxref is the current -official- dbxref for the linked stock.';


-- ================================================
-- TABLE: stock_cvterm
-- ================================================

create table stock_cvterm (
     stock_cvterm_id bigserial not null,
     primary key (stock_cvterm_id),
     stock_id bigint not null,
     foreign key (stock_id) references stock (stock_id) on delete cascade INITIALLY DEFERRED,
     cvterm_id bigint not null,
     foreign key (cvterm_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
     pub_id bigint not null,
     foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
     is_not boolean not null default false,
     rank int not null default 0,
     constraint stock_cvterm_c1 unique (stock_id,cvterm_id,pub_id,rank)
 );
create index stock_cvterm_idx1 on stock_cvterm (stock_id);
create index stock_cvterm_idx2 on stock_cvterm (cvterm_id);
create index stock_cvterm_idx3 on stock_cvterm (pub_id);

COMMENT ON TABLE stock_cvterm IS 'stock_cvterm links a stock to cvterms. This is for secondary cvterms; primary cvterms should use stock.type_id.';


-- ================================================
-- TABLE: stock_cvtermprop
-- ================================================

create table stock_cvtermprop (
    stock_cvtermprop_id bigserial not null,
    primary key (stock_cvtermprop_id),
    stock_cvterm_id bigint not null,
    foreign key (stock_cvterm_id) references stock_cvterm (stock_cvterm_id) on delete cascade,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint stock_cvtermprop_c1 unique (stock_cvterm_id,type_id,rank)
);
create index stock_cvtermprop_idx1 on stock_cvtermprop (stock_cvterm_id);
create index stock_cvtermprop_idx2 on stock_cvtermprop (type_id);

COMMENT ON TABLE stock_cvtermprop IS 'Extensible properties for
stock to cvterm associations. Examples: GO evidence codes;
qualifiers; metadata such as the date on which the entry was curated
and the source of the association. See the stockprop table for
meanings of type_id, value and rank.';

COMMENT ON COLUMN stock_cvtermprop.type_id IS 'The name of the
property/slot is a cvterm. The meaning of the property is defined in
that cvterm. cvterms may come from the OBO evidence code cv.';

COMMENT ON COLUMN stock_cvtermprop.value IS 'The value of the
property, represented as text. Numeric values are converted to their
text representation. This is less efficient than using native database
types, but is easier to query.';

COMMENT ON COLUMN stock_cvtermprop.rank IS 'Property-Value
ordering. Any stock_cvterm can have multiple values for any particular
property type - these are ordered in a list using rank, counting from
zero. For properties that are single-valued rather than multi-valued,
the default 0 value should be used.';


-- ================================================
-- TABLE: stock_genotype
-- ================================================

create table stock_genotype (
       stock_genotype_id bigserial not null,
       primary key (stock_genotype_id),
       stock_id bigint not null,
       foreign key (stock_id) references stock (stock_id) on delete cascade,
       genotype_id bigint not null,
       foreign key (genotype_id) references genotype (genotype_id) on delete cascade,
       constraint stock_genotype_c1 unique (stock_id, genotype_id)
);
create index stock_genotype_idx1 on stock_genotype (stock_id);
create index stock_genotype_idx2 on stock_genotype (genotype_id);

COMMENT ON TABLE stock_genotype IS 'Simple table linking a stock to
a genotype. Features with genotypes can be linked to stocks thru feature_genotype -> genotype -> stock_genotype -> stock.';


-- ================================================
-- TABLE: stockcollection
-- ================================================

create table stockcollection (
	stockcollection_id bigserial not null, 
        primary key (stockcollection_id),
	type_id bigint not null,
        foreign key (type_id) references cvterm (cvterm_id) on delete cascade,
        contact_id bigint null,
        foreign key (contact_id) references contact (contact_id) on delete set null INITIALLY DEFERRED,
	name varchar(255),
	uniquename text not null,
	constraint stockcollection_c1 unique (uniquename,type_id)
);
create index stockcollection_name_ind1 on stockcollection (name);
create index stockcollection_idx1 on stockcollection (contact_id);
create index stockcollection_idx2 on stockcollection (type_id);
create index stockcollection_idx3 on stockcollection (uniquename);

COMMENT ON TABLE stockcollection IS 'The lab or stock center distributing the stocks in their collection.';
COMMENT ON COLUMN stockcollection.uniquename IS 'uniqename is the value of the collection cv.';
COMMENT ON COLUMN stockcollection.type_id IS 'type_id is the collection type cv.';
COMMENT ON COLUMN stockcollection.name IS 'name is the collection.';
COMMENT ON COLUMN stockcollection.contact_id IS 'contact_id links to the contact information for the collection.';


-- ================================================
-- TABLE: stockcollectionprop
-- ================================================

create table stockcollectionprop (
    stockcollectionprop_id bigserial not null,
    primary key (stockcollectionprop_id),
    stockcollection_id bigint not null,
    foreign key (stockcollection_id) references stockcollection (stockcollection_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id),
    value text null,
    rank int not null default 0,
    constraint stockcollectionprop_c1 unique (stockcollection_id,type_id,rank)
);
create index stockcollectionprop_idx1 on stockcollectionprop (stockcollection_id);
create index stockcollectionprop_idx2 on stockcollectionprop (type_id);

COMMENT ON TABLE stockcollectionprop IS 'The table stockcollectionprop
contains the value of the stock collection such as website/email URLs;
the value of the stock collection order URLs.';
COMMENT ON COLUMN stockcollectionprop.type_id IS 'The cv for the type_id is "stockcollection property type".';


-- ================================================
-- TABLE: stockcollection_stock
-- ================================================

create table stockcollection_stock (
    stockcollection_stock_id bigserial not null,
    primary key (stockcollection_stock_id),
    stockcollection_id bigint not null,
    foreign key (stockcollection_id) references stockcollection (stockcollection_id) on delete cascade INITIALLY DEFERRED,
    stock_id bigint not null,
    foreign key (stock_id) references stock (stock_id) on delete cascade INITIALLY DEFERRED,
    constraint stockcollection_stock_c1 unique (stockcollection_id,stock_id)
);
create index stockcollection_stock_idx1 on stockcollection_stock (stockcollection_id);
create index stockcollection_stock_idx2 on stockcollection_stock (stock_id);

COMMENT ON TABLE stockcollection_stock IS 'stockcollection_stock links
a stock collection to the stocks which are contained in the collection.';



-- ================================================
-- TABLE: stock_dbxrefprop
-- ================================================

create table stock_dbxrefprop (
       stock_dbxrefprop_id bigserial not null,
       primary key (stock_dbxrefprop_id),
       stock_dbxref_id bigint not null,
       foreign key (stock_dbxref_id) references stock_dbxref (stock_dbxref_id) on delete cascade INITIALLY DEFERRED,
       type_id bigint not null,
       foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
       value text null,
       rank int not null default 0,
       constraint stock_dbxrefprop_c1 unique (stock_dbxref_id,type_id,rank)
);
create index stock_dbxrefprop_idx1 on stock_dbxrefprop (stock_dbxref_id);
create index stock_dbxrefprop_idx2 on stock_dbxrefprop (type_id);

COMMENT ON TABLE stock_dbxrefprop IS 'A stock_dbxref can have any number of
slot-value property tags attached to it. This is useful for storing properties related to dbxref annotations of stocks, such as evidence codes, and references, and metadata, such as create/modify dates. This is an alternative to
hardcoding a list of columns in the relational schema, and is
completely extensible. There is a unique constraint, stock_dbxrefprop_c1, for
the combination of stock_dbxref_id, rank, and type_id. Multivalued property-value pairs must be differentiated by rank.';

-- ================================================
-- TABLE: stockcollection_db
-- ================================================

CREATE TABLE stockcollection_db (
    stockcollection_db_id bigserial primary key NOT NULL,
    stockcollection_id bigint NOT NULL,
    db_id bigint NOT NULL,
    CONSTRAINT stockcollection_db_c1 UNIQUE (stockcollection_id, db_id),
    FOREIGN KEY (db_id) REFERENCES db(db_id) ON DELETE CASCADE,
    FOREIGN KEY (stockcollection_id) REFERENCES stockcollection(stockcollection_id) ON DELETE CASCADE
);

CREATE INDEX stockcollection_db_idx1 ON stockcollection_db USING btree (stockcollection_id);
CREATE INDEX stockcollection_db_idx2 ON stockcollection_db USING btree (db_id);

COMMENT ON TABLE stockcollection_db IS 'Stock collections may be respresented 
by an external online database. This table associates a stock collection with 
a database where its member stocks can be found. Individual stock that are part 
of this collction should have entries in the stock_dbxref table with the same 
db_id record';


-- ================================================
-- TABLE: stock_feature
-- ================================================

CREATE TABLE stock_feature (
  stock_feature_id bigserial NOT NULL,
  feature_id bigint NOT NULL,
  stock_id bigint NOT NULL,
  type_id bigint NOT NULL,
  rank INT NOT NULL DEFAULT 0,
  PRIMARY KEY (stock_feature_id),
  FOREIGN KEY (feature_id) REFERENCES feature (feature_id) ON DELETE CASCADE INITIALLY DEFERRED,
  FOREIGN KEY (stock_id) REFERENCES stock (stock_id) ON DELETE CASCADE INITIALLY DEFERRED,
  FOREIGN KEY (type_id) REFERENCES cvterm (cvterm_id) ON DELETE CASCADE INITIALLY DEFERRED,
  CONSTRAINT stock_feature_c1 UNIQUE (feature_id, stock_id, type_id, rank)  
);
create index stock_feature_idx1 on stock_feature (stock_feature_id);
create index stock_feature_idx2 on stock_feature (feature_id);
create index stock_feature_idx3 on stock_feature (stock_id);
create index stock_feature_idx4 on stock_feature (type_id);

COMMENT ON TABLE stock_feature  IS 'Links a stock to a feature.';


-- ================================================
-- TABLE: stock_featuremap
-- ================================================

CREATE TABLE stock_featuremap (
  stock_featuremap_id bigserial NOT NULL,
  featuremap_id bigint NOT NULL,
  stock_id bigint NOT NULL,
  type_id bigint,
  PRIMARY KEY (stock_featuremap_id),
  FOREIGN KEY (featuremap_id) REFERENCES featuremap (featuremap_id) ON DELETE CASCADE INITIALLY DEFERRED,
  FOREIGN KEY (stock_id) REFERENCES stock (stock_id)  ON DELETE CASCADE INITIALLY DEFERRED,
  FOREIGN KEY (type_id) REFERENCES cvterm (cvterm_id) ON DELETE CASCADE INITIALLY DEFERRED,
  CONSTRAINT stock_featuremap_c1 UNIQUE (featuremap_id, stock_id, type_id)  
);

create index stock_featuremap_idx1 on stock_featuremap (featuremap_id);
create index stock_featuremap_idx2 on stock_featuremap (stock_id);
create index stock_featuremap_idx3 on stock_featuremap (type_id);

COMMENT ON TABLE stock_featuremap  IS 'Links a featuremap to a stock.';


-- ================================================
-- TABLE: stock_library
-- ================================================
CREATE TABLE stock_library (
    stock_library_id bigserial primary key NOT NULL,
    library_id bigint NOT NULL,
    stock_id bigint NOT NULL,
    CONSTRAINT stock_library_c1 UNIQUE (library_id, stock_id),
    FOREIGN KEY (library_id) REFERENCES library(library_id) ON DELETE CASCADE,
    FOREIGN KEY (stock_id) REFERENCES stock(stock_id) ON DELETE CASCADE
);

CREATE INDEX stock_library_idx1 ON stock_library USING btree (library_id);
CREATE INDEX stock_library_idx2 ON stock_library USING btree (stock_id);

COMMENT ON TABLE stock_library IS 'Links a stock with a library.';

-- ==========================================
-- Chado project module. Used primarily by other Chado modules to
-- group experiments, stocks, and so forth that are associated with
-- eachother administratively or organizationally.
--
-- =================================================================
-- Dependencies:
--
-- :import cvterm from cv
-- :import pub from pub
-- :import contact from contact
-- :import dbxref from db
-- :import analysis from companalysis
-- :import feature from sequence
-- :import stock from stock
-- =================================================================


-- ================================================
-- TABLE: project
-- ================================================

create table project (
    project_id bigserial not null,
    primary key (project_id),
    name varchar(255) not null,
    description text,
    constraint project_c1 unique (name)
);

COMMENT ON TABLE project IS
'A project is some kind of planned endeavor.  Used primarily by other
Chado modules to group experiments, stocks, and so forth that are
associated with eachother administratively or organizationally.';

-- ================================================
-- TABLE: projectprop
-- ================================================

CREATE TABLE projectprop (
	projectprop_id bigserial NOT NULL,
	PRIMARY KEY (projectprop_id),
	project_id bigint NOT NULL,
	FOREIGN KEY (project_id) REFERENCES project (project_id) ON DELETE CASCADE,
	type_id bigint NOT NULL,
	FOREIGN KEY (type_id) REFERENCES cvterm (cvterm_id) ON DELETE CASCADE,
	value text,
	rank int not null default 0,
	CONSTRAINT projectprop_c1 UNIQUE (project_id, type_id, rank)
);
COMMENT ON TABLE project IS
'Standard Chado flexible property table for projects.';

-- ================================================
-- TABLE: project_relationship
-- ================================================

CREATE TABLE project_relationship (
	project_relationship_id bigserial NOT NULL,
	PRIMARY KEY (project_relationship_id),
	subject_project_id bigint NOT NULL,
	FOREIGN KEY (subject_project_id) REFERENCES project (project_id) ON DELETE CASCADE,
	object_project_id bigint NOT NULL,
	FOREIGN KEY (object_project_id) REFERENCES project (project_id) ON DELETE CASCADE,
	type_id bigint NOT NULL,
	FOREIGN KEY (type_id) REFERENCES cvterm (cvterm_id) ON DELETE RESTRICT,
	CONSTRAINT project_relationship_c1 UNIQUE (subject_project_id, object_project_id, type_id)
);

COMMENT ON TABLE project_relationship IS
'Linking table for relating projects to each other.  For example, a
given project could be composed of several smaller subprojects';

COMMENT ON COLUMN project_relationship.type_id IS
'The cvterm type of the relationship being stated, such as "part of".';

-- ================================================
-- TABLE: project_pub
-- ================================================

create table project_pub (
       project_pub_id bigserial not null,
       primary key (project_pub_id),
       project_id bigint not null,
       foreign key (project_id) references project (project_id) on delete cascade INITIALLY DEFERRED,
       pub_id bigint not null,
       foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
       constraint project_pub_c1 unique (project_id,pub_id)
);
create index project_pub_idx1 on project_pub (project_id);
create index project_pub_idx2 on project_pub (pub_id);

COMMENT ON TABLE project_pub IS 'Linking table for associating projects and publications.';

-- ================================================
-- TABLE: project_contact
-- ================================================

create table project_contact (
       project_contact_id bigserial not null,
       primary key (project_contact_id),
       project_id bigint not null,
       foreign key (project_id) references project (project_id) on delete cascade INITIALLY DEFERRED,
       contact_id bigint not null,
       foreign key (contact_id) references contact (contact_id) on delete cascade INITIALLY DEFERRED,
       constraint project_contact_c1 unique (project_id,contact_id)
);
create index project_contact_idx1 on project_contact (project_id);
create index project_contact_idx2 on project_contact (contact_id);

COMMENT ON TABLE project_contact IS 'Linking table for associating projects and contacts.';

-- ================================================
-- TABLE: project_dbxref
-- ================================================

create table project_dbxref (
  project_dbxref_id bigserial not null,
  project_id bigint not null,
  dbxref_id bigint not null,
  is_current boolean not null default 'true',
  primary key (project_dbxref_id),
  foreign key (dbxref_id) references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED,
  foreign key (project_id) references project (project_id) on delete cascade INITIALLY DEFERRED,
  constraint project_dbxref_c1 unique (project_id,dbxref_id)
);
create index project_dbxref_idx1 on project_dbxref (project_id);
create index project_dbxref_idx2 on project_dbxref (dbxref_id);

COMMENT ON TABLE project_dbxref IS 'project_dbxref links a project to dbxrefs.';
COMMENT ON COLUMN project_dbxref.is_current IS 'The is_current boolean indicates whether the linked dbxref is the current -official- dbxref for the linked project.';

-- ================================================
-- TABLE: project_analysis
-- ================================================

create table project_analysis (
       project_analysis_id bigserial not null,
       primary key (project_analysis_id),
       project_id bigint not null,
       foreign key (project_id) references project (project_id) on delete cascade INITIALLY DEFERRED,
       analysis_id bigint not null,
       foreign key (analysis_id) references analysis (analysis_id) on delete cascade INITIALLY DEFERRED,
       rank int not null default 0,
       constraint project_analysis_c1 unique (project_id,analysis_id)
);
create index project_analysis_idx1 on project_analysis (project_id);
create index project_analysis_idx2 on project_analysis (analysis_id);

COMMENT ON TABLE project_analysis IS 'Links an analysis to a project that may contain multiple analyses. 
The rank column can be used to specify a simple ordering in which analyses were executed.';


-- ================================================
-- TABLE: project_feature
-- ================================================

CREATE TABLE project_feature (
    project_feature_id bigserial primary key NOT NULL,
    feature_id bigint NOT NULL,
    project_id bigint NOT NULL,
    CONSTRAINT project_feature_c1 UNIQUE (feature_id, project_id),
    FOREIGN KEY (feature_id) REFERENCES feature(feature_id) ON DELETE CASCADE,
    FOREIGN KEY (project_id) REFERENCES project(project_id) ON DELETE CASCADE
);

CREATE INDEX project_feature_idx1 ON project_feature USING btree (feature_id);
CREATE INDEX project_feature_idx2 ON project_feature USING btree (project_id);

COMMENT ON TABLE project_feature IS 'This table is intended associate records in the feature table with a project.';

-- ================================================
-- TABLE: project_stock
-- ================================================

CREATE TABLE project_stock (
    project_stock_id bigserial primary key NOT NULL,
    stock_id bigint NOT NULL,
    project_id bigint NOT NULL,
    CONSTRAINT project_stock_c1 UNIQUE (stock_id, project_id),
    FOREIGN KEY (stock_id) REFERENCES stock(stock_id) ON DELETE CASCADE,
    FOREIGN KEY (project_id) REFERENCES project(project_id) ON DELETE CASCADE
);

CREATE INDEX project_stock_idx1 ON project_stock USING btree (stock_id);
CREATE INDEX project_stock_idx2 ON project_stock USING btree (project_id);


COMMENT ON TABLE project_stock IS 'This table is intended associate records in the stock table with a project.';
-- $Id: mage.sql,v 1.3 2008-03-19 18:32:51 scottcain Exp $
-- ==========================================
-- Chado mage module
--
-- =================================================================
-- Dependencies:
--
-- :import feature from sequence
-- :import cvterm from cv
-- :import pub from pub
-- :import organism from organism
-- :import contact from contact
-- :import dbxref from db
-- :import tableinfo from general
-- :import project from project
-- :import analysis from companalysis
-- =================================================================

-- ================================================
-- TABLE: mageml
-- ================================================

create table mageml (
    mageml_id bigserial not null,
    primary key (mageml_id),
    mage_package text not null,
    mage_ml text not null
);

COMMENT ON TABLE mageml IS 'This table is for storing extra bits of MAGEml in a denormalized form. More normalization would require many more tables.';

-- ================================================
-- TABLE: magedocumentation
-- ================================================

create table magedocumentation (
    magedocumentation_id bigserial not null,
    primary key (magedocumentation_id),
    mageml_id bigint not null,
    foreign key (mageml_id) references mageml (mageml_id) on delete cascade INITIALLY DEFERRED,
    tableinfo_id bigint not null,
    foreign key (tableinfo_id) references tableinfo (tableinfo_id) on delete cascade INITIALLY DEFERRED,
    row_id int not null,
    mageidentifier text not null
);
create index magedocumentation_idx1 on magedocumentation (mageml_id);
create index magedocumentation_idx2 on magedocumentation (tableinfo_id);
create index magedocumentation_idx3 on magedocumentation (row_id);

COMMENT ON TABLE magedocumentation IS NULL;

-- ================================================
-- TABLE: protocol
-- ================================================

create table protocol (
    protocol_id bigserial not null,
    primary key (protocol_id),
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    pub_id bigint null,
    foreign key (pub_id) references pub (pub_id) on delete set null INITIALLY DEFERRED,
    dbxref_id bigint null,
    foreign key (dbxref_id) references dbxref (dbxref_id) on delete set null INITIALLY DEFERRED,
    name text not null,
    uri text null,
    protocoldescription text null,
    hardwaredescription text null,
    softwaredescription text null,
    constraint protocol_c1 unique (name)
);
create index protocol_idx1 on protocol (type_id);
create index protocol_idx2 on protocol (pub_id);
create index protocol_idx3 on protocol (dbxref_id);

COMMENT ON TABLE protocol IS 'Procedural notes on how data was prepared and processed.';

-- ================================================
-- TABLE: protocolparam
-- ================================================

create table protocolparam (
    protocolparam_id bigserial not null,
    primary key (protocolparam_id),
    protocol_id bigint not null,
    foreign key (protocol_id) references protocol (protocol_id) on delete cascade INITIALLY DEFERRED,
    name text not null,
    datatype_id bigint null,
    foreign key (datatype_id) references cvterm (cvterm_id) on delete set null INITIALLY DEFERRED,
    unittype_id bigint null,
    foreign key (unittype_id) references cvterm (cvterm_id) on delete set null INITIALLY DEFERRED,
    value text null,
    rank int not null default 0
);
create index protocolparam_idx1 on protocolparam (protocol_id);
create index protocolparam_idx2 on protocolparam (datatype_id);
create index protocolparam_idx3 on protocolparam (unittype_id);

COMMENT ON TABLE protocolparam IS 'Parameters related to a
protocol. For example, if the protocol is a soak, this might include attributes of bath temperature and duration.';

-- ================================================
-- TABLE: channel
-- ================================================

create table channel (
    channel_id bigserial not null,
    primary key (channel_id),
    name text not null,
    definition text not null,
    constraint channel_c1 unique (name)
);

COMMENT ON TABLE channel IS 'Different array platforms can record signals from one or more channels (cDNA arrays typically use two CCD, but Affymetrix uses only one).';

-- ================================================
-- TABLE: arraydesign
-- ================================================

create table arraydesign (
    arraydesign_id bigserial not null,
    primary key (arraydesign_id),
    manufacturer_id bigint not null,
    foreign key (manufacturer_id) references contact (contact_id) on delete cascade INITIALLY DEFERRED,
    platformtype_id bigint not null,
    foreign key (platformtype_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    substratetype_id bigint null,
    foreign key (substratetype_id) references cvterm (cvterm_id) on delete set null INITIALLY DEFERRED,
    protocol_id bigint null,
    foreign key (protocol_id) references protocol (protocol_id) on delete set null INITIALLY DEFERRED,
    dbxref_id bigint null,
    foreign key (dbxref_id) references dbxref (dbxref_id) on delete set null INITIALLY DEFERRED,
    name text not null,
    version text null,
    description text null,
    array_dimensions text null,
    element_dimensions text null,
    num_of_elements int null,
    num_array_columns int null,
    num_array_rows int null,
    num_grid_columns int null,
    num_grid_rows int null,
    num_sub_columns int null,
    num_sub_rows int null,
    constraint arraydesign_c1 unique (name)
);
create index arraydesign_idx1 on arraydesign (manufacturer_id);
create index arraydesign_idx2 on arraydesign (platformtype_id);
create index arraydesign_idx3 on arraydesign (substratetype_id);
create index arraydesign_idx4 on arraydesign (protocol_id);
create index arraydesign_idx5 on arraydesign (dbxref_id);

COMMENT ON TABLE arraydesign IS 'General properties about an array.
An array is a template used to generate physical slides, etc.  It
contains layout information, as well as global array properties, such
as material (glass, nylon) and spot dimensions (in rows/columns).';

-- ================================================
-- TABLE: arraydesignprop
-- ================================================

create table arraydesignprop (
    arraydesignprop_id bigserial not null,
    primary key (arraydesignprop_id),
    arraydesign_id bigint not null,
    foreign key (arraydesign_id) references arraydesign (arraydesign_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint arraydesignprop_c1 unique (arraydesign_id,type_id,rank)
);
create index arraydesignprop_idx1 on arraydesignprop (arraydesign_id);
create index arraydesignprop_idx2 on arraydesignprop (type_id);

COMMENT ON TABLE arraydesignprop IS 'Extra array design properties that are not accounted for in arraydesign.';

-- ================================================
-- TABLE: assay
-- ================================================

create table assay (
    assay_id bigserial not null,
    primary key (assay_id),
    arraydesign_id bigint not null,
    foreign key (arraydesign_id) references arraydesign (arraydesign_id) on delete cascade INITIALLY DEFERRED,
    protocol_id bigint null,
    foreign key (protocol_id) references protocol (protocol_id) on delete set null INITIALLY DEFERRED,
    assaydate timestamp null default current_timestamp,
    arrayidentifier text null,
    arraybatchidentifier text null,
    operator_id bigint not null,
    foreign key (operator_id) references contact (contact_id) on delete cascade INITIALLY DEFERRED,
    dbxref_id bigint null,
    foreign key (dbxref_id) references dbxref (dbxref_id) on delete set null INITIALLY DEFERRED,
    name text null,
    description text null,
    constraint assay_c1 unique (name)
);
create index assay_idx1 on assay (arraydesign_id);
create index assay_idx2 on assay (protocol_id);
create index assay_idx3 on assay (operator_id);
create index assay_idx4 on assay (dbxref_id);

COMMENT ON TABLE assay IS 'An assay consists of a physical instance of
an array, combined with the conditions used to create the array
(protocols, technician information). The assay can be thought of as a hybridization.';

-- ================================================
-- TABLE: assayprop
-- ================================================

create table assayprop (
    assayprop_id bigserial not null,
    primary key (assayprop_id),
    assay_id bigint not null,
    foreign key (assay_id) references assay (assay_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint assayprop_c1 unique (assay_id,type_id,rank)
);
create index assayprop_idx1 on assayprop (assay_id);
create index assayprop_idx2 on assayprop (type_id);

COMMENT ON TABLE assayprop IS 'Extra assay properties that are not accounted for in assay.';

-- ================================================
-- TABLE: assay_project
-- ================================================

create table assay_project (
    assay_project_id bigserial not null,
    primary key (assay_project_id),
    assay_id bigint not null,
    foreign key (assay_id) references assay (assay_id) INITIALLY DEFERRED,
    project_id bigint not null,
    foreign key (project_id) references project (project_id) INITIALLY DEFERRED,
    constraint assay_project_c1 unique (assay_id,project_id)
);
create index assay_project_idx1 on assay_project (assay_id);
create index assay_project_idx2 on assay_project (project_id);

COMMENT ON TABLE assay_project IS 'Link assays to projects.';

-- ================================================
-- TABLE: biomaterial
-- ================================================

create table biomaterial (
    biomaterial_id bigserial not null,
    primary key (biomaterial_id),
    taxon_id bigint null,
    foreign key (taxon_id) references organism (organism_id) on delete set null INITIALLY DEFERRED,
    biosourceprovider_id bigint null,
    foreign key (biosourceprovider_id) references contact (contact_id) on delete set null INITIALLY DEFERRED,
    dbxref_id bigint null,
    foreign key (dbxref_id) references dbxref (dbxref_id) on delete set null INITIALLY DEFERRED,
    name text null,
    description text null,
    constraint biomaterial_c1 unique (name)
);
create index biomaterial_idx1 on biomaterial (taxon_id);
create index biomaterial_idx2 on biomaterial (biosourceprovider_id);
create index biomaterial_idx3 on biomaterial (dbxref_id);

COMMENT ON TABLE biomaterial IS 'A biomaterial represents the MAGE concept of BioSource, BioSample, and LabeledExtract. It is essentially some biological material (tissue, cells, serum) that may have been processed. Processed biomaterials should be traceable back to raw biomaterials via the biomaterialrelationship table.';

-- ================================================
-- TABLE: biomaterial_relationship
-- ================================================

create table biomaterial_relationship (
    biomaterial_relationship_id bigserial not null,
    primary key (biomaterial_relationship_id),
    subject_id bigint not null,
    foreign key (subject_id) references biomaterial (biomaterial_id) INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) INITIALLY DEFERRED,
    object_id bigint not null,
    foreign key (object_id) references biomaterial (biomaterial_id) INITIALLY DEFERRED,
    constraint biomaterial_relationship_c1 unique (subject_id,object_id,type_id)
);
create index biomaterial_relationship_idx1 on biomaterial_relationship (subject_id);
create index biomaterial_relationship_idx2 on biomaterial_relationship (object_id);
create index biomaterial_relationship_idx3 on biomaterial_relationship (type_id);

COMMENT ON TABLE biomaterial_relationship IS 'Relate biomaterials to one another. This is a way to track a series of treatments or material splits/merges, for instance.';

-- ================================================
-- TABLE: biomaterialprop
-- ================================================

create table biomaterialprop (
    biomaterialprop_id bigserial not null,
    primary key (biomaterialprop_id),
    biomaterial_id bigint not null,
    foreign key (biomaterial_id) references biomaterial (biomaterial_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint biomaterialprop_c1 unique (biomaterial_id,type_id,rank)
);
create index biomaterialprop_idx1 on biomaterialprop (biomaterial_id);
create index biomaterialprop_idx2 on biomaterialprop (type_id);

COMMENT ON TABLE biomaterialprop IS 'Extra biomaterial properties that are not accounted for in biomaterial.';

-- ================================================
-- TABLE: biomaterial_dbxref
-- ================================================

create table biomaterial_dbxref (
    biomaterial_dbxref_id bigserial not null,
    primary key (biomaterial_dbxref_id),
    biomaterial_id bigint not null,
    foreign key (biomaterial_id) references biomaterial (biomaterial_id) on delete cascade INITIALLY DEFERRED,
    dbxref_id bigint not null,
    foreign key (dbxref_id) references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED,
    constraint biomaterial_dbxref_c1 unique (biomaterial_id,dbxref_id)
);
create index biomaterial_dbxref_idx1 on biomaterial_dbxref (biomaterial_id);
create index biomaterial_dbxref_idx2 on biomaterial_dbxref (dbxref_id);

-- ================================================
-- TABLE: treatment
-- ================================================

create table treatment (
    treatment_id bigserial not null,
    primary key (treatment_id),
    rank int not null default 0,
    biomaterial_id bigint not null,
    foreign key (biomaterial_id) references biomaterial (biomaterial_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    protocol_id bigint null,
    foreign key (protocol_id) references protocol (protocol_id) on delete set null INITIALLY DEFERRED,
    name text null
);
create index treatment_idx1 on treatment (biomaterial_id);
create index treatment_idx2 on treatment (type_id);
create index treatment_idx3 on treatment (protocol_id);

COMMENT ON TABLE treatment IS 'A biomaterial may undergo multiple
treatments. Examples of treatments: apoxia, fluorophore and biotin labeling.';

-- ================================================
-- TABLE: biomaterial_treatment
-- ================================================

create table biomaterial_treatment (
    biomaterial_treatment_id bigserial not null,
    primary key (biomaterial_treatment_id),
    biomaterial_id bigint not null,
    foreign key (biomaterial_id) references biomaterial (biomaterial_id) on delete cascade INITIALLY DEFERRED,
    treatment_id bigint not null,
    foreign key (treatment_id) references treatment (treatment_id) on delete cascade INITIALLY DEFERRED,
    unittype_id bigint null,
    foreign key (unittype_id) references cvterm (cvterm_id) on delete set null INITIALLY DEFERRED,
    value float(15) null,
    rank int not null default 0,
    constraint biomaterial_treatment_c1 unique (biomaterial_id,treatment_id)
);
create index biomaterial_treatment_idx1 on biomaterial_treatment (biomaterial_id);
create index biomaterial_treatment_idx2 on biomaterial_treatment (treatment_id);
create index biomaterial_treatment_idx3 on biomaterial_treatment (unittype_id);

COMMENT ON TABLE biomaterial_treatment IS 'Link biomaterials to treatments. Treatments have an order of operations (rank), and associated measurements (unittype_id, value).';

-- ================================================
-- TABLE: assay_biomaterial
-- ================================================

create table assay_biomaterial (
    assay_biomaterial_id bigserial not null,
    primary key (assay_biomaterial_id),
    assay_id bigint not null,
    foreign key (assay_id) references assay (assay_id) on delete cascade INITIALLY DEFERRED,
    biomaterial_id bigint not null,
    foreign key (biomaterial_id) references biomaterial (biomaterial_id) on delete cascade INITIALLY DEFERRED,
    channel_id bigint null,
    foreign key (channel_id) references channel (channel_id) on delete set null INITIALLY DEFERRED,
    rank int not null default 0,
    constraint assay_biomaterial_c1 unique (assay_id,biomaterial_id,channel_id,rank)
);
create index assay_biomaterial_idx1 on assay_biomaterial (assay_id);
create index assay_biomaterial_idx2 on assay_biomaterial (biomaterial_id);
create index assay_biomaterial_idx3 on assay_biomaterial (channel_id);

COMMENT ON TABLE assay_biomaterial IS 'A biomaterial can be hybridized many times (technical replicates), or combined with other biomaterials in a single hybridization (for two-channel arrays).';

-- ================================================
-- TABLE: acquisition
-- ================================================

create table acquisition (
    acquisition_id bigserial not null,
    primary key (acquisition_id),
    assay_id bigint not null,
    foreign key (assay_id) references  assay (assay_id) on delete cascade INITIALLY DEFERRED,
    protocol_id bigint null,
    foreign key (protocol_id) references protocol (protocol_id) on delete set null INITIALLY DEFERRED,
    channel_id bigint null,
    foreign key (channel_id) references channel (channel_id) on delete set null INITIALLY DEFERRED,
    acquisitiondate timestamp null default current_timestamp,
    name text null,
    uri text null,
    constraint acquisition_c1 unique (name)
);
create index acquisition_idx1 on acquisition (assay_id);
create index acquisition_idx2 on acquisition (protocol_id);
create index acquisition_idx3 on acquisition (channel_id);

COMMENT ON TABLE acquisition IS 'This represents the scanning of hybridized material. The output of this process is typically a digital image of an array.';

-- ================================================
-- TABLE: acquisitionprop
-- ================================================

create table acquisitionprop (
    acquisitionprop_id bigserial not null,
    primary key (acquisitionprop_id),
    acquisition_id bigint not null,
    foreign key (acquisition_id) references acquisition (acquisition_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint acquisitionprop_c1 unique (acquisition_id,type_id,rank)
);
create index acquisitionprop_idx1 on acquisitionprop (acquisition_id);
create index acquisitionprop_idx2 on acquisitionprop (type_id);

COMMENT ON TABLE acquisitionprop IS 'Parameters associated with image acquisition.';

-- ================================================
-- TABLE: acquisition_relationship
-- ================================================

create table acquisition_relationship (
    acquisition_relationship_id bigserial not null,
    primary key (acquisition_relationship_id),
    subject_id bigint not null,
    foreign key (subject_id) references acquisition (acquisition_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    object_id bigint not null,
    foreign key (object_id) references acquisition (acquisition_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint acquisition_relationship_c1 unique (subject_id,object_id,type_id,rank)
);
create index acquisition_relationship_idx1 on acquisition_relationship (subject_id);
create index acquisition_relationship_idx2 on acquisition_relationship (type_id);
create index acquisition_relationship_idx3 on acquisition_relationship (object_id);

COMMENT ON TABLE acquisition_relationship IS 'Multiple monochrome images may be merged to form a multi-color image. Red-green images of 2-channel hybridizations are an example of this.';

-- ================================================
-- TABLE: quantification
-- ================================================

create table quantification (
    quantification_id bigserial not null,
    primary key (quantification_id),
    acquisition_id bigint not null,
    foreign key (acquisition_id) references acquisition (acquisition_id) on delete cascade INITIALLY DEFERRED,
    operator_id bigint null,
    foreign key (operator_id) references contact (contact_id) on delete set null INITIALLY DEFERRED,
    protocol_id bigint null,
    foreign key (protocol_id) references protocol (protocol_id) on delete set null INITIALLY DEFERRED,
    analysis_id bigint not null,
    foreign key (analysis_id) references analysis (analysis_id) on delete cascade INITIALLY DEFERRED,
    quantificationdate timestamp null default current_timestamp,
    name text null,
    uri text null,
    constraint quantification_c1 unique (name,analysis_id)
);
create index quantification_idx1 on quantification (acquisition_id);
create index quantification_idx2 on quantification (operator_id);
create index quantification_idx3 on quantification (protocol_id);
create index quantification_idx4 on quantification (analysis_id);

COMMENT ON TABLE quantification IS 'Quantification is the transformation of an image acquisition to numeric data. This typically involves statistical procedures.';

-- ================================================
-- TABLE: quantificationprop
-- ================================================

create table quantificationprop (
    quantificationprop_id bigserial not null,
    primary key (quantificationprop_id),
    quantification_id bigint not null,
    foreign key (quantification_id) references quantification (quantification_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint quantificationprop_c1 unique (quantification_id,type_id,rank)
);
create index quantificationprop_idx1 on quantificationprop (quantification_id);
create index quantificationprop_idx2 on quantificationprop (type_id);

COMMENT ON TABLE quantificationprop IS 'Extra quantification properties that are not accounted for in quantification.';

-- ================================================
-- TABLE: quantification_relationship
-- ================================================

create table quantification_relationship (
    quantification_relationship_id bigserial not null,
    primary key (quantification_relationship_id),
    subject_id bigint not null,
    foreign key (subject_id) references quantification (quantification_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    object_id bigint not null,
    foreign key (object_id) references quantification (quantification_id) on delete cascade INITIALLY DEFERRED,
    constraint quantification_relationship_c1 unique (subject_id,object_id,type_id)
);
create index quantification_relationship_idx1 on quantification_relationship (subject_id);
create index quantification_relationship_idx2 on quantification_relationship (type_id);
create index quantification_relationship_idx3 on quantification_relationship (object_id);

COMMENT ON TABLE quantification_relationship IS 'There may be multiple rounds of quantification, this allows us to keep an audit trail of what values went where.';

-- ================================================
-- TABLE: control
-- ================================================

create table control (
    control_id bigserial not null,
    primary key (control_id),
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    assay_id bigint not null,
    foreign key (assay_id) references assay (assay_id) on delete cascade INITIALLY DEFERRED,
    tableinfo_id bigint not null,
    foreign key (tableinfo_id) references tableinfo (tableinfo_id) on delete cascade INITIALLY DEFERRED,
    row_id int not null,
    name text null,
    value text null,
    rank int not null default 0
);
create index control_idx1 on control (type_id);
create index control_idx2 on control (assay_id);
create index control_idx3 on control (tableinfo_id);
create index control_idx4 on control (row_id);

COMMENT ON TABLE control IS NULL;

-- ================================================
-- TABLE: element
-- ================================================

create table element (
    element_id bigserial not null,
    primary key (element_id),
    feature_id bigint null,
    foreign key (feature_id) references feature (feature_id) on delete set null INITIALLY DEFERRED,
    arraydesign_id bigint not null,
    foreign key (arraydesign_id) references arraydesign (arraydesign_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint null,
    foreign key (type_id) references cvterm (cvterm_id) on delete set null INITIALLY DEFERRED,
    dbxref_id bigint null,
    foreign key (dbxref_id) references dbxref (dbxref_id) on delete set null INITIALLY DEFERRED,
    constraint element_c1 unique (feature_id,arraydesign_id)
);
create index element_idx1 on element (feature_id);
create index element_idx2 on element (arraydesign_id);
create index element_idx3 on element (type_id);
create index element_idx4 on element (dbxref_id);

COMMENT ON TABLE element IS 'Represents a feature of the array. This is typically a region of the array coated or bound to DNA.';

-- ================================================
-- TABLE: element_result
-- ================================================

create table elementresult (
    elementresult_id bigserial not null,
    primary key (elementresult_id),
    element_id bigint not null,
    foreign key (element_id) references element (element_id) on delete cascade INITIALLY DEFERRED,
    quantification_id bigint not null,
    foreign key (quantification_id) references quantification (quantification_id) on delete cascade INITIALLY DEFERRED,
    signal float not null,
    constraint elementresult_c1 unique (element_id,quantification_id)
);
create index elementresult_idx1 on elementresult (element_id);
create index elementresult_idx2 on elementresult (quantification_id);
create index elementresult_idx3 on elementresult (signal);

COMMENT ON TABLE elementresult IS 'An element on an array produces a measurement when hybridized to a biomaterial (traceable through quantification_id). This is the base data from which tables that actually contain data inherit.';

-- ================================================
-- TABLE: element_relationship
-- ================================================

create table element_relationship (
    element_relationship_id bigserial not null,
    primary key (element_relationship_id),
    subject_id bigint not null,
    foreign key (subject_id) references element (element_id) INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) INITIALLY DEFERRED,
    object_id bigint not null,
    foreign key (object_id) references element (element_id) INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint element_relationship_c1 unique (subject_id,object_id,type_id,rank)
);
create index element_relationship_idx1 on element_relationship (subject_id);
create index element_relationship_idx2 on element_relationship (type_id);
create index element_relationship_idx3 on element_relationship (object_id);
create index element_relationship_idx4 on element_relationship (value);

COMMENT ON TABLE element_relationship IS 'Sometimes we want to combine measurements from multiple elements to get a composite value. Affymetrix combines many probes to form a probeset measurement, for instance.';

-- ================================================
-- TABLE: elementresult_relationship
-- ================================================

create table elementresult_relationship (
    elementresult_relationship_id bigserial not null,
    primary key (elementresult_relationship_id),
    subject_id bigint not null,
    foreign key (subject_id) references elementresult (elementresult_id) INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) INITIALLY DEFERRED,
    object_id bigint not null,
    foreign key (object_id) references elementresult (elementresult_id) INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint elementresult_relationship_c1 unique (subject_id,object_id,type_id,rank)
);
create index elementresult_relationship_idx1 on elementresult_relationship (subject_id);
create index elementresult_relationship_idx2 on elementresult_relationship (type_id);
create index elementresult_relationship_idx3 on elementresult_relationship (object_id);
create index elementresult_relationship_idx4 on elementresult_relationship (value);

COMMENT ON TABLE elementresult_relationship IS 'Sometimes we want to combine measurements from multiple elements to get a composite value. Affymetrix combines many probes to form a probeset measurement, for instance.';

-- ================================================
-- TABLE: study
-- ================================================

create table study (
    study_id bigserial not null,
    primary key (study_id),
    contact_id bigint not null,
    foreign key (contact_id) references contact (contact_id) on delete cascade INITIALLY DEFERRED,
    pub_id bigint null,
    foreign key (pub_id) references pub (pub_id) on delete set null INITIALLY DEFERRED,
    dbxref_id bigint null,
    foreign key (dbxref_id) references dbxref (dbxref_id) on delete set null INITIALLY DEFERRED,
    name text not null,
    description text null,
    constraint study_c1 unique (name)
);
create index study_idx1 on study (contact_id);
create index study_idx2 on study (pub_id);
create index study_idx3 on study (dbxref_id);

COMMENT ON TABLE study IS NULL;

-- ================================================
-- TABLE: study_assay
-- ================================================

create table study_assay (
    study_assay_id bigserial not null,
    primary key (study_assay_id),
    study_id bigint not null,
    foreign key (study_id) references study (study_id) on delete cascade INITIALLY DEFERRED,
    assay_id bigint not null,
    foreign key (assay_id) references assay (assay_id) on delete cascade INITIALLY DEFERRED,
    constraint study_assay_c1 unique (study_id,assay_id)
);
create index study_assay_idx1 on study_assay (study_id);
create index study_assay_idx2 on study_assay (assay_id);

COMMENT ON TABLE study_assay IS NULL;

-- ================================================
-- TABLE: studydesign
-- ================================================

create table studydesign (
    studydesign_id bigserial not null,
    primary key (studydesign_id),
    study_id bigint not null,
    foreign key (study_id) references study (study_id) on delete cascade INITIALLY DEFERRED,
    description text null
);
create index studydesign_idx1 on studydesign (study_id);

COMMENT ON TABLE studydesign IS NULL;

-- ================================================
-- TABLE: studydesignprop
-- ================================================

create table studydesignprop (
    studydesignprop_id bigserial not null,
    primary key (studydesignprop_id),
    studydesign_id bigint not null,
    foreign key (studydesign_id) references studydesign (studydesign_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint not null,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int not null default 0,
    constraint studydesignprop_c1 unique (studydesign_id,type_id,rank)
);
create index studydesignprop_idx1 on studydesignprop (studydesign_id);
create index studydesignprop_idx2 on studydesignprop (type_id);

COMMENT ON TABLE studydesignprop IS NULL;

-- ================================================
-- TABLE: studyfactor
-- ================================================

create table studyfactor (
    studyfactor_id bigserial not null,
    primary key (studyfactor_id),
    studydesign_id bigint not null,
    foreign key (studydesign_id) references studydesign (studydesign_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint null,
    foreign key (type_id) references cvterm (cvterm_id) on delete set null INITIALLY DEFERRED,
    name text not null,
    description text null
);
create index studyfactor_idx1 on studyfactor (studydesign_id);
create index studyfactor_idx2 on studyfactor (type_id);

COMMENT ON TABLE studyfactor IS NULL;

-- ================================================
-- TABLE: studyfactorvalue
-- ================================================

create table studyfactorvalue (
    studyfactorvalue_id bigserial not null,
    primary key (studyfactorvalue_id),
    studyfactor_id bigint not null,
    foreign key (studyfactor_id) references studyfactor (studyfactor_id) on delete cascade INITIALLY DEFERRED,
    assay_id bigint not null,
    foreign key (assay_id) references assay (assay_id) on delete cascade INITIALLY DEFERRED,
    factorvalue text null,
    name text null,
    rank int not null default 0
);
create index studyfactorvalue_idx1 on studyfactorvalue (studyfactor_id);
create index studyfactorvalue_idx2 on studyfactorvalue (assay_id);

COMMENT ON TABLE studyfactorvalue IS NULL;

--
-- studyprop and studyprop_feature added for Kara Dolinski's group
-- 
-- Here is her description of it:
--Both of the tables are used for our YFGdb project 
--(http://yfgdb.princeton.edu/), which uses chado. 
--
--Here is how we use those tables, using the following example:
--
--http://yfgdb.princeton.edu/cgi-bin/display.cgi?db=pmid&amp;id=15575969
--
--The above data set is represented as a row in the STUDY table.  We have
--lots of attributes that we want to store about each STUDY (status, etc)
--and in the official schema, the only prop table we could use was the
--STUDYDESIGN_PROP table.  This forced us to go through the STUDYDESIGN 
--table when we often have no real data to store in that table (small 
--percent of our collection use MAGE-ML unfortunately, and even fewer 
--provide all the data in the MAGE model, of which STUDYDESIGN is a vestige). 
--So, we created a STUDYPROP table.  I'd think this table would be 
--generally useful to people storing various types of data sets via the 
--STUDY table.
--
--The other new table is STUDYPROP_FEATURE.  This basically allows us to
--group features together per study.  For example, we can store microarray
--clustering results by saying that the STUDYPROP type is 'cluster'  (via 
--type_id -> CVTERM of course), the value is 'cluster id 123', and then
--that cluster would be associated with all the features that are in that
--cluster via STUDYPROP_FEATURE.  Adding type_id to STUDYPROP_FEATURE is
-- fine by us!
--
--studyprop
create table studyprop (
    studyprop_id bigserial not null,
        primary key (studyprop_id),
    study_id bigint not null,
        foreign key (study_id) references study (study_id) on delete cascade,
    type_id bigint not null,
        foreign key (type_id) references cvterm (cvterm_id) on delete cascade,  
    value text null,
    rank int not null default 0,
    unique (study_id,type_id,rank)
);

create index studyprop_idx1 on studyprop (study_id);
create index studyprop_idx2 on studyprop (type_id);


--studyprop_feature
CREATE TABLE studyprop_feature (
    studyprop_feature_id bigserial NOT NULL,
    primary key (studyprop_feature_id),
    studyprop_id bigint NOT NULL,
    foreign key (studyprop_id) references studyprop(studyprop_id) on delete cascade,
    feature_id bigint NOT NULL,
    foreign key (feature_id) references feature (feature_id) on delete cascade,
    type_id bigint,
    foreign key (type_id) references cvterm (cvterm_id) on delete cascade,
    unique (studyprop_id, feature_id)
    );
 

create index studyprop_feature_idx1 on studyprop_feature (studyprop_id);
create index studyprop_feature_idx2 on studyprop_feature (feature_id);

-- ==========================================
-- Chado cell line module
--
-- ============
-- DEPENDENCIES
-- ============
-- :import feature from sequence
-- :import synonym from sequence
-- :import library from library
-- :import cvterm from cv
-- :import dbxref from db
-- :import pub from pub
-- :import organism from organism
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- ================================================
-- TABLE: cell_line
-- ================================================

create table cell_line (
        cell_line_id bigserial not null,
        primary key (cell_line_id),
        name varchar(255) null,
        uniquename varchar(255) not null,
	organism_id bigint not null,
	foreign key (organism_id) references organism (organism_id) on delete cascade INITIALLY DEFERRED,
	timeaccessioned timestamp not null default current_timestamp,
	timelastmodified timestamp not null default current_timestamp,
        constraint cell_line_c1 unique (uniquename, organism_id)
);
grant all on cell_line to PUBLIC;


-- ================================================
-- TABLE: cell_line_relationship
-- ================================================

create table cell_line_relationship (
	cell_line_relationship_id bigserial not null,
	primary key (cell_line_relationship_id),	
        subject_id bigint not null,
	foreign key (subject_id) references cell_line (cell_line_id) on delete cascade INITIALLY DEFERRED,
        object_id bigint not null,
	foreign key (object_id) references cell_line (cell_line_id) on delete cascade INITIALLY DEFERRED,
	type_id bigint not null,
	foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
	constraint cell_line_relationship_c1 unique (subject_id, object_id, type_id)
);
grant all on cell_line_relationship to PUBLIC;


-- ================================================
-- TABLE: cell_line_synonym
-- ================================================

create table cell_line_synonym (
	cell_line_synonym_id bigserial not null,
	primary key (cell_line_synonym_id),
	cell_line_id bigint not null,
	foreign key (cell_line_id) references cell_line (cell_line_id) on delete cascade INITIALLY DEFERRED,
	synonym_id bigint not null,
	foreign key (synonym_id) references synonym (synonym_id) on delete cascade INITIALLY DEFERRED,
	pub_id bigint not null,
	foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
	is_current boolean not null default 'false',
	is_internal boolean not null default 'false',
	constraint cell_line_synonym_c1 unique (synonym_id,cell_line_id,pub_id)	
);
grant all on cell_line_synonym to PUBLIC;


-- ================================================
-- TABLE: cell_line_cvterm
-- ================================================

create table cell_line_cvterm (
	cell_line_cvterm_id bigserial not null,
	primary key (cell_line_cvterm_id),
	cell_line_id bigint not null,
	foreign key (cell_line_id) references cell_line (cell_line_id) on delete cascade INITIALLY DEFERRED,
	cvterm_id bigint not null,
	foreign key (cvterm_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
	pub_id bigint not null,
	foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
	rank int not null default 0,
	constraint cell_line_cvterm_c1 unique (cell_line_id,cvterm_id,pub_id,rank)
);
grant all on cell_line_cvterm to PUBLIC;


-- ================================================
-- TABLE: cell_line_dbxref
-- ================================================

create table cell_line_dbxref (
	cell_line_dbxref_id bigserial not null,
	primary key (cell_line_dbxref_id),
	cell_line_id bigint not null,
	foreign key (cell_line_id) references cell_line (cell_line_id) on delete cascade INITIALLY DEFERRED,
	dbxref_id bigint not null,
	foreign key (dbxref_id) references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED,
	is_current boolean not null default 'true',
	constraint cell_line_dbxref_c1 unique (cell_line_id,dbxref_id)
);
grant all on cell_line_dbxref to PUBLIC;


-- ================================================
-- TABLE: cell_lineprop
-- ================================================

create table cell_lineprop (
	cell_lineprop_id bigserial not null,
	primary key (cell_lineprop_id),
	cell_line_id bigint not null,
	foreign key (cell_line_id) references cell_line (cell_line_id) on delete cascade INITIALLY DEFERRED,
	type_id bigint not null,
	foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
	value text null,
	rank int not null default 0,
	constraint cell_lineprop_c1 unique (cell_line_id,type_id,rank)
);
grant all on cell_lineprop to PUBLIC;


-- ================================================
-- TABLE: cell_lineprop_pub
-- ================================================

create table cell_lineprop_pub (
	cell_lineprop_pub_id bigserial not null,
	primary key (cell_lineprop_pub_id),
	cell_lineprop_id bigint not null,
	foreign key (cell_lineprop_id) references cell_lineprop (cell_lineprop_id) on delete cascade INITIALLY DEFERRED,
	pub_id bigint not null,
	foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
	constraint cell_lineprop_pub_c1 unique (cell_lineprop_id,pub_id)
);
grant all on cell_lineprop_pub to PUBLIC;


-- ================================================
-- TABLE: cell_line_feature
-- ================================================

create table cell_line_feature (
	cell_line_feature_id bigserial not null,
	primary key (cell_line_feature_id),
	cell_line_id bigint not null,
	foreign key (cell_line_id) references cell_line (cell_line_id) on delete cascade INITIALLY DEFERRED,
	feature_id bigint not null,
	foreign key (feature_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED,
	pub_id bigint not null,
	foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
	constraint cell_line_feature_c1 unique (cell_line_id, feature_id, pub_id)
);
grant all on cell_line_feature to PUBLIC;


-- ================================================
-- TABLE: cell_line_cvtermprop
-- ================================================

create table cell_line_cvtermprop (
	cell_line_cvtermprop_id bigserial not null,
	primary key (cell_line_cvtermprop_id),
	cell_line_cvterm_id bigint not null,
	foreign key (cell_line_cvterm_id) references cell_line_cvterm (cell_line_cvterm_id) on delete cascade INITIALLY DEFERRED,
	type_id bigint not null,
	foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
	value text null,
	rank int not null default 0,
	constraint cell_line_cvtermprop_c1 unique (cell_line_cvterm_id, type_id, rank)
);
grant all on cell_line_cvtermprop to PUBLIC;


-- ================================================
-- TABLE: cell_line_pub
-- ================================================

create table cell_line_pub (
	cell_line_pub_id bigserial not null,
	primary key (cell_line_pub_id),
	cell_line_id bigint not null,
	foreign key (cell_line_id) references cell_line (cell_line_id) on delete cascade INITIALLY DEFERRED,
	pub_id bigint not null,
	foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
	constraint cell_line_pub_c1 unique (cell_line_id, pub_id)
);
grant all on cell_line_pub to PUBLIC;


-- ================================================
-- TABLE: cell_line_library
-- ================================================

create table cell_line_library (
	cell_line_library_id bigserial not null,
	primary key (cell_line_library_id),
	cell_line_id bigint not null,
	foreign key (cell_line_id) references cell_line (cell_line_id) on delete cascade INITIALLY DEFERRED,
	library_id bigint not null,
	foreign key (library_id) references library (library_id) on delete cascade INITIALLY DEFERRED,
	pub_id bigint not null,
	foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
	constraint cell_line_library_c1 unique (cell_line_id, library_id, pub_id)
);
grant all on cell_line_library to PUBLIC;

-- VIEW gffatts: a view to get feature attributes in a format that
-- will make it easy to convert them to GFF attributes

CREATE OR REPLACE VIEW gffatts (
    feature_id,
    type,
    attribute
) AS
SELECT feature_id, 'Ontology_term' AS type,  s.name AS attribute
FROM cvterm s, feature_cvterm fs
WHERE fs.cvterm_id = s.cvterm_id
UNION ALL
SELECT feature_id, 'Dbxref' AS type, d.name || ':' || s.accession AS attribute
FROM dbxref s, feature_dbxref fs, db d
WHERE fs.dbxref_id = s.dbxref_id and s.db_id = d.db_id
UNION ALL
SELECT feature_id, 'Alias' AS type, s.name AS attribute
FROM synonym s, feature_synonym fs
WHERE fs.synonym_id = s.synonym_id
UNION ALL
SELECT fp.feature_id,cv.name,fp.value
FROM featureprop fp, cvterm cv
WHERE fp.type_id = cv.cvterm_id
UNION ALL
SELECT feature_id, 'pub' AS type, s.series_name || ':' || s.title AS attribute
FROM pub s, feature_pub fs
WHERE fs.pub_id = s.pub_id;

--creates a view that can be used to assemble a GFF3 compliant attribute string
CREATE OR REPLACE VIEW gff3atts (
    feature_id,
    type,
    attribute
) AS
SELECT feature_id, 
      'Ontology_term' AS type, 
      CASE WHEN db.name like '%Gene Ontology%'    THEN 'GO:'|| dbx.accession
           WHEN db.name like 'Sequence Ontology%' THEN 'SO:'|| dbx.accession
           ELSE                            CAST(db.name||':'|| dbx.accession AS varchar)
      END 
FROM cvterm s, dbxref dbx, feature_cvterm fs, db
WHERE fs.cvterm_id = s.cvterm_id and s.dbxref_id=dbx.dbxref_id and
      db.db_id = dbx.db_id 
UNION ALL
SELECT feature_id, 'Dbxref' AS type, d.name || ':' || s.accession AS
attribute
FROM dbxref s, feature_dbxref fs, db d
WHERE fs.dbxref_id = s.dbxref_id and s.db_id = d.db_id and
      d.name != 'GFF_source'
UNION ALL
SELECT f.feature_id, 'Alias' AS type, s.name AS attribute
FROM synonym s, feature_synonym fs, feature f
WHERE fs.synonym_id = s.synonym_id and f.feature_id = fs.feature_id and
      f.name != s.name and f.uniquename != s.name
UNION ALL
SELECT fp.feature_id,cv.name,fp.value
FROM featureprop fp, cvterm cv
WHERE fp.type_id = cv.cvterm_id
UNION ALL
SELECT feature_id, 'pub' AS type, s.series_name || ':' || s.title AS
attribute
FROM pub s, feature_pub fs
WHERE fs.pub_id = s.pub_id
UNION ALL
SELECT fr.subject_id as feature_id, 'Parent' as type,  parent.uniquename
as attribute
FROM feature_relationship fr, feature parent
WHERE  fr.object_id=parent.feature_id AND fr.type_id = (SELECT cvterm_id
FROM cvterm WHERE name='part_of' and cv_id in (select cv_id
  FROM cv WHERE name='relationship'))
UNION ALL
SELECT fr.subject_id as feature_id, 'Derives_from' as type,
parent.uniquename as attribute
FROM feature_relationship fr, feature parent
WHERE  fr.object_id=parent.feature_id AND fr.type_id = (SELECT cvterm_id
FROM cvterm WHERE name='derives_from' and cv_id in (select cv_id
  FROM cv WHERE name='relationship'))
UNION ALL
SELECT fl.feature_id, 'Target' as type, target.name || ' ' || fl.fmin+1
|| ' ' || fl.fmax || ' ' || fl.strand as attribute
FROM featureloc fl, feature target
WHERE fl.srcfeature_id=target.feature_id
        AND fl.rank != 0
UNION ALL
SELECT feature_id, 'ID' as type, uniquename as attribute
FROM feature
WHERE type_id NOT IN (SELECT cvterm_id FROM cvterm WHERE name='CDS')
UNION ALL
SELECT feature_id, 'chado_feature_id' as type, CAST(feature_id AS
varchar) as attribute
FROM feature
UNION ALL
SELECT feature_id, 'Name' as type, name as attribute
FROM feature;


--replaced with Rob B's improved view
CREATE OR REPLACE VIEW gff3view (
feature_id, ref, source, type, fstart, fend,
score, strand, phase, seqlen, name, organism_id
) AS
SELECT
f.feature_id, sf.name, 
 COALESCE(gffdbx.accession,'.'::varchar(255)), cv.name,
fl.fmin+1, fl.fmax, 
 COALESCE(CAST(af.significance AS text), '.'),
 CASE WHEN fl.strand=-1 THEN '-'
      WHEN fl.strand=1  THEN '+'
      ELSE '.'
 END,
 COALESCE(CAST(fl.phase AS text), '.'), f.seqlen, f.name, f.organism_id
FROM feature f
LEFT JOIN featureloc fl ON (f.feature_id = fl.feature_id)
LEFT JOIN feature sf ON (fl.srcfeature_id = sf.feature_id)
LEFT JOIN ( SELECT fd.feature_id, d.accession
FROM feature_dbxref fd
JOIN dbxref d using(dbxref_id)
JOIN db using(db_id)
WHERE db.name = 'GFF_source'
) as gffdbx
ON (f.feature_id=gffdbx.feature_id)
LEFT JOIN cvterm cv ON (f.type_id = cv.cvterm_id)
LEFT JOIN analysisfeature af ON (f.feature_id = af.feature_id);

-- FUNCTION gfffeatureatts (integer) is a function to get 
-- data in the same format as the gffatts view so that 
-- it can be easily converted to GFF attributes.

CREATE FUNCTION  gfffeatureatts (bigint)
RETURNS SETOF gffatts
AS
'
SELECT feature_id, ''Ontology_term'' AS type,  s.name AS attribute
FROM cvterm s, feature_cvterm fs
WHERE fs.feature_id= $1 AND fs.cvterm_id = s.cvterm_id
UNION
SELECT feature_id, ''Dbxref'' AS type, d.name || '':'' || s.accession AS attribute
FROM dbxref s, feature_dbxref fs, db d
WHERE fs.feature_id= $1 AND fs.dbxref_id = s.dbxref_id AND s.db_id = d.db_id
UNION
SELECT feature_id, ''Alias'' AS type, s.name AS attribute
FROM synonym s, feature_synonym fs
WHERE fs.feature_id= $1 AND fs.synonym_id = s.synonym_id
UNION
SELECT fp.feature_id,cv.name,fp.value
FROM featureprop fp, cvterm cv
WHERE fp.feature_id= $1 AND fp.type_id = cv.cvterm_id 
UNION
SELECT feature_id, ''pub'' AS type, s.series_name || '':'' || s.title AS attribute
FROM pub s, feature_pub fs
WHERE fs.feature_id= $1 AND fs.pub_id = s.pub_id
'
LANGUAGE SQL;


--
-- functions for creating coordinate based functions
--
-- create a point
CREATE OR REPLACE FUNCTION featureslice(bigint, bigint) RETURNS setof featureloc AS
  'SELECT * from featureloc where boxquery($1, $2) @ boxrange(fmin,fmax)'
LANGUAGE 'sql';

--uses the gff3atts to create a GFF3 compliant attribute string
CREATE OR REPLACE FUNCTION gffattstring (bigint) RETURNS varchar AS
'DECLARE
  return_string      varchar;
  f_id               ALIAS FOR $1;
  atts_view          gffatts%ROWTYPE;
  feature_row        feature%ROWTYPE;
  name               varchar;
  uniquename         varchar;
  parent             varchar;
  escape_loc         bigint; 
BEGIN
  --Get name from feature.name
  --Get ID from feature.uniquename
                                                                                
  SELECT INTO feature_row * FROM feature WHERE feature_id = f_id;
  name  = feature_row.name;
  return_string = ''ID='' || feature_row.uniquename;
  IF name IS NOT NULL AND name != ''''
  THEN
    return_string = return_string ||'';'' || ''Name='' || name;
  END IF;
                                                                                
  --Get Parent from feature_relationship
  SELECT INTO feature_row * FROM feature f, feature_relationship fr
    WHERE fr.subject_id = f_id AND fr.object_id = f.feature_id;
  IF FOUND
  THEN
    return_string = return_string||'';''||''Parent=''||feature_row.uniquename;
  END IF;
                                                                                
  FOR atts_view IN SELECT * FROM gff3atts WHERE feature_id = f_id  LOOP
    escape_loc = position('';'' in atts_view.attribute);
    IF escape_loc > 0 THEN
      atts_view.attribute = replace(atts_view.attribute, '';'', ''%3B'');
    END IF;
    return_string = return_string || '';''
                     || atts_view.type || ''=''
                     || atts_view.attribute;
  END LOOP;
                                                                                
  RETURN return_string;
END;
'
LANGUAGE plpgsql;

--creates a view that is suitable for creating a GFF3 string
--CREATE OR REPLACE VIEW gff3view (
--REMOVED and RECREATED in sequence-gff-views.sql to avoid 
--using the function above
--------------------------------
---- all_feature_names ---------
--------------------------------
-- This is a view to replace the denormaliziation of the synonym
-- table.  It contains names and uniquenames from feature and
-- synonym.names from the synonym table, so that GBrowse has one
-- place to search for names.
--
-- To materialize this view, run gmod_materialized_view_tool.pl -c and
-- answer the questions with these responses:
--
--   all_feature_names
--
--   public.all_feature_names
--
--   y   (yes, replace the existing view)
--
--   (some update frequency, I chose daily)
--
--   feature_id bigint,name varchar(255),organism_id bigint
--
--   (the select part of the view below, all on one line)
--
--   feature_id,name
--
--   create index all_feature_names_lower_name on all_feature_names (lower(name))
--
--   y
--
-- OR, you could execute this command (the materialized view tool has been
-- updated to allow this all to be supplied on the command line):
--
-- (yes, it's all one really long line, to make copy and pasting easier)
-- gmod_materialized_view_tool.pl --create_view --view_name all_feature_names --table_name public.all_feature_names --refresh_time daily --column_def "feature_id bigint,name varchar(255),organism_id bigint" --sql_query "SELECT feature_id,CAST(substring(uniquename from 0 for 255) as varchar(255)) as name,organism_id FROM feature UNION SELECT feature_id, name, organism_id FROM feature where name is not null UNION SELECT fs.feature_id,s.name,f.organism_id FROM feature_synonym fs, synonym s, feature f WHERE fs.synonym_id = s.synonym_id AND fs.feature_id = f.feature_id UNION SELECT fp.feature_id, CAST(substring(fp.value from 0 for 255) as varchar(255)) as name,f.organism_id FROM featureprop fp, feature f WHERE f.feature_id = fp.feature_id UNION SELECT fd.feature_id, d.accession, f.organism_id FROM feature_dbxref fd, dbxref d,feature f WHERE fd.dbxref_id = d.dbxref_id AND fd.feature_id = f.feature_id" --index_fields "feature_id,name" --special_index "create index all_feature_names_lower_name on all_feature_names (lower(name))" --yes
--
--
-- OR, even more complicated, you could use this command to create a materialized view
-- for use with full text searching on PostgreSQL 8.4 or better:
--
-- gmod_materialized_view_tool.pl --create_view --view_name all_feature_names --table_name public.all_feature_names --refresh_time daily --column_def "feature_id bigint,name varchar(255),organism_id bigint,searchable_name tsvector" --sql_query "SELECT feature_id, CAST(substring(uniquename FROM 0 FOR 255) AS varchar(255)) AS name, organism_id, to_tsvector('english', CAST(substring(uniquename FROM 0 FOR 255) AS varchar(255))) AS searchable_name FROM feature UNION SELECT feature_id, name, organism_id, to_tsvector('english', name) AS searchable_name FROM feature WHERE name IS NOT NULL UNION SELECT fs.feature_id, s.name, f.organism_id, to_tsvector('english', s.name) AS searchable_name FROM feature_synonym fs, synonym s, feature f WHERE fs.synonym_id = s.synonym_id AND fs.feature_id = f.feature_id UNION SELECT fp.feature_id, CAST(substring(fp.value FROM 0 FOR 255) AS varchar(255)) AS name, f.organism_id, to_tsvector('english',CAST(substring(fp.value FROM 0 FOR 255) AS varchar(255))) AS searchable_name FROM featureprop fp, feature f WHERE f.feature_id = fp.feature_id UNION SELECT fd.feature_id, d.accession, f.organism_id,to_tsvector('english',d.accession) AS searchable_name FROM feature_dbxref fd, dbxref d,feature f WHERE fd.dbxref_id = d.dbxref_id AND fd.feature_id = f.feature_id" --index_fields "feature_id,name" --special_index "CREATE INDEX searchable_all_feature_names_idx ON all_feature_names USING gin(searchable_name)" --yes 
--
CREATE OR REPLACE VIEW all_feature_names (
  feature_id,
  name,
  organism_id
) AS
SELECT feature_id,CAST(substring(uniquename from 0 for 255) as varchar(255)) as name,organism_id FROM feature  
UNION
SELECT feature_id, name, organism_id FROM feature where name is not null 
UNION
SELECT fs.feature_id,s.name,f.organism_id FROM feature_synonym fs, synonym s, feature f
  WHERE fs.synonym_id = s.synonym_id AND fs.feature_id = f.feature_id
UNION
SELECT fp.feature_id, CAST(substring(fp.value from 0 for 255) as varchar(255)) as name,f.organism_id FROM featureprop fp, feature f 
  WHERE f.feature_id = fp.feature_id
UNION
SELECT fd.feature_id, d.accession, f.organism_id FROM feature_dbxref fd, dbxref d,feature f
  WHERE fd.dbxref_id = d.dbxref_id AND fd.feature_id = f.feature_id;

--------------------------------
---- dfeatureloc ---------------
--------------------------------
-- dfeatureloc is meant as an alternate representation of
-- the data in featureloc (see the descrption of featureloc
-- in sequence.sql).  In dfeatureloc, fmin and fmax are 
-- replaced with nbeg and nend.  Whereas fmin and fmax
-- are absolute coordinates relative to the parent feature, nbeg 
-- and nend are the beginning and ending coordinates
-- relative to the feature itself.  For example, nbeg would
-- mark the 5' end of a gene and nend would mark the 3' end.

CREATE OR REPLACE VIEW dfeatureloc (
 featureloc_id,
 feature_id,
 srcfeature_id,
 nbeg,
 is_nbeg_partial,
 nend,
 is_nend_partial,
 strand,
 phase,
 residue_info,
 locgroup,
 rank
) AS
SELECT featureloc_id, feature_id, srcfeature_id, fmin, is_fmin_partial,
       fmax, is_fmax_partial, strand, phase, residue_info, locgroup, rank
FROM featureloc
WHERE (strand < 0 or phase < 0)
UNION
SELECT featureloc_id, feature_id, srcfeature_id, fmax, is_fmax_partial,
       fmin, is_fmin_partial, strand, phase, residue_info, locgroup, rank
FROM featureloc
WHERE (strand is NULL or strand >= 0 or phase >= 0) ;

--------------------------------
---- f_type --------------------
--------------------------------
CREATE OR REPLACE VIEW f_type
AS
  SELECT  f.feature_id,
          f.name,
          f.dbxref_id,
          c.name AS type,
          f.residues,
          f.seqlen,
          f.md5checksum,
          f.type_id,
          f.timeaccessioned,
          f.timelastmodified
    FROM  feature f, cvterm c
   WHERE  f.type_id = c.cvterm_id;

--------------------------------
---- fnr_type ------------------
--------------------------------
CREATE OR REPLACE VIEW fnr_type
AS
  SELECT  f.feature_id,
          f.name,
          f.dbxref_id,
          c.name AS type,
          f.residues,
          f.seqlen,
          f.md5checksum,
          f.type_id,
          f.timeaccessioned,
          f.timelastmodified
    FROM  feature f left outer join analysisfeature af
          on (f.feature_id = af.feature_id), cvterm c
   WHERE  f.type_id = c.cvterm_id
          and af.feature_id is null;

--------------------------------
---- f_loc ---------------------
--------------------------------
-- Note from Scott:  I changed this view to depend on dfeatureloc,
-- since I don't know what it is used for.  The change should
-- be transparent.  I also changed dbxrefstr to dbxref_id since
-- dbxrefstr is no longer in feature

CREATE OR REPLACE VIEW f_loc
AS
  SELECT  f.feature_id,
          f.name,
          f.dbxref_id,
          fl.nbeg,
          fl.nend,
          fl.strand
    FROM  dfeatureloc fl, f_type f
   WHERE  f.feature_id = fl.feature_id;

--------------------------------
---- fp_key -------------------
--------------------------------
CREATE OR REPLACE VIEW fp_key
AS
  SELECT  fp.feature_id,
          c.name AS pkey,
          fp.value
    FROM  featureprop fp, cvterm c
   WHERE  fp.featureprop_id = c.cvterm_id;

-- [symmetric,reflexive]
-- intervals have at least one interbase point in common
-- (i.e. overlap OR abut)
-- EXAMPLE QUERY:
--   (features of same type that overlap)
--   SELECT r.*
--   FROM feature AS x 
--   INNER JOIN feature_meets AS r ON (x.feature_id=r.subject_id)
--   INNER JOIN feature AS y ON (y.feature_id=r.object_id)
--   WHERE x.type_id=y.type_id
CREATE OR REPLACE VIEW feature_meets (
  subject_id,
  object_id
) AS
SELECT
 x.feature_id,
 y.feature_id
FROM
 featureloc AS x,
 featureloc AS y
WHERE
 x.srcfeature_id=y.srcfeature_id
 AND
 ( x.fmax >= y.fmin AND x.fmin <= y.fmax );

COMMENT ON VIEW feature_meets IS 'intervals have at least one
interbase point in common (ie overlap OR abut). symmetric,reflexive';

-- [symmetric,reflexive]
-- as above, strands match
CREATE OR REPLACE VIEW feature_meets_on_same_strand (
  subject_id,
  object_id
) AS
SELECT
 x.feature_id,
 y.feature_id
FROM
 featureloc AS x,
 featureloc AS y
WHERE
 x.srcfeature_id=y.srcfeature_id
 AND
 x.strand = y.strand
 AND
 ( x.fmax >= y.fmin AND x.fmin <= y.fmax );

COMMENT ON VIEW feature_meets_on_same_strand IS 'as feature_meets, but
featurelocs must be on the same strand. symmetric,reflexive';


-- [symmetric]
-- intervals have no interbase points in common and do not abut
CREATE OR REPLACE VIEW feature_disjoint (
  subject_id,
  object_id
) AS
SELECT
 x.feature_id,
 y.feature_id
FROM
 featureloc AS x,
 featureloc AS y
WHERE
 x.srcfeature_id=y.srcfeature_id
 AND
 ( x.fmax < y.fmin AND x.fmin > y.fmax );

COMMENT ON VIEW feature_disjoint IS 'featurelocs do not meet. symmetric';

-- 4-ary relation
CREATE OR REPLACE VIEW feature_union AS
SELECT
  x.feature_id  AS subject_id,
  y.feature_id  AS object_id,
  x.srcfeature_id,
  x.strand      AS subject_strand,
  y.strand      AS object_strand,
  CASE WHEN x.fmin<y.fmin THEN x.fmin ELSE y.fmin END AS fmin,
  CASE WHEN x.fmax>y.fmax THEN x.fmax ELSE y.fmax END AS fmax
FROM
 featureloc AS x,
 featureloc AS y
WHERE
 x.srcfeature_id=y.srcfeature_id
 AND
 ( x.fmax >= y.fmin AND x.fmin <= y.fmax );

COMMENT ON VIEW feature_union IS 'set-union on interval defined by featureloc. featurelocs must meet';


-- 4-ary relation
CREATE OR REPLACE VIEW feature_intersection AS
SELECT
  x.feature_id  AS subject_id,
  y.feature_id  AS object_id,
  x.srcfeature_id,
  x.strand      AS subject_strand,
  y.strand      AS object_strand,
  CASE WHEN x.fmin<y.fmin THEN y.fmin ELSE x.fmin END AS fmin,
  CASE WHEN x.fmax>y.fmax THEN y.fmax ELSE x.fmax END AS fmax
FROM
 featureloc AS x,
 featureloc AS y
WHERE
 x.srcfeature_id=y.srcfeature_id
 AND
 ( x.fmax >= y.fmin AND x.fmin <= y.fmax );

COMMENT ON VIEW feature_intersection IS 'set-intersection on interval defined by featureloc. featurelocs must meet';

-- 4-ary relation
-- subtract object interval from subject interval
--  (may leave zero, one or two intervals)
CREATE OR REPLACE VIEW feature_difference (
  subject_id,
  object_id,
  srcfeature_id,
  fmin,
  fmax,
  strand
) AS
-- left interval
SELECT
  x.feature_id,
  y.feature_id,
  x.strand,
  x.srcfeature_id,
  x.fmin,
  y.fmin
FROM
 featureloc AS x,
 featureloc AS y
WHERE
 x.srcfeature_id=y.srcfeature_id
 AND
 (x.fmin < y.fmin AND x.fmax >= y.fmax )
UNION
-- right interval
SELECT
  x.feature_id,
  y.feature_id,
  x.strand,
  x.srcfeature_id,
  y.fmax,
  x.fmax
FROM
 featureloc AS x,
 featureloc AS y
WHERE
 x.srcfeature_id=y.srcfeature_id
 AND
 (x.fmax > y.fmax AND x.fmin <= y.fmin );

COMMENT ON VIEW feature_difference IS 'set-distance on interval defined by featureloc. featurelocs must meet';

-- 4-ary relation
CREATE OR REPLACE VIEW feature_distance AS
SELECT
  x.feature_id  AS subject_id,
  y.feature_id  AS object_id,
  x.srcfeature_id,
  x.strand      AS subject_strand,
  y.strand      AS object_strand,
  CASE WHEN x.fmax <= y.fmin THEN (x.fmax-y.fmin) ELSE (y.fmax-x.fmin) END AS distance
FROM
 featureloc AS x,
 featureloc AS y
WHERE
 x.srcfeature_id=y.srcfeature_id
 AND
 ( x.fmax <= y.fmin OR x.fmin >= y.fmax );

COMMENT ON VIEW feature_difference IS 'size of gap between two features. must be abutting or disjoint';

-- [transitive,reflexive]
-- (should this be made non-reflexive?)
-- subject intervals contains (or is same as) object interval
CREATE OR REPLACE VIEW feature_contains (
  subject_id,
  object_id
) AS
SELECT
 x.feature_id,
 y.feature_id
FROM
 featureloc AS x,
 featureloc AS y
WHERE
 x.srcfeature_id=y.srcfeature_id
 AND
 ( y.fmin >= x.fmin AND y.fmin <= x.fmax );

COMMENT ON VIEW feature_contains IS 'subject intervals contains (or is
same as) object interval. transitive,reflexive';

-- featureset relations:
--  a featureset relation is true between any two features x and y
--  if the relation is true for any x' and y' where x' and y' are
--  subfeatures of x and y

-- see feature_meets
-- example: two transcripts meet if any of their exons or CDSs overlap
-- or abut
CREATE OR REPLACE VIEW featureset_meets (
  subject_id,
  object_id
) AS
SELECT
 x.object_id,
 y.object_id
FROM
 feature_meets AS r
 INNER JOIN feature_relationship AS x ON (r.subject_id = x.subject_id)
 INNER JOIN feature_relationship AS y ON (r.object_id = y.subject_id);

-- =================================================================
-- Dependencies:
--
-- :import feature from sequence
-- :import cvterm from cv
-- :import pub from pub
-- :import phenotype from phenotype
-- :import organism from organism
-- :import genotype from genetic
-- :import contact from contact
-- :import project from project
-- :import stock from stock
-- :import synonym
-- =================================================================


-- this probably needs some work, depending on how cross-database we
-- want to be.  In Postgres, at least, there are much better ways to 
-- represent geo information.

-- ================================================
-- TABLE: nd_geolocation
-- ================================================

CREATE TABLE nd_geolocation (
    nd_geolocation_id bigserial PRIMARY KEY NOT NULL,
    description text,
    latitude real,
    longitude real,
    geodetic_datum character varying(32),
    altitude real
);
CREATE INDEX nd_geolocation_idx1 ON nd_geolocation (latitude);
CREATE INDEX nd_geolocation_idx2 ON nd_geolocation (longitude);
CREATE INDEX nd_geolocation_idx3 ON nd_geolocation (altitude);

COMMENT ON TABLE nd_geolocation IS 'The geo-referencable location of the stock. NOTE: This entity is subject to change as a more general and possibly more OpenGIS-compliant geolocation module may be introduced into Chado.';

COMMENT ON COLUMN nd_geolocation.description IS 'A textual representation of the location, if this is the original georeference. Optional if the original georeference is available in lat/long coordinates.';


COMMENT ON COLUMN nd_geolocation.latitude IS 'The decimal latitude coordinate of the georeference, using positive and negative sign to indicate N and S, respectively.';

COMMENT ON COLUMN nd_geolocation.longitude IS 'The decimal longitude coordinate of the georeference, using positive and negative sign to indicate E and W, respectively.';

COMMENT ON COLUMN nd_geolocation.geodetic_datum IS 'The geodetic system on which the geo-reference coordinates are based. For geo-references measured between 1984 and 2010, this will typically be WGS84.';

COMMENT ON COLUMN nd_geolocation.altitude IS 'The altitude (elevation) of the location in meters. If the altitude is only known as a range, this is the average, and altitude_dev will hold half of the width of the range.';

-- ================================================
-- TABLE: nd_experiment
-- ================================================

CREATE TABLE nd_experiment (
    nd_experiment_id bigserial PRIMARY KEY NOT NULL,
    nd_geolocation_id bigint NOT NULL references nd_geolocation (nd_geolocation_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED 
);
CREATE INDEX nd_experiment_idx1 ON nd_experiment (nd_geolocation_id);
CREATE INDEX nd_experiment_idx2 ON nd_experiment (type_id);

COMMENT ON TABLE nd_experiment IS 'This is the core table for the natural diversity module, 
representing each individual assay that is undertaken (this is usually *not* an 
entire experiment). Each nd_experiment should give rise to a single genotype or 
phenotype and be described via 1 (or more) protocols. Collections of assays that 
relate to each other should be linked to the same record in the project table.';

-- ================================================
-- TABLE: nd_experiment_project
-- ================================================
--
--used to be nd_diversityexperiment_project
--then was nd_assay_project
CREATE TABLE nd_experiment_project (
    nd_experiment_project_id bigserial PRIMARY KEY NOT NULL,
    project_id bigint not null references project (project_id) on delete cascade INITIALLY DEFERRED,
    nd_experiment_id bigint NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED,
    CONSTRAINT nd_experiment_project_c1 unique (project_id, nd_experiment_id)
);
CREATE INDEX nd_experiment_project_idx1 ON nd_experiment_project (project_id);
CREATE INDEX nd_experiment_project_idx2 ON nd_experiment_project (nd_experiment_id);

COMMENT ON TABLE nd_experiment_project IS 'Used to group together related nd_experiment records. All nd_experiments 
should be linked to at least one project.';

-- ================================================
-- TABLE: nd_experimentprop
-- ================================================

CREATE TABLE nd_experimentprop (
    nd_experimentprop_id bigserial PRIMARY KEY NOT NULL,
    nd_experiment_id bigint NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED ,
    value text null,
    rank int NOT NULL default 0,
    constraint nd_experimentprop_c1 unique (nd_experiment_id,type_id,rank)
);

CREATE INDEX nd_experimentprop_idx1 ON nd_experimentprop (nd_experiment_id);
CREATE INDEX nd_experimentprop_idx2 ON nd_experimentprop (type_id);

COMMENT ON TABLE nd_experimentprop IS 'An nd_experiment can have any number of
slot-value property tags attached to it. This is an alternative to
hardcoding a list of columns in the relational schema, and is
completely extensible. There is a unique constraint, stockprop_c1, for
the combination of stock_id, rank, and type_id. Multivalued property-value pairs must be differentiated by rank.';

-- ================================================
-- TABLE: nd_experiment_pub
-- ================================================

CREATE TABLE nd_experiment_pub (
       nd_experiment_pub_id bigserial PRIMARY KEY not null,
       nd_experiment_id bigint not null,
       foreign key (nd_experiment_id) references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED,
       pub_id bigint not null,
       foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED,
       constraint nd_experiment_pub_c1 unique (nd_experiment_id,pub_id)
);
create index nd_experiment_pub_idx1 on nd_experiment_pub (nd_experiment_id);
create index nd_experiment_pub_idx2 on nd_experiment_pub (pub_id);

COMMENT ON TABLE nd_experiment_pub IS 'Linking nd_experiment(s) to publication(s)';

-- ================================================
-- TABLE: nd_geolocationprop
-- ================================================

CREATE TABLE nd_geolocationprop (
    nd_geolocationprop_id bigserial PRIMARY KEY NOT NULL,
    nd_geolocation_id bigint NOT NULL references nd_geolocation (nd_geolocation_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int NOT NULL DEFAULT 0,
    constraint nd_geolocationprop_c1 unique (nd_geolocation_id,type_id,rank)
);
CREATE INDEX nd_geolocationprop_idx1 ON nd_geolocationprop (nd_geolocation_id);
CREATE INDEX nd_geolocationprop_idx2 ON nd_geolocationprop (type_id);

COMMENT ON TABLE nd_geolocationprop IS 'Property/value associations for geolocations. This table can store the properties such as location and environment';

COMMENT ON COLUMN nd_geolocationprop.type_id IS 'The name of the property as a reference to a controlled vocabulary term.';

COMMENT ON COLUMN nd_geolocationprop.value IS 'The value of the property.';

COMMENT ON COLUMN nd_geolocationprop.rank IS 'The rank of the property value, if the property has an array of values.';

-- ================================================
-- TABLE: nd_protocol
-- ================================================

CREATE TABLE nd_protocol (
    nd_protocol_id bigserial PRIMARY KEY  NOT NULL,
    name character varying(255) NOT NULL unique,
    type_id bigint NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED
);
CREATE INDEX nd_protocol_idx1 ON nd_protocol (type_id);

COMMENT ON TABLE nd_protocol IS 'A protocol can be anything that is done as part of the experiment.';

COMMENT ON COLUMN nd_protocol.name IS 'The protocol name.';

-- ================================================
-- TABLE: nd_reagent
-- ===============================================

CREATE TABLE nd_reagent (
    nd_reagent_id bigserial PRIMARY KEY NOT NULL,
    name character varying(80) NOT NULL,
    type_id bigint NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    feature_id bigint NULL references feature (feature_id) on delete cascade INITIALLY DEFERRED
);
CREATE INDEX nd_reagent_idx1 ON nd_reagent (type_id);
CREATE INDEX nd_reagent_idx2 ON nd_reagent (feature_id);

COMMENT ON TABLE nd_reagent IS 'A reagent such as a primer, an enzyme, an adapter oligo, a linker oligo. Reagents are used in genotyping experiments, or in any other kind of experiment.';

COMMENT ON COLUMN nd_reagent.name IS 'The name of the reagent. The name should be unique for a given type.';

COMMENT ON COLUMN nd_reagent.type_id IS 'The type of the reagent, for example linker oligomer, or forward primer.';

COMMENT ON COLUMN nd_reagent.feature_id IS 'If the reagent is a primer, the feature that it corresponds to. More generally, the corresponding feature for any reagent that has a sequence that maps to another sequence.';

-- ================================================
-- TABLE: nd_protocol_reagent
-- ================================================

CREATE TABLE nd_protocol_reagent (
    nd_protocol_reagent_id bigserial PRIMARY KEY NOT NULL,
    nd_protocol_id bigint NOT NULL references nd_protocol (nd_protocol_id) on delete cascade INITIALLY DEFERRED,
    reagent_id bigint NOT NULL references nd_reagent (nd_reagent_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED
);

CREATE INDEX nd_protocol_reagent_idx1 ON nd_protocol_reagent (nd_protocol_id);
CREATE INDEX nd_protocol_reagent_idx2 ON nd_protocol_reagent (reagent_id);
CREATE INDEX nd_protocol_reagent_idx3 ON nd_protocol_reagent (type_id);

-- ================================================
-- TABLE: nd_protocolprop
-- ================================================

CREATE TABLE nd_protocolprop (
    nd_protocolprop_id bigserial PRIMARY KEY NOT NULL,
    nd_protocol_id bigint NOT NULL references nd_protocol (nd_protocol_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int DEFAULT 0 NOT NULL,
    constraint nd_protocolprop_c1 unique (nd_protocol_id,type_id,rank)
);

CREATE INDEX nd_protocolprop_idx1 ON nd_protocolprop (nd_protocol_id);
CREATE INDEX nd_protocolprop_idx2 ON nd_protocolprop (type_id);

COMMENT ON TABLE nd_protocolprop IS 'Property/value associations for protocol.';

COMMENT ON COLUMN nd_protocolprop.nd_protocol_id IS 'The protocol to which the property applies.';

COMMENT ON COLUMN nd_protocolprop.type_id IS 'The name of the property as a reference to a controlled vocabulary term.';

COMMENT ON COLUMN nd_protocolprop.value IS 'The value of the property.';

COMMENT ON COLUMN nd_protocolprop.rank IS 'The rank of the property value, if the property has an array of values.';

-- ================================================
-- TABLE: nd_experiment_stock
-- ================================================

CREATE TABLE nd_experiment_stock (
    nd_experiment_stock_id bigserial PRIMARY KEY NOT NULL,
    nd_experiment_id bigint NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED,
    stock_id bigint NOT NULL references stock (stock_id)  on delete cascade INITIALLY DEFERRED,
    type_id bigint NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED
);
CREATE INDEX nd_experiment_stock_idx1 ON nd_experiment_stock (nd_experiment_id);
CREATE INDEX nd_experiment_stock_idx2 ON nd_experiment_stock (stock_id);
CREATE INDEX nd_experiment_stock_idx3 ON nd_experiment_stock (type_id);

COMMENT ON TABLE nd_experiment_stock IS 'Part of a stock or a clone of a stock that is used in an experiment';


COMMENT ON COLUMN nd_experiment_stock.stock_id IS 'stock used in the extraction or the corresponding stock for the clone';

-- ================================================
-- TABLE: nd_experiment_protocol
-- ================================================

CREATE TABLE nd_experiment_protocol (
    nd_experiment_protocol_id bigserial PRIMARY KEY NOT NULL,
    nd_experiment_id bigint NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED,
    nd_protocol_id bigint NOT NULL references nd_protocol (nd_protocol_id) on delete cascade INITIALLY DEFERRED
);
CREATE INDEX nd_experiment_protocol_idx1 ON nd_experiment_protocol (nd_experiment_id);
CREATE INDEX nd_experiment_protocol_idx2 ON nd_experiment_protocol (nd_protocol_id);

COMMENT ON TABLE nd_experiment_protocol IS 'Linking table: experiments to the protocols they involve.';

-- ================================================
-- TABLE: nd_experiment_phenotype
-- ================================================

CREATE TABLE nd_experiment_phenotype (
    nd_experiment_phenotype_id bigserial PRIMARY KEY NOT NULL,
    nd_experiment_id bigint NOT NULL REFERENCES nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED,
    phenotype_id bigint NOT NULL references phenotype (phenotype_id) on delete cascade INITIALLY DEFERRED,
   constraint nd_experiment_phenotype_c1 unique (nd_experiment_id,phenotype_id)
); 
CREATE INDEX nd_experiment_phenotype_idx1 ON nd_experiment_phenotype (nd_experiment_id);
CREATE INDEX nd_experiment_phenotype_idx2 ON nd_experiment_phenotype (phenotype_id);

COMMENT ON TABLE nd_experiment_phenotype IS 'Linking table: experiments to the phenotypes they produce. There is a one-to-one relationship between an experiment and a phenotype since each phenotype record should point to one experiment. Add a new experiment_id for each phenotype record.';

-- ================================================
-- TABLE: nd_experiment_genotype
-- ================================================

CREATE TABLE nd_experiment_genotype (
    nd_experiment_genotype_id bigserial PRIMARY KEY NOT NULL,
    nd_experiment_id bigint NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED,
    genotype_id bigint NOT NULL references genotype (genotype_id) on delete cascade INITIALLY DEFERRED ,
    constraint nd_experiment_genotype_c1 unique (nd_experiment_id,genotype_id)
);

CREATE INDEX nd_experiment_genotype_idx1 ON nd_experiment_genotype (nd_experiment_id);
CREATE INDEX nd_experiment_genotype_idx2 ON nd_experiment_genotype (genotype_id);

COMMENT ON TABLE nd_experiment_genotype IS 'Linking table: experiments to the genotypes they produce. There is a one-to-one relationship between an experiment and a genotype since each genotype record should point to one experiment. Add a new experiment_id for each genotype record.';

-- ================================================
-- TABLE: nd_reagent_relationship
-- ================================================

CREATE TABLE nd_reagent_relationship (
    nd_reagent_relationship_id bigserial PRIMARY KEY NOT NULL,
    subject_reagent_id bigint NOT NULL references nd_reagent (nd_reagent_id) on delete cascade INITIALLY DEFERRED,
    object_reagent_id bigint NOT NULL  references nd_reagent (nd_reagent_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint NOT NULL  references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED
);

CREATE INDEX nd_reagent_relationship_idx1 ON nd_reagent_relationship (subject_reagent_id);
CREATE INDEX nd_reagent_relationship_idx2 ON nd_reagent_relationship (object_reagent_id);
CREATE INDEX nd_reagent_relationship_idx3 ON nd_reagent_relationship (type_id);

COMMENT ON TABLE nd_reagent_relationship IS 'Relationships between reagents. Some reagents form a group. i.e., they are used all together or not at all. Examples are adapter/linker/enzyme experiment reagents.';

COMMENT ON COLUMN nd_reagent_relationship.subject_reagent_id IS 'The subject reagent in the relationship. In parent/child terminology, the subject is the child. For example, in "linkerA 3prime-overhang-linker enzymeA" linkerA is the subject, 3prime-overhand-linker is the type, and enzymeA is the object.';

COMMENT ON COLUMN nd_reagent_relationship.object_reagent_id IS 'The object reagent in the relationship. In parent/child terminology, the object is the parent. For example, in "linkerA 3prime-overhang-linker enzymeA" linkerA is the subject, 3prime-overhand-linker is the type, and enzymeA is the object.';

COMMENT ON COLUMN nd_reagent_relationship.type_id IS 'The type (or predicate) of the relationship. For example, in "linkerA 3prime-overhang-linker enzymeA" linkerA is the subject, 3prime-overhand-linker is the type, and enzymeA is the object.';

-- ================================================
-- TABLE: nd_reagentprop
-- ================================================

CREATE TABLE nd_reagentprop (
    nd_reagentprop_id bigserial PRIMARY KEY NOT NULL,
    nd_reagent_id bigint NOT NULL references nd_reagent (nd_reagent_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int DEFAULT 0 NOT NULL,
    constraint nd_reagentprop_c1 unique (nd_reagent_id,type_id,rank)
);

CREATE INDEX nd_reagentprop_idx1 ON nd_reagentprop (nd_reagent_id);
CREATE INDEX nd_reagentprop_idx2 ON nd_reagentprop (type_id);

-- ================================================
-- TABLE: nd_experiment_stockprop
-- ================================================

CREATE TABLE nd_experiment_stockprop (
    nd_experiment_stockprop_id bigserial PRIMARY KEY NOT NULL,
    nd_experiment_stock_id bigint NOT NULL references nd_experiment_stock (nd_experiment_stock_id) on delete cascade INITIALLY DEFERRED,
    type_id bigint NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
    value text null,
    rank int DEFAULT 0 NOT NULL,
    constraint nd_experiment_stockprop_c1 unique (nd_experiment_stock_id,type_id,rank)
);

CREATE INDEX nd_experiment_stockprop_idx1 ON nd_experiment_stockprop (nd_experiment_stock_id);
CREATE INDEX nd_experiment_stockprop_idx2 ON nd_experiment_stockprop (type_id);

COMMENT ON TABLE nd_experiment_stockprop IS 'Property/value associations for experiment_stocks. This table can store the properties such as treatment';

COMMENT ON COLUMN nd_experiment_stockprop.nd_experiment_stock_id IS 'The experiment_stock to which the property applies.';

COMMENT ON COLUMN nd_experiment_stockprop.type_id IS 'The name of the property as a reference to a controlled vocabulary term.';

COMMENT ON COLUMN nd_experiment_stockprop.value IS 'The value of the property.';

COMMENT ON COLUMN nd_experiment_stockprop.rank IS 'The rank of the property value, if the property has an array of values.';

-- ================================================
-- TABLE: nd_experiment_stock_dbxref
-- ================================================

CREATE TABLE nd_experiment_stock_dbxref (
    nd_experiment_stock_dbxref_id bigserial PRIMARY KEY NOT NULL,
    nd_experiment_stock_id bigint NOT NULL references nd_experiment_stock (nd_experiment_stock_id) on delete cascade INITIALLY DEFERRED,
    dbxref_id bigint NOT NULL references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED
);
CREATE INDEX nd_experiment_stock_dbxref_idx1 ON nd_experiment_stock_dbxref (nd_experiment_stock_id);
CREATE INDEX nd_experiment_stock_dbxref_idx2 ON nd_experiment_stock_dbxref (dbxref_id);

COMMENT ON TABLE nd_experiment_stock_dbxref IS 'Cross-reference experiment_stock to accessions, images, etc';

-- ================================================
-- TABLE: nd_experiment_dbxref
-- ===============================================

CREATE TABLE nd_experiment_dbxref (
    nd_experiment_dbxref_id bigserial PRIMARY KEY NOT NULL,
    nd_experiment_id bigint NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED,
    dbxref_id bigint NOT NULL references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED
);

CREATE INDEX nd_experiment_dbxref_idx1 ON nd_experiment_dbxref (nd_experiment_id);
CREATE INDEX nd_experiment_dbxref_idx2 ON nd_experiment_dbxref (dbxref_id);

COMMENT ON TABLE nd_experiment_dbxref IS 'Cross-reference experiment to accessions, images, etc';

-- ================================================
-- TABLE: nd_experiment_contact
-- ================================================

CREATE TABLE nd_experiment_contact (
    nd_experiment_contact_id bigserial PRIMARY KEY NOT NULL,
    nd_experiment_id bigint NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED,
    contact_id bigint NOT NULL references contact (contact_id) on delete cascade INITIALLY DEFERRED
);
CREATE INDEX nd_experiment_contact_idx1 ON nd_experiment_contact (nd_experiment_id);
CREATE INDEX nd_experiment_contact_idx2 ON nd_experiment_contact (contact_id);

-- ================================================
-- TABLE: nd_experiment_analysis
-- ================================================

CREATE TABLE nd_experiment_analysis (
  nd_experiment_analysis_id bigserial PRIMARY KEY NOT NULL,
  nd_experiment_id bigint NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED,
  analysis_id bigint NOT NULL references analysis (analysis_id)  on delete cascade INITIALLY DEFERRED,
  type_id bigint NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED
);
CREATE INDEX nd_experiment_analysis_idx1 ON nd_experiment_analysis (nd_experiment_id);
CREATE INDEX nd_experiment_analysis_idx2 ON nd_experiment_analysis (analysis_id);
CREATE INDEX nd_experiment_analysis_idx3 ON nd_experiment_analysis (type_id);

COMMENT ON TABLE nd_experiment_analysis IS 'An analysis that is used in an experiment';