Skip to content

Commit

Permalink
Merge branch 'master' of github.com:tripal/tripal_analysis_expression
Browse files Browse the repository at this point in the history
  • Loading branch information
MingChen0919 committed Jul 27, 2016
2 parents aa28947 + ec3857c commit 36a6b16
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,8 @@ The following panes are added to the following content types:

### Biomaterial
* **Overview (base)** - The generic tripal overview pane.
* **Feature Browser** - A list of features associated with the biomaterial.
* **Properties** - Properties associated with the biomaterial.
* **Cross References** - Accession terms associated with the biomaterial.
* **Relationships** - Relationships associated with the biomaterial.

### Array Design
* **Overview (base)** - The generic tripal overview pane.
Expand All @@ -200,7 +198,15 @@ Each Analysis: Expression content type has administrative pages. As an administr
![Administrator Pages for Content Types](https://cloud.githubusercontent.com/assets/14822959/13010514/2d2dc7be-d170-11e5-8670-92bdded6659d.png)

### Expression Display Administrative Page
The display of expression data on feature pages can be configured.
The display of expression data on feature pages can be configured. To configure the expression figure, navigate to **Tripal->Extensions->Expression Analysis->Tripal Expression Analysis Settings**. Available options are:

* **Hide Expression Figure** - Hide expression figures on all feature pages. With this option you can load expression data without displaying the expression figure.
* **Hide Biomaterial Labels** - Hide the name of the biomaterial under the expression figure tile or column. Biomaterial names will still appear in tooltips.
* **Maximum Label Length** - Set the maximum acceptable biomaterial name length. Biomaterial names that are longer than this length will be truncated.
* **Expession Column Width** - Change the size of the width of the tile or column in the figure. Value must be 15 or greater.
* **Default Heatmap Display** - The default display can be either a one dimensional heatmap or a bar chart.





Expand Down
8 changes: 7 additions & 1 deletion includes/tripal_analysis_expression.chado_node.inc
Original file line number Diff line number Diff line change
Expand Up @@ -711,12 +711,18 @@ function chado_analysis_expression_biomaterial_validator_submit($form, &$form_st
$re_ext = '/^.+\.(' . $fileext . ')/';

// A matrix file.
if ($filetype == 'mat' and is_file($filepath) and preg_match($re_ext,$filepath)) {
if ($filetype == 'mat' and is_file($filepath)) {
$data_ln = 0;
$mat_fp = fopen($filepath, 'r');
//Check a single matrix file.
while($line = fgets($mat_fp)) {
if ($data_ln == 1 or !$re_start) {
// Make sure this is actually a tab separated file.
if (!preg_match('/\t/', $line, $matches)) {
drupal_set_message(t('Warning: the expression loader expects a tab separated file. Please ensure the expression file is a tab separated file. Warning thrown on line:') . "\n", 'warning');
drupal_set_message($line, 'warning');
return;
}
$linepart = preg_split('/\t/',$line,-1,PREG_SPLIT_NO_EMPTY);
// Trim whitespace from biomaterial names.
foreach ($linepart as $biomaterial) {
Expand Down
4 changes: 2 additions & 2 deletions includes/tripal_analysis_expression_config.admin.inc
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ function tripal_analysis_expression_config_admin() {

$form['feature_expression']['expression_display'] = array(
'#type' => 'radios',
'#title' => t('Heatmap Display'),
'#title' => t('Default Heatmap Display'),
'#options' => array(
'tile' => t('One Dimensional Heatmap'),
'column' => t('Column Display'),
'column' => t('Chart Display'),
),
'#default_value' => variable_get('chado_feature_expression_expression_display','column'),
);
Expand Down
3 changes: 2 additions & 1 deletion includes/tripal_biomaterial_loader.inc
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ function flat_biomaterial_parser($flat_path, $organism_id, $flat_file_type) {
$db_id - create_ncbi_db('bioproject', 'NCBI BioProject', '');
}
// First check to see if there is a dbxref record in the database corresponding to the accession number from the file.
if (empty(chado_select_record('dbxref', array('dbxref_id'), array('accession' => $line[$index], 'db_id' => $db_id)))) {
$record = chado_select_record('dbxref', array('dbxref_id'), array('accession' => $line[$index], 'db_id' => $db_id));
if (empty($record)) {
// Insert value into dbxref table.
$values = array(
'accession' => $line[$index],
Expand Down
4 changes: 2 additions & 2 deletions tripal_analysis_expression.install
Original file line number Diff line number Diff line change
Expand Up @@ -464,11 +464,11 @@ function tripal_analysis_expression_add_cvterms() {
* @ingroup tripal_analysis_expression
*/
function tripal_analysis_expression_uninstall() {

/*
// Get localization function for installation.
$t = get_t();

// Unregister the analysis.
tripal_unregister_analysis_child('tripal_analysis_expression');

*/
}

0 comments on commit 36a6b16

Please sign in to comment.