Skip to content

Commit

Permalink
Merge branch 'biochem_direction_0723' into solr_staging_spring23
Browse files Browse the repository at this point in the history
  • Loading branch information
samseaver committed Jan 19, 2024
2 parents ddfd4d7 + 0b259c7 commit 09f55ba
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,16 @@

## Requirements
- node (https://nodejs.org/)
- bower `npm install -g bower`


(it is recommended that you use nvm to manage versions of node and the package manager npm)

## Local Installation

```
git clone --recursive https://github.com/modelseed/modelseed-ui.git modelseed-ui
cd modelseed-ui
bower install
npm install
```

Notes:
- `bower install` installs some third-party (front-end) dependencies


Now point your favorite webserver at `modelseed-ui` and you are ready to go!

From `modelseed-ui`:
Expand Down
8 changes: 4 additions & 4 deletions app/ctrls/ms-ctrls.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ function($s, Biochem, $state, $stateParams, MS, Session) {
var rxn_sFields = ['id', 'name', 'status', 'synonyms', 'aliases', 'pathways', 'stoichiometry', 'notes'];
$s.rxnOpts = Session.getOpts($state, 'rxns') ||
{query: '', limit: 25, offset: 0, sort: {field: 'id'}, core: 'reactions', searchFields: rxn_sFields,
visible: ['name', 'id', 'definition', 'deltag', 'deltagerr', 'direction', 'stoichiometry', 'status',
visible: ['name', 'id', 'definition', 'deltag', 'deltagerr', 'reversibility', 'stoichiometry', 'status',
'aliases', 'is_obsolete', 'is_transport', 'ontology', 'pathways', 'notes', 'is_transport'] };

// Compounds
Expand All @@ -279,7 +279,7 @@ function($s, Biochem, $state, $stateParams, MS, Session) {
{label: 'Equation', key: 'stoichiometry', format: function(r) {
if (!r.stoichiometry) return "N/A";
var stoich = r.stoichiometry.replace(/\"/g, '')
return '<span style="white-space: wrap"'+'stoichiometry-to-eq="'+stoich+'" direction="'+r.direction+'"></span>';
return '<span style="white-space: wrap"'+'stoichiometry-to-eq="'+stoich+'" direction="'+r.reversibility+'"></span>';
}},
{label: 'Transport', key: 'is_transport', format: function(row){
return row.is_transport? 'Yes' : 'No';
Expand Down Expand Up @@ -439,7 +439,7 @@ function($s, Biochem, $state, $stateParams, Session) {
// cpd_Reactions
var cpd_rxn_sFields = ['id', 'name', 'status', 'aliases', 'pathways', 'ontology', 'stoichiometry', 'notes'];
$s.cpd_rxnOpts = {query: $s.id, limit: 25, offset: 0, sort: {field: 'id'}, core: 'reactions', searchFields: cpd_rxn_sFields,
visible: ['name', 'id', 'definition', 'deltag', 'deltagerr', 'direction', 'stoichiometry', 'status',
visible: ['name', 'id', 'definition', 'deltag', 'deltagerr','reversibility', 'stoichiometry', 'status',
'inchikey', 'smiles', 'aliases', 'is_obsolete', 'ontology', 'pathways', 'notes', 'is_transport'] };

$s.cpd_rxnHeader = [
Expand All @@ -453,7 +453,7 @@ function($s, Biochem, $state, $stateParams, Session) {
{label: 'Equation', key: 'stoichiometry', format: function(r) {
if (!r.stoichiometry) return "N/A";
var stoich = r.stoichiometry.replace(/\"/g, '')
return '<span style="white-space: wrap;"'+'stoichiometry-to-eq="'+stoich+'" direction="'+r.direction+'"></span>';
return '<span style="white-space: wrap;"'+'stoichiometry-to-eq="'+stoich+'" direction="'+r.reversibility+'"></span>';
}},
{label: 'Transport', key: 'is_transport', format: function(row){
return row.is_transport? 'Yes' : 'No';
Expand Down
7 changes: 7 additions & 0 deletions app/directives/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -2190,6 +2190,8 @@ function(Dialogs, $dialog) {

if (dir === '=')
var dirClass = 'fa-arrows-h';
else if (dir == '?')
var dirClass = 'fa-arrows-h';
else if (dir === '>')
var dirClass = 'fa-long-arrow-right';
else if (dir === '<')
Expand Down Expand Up @@ -2243,8 +2245,13 @@ function(Dialogs, $dialog) {
var parts = stoichString.split(';');
var dir = scope.direction;

console.log("Testing")
console.log(dir)

if (dir === '=')
var dirClass = 'fa-arrows-h';
else if (dir == '?')
var dirClass = 'fa-arrows-h';
else if (dir === '>')
var dirClass = 'fa-long-arrow-right';
else if (dir === '<')
Expand Down
6 changes: 1 addition & 5 deletions app/views/biochem/reaction.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<div layout="row" ng-if="!loading">
<div flex="20" layout="column"><strong>Equation</strong></div>
<div flex="80" layout="column">
<span stoichiometry-to-imgs="{{rxn.stoichiometry}}" direction="{{rxn.direction}}"></span>
<span stoichiometry-to-imgs="{{rxn.stoichiometry}}" direction="{{rxn.reversibility}}"></span>
</div>
</div>
<hr>
Expand All @@ -87,10 +87,6 @@
<div flex="20" layout="column"><strong>EC numbers</strong></div>
<div flex="80" layout="column">{{rxn.ec_numbers_display}}</div>
</div>
<div layout="row">
<div flex="20" layout="column"><strong>Direction</strong></div>
<div flex="80" layout="column">{{rxn.direction}}</div>
</div>
<div layout="row">
<div flex="20" layout="column"><strong>Thermodynamic reversibility</strong></div>
<div flex="80" layout="column">{{rxn.reversibility}}</div>
Expand Down

0 comments on commit 09f55ba

Please sign in to comment.