Browse Source

Added better launchpad pages

Lacey Sanderson 10 years ago
parent
commit
9d08f308f5

+ 16 - 0
blast_ui.module

@@ -145,6 +145,22 @@ function blast_ui_theme() {
     'path' => "$path/theme",
   );
 
+  // Menu Information Pages
+  // These are only seen if the user has disabled the all-in-one
+  // or by query type forms.
+  $items['blast_user_menupage'] = array(
+    'template' => 'blast_user_menupage',
+    'path' => "$path/theme",
+  );
+  $items['blast_nucleotide_user_menupage'] = array(
+    'template' => 'blast_nucleotide_user_menupage',
+    'path' => "$path/theme",
+  );
+  $items['blast_protein_user_menupage'] = array(
+    'template' => 'blast_protein_user_menupage',
+    'path' => "$path/theme",
+  );
+
   return $items;
 }
 

+ 3 - 2
includes/blast_ui.form_per_query_type.inc

@@ -13,12 +13,14 @@ function blast_ui_per_query_type_form($form, $form_state) {
   // Determine the BLAST program.
   $query_type = $form_state['build_info']['args'][0];
   if ($query_type == 'nucleotide') {
+    $template = 'blast_nucleotide_user_menupage';
     $blast_program = array(
       'blastn',
       'blastx'
     );
   }
   elseif ($query_type == 'protein') {
+    $template = 'blast_protein_user_menupage';
     $blast_program = array(
       'blastp',
       'tblastn'
@@ -35,10 +37,9 @@ function blast_ui_per_query_type_form($form, $form_state) {
     '#value' => implode(', ', $blast_program)
   );
 
-  // Give the users a message.
   $form['msg'] = array(
     '#type' => 'item',
-    '#markup' => 'COMMING SOON!'
+    '#markup' => theme($template)
   );
 
   return $form;

+ 1 - 1
includes/blast_ui.form_single.inc

@@ -14,7 +14,7 @@ function blast_ui_all_in_one_form($form, $form_state) {
   // form that just isn't ready yet.
   $form['msg'] = array(
     '#type' => 'item',
-    '#markup' => 'COMMING SOON!'
+    '#markup' => theme('blast_user_menupage')
   );
 
   return $form;

+ 59 - 0
theme/blast_nucleotide_user_menupage.tpl.php

@@ -0,0 +1,59 @@
+<?php
+
+/**
+ * @file
+ *
+ */
+
+?>
+
+<style>
+  tr.blast-highlighted td {
+    background: #F6FFEC;
+  }
+</style>
+
+<p>In bioinformatics, BLAST (Basic Local Alignment Search Tool) is an algorithm
+for comparing primary biological sequence information, such as the amino-acid
+sequences of different proteins or the nucleotides of DNA sequences. A BLAST
+search enables a researcher to compare a query sequence with a library or
+database of sequences, and identify library sequences that resemble the query
+sequence above a certain threshold. Different types of BLASTs are available
+according to the query sequences. For example, following the discovery of a
+previously unknown gene in the mouse, a scientist will typically perform a
+BLAST search of the human genome to see if humans carry a similar gene;
+BLAST will identify sequences in the human genome that resemble the mouse
+gene based on similarity of sequence.</p>
+
+<blockquote>Altschul,S.F., Gish,W., Miller,W., Myers,E.W. and Lipman,D.J. (1990) Basic
+local alignment search tool. J. Mol. Biol., 215, 403–410.</blockquote>
+
+<table>
+  <tr>
+    <th>Query Type</th>
+    <th>Database Type</th>
+    <th>BLAST Program</th>
+  </tr>
+  <tr class= "blast-highlighted">
+    <td rowspan="2">Nucleotide</td>
+    <td>Nucleotide</td>
+    <td><?php print l('blastn', '/blast/nucleotide/nucleotide');?>:
+      Search a nucleotide database using a nucleotide query.</td>
+  </tr>
+  <tr class="blast-highlighted">
+    <td>Protein</td>
+    <td><?php print l('blastx', '/blast/nucleotide/protein');?>:
+      Search protein database using a translated nucleotide query.</td>
+  </tr>
+  <tr>
+    <td  rowspan="2">Protein</td>
+    <td>Nucleotide</td>
+    <td><?php print l('tblastn', '/blast/protein/nucleotide');?>:
+      Search translated nucleotide database using a protein query.</td>
+  </tr>
+  <tr>
+    <td>Protein</td>
+    <td><?php print l('blastp', '/blast/protein/protein');?>:
+      Search protein database using a protein query.</td>
+  </tr>
+</table>

+ 59 - 0
theme/blast_protein_user_menupage.tpl.php

@@ -0,0 +1,59 @@
+<?php
+
+/**
+ * @file
+ *
+ */
+
+?>
+
+<style>
+  tr.blast-highlighted td {
+    background: #F6FFEC;
+  }
+</style>
+
+<p>In bioinformatics, BLAST (Basic Local Alignment Search Tool) is an algorithm
+for comparing primary biological sequence information, such as the amino-acid
+sequences of different proteins or the nucleotides of DNA sequences. A BLAST
+search enables a researcher to compare a query sequence with a library or
+database of sequences, and identify library sequences that resemble the query
+sequence above a certain threshold. Different types of BLASTs are available
+according to the query sequences. For example, following the discovery of a
+previously unknown gene in the mouse, a scientist will typically perform a
+BLAST search of the human genome to see if humans carry a similar gene;
+BLAST will identify sequences in the human genome that resemble the mouse
+gene based on similarity of sequence.</p>
+
+<blockquote>Altschul,S.F., Gish,W., Miller,W., Myers,E.W. and Lipman,D.J. (1990) Basic
+local alignment search tool. J. Mol. Biol., 215, 403–410.</blockquote>
+
+<table>
+  <tr>
+    <th>Query Type</th>
+    <th>Database Type</th>
+    <th>BLAST Program</th>
+  </tr>
+  <tr>
+    <td rowspan="2">Nucleotide</td>
+    <td>Nucleotide</td>
+    <td><?php print l('blastn', '/blast/nucleotide/nucleotide');?>:
+      Search a nucleotide database using a nucleotide query.</td>
+  </tr>
+  <tr>
+    <td>Protein</td>
+    <td><?php print l('blastx', '/blast/nucleotide/protein');?>:
+      Search protein database using a translated nucleotide query.</td>
+  </tr>
+  <tr class="blast-highlighted">
+    <td  rowspan="2">Protein</td>
+    <td>Nucleotide</td>
+    <td><?php print l('tblastn', '/blast/protein/nucleotide');?>:
+      Search translated nucleotide database using a protein query.</td>
+  </tr>
+  <tr class="blast-highlighted">
+    <td>Protein</td>
+    <td><?php print l('blastp', '/blast/protein/protein');?>:
+      Search protein database using a protein query.</td>
+  </tr>
+</table>

+ 53 - 0
theme/blast_user_menupage.tpl.php

@@ -0,0 +1,53 @@
+<?php
+
+/**
+ * @file
+ *
+ */
+
+?>
+
+<p>In bioinformatics, BLAST (Basic Local Alignment Search Tool) is an algorithm
+for comparing primary biological sequence information, such as the amino-acid
+sequences of different proteins or the nucleotides of DNA sequences. A BLAST
+search enables a researcher to compare a query sequence with a library or
+database of sequences, and identify library sequences that resemble the query
+sequence above a certain threshold. Different types of BLASTs are available
+according to the query sequences. For example, following the discovery of a
+previously unknown gene in the mouse, a scientist will typically perform a
+BLAST search of the human genome to see if humans carry a similar gene;
+BLAST will identify sequences in the human genome that resemble the mouse
+gene based on similarity of sequence.</p>
+
+<blockquote>Altschul,S.F., Gish,W., Miller,W., Myers,E.W. and Lipman,D.J. (1990) Basic
+local alignment search tool. J. Mol. Biol., 215, 403–410.</blockquote>
+
+<table>
+  <tr>
+    <th>Query Type</th>
+    <th>Database Type</th>
+    <th>BLAST Program</th>
+  </tr>
+  <tr>
+    <td  rowspan="2">Nucleotide</td>
+    <td>Nucleotide</td>
+    <td><?php print l('blastn', '/blast/nucleotide/nucleotide');?>:
+      Search a nucleotide database using a nucleotide query.</td>
+  </tr>
+  <tr>
+    <td>Protein</td>
+    <td><?php print l('blastx', '/blast/nucleotide/protein');?>:
+      Search protein database using a translated nucleotide query.</td>
+  </tr>
+  <tr>
+    <td  rowspan="2">Protein</td>
+    <td>Nucleotide</td>
+    <td><?php print l('tblastn', '/blast/protein/nucleotide');?>:
+      Search translated nucleotide database using a protein query.</td>
+  </tr>
+  <tr>
+    <td>Protein</td>
+    <td><?php print l('blastp', '/blast/protein/protein');?>:
+      Search protein database using a protein query.</td>
+  </tr>
+</table>