Tripal v1.0 (6.x-1.0)
tripal_views_plugin_style_export_fasta.inc
Go to the documentation of this file.
00001 <?php
00012 class tripal_views_plugin_style_export_fasta extends views_data_export_plugin_style_export {
00013 
00020   function option_definition() {
00021     $options = parent::option_definition();
00022 
00023 
00024     return $options;
00025   }
00026 
00037   function options_form(&$form, &$form_state) {
00038     parent::options_form($form, $form_state);
00039 
00040 
00041     $form['display'] = array(
00042       '#type' => 'fieldset',
00043       '#title' => 'Format Output',
00044     );
00045     
00046     $form['display']['residues_colname'] = array(
00047       '#type' => 'textfield',
00048       '#title' => t('The name of the residues column'),
00049       '#description' => t("The name of the column that contains the sequence ".
00050          "residues. To discover this field edit the feature residues field ".
00051          "and click the checkbox \"Rewrite ".
00052          "the output of this field\".  In the replacement patterns section are ".
00053          "field names.  The field name for the residues column should be the ".
00054          "last one"),
00055       '#required' => TRUE,
00056       '#default_value' => $this->options['display']['residues_colname'],
00057     );
00058     
00059     $form['display']['use_residues'] = array(
00060       '#type' => 'checkbox',
00061       '#title' => t('Use the value as is'),
00062       '#description' => t('Check this box if you do not want the FASTA exporter ' .
00063          'to provide a definition line or add line breaks to the sequence. This is '.
00064          'useful when the field options provided for the residues column has '.
00065          'already been formatted'),
00066       '#default_value' => $this->options['display']['use_residues'],
00067     );
00068 
00069 
00070     $form['display']['num_bases_per_line'] = array(
00071       '#type' => 'textfield',
00072       '#title' => t('Number of bases per line'),
00073       '#description' => t('Specify the number of bases per line. If no value is ' .
00074         'provided. The sequence will be one long string (default)'),
00075       '#default_value' => $this->options['display']['num_bases_per_line'],
00076     );
00077     
00078     $form['display']['defline_fields'] = array(
00079       '#type' => 'textfield',
00080       '#title' => t('Defenition line fields'),
00081       '#default_value' => $this->options['display']['defline_fields'],
00082       '#description' => t("This field controls the information present in the definition ".
00083          "line for each sequence. Any of the fields in the view can be used in the ".
00084          "definition line.  To discover these fields, add the feature residues as the ".
00085          "last field in the view.  Then edit the field and click the checkbox \"Rewrite ".
00086          "the output of this field\".  In the replacement patterns section are the ".
00087          "field replacement tokens that can be used in this field. You may include any ".
00088          "additional text to separte or qualify these fields.  Only fields that have not ".
00089          "been excluded from the display will appear."),
00090     );
00091   }
00092 }
 All Classes Files Functions Variables