File: organism.sqlapi

package info (click to toggle)
libchado-perl 1.22-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 24,024 kB
  • sloc: xml: 192,540; sql: 165,936; perl: 28,298; sh: 101; python: 73; makefile: 46
file content (13 lines) | stat: -rw-r--r-- 810 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13

DECLARE FUNCTION get_organism_id(genus VARCHAR, species VARCHAR) RETURN INT;
COMMENT ON FUNCTION get_organism_id(VARCHAR, VARCHAR) IS
'returns an organism based on its binomial genus species unique key';

DECLARE FUNCTION get_organism_id(binomial VARCHAR) RETURN INT;
COMMENT ON FUNCTION get_organism_id(VARCHAR) IS
'returns an organism based on its binomial unique key. The binomial is passed as a single string. The string will split on the FIRST space - before the space is the genus, after the species. For example "Drosophila Melanogaster';

DECLARE FUNCTION get_organism_id_abbrev(binomial VARCHAR) RETURNS INT;
COMMENT ON FUNCTION get_organism_id_abbrev(VARCHAR) IS
'as get_organism_id(binomial), except only the first letter of the genus is used. In theory this should still result in a unique key';