function tripal_feature_fasta_load_form_submit
2.x tripal_feature.fasta_loader.inc | tripal_feature_fasta_load_form_submit($form, &$form_state) |
1.x fasta_loader.inc | tripal_feature_fasta_load_form_submit($form, &$form_state) |
Related topics
File
- tripal_feature/
includes/ fasta_loader.inc, line 374 - @todo Add file header description
Code
function tripal_feature_fasta_load_form_submit($form, &$form_state) {
global $user;
$dfile = $form_state['storage']['dfile'];
$organism_id = $form_state['values']['organism_id'];
$type = trim($form_state['values']['seqtype']);
$method = trim($form_state['values']['method']);
$match_type = trim($form_state['values']['match_type']);
$library_id = $form_state['values']['library_id'];
$re_name = trim($form_state['values']['re_name']);
$re_uname = trim($form_state['values']['re_uname']);
$re_accession = trim($form_state['values']['re_accession']);
$db_id = $form_state['values']['db_id'];
$rel_type = $form_state['values']['rel_type'];
$re_subject = trim($form_state['values']['re_subject']);
$parent_type = trim($form_state['values']['parent_type']);
$analysis_id = $form_state['values']['analysis_id'];
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';
}
$args = array($dfile, $organism_id, $type, $library_id, $re_name, $re_uname,
$re_accession, $db_id, $rel_type, $re_subject, $parent_type, $method,
$user->uid, $analysis_id, $match_type);
$fname = preg_replace("/.*\/(.*)/", "$1", $dfile);
tripal_add_job("Import FASTA file: $fname", 'tripal_feature',
'tripal_feature_load_fasta', $args, $user->uid);
}