function tripal_feature_gff3_load_form_submit
2.x tripal_feature.gff_loader.inc | tripal_feature_gff3_load_form_submit($form, &$form_state) |
1.x gff_loader.inc | tripal_feature_gff3_load_form_submit($form, &$form_state) |
Related topics
File
- tripal_feature/
includes/ gff_loader.inc, line 258 - @todo Add file header description
Code
function tripal_feature_gff3_load_form_submit($form, &$form_state) {
global $user;
$gff_file = trim($form_state['values']['gff_file']);
$organism_id = $form_state['values']['organism_id'];
$add_only = $form_state['values']['add_only'];
$update = $form_state['values']['update'];
$refresh = $form_state['values']['refresh'];
$remove = $form_state['values']['remove'];
$analysis_id = $form_state['values']['analysis_id'];
$use_transaction = $form_state['values']['use_transaction'];
$target_organism_id = $form_state['values']['target_organism_id'];
$target_type = trim($form_state['values']['target_type']);
$create_target = $form_state['values']['create_target'];
$line_number = trim($form_state['values']['line_number']);
$landmark_type = trim($form_state['values']['landmark_type']);
$alt_id_attr = trim($form_state['values']['alt_id_attr']);
$create_organism = $form_state['values']['create_organism'];
$args = array($gff_file, $organism_id, $analysis_id, $add_only,
$update, $refresh, $remove, $use_transaction, $target_organism_id,
$target_type, $create_target, $line_number, $landmark_type, $alt_id_attr,
$create_organism);
$type = '';
if ($add_only) {
$type = 'import only new features';
}
if ($update) {
$type = 'import all and update';
}
if ($refresh) {
$type = 'import all and replace';
}
if ($remove) {
$type = 'delete features';
}
$fname = preg_replace("/.*\/(.*)/", "$1", $gff_file);
tripal_add_job("$type GFF3 file: $fname", 'tripal_feature',
'tripal_feature_load_gff3', $args, $user->uid);
return '';
}