Browse Source

Some additional fixes to improve documentation

Stephen Ficklin 4 years ago
parent
commit
779f3fb74a

+ 11 - 17
docs/user_guide/example_genomics/func_annots/setup.rst

@@ -3,41 +3,37 @@ Module Setup
 .. note::
 
   Remember you must set the ``$DRUPAL_HOME`` environment variable if you want to cut-and-paste the commands below. See :doc:`../../install_tripal/drupal_home`
-  
-  
-For this example we will be load functional data for our gene. To do this we will use the Blast, KEGG, and InterPro extension modules. However, these extension modules are not part of the "core" Tripal package but are available as separate extensions.  Anyone may create extensions for Tripal.  These extensions are useful for genomic data and therefore are included in this tutorial. 
+
+
+For this example we will be load functional data for our gene. To do this we will use the Blast, KEGG, and InterPro extension modules. However, these extension modules are not part of the "core" Tripal package but are available as separate extensions.  Anyone may create extensions for Tripal.  These extensions are useful for genomic data and therefore are included in this tutorial.
 
 To download these modules:
 
   ::
-  
-    cd $DRUPAL_HOME    
+
+    cd $DRUPAL_HOME
     drush pm-download tripal_analysis_blast
-    drush pm-download tripal_analysis_kegg
     drush pm-download tripal_analysis_interpro
 
 Now, enable these extension modules:
 
   ::
-  
+
     drush pm-enable tripal_analysis_blast
     drush pm-enable tripal_analysis_interpro
-    drush pm-enable tripal_analysis_kegg
 
 For this example, we will use the following files which are available for downloading:
 
 - `Citrus_sinensis-orange1.1g015632m.g.iprscan.xml <http://www.gmod.org/mediawiki/images/0/0c/Citrus_sinensis-orange1.1g015632m.g.iprscan.xml>`_
-- `Citrus_sinensis-orange1.1g015632m.g.KEGG.heir.tar.gz <http://www.gmod.org/mediawiki/images/1/13/Citrus_sinensis-orange1.1g015632m.g.KEGG.heir.tar.gz>`_
 - `Blastx_citrus_sinensis-orange1.1g015632m.g.fasta.0_vs_uniprot_sprot.fasta.out <http://www.gmod.org/mediawiki/images/e/e8/Blastx_citrus_sinensis-orange1.1g015632m.g.fasta.0_vs_uniprot_sprot.fasta.out>`_
 - `Blastx_citrus_sinensis-orange1.1g015632m.g.fasta.0_vs_nr.out <http://www.gmod.org/mediawiki/images/2/24/Blastx_citrus_sinensis-orange1.1g015632m.g.fasta.0_vs_nr.out>`_
 
 Download these files to the ```$DRUPAL_HOME/sites/default/files``` directory. To do so quickly run these commands:
 
   ::
-  
+
     cd $DRUPAL_HOME/sites/default/files
     wget http://www.gmod.org/mediawiki/images/0/0c/Citrus_sinensis-orange1.1g015632m.g.iprscan.xml
-    wget http://www.gmod.org/mediawiki/images/1/13/Citrus_sinensis-orange1.1g015632m.g.KEGG.heir.tar.gz
     wget http://www.gmod.org/mediawiki/images/e/e8/Blastx_citrus_sinensis-orange1.1g015632m.g.fasta.0_vs_uniprot_sprot.fasta.out
     wget http://www.gmod.org/mediawiki/images/2/24/Blastx_citrus_sinensis-orange1.1g015632m.g.fasta.0_vs_nr.out
 
@@ -45,23 +41,22 @@ Each of these modules provides new fields for both the **gene** and **mRNA** con
 
 .. image:: setup1.png
 
-Next, we need to position the new field. Using the skills you learned in the :doc:`../../content_types/configuring_page_display` Create three new **Tripal Panes** named:
+Next, we need to position the new field. Using the skills you learned in the :doc:`../../content_types/configuring_page_display` Create two new **Tripal Panes** named:
 
 - Blast Results
 - Protein Domains
