1
SELECT feature_id, 'cvterm' AS type, s.name AS attribute
2
FROM cvterm s, feature_cvterm fs
3
WHERE fs.feature_id= $1 AND fs.cvterm_id = s.cvterm_id
4
UNION
5
SELECT feature_id, 'dbxref' AS type, d.name || ':' || s.accession AS attribute
6
FROM dbxref s, feature_dbxref fs, db d
7
WHERE fs.feature_id= $1 AND fs.dbxref_id = s.dbxref_id AND s.db_id = d.db_id
8
--UNION
9
--SELECT feature_id, 'expression' AS type, s.description AS attribute
10
--FROM expression s, feature_expression fs
11
--WHERE fs.feature_id= $1 AND fs.expression_id = s.expression_id
12
--UNION
13
--SELECT fg.feature_id, 'genotype' AS type, g.uniquename||': '||g.description AS attribute
14
--FROM gcontext g, feature_gcontext fg
15
--WHERE fg.feature_id= $1 AND g.gcontext_id = fg.gcontext_id
16
--UNION
17
--SELECT feature_id, 'genotype' AS type, s.description AS attribute
18
--FROM genotype s, feature_genotype fs
19
--WHERE fs.feature_id= $1 AND fs.genotype_id = s.genotype_id
20
--UNION
21
--SELECT feature_id, 'phenotype' AS type, s.description AS attribute
22
--FROM phenotype s, feature_phenotype fs
23
--WHERE fs.feature_id= $1 AND fs.phenotype_id = s.phenotype_id
24
UNION
25
SELECT feature_id, 'synonym' AS type, s.name AS attribute
26
FROM synonym s, feature_synonym fs
27
WHERE fs.feature_id= $1 AND fs.synonym_id = s.synonym_id
28
UNION
29
SELECT fp.feature_id,cv.name,fp.value
30
FROM featureprop fp, cvterm cv
31
WHERE fp.feature_id= $1 AND fp.type_id = cv.cvterm_id
32
UNION
33
SELECT feature_id, 'pub' AS type, s.series_name || ':' || s.title AS attribute
34
FROM pub s, feature_pub fs
35
WHERE fs.feature_id= $1 AND fs.pub_id = s.pub_id