Skip to content

Commit

Permalink
GPML Map type Added
Browse files Browse the repository at this point in the history
GPML map type added to map menu and map type compatibility implemented
  • Loading branch information
SainiAditya1 committed May 29, 2024
1 parent 10d9ecd commit 667cfaa
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/js/app-utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ appUtilities.mapTypesToViewableText = {
'SIF': 'SIF',
'SBML': 'SBML',
'HybridSbgn' : 'Hybrid (PD,AF)' ,
'HybridAny' : 'Hybrid (PD,AF,SIF, SBML)'
'HybridAny' : 'Hybrid (PD,AF,SIF, SBML, GPML)'
};
// Set a single property on scratchpad of an element or the core
appUtilities.setScratch = function (cyOrEle, name, val) {
Expand Down
22 changes: 16 additions & 6 deletions app/js/backbone-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ var MapTabGeneralPanel = GeneralPropertiesParentView.extend({
}
var currentMapType = chiseInstance.getMapType();
var validChange = false;
if((currentMapType == 'PD' || currentMapType == 'AF' || currentMapType =='SIF' || currentMapType =='SBML' ) && newMapType == 'HybridAny' && !validChange){
if((currentMapType == 'PD' || currentMapType == 'AF' || currentMapType =='SIF' || currentMapType =='SBML' || currentMapType =='GPML' ) && newMapType == 'HybridAny' && !validChange){
validChange = true;

//ok
Expand Down Expand Up @@ -660,7 +660,7 @@ var MapTabGeneralPanel = GeneralPropertiesParentView.extend({
//check no SIF elements in netwrok
var checkType = true;
for(var i = 0 ; i < elements.length && checkType ;i++){
if(elements[i].data("language") == "SIF" || elements[i].data("language") == "SBML"){
if(elements[i].data("language") == "SIF" || elements[i].data("language") == "SBML" || elements[i].data("language") == "GPML"){
checkType = false;
}
}
Expand All @@ -669,7 +669,7 @@ var MapTabGeneralPanel = GeneralPropertiesParentView.extend({
//check no AF OR SIF elements in netwrok
var checkType = true;
for(var i = 0 ; i < elements.length && checkType;i++){
if(elements[i].data("language") == "AF" || elements[i].data("language") == "SIF" || elements[i].data("language") == "SBML" ){
if(elements[i].data("language") == "AF" || elements[i].data("language") == "SIF" || elements[i].data("language") == "SBML" || elements[i].data("language") == "GPML"){
checkType = false;
}
}
Expand All @@ -679,7 +679,7 @@ var MapTabGeneralPanel = GeneralPropertiesParentView.extend({
//check no PD OR SIF elements in netwrok
var checkType = true;
for(var i = 0 ; i < elements.length && checkType ;i++){
if(elements[i].data("language") == "PD" || elements[i].data("language") == "SIF" || elements[i].data("language") == "SBML"){
if(elements[i].data("language") == "PD" || elements[i].data("language") == "SIF" || elements[i].data("language") == "SBML" || elements[i].data("language") == "GPML"){
checkType = false;
}
}
Expand All @@ -691,7 +691,17 @@ var MapTabGeneralPanel = GeneralPropertiesParentView.extend({
//check no PD AF or SIF elements in netwrok
var checkType = true;
for(var i = 0 ; i < elements.length && checkType ;i++){
if(elements[i].data("language") == "PD" || elements[i].data("language") == "SIF" || elements[i].data("language") == "AF"){
if(elements[i].data("language") == "PD" || elements[i].data("language") == "SIF" || elements[i].data("language") == "AF" || elements[i].data("language") == "GPML"){
checkType = false;
}
}
}
else if(newMapType == 'GPML')
{
//check no PD AF or SIF elements in netwrok
var checkType = true;
for(var i = 0 ; i < elements.length && checkType ;i++){
if(elements[i].data("language") == "PD" || elements[i].data("language") == "SIF" || elements[i].data("language") == "AF" || elements[i].data("language") == "SBML"){
checkType = false;
}
}
Expand All @@ -700,7 +710,7 @@ var MapTabGeneralPanel = GeneralPropertiesParentView.extend({
//check no PD OR AF elements in netwrok
var checkType = true;
for(var i = 0 ; i < elements.length && checkType ;i++){
if(elements[i].data("language") == "AF" || elements[i].data("language") == "PD" || elements[i].data("language") == "SBML"){
if(elements[i].data("language") == "AF" || elements[i].data("language") == "PD" || elements[i].data("language") == "SBML" || elements[i].data("language") == "GPML"){
checkType = false;
}
}
Expand Down
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1405,7 +1405,8 @@ <h4 class="modal-title">Layout Properties</h4>
<option value="HybridSbgn">PD+AF</option>
<option value="SIF">SIF</option>
<option value="SBML">SBML</option>
<option value="HybridAny">PD+AF+SIF+SBML</option>
<option value="GPML">GPML</option>
<option value="HybridAny">PD+AF+SIF+SBML+GPML</option>
</select>
</td>
</tr>
Expand Down

0 comments on commit 667cfaa

Please sign in to comment.