-- KEGG Pathways
 
 Be sure to:
 
-- Place the three new fields into each pane respectively 
-- Move the Panes out of the **disabled** section. 
+- Place the new fields into each pane respectively
+- Move the Panes out of the **disabled** section.
 - Set the label for each field to **Hidden**.
 
 The following shows an example of this layout:
 
 .. image:: setup2.png
 
-The fields are now ready for display once data is added!  
+The fields are now ready for display once data is added!
 
 .. note::
 
@@ -70,4 +65,3 @@ The fields are now ready for display once data is added!
 .. note::
 
   Anytime you install a Tripal v3 extension module you should check for new fields, and then place those fields in the layout.  Extension modules often will not do this for you because they do not assume you want these new fields.
-  

BIN
docs/user_guide/example_genomics/func_annots/setup2.png


BIN
docs/user_guide/example_genomics/genomes_genes.1.png


+ 1 - 1
docs/user_guide/example_genomics/genomes_genes.rst

@@ -26,7 +26,7 @@ Enter the following:
 
   "File", "Upload the file name Citrus_sinensis-orange1.1g015632m.g.gff3"
   "Analysis", "Whole Genome Assembly and Annotation of Citrus sinensis"
-  "Organism", "Citrus sinensis"
+  "Existing Organism", "Citrus sinensis"
   "Landmark Type", "supercontig"
   "All other options", "leave as default"
 

+ 8 - 9
docs/user_guide/example_genomics/pub_import.rst

@@ -3,7 +3,7 @@ Importing Publications
 .. note::
 
   Remember you must set the ``$DRUPAL_HOME`` environment variable if you want to cut-and-paste the commands below. See :doc:`../install_tripal/drupal_home`
-  
+
 Tripal provides an interface for automatically and manually adding publications.
 
 Manually Adding a Publication
@@ -64,7 +64,7 @@ Now, save this importer. You should see that we have one importer in the list:
 
 .. image:: pub_import.4.png
 
-We can use this importer to load all  publications related to Citrus sinensis from PubMed into our database (how to load these will be shown later). However, what if new publications are added? We would like this importer to be run monthly so that we can automatically add new publications as they become available. But we do not need to try to reload these 760 every time the loader runs each month. We will create a new importer that only finds publications within the last 30 days. To do this, click the link New Importer. Now, add the following criteria:
+We can use this importer to load all  publications related to <i>Citrus sinensis</i> from PubMed into our database (how to load these will be shown later). However, what if new publications are added? We would like this importer to be run monthly so that we can automatically add new publications as they become available. But we do not need to try to reload the same publications every time the loader runs each month. We will create a new importer that only finds publications within the last 30 days. To do this, click the link New Importer. Now, add the following criteria:
 
 .. csv-table::
   :header: "Field Name", "Value"
@@ -142,14 +142,14 @@ Import from the USDA National Agricultural Library
 The instructions for the Tripal publication importer described previously use the the NCBI PubMed database. However, you can also import publications from the USDA National Agriculture Library (AGRICOLA). However, to use this repository a few software dependences are required.  These include:
 
 - The `YAZ library <https://www.indexdata.com/resources/software/yaz/>`_
-- `PHP support for YAZ <https://www.php.net/manual/en/book.yaz.php>`_  
+- `PHP support for YAZ <https://www.php.net/manual/en/book.yaz.php>`_
 
-The following instructions are to install the necessary dependencies on an Ubuntu 18.04 LTS.   
+The following instructions are to install the necessary dependencies on an Ubuntu 18.04 LTS.
 
 First install yaz, the yaz development library and the php development library:
 
 .. code-block:: bash
- 
+
   sudo apt-get install yaz libyaz5-dev php-dev
 
 
@@ -157,10 +157,10 @@ Next update the PECL tool and install the PHP yaz library:
 
 
 .. code-block:: bash
-  
+
   sudo pecl channel-update pecl.php.net
   sudo pecl install yaz
