function tripal_feature_seq_extract_page
1.x seq_extract.inc | tripal_feature_seq_extract_page() |
1 string reference to 'tripal_feature_seq_extract_page'
- tripal_feature_menu in tripal_feature/
tripal_feature.module - Menu items are automatically added for the new node types created by this module to the 'Create Content' Navigation menu item. This function adds more menu items needed for this module.
File
- tripal_feature/
includes/ seq_extract.inc, line 5
Code
function tripal_feature_seq_extract_page() {
if ($_SESSION['tripal_feature_seq_extract']['download']) {
$genus = $_SESSION['tripal_feature_seq_extract']['genus'];
$species = $_SESSION['tripal_feature_seq_extract']['species'];
$analysis = $_SESSION['tripal_feature_seq_extract']['analysis'];
$ftype = $_SESSION['tripal_feature_seq_extract']['ftype'];
$fnames = $_SESSION['tripal_feature_seq_extract']['fnames'];
$upstream = $_SESSION['tripal_feature_seq_extract']['upstream'];
$downstream = $_SESSION['tripal_feature_seq_extract']['downstream'];
$format = $_SESSION['tripal_feature_seq_extract']['format'];
$use_parent = $_SESSION['tripal_feature_seq_extract']['use_parent'];
$aggregate = $_SESSION['tripal_feature_seq_extract']['aggregate'];
$agg_types = $_SESSION['tripal_feature_seq_extract']['agg_types'];
unset($_SESSION['tripal_feature_seq_extract']['download']);
if ($format == 'fasta_html') {
drupal_set_header('Content-Type: text/html');
}
else {
drupal_set_header('Content-Type: text');
drupal_set_header('Content-Disposition: attachment; filename="sequences.fasta.txt"');
}
tripal_feature_seq_extract_get_features(NULL, $genus, $species, $analysis,
$ftype, $fnames['items_array'], $upstream, $downstream, $format, $use_parent, $aggregate,
$agg_types);
return;
}
// generate the search form
$output .= '';
if (user_access('access administration pages')) {
$output .= "
<div class=\"tripal-no-results\">
<p>Administrators, the " . l('organism_feature_count', 'admin/tripal/mviews') . " and
" . l('analysis_organism', 'admin/tripal/mviews') . " materialized
views must be populated before using this form. Those views should be re-populated
when new data is added. If you use the " . l('jquery_update module', 'http://drupal.org/project/jquery_update') . ", it may break this form.
You will need to update the jquery_update/replace/jquery.form.js file with " .
l('a more recent version', 'https://raw.github.com/malsup/form/master/jquery.form.js') . "</p>
</div>
";
}
$output .= "<div id=\"tripal-feature-seq-extract-form-block\">";
$output .= drupal_get_form('tripal_feature_seq_extract_form');
$output .= "</div>";
return $output;
}