public function FASTAImporter::run

3.x FASTAImporter.inc public FASTAImporter::run()

Overrides TripalImporter::run

See also

TripalImporter::run()

File

tripal_chado/includes/TripalImporter/FASTAImporter.inc, line 324

Class

FASTAImporter

Code

public function run() {

  $arguments = $this->arguments['run_args'];
  $file_path = $this->arguments['files'][0]['file_path'];

  $organism_id = $arguments['organism_id'];
  $type = $arguments['seqtype'];
  $method = $arguments['method'];
  $match_type = $arguments['match_type'];
  $re_name = $arguments['re_name'];
  $re_uname = $arguments['re_uname'];
  $re_accession = $arguments['re_accession'];
  $db_id = $arguments['db_id'];
  $rel_type = $arguments['rel_type'];
  $re_subject = $arguments['re_subject'];
  $parent_type = $arguments['parent_type'];
  $method = $arguments['method'];
  $analysis_id = $arguments['analysis_id'];
  $match_type = $arguments['match_type'];


  if ($method == 0) {
    $method = 'Insert only';
  }
  if ($method == 1) {
    $method = 'Update only';
  }
  if ($method == 2) {
    $method = 'Insert and update';
  }

  if ($match_type == 0) {
    $match_type = 'Name';
  }

  if ($match_type == 1) {
    $match_type = 'Unique name';
  }

  $this->loadFasta($file_path, $organism_id, $type, $re_name, $re_uname, $re_accession, 
  $db_id, $rel_type, $re_subject, $parent_type, $method, $analysis_id, 
  $match_type);
}