-  
+
 Next, edit the `php.ini` files.  On Ubuntu 18.04 there are two PHP files:
 
 - `/etc/php/7.2/cli/php.ini`
@@ -175,8 +175,7 @@ Add the following line to each file:
 Finally, restart the web server so that it picks up the changes to the `php.ini` file.
 
 .. code-block:: bash
-  
+
   sudo service apache2 restart
 
 You can now import publications from Agricola using the same interface as with PubMed.
-

+ 1 - 1
tripal/includes/tripal.importer.inc

@@ -80,7 +80,7 @@ function tripal_get_importer_form($form, &$form_state, $class) {
     $analyses = [];
     $analyses[''] = '';
     while ($analysis = $org_rset->fetchObject()) {
-      $analyses[$analysis->analysis_id] = "$analysis->name ($analysis->program $analysis->programversion, $analysis->sourcename)";
+      $analyses[$analysis->analysis_id] = $analysis->name;
     }
     $form['analysis_id'] = [
       '#title' => t('Analysis'),

+ 6 - 0
tripal_chado/includes/TripalFields/chado_linker__prop/chado_linker__prop_widget.inc

@@ -143,6 +143,12 @@ class chado_linker__prop_widget extends ChadoFieldWidget {
     $value = $form_state['values'][$field_name]['und'][$delta]['chado-' . $field_table . '__value'];
     $form_state['values'][$field_name]['und'][$delta]['value'] = $value;
 
+    // A value of zero gets set to empty when sbumitted and some prop
+    // tables don't have a default value set (e.g. pubprop).
+    if (!$form_state['values'][$field_name]['und'][$delta]['chado-' . $field_table . '__rank']) {
+      $form_state['values'][$field_name]['und'][$delta]['chado-' . $field_table . '__rank'] = 0;
+    }
+
     // If the user removed the property then we want to clear out the other
     // fields except the pkey value. If the pkey field is present and the value
     // is present then the chado storage backend will delete the record.

+ 11 - 12
tripal_chado/includes/TripalImporter/GFF3Importer.inc

@@ -306,17 +306,6 @@ class GFF3Importer extends TripalImporter {
       '#required' => TRUE,
       '#options' => $organisms,
     ];
-    $form['create_organism'] = [
-      '#type' => 'checkbox',
-      '#title' => t('Create organism'),
-      '#required' => FALSE,
-      '#description' => t('The Tripal GFF loader supports the "organism" attribute. This allows features of a
-       different organism to be aligned to the landmark sequence.  The format of the
-       attribute is "organism=[genus]:[species]", where [genus] is the organism\'s genus and [species] is the
-       species name. Check this box to automatically add the organism to the database if it does not already exists.
-       Otherwise lines with an organism attribute where the organism is not present in the database will be skipped.'),
-    ];
-
     $form['landmark_type'] = [
       '#title' => t('Landmark Type'),
       '#type' => 'textfield',
@@ -325,6 +314,7 @@ class GFF3Importer extends TripalImporter {
        the landmark features (first column of the GFF3 file) are not already in the database.."),
     ];
 
+
     $form['proteins'] = [
       '#type' => 'fieldset',
       '#title' => t('Proteins'),
@@ -410,7 +400,16 @@ class GFF3Importer extends TripalImporter {
       '#collapsible' => TRUE,
       '#collapsed' => FALSE,
     ];
-
+    $form['advanced']['create_organism'] = [
+      '#type' => 'checkbox',
+      '#title' => t('Create organism'),
+      '#required' => FALSE,
+      '#description' => t('The Tripal GFF loader supports the "organism" attribute. This allows features of a
+       different organism to be aligned to the landmark sequence.  The format of the
+       attribute is "organism=[genus]:[species]", where [genus] is the organism\'s genus and [species] is the
+       species name. Check this box to automatically add the organism to the database if it does not already exists.
+       Otherwise lines with an organism attribute where the organism is not present in the database will be skipped.'),
+    ];
 
     $form['advanced']['line_number'] = [
       '#type' => 'textfield',