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: 
<?php

namespace DispatchModule\Models;

/**
 * BlastModel cooperates with Blast
 *
 */
class BlastModel extends \BaseModule\Models\BaseModel {

    /**
     * Input query file (relative path from "www" folder)
     * @var String
     */
    private $input;

    /**
     * Constructor of BlasModel - sets input file
     *
     * @param string $input input path
     */
    public function __construct($input) {
        $this->input = $input;
    }

    /**
     * Executing query saved in the blastTemp directory
     * @param string $output path where to store output
     * @param string $format format of output
     * @param string $database blast database that should be used for alignment
     * @return array output of the blast tool
     */
    public function executeBlastSearch($output = "", $format = "", $database = "") {
        if (empty($database)) {
            $database = BLAST_DATABASE;
        }
        if (!empty($output)) {
            $output = " -out \"" . $output . '"';
        }
        if (empty($format)) {
            $format = 5;
        }
        exec("\"" . BLAST_PATH . "blastn\" -db \"" . $database . "\" -query \"" . $this->input . "\" -outfmt \"" . $format . '"' . $output, $result);
        return $result;
    }

}
API documentation generated by ApiGen