function [stat] = my_GO(descriptor)


switch lower(descriptor)
    case 'tree_from_term'
        stat = 'SELECT DISTINCT descendant.acc, descendant.name, descendant.term_type FROM term  INNER JOIN graph_path ON (term.id=graph_path.term1_id)  INNER JOIN term AS descendant ON (descendant.id=graph_path.term2_id) WHERE term.name=''%s'' AND distance < %d order by descendant.name';

    case 'tree_from_id'
        stat = 'SELECT DISTINCT descendant.acc, descendant.name, descendant.term_type FROM term  INNER JOIN graph_path ON (term.id=graph_path.term1_id)  INNER JOIN term AS descendant ON (descendant.id=graph_path.term2_id) WHERE term.acc=''%s'' AND distance < %d order by descendant.name';


    case 'genes_from_term'
        stat = 'SELECT distinct(gene_product.symbol) AS gp_symbol FROM term  INNER JOIN graph_path ON (term.id=graph_path.term1_id)  INNER JOIN association ON (graph_path.term2_id=association.term_id)  INNER JOIN gene_product ON (association.gene_product_id=gene_product.id)  INNER JOIN species ON (gene_product.species_id=species.id)  INNER JOIN dbxref ON (gene_product.dbxref_id=dbxref.id) WHERE  term.name = ''%s''  AND  species.genus = ''Drosophila''';

    case 'ancestors_from_id'
        stat = 'SELECT DISTINCT ancestor.acc FROM term INNER JOIN graph_path ON (term.id=graph_path.term2_id) INNER JOIN term AS ancestor ON (ancestor.id=graph_path.term1_id) WHERE term.acc=''%s''';

    case 'term_from_acc'
        stat = 'select name from term where acc = ''%s''';

end
end
