Overview

Namespaces

  • AnalyseModule
    • Models
  • BaseModule
    • Exceptions
    • Models
    • Repository
    • Services
  • DispatchModule
    • Helpers
    • Models
    • Tools
  • PredictModule
  • SearchModule

Classes

  • AnalyseModule\AnalysePresenter
  • AnalyseModule\ConservancyPresenter
  • AnalyseModule\Models\BaseTool
  • AnalyseModule\Models\ConservancyComparator
  • BaseModule\BasePresenter
  • BaseModule\DiscoveredViewReflection
  • BaseModule\ErrorPresenter
  • BaseModule\Form
  • BaseModule\HomepagePresenter
  • BaseModule\Models\BaseModel
  • BaseModule\Models\FileModel
  • BaseModule\PesekPresenter
  • BaseModule\Repository\BaseRepository
  • BaseModule\Repository\TestRepository
  • BaseModule\RouterFactory
  • BaseModule\RssPresenter
  • BaseModule\Services\Authenticator
  • BaseModule\Services\BaseService
  • BaseModule\Services\DbService
  • DispatchModule\BaseMatch
  • DispatchModule\BaseParser
  • DispatchModule\BlastMatch
  • DispatchModule\BlatMatch
  • DispatchModule\Helpers\RnaplotHelper
  • DispatchModule\Helpers\TravelerHelper
  • DispatchModule\Models\BaseModel
  • DispatchModule\Models\BlastModel
  • DispatchModule\Models\BlastXMLParser
  • DispatchModule\Models\BlatModel
  • DispatchModule\Models\Cppredict2Model
  • DispatchModule\Models\CppredictModel
  • DispatchModule\Models\FastaModel
  • DispatchModule\Models\FileModel
  • DispatchModule\PredictParser
  • DispatchModule\ResultSet
  • DispatchModule\SearchParser
  • DispatchModule\Sequence
  • DispatchModule\Tools\AnnotationDbTool
  • DispatchModule\Tools\BaseTool
  • DispatchModule\Tools\Cppredict2Tool
  • DispatchModule\Tools\DbTool
  • DispatchModule\Tools\SimilarityTool
  • DispatchModule\Tools\TaxonomyDbTool
  • PredictModule\PredictPresenter
  • SearchModule\SearchPresenter

Interfaces

  • DispatchModule\Tools\ToolInterface

Exceptions

  • BaseModule\Exceptions\BaseException
  • BaseModule\Exceptions\NotFoundException
  • BaseModule\Exceptions\ToolException
  • Overview
  • Namespace
  • Class
 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: 
<?php

namespace DispatchModule\Tools;

/**
 * AnnotationDbTool
 * - retrieves non-taxonomic information from database
 * - used (mainly) by search
 */
class AnnotationDbTool extends \DispatchModule\Tools\DbTool {

    /**
     * Constructor used to save container
     *
     * @param \Nette\DI\Container $container
     */
    public function __construct(\Nette\DI\Container $container) {
        parent::__construct($container,
                            'Annotation',
                            'Standard search using annotations stored in database',
                            array(
                                'molecule_type' => array('select', 'Molecule type', array(
                                          'items' => array('' => 'any'),
                                          'multiplicators' => array('or' => 5))),
                                'description' => array('text', 'Description contains',
                                    array('placeholder' => '18S sequenced from gene...')),
                                'accession' => array('text', 'Accession number', array(
                                        'multiplicators' => array('or' => 10),
                                        'placeholder' => 'AC091632'
                                    )),
                                'firstpublished' => array('text', 'First published', array(
                                        'date' => true,
                                        'modifiers' => array('firstpublished_direction' => array('select', '', array('items' => array(self::RULE_LT => 'before', self::RULE_GT => 'after')))),
                                        'multiplicators' => array('and' => 2)
                                    )),
                                'sequence_quality' => array('select', 'Minimal sequence quality', array('items' => array('' => '0%', '50' => '50%', '90' => '90%', '95' => '95%', '99' => '99%'))),
                                'region_length' => array('text', 'Length', array(
                                        'modifiers' => array('region_length_direction' => array('select', '', array('items' => array(self::RULE_LT => '<', self::RULE_GT => '>')))),
                                        'multiplicators' => array('and' => 2)
                                    )),
                            ));

        $base = $this->chooseBaseTable();
        $result = $this->prepareCriteria('DISTINCT dataset', $base);
        $result->order('dataset');
        foreach ($result as $res) {
            $type = $res['dataset'];
            $this->wantedParameters['molecule_type'][2]['items'][$type] = $type;
        }
    }

}
API documentation generated by ApiGen