From 775f6756e9109f021739a60ebec4fc722e42eb7e Mon Sep 17 00:00:00 2001 From: evaliu2002 Date: Fri, 22 Sep 2023 20:54:25 -0700 Subject: [PATCH 01/11] check sbml --- vscode-antimony/package-lock.json | 4 ++-- vscode-antimony/src/extension.ts | 2 -- vscode-antimony/src/server/main.py | 16 +++++++++++++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/vscode-antimony/package-lock.json b/vscode-antimony/package-lock.json index 1de7fc9d..a0664f1a 100644 --- a/vscode-antimony/package-lock.json +++ b/vscode-antimony/package-lock.json @@ -1,12 +1,12 @@ { "name": "vscode-antimony", - "version": "0.2.17", + "version": "0.2.19", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "vscode-antimony", - "version": "0.2.17", + "version": "0.2.19", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/vscode-antimony/src/extension.ts b/vscode-antimony/src/extension.ts index 711d652a..ccdb55da 100644 --- a/vscode-antimony/src/extension.ts +++ b/vscode-antimony/src/extension.ts @@ -696,7 +696,6 @@ export async function createVirtualEnv(context: vscode.ExtensionContext) { .then(async selection => { if (selection === 'Yes') { installEnv(); - vscode.env.openExternal(vscode.Uri.parse("https://github.com/sys-bio/vscode-antimony#installation-required-1")); } else if (selection === 'No') { vscode.window.showInformationMessage('The default python interpreter will be used.'); } @@ -893,7 +892,6 @@ async function deleteVirtualEnv(message) { promptToReloadWindow("Reload for changes to take effect.") } } else if (selection === 'No') { - vscode.env.openExternal(vscode.Uri.parse("https://github.com/sys-bio/vscode-antimony#installation-required-1")); vscode.window.showWarningMessage(`The extension will not work without deleting and reinstalling the virtual environment.`, {modal: true}, action) .then(selectedAction => { if (selectedAction === action) { diff --git a/vscode-antimony/src/server/main.py b/vscode-antimony/src/server/main.py index d75830c4..b589d85e 100644 --- a/vscode-antimony/src/server/main.py +++ b/vscode-antimony/src/server/main.py @@ -10,6 +10,8 @@ import antimony +import libsbml + sys.path.append(os.path.join(EXTENSION_ROOT, "server", "stibium")) from stibium.parse import AntimonyParser @@ -41,9 +43,9 @@ import io # TODO remove this for production -# logging.basicConfig(filename='vscode-antimony-dep.log', filemode='w', level=logging.DEBUG) -# vscode_logger = logging.getLogger("vscode-antimony logger") -# vscode_logger.addHandler(logging.FileHandler('vscode-antimony-ext.log', mode="w")) +logging.basicConfig(filename='vscode-antimony-dep.log', filemode='w', level=logging.DEBUG) +vscode_logger = logging.getLogger("vscode-antimony logger") +vscode_logger.addHandler(logging.FileHandler('vscode-antimony-ext.log', mode="w")) server = LanguageServer() services = WebServices() @@ -51,6 +53,14 @@ antfile_cache = None uri = None +#### Check sbml files #### +@server.command('antimony.checkSbml') +def check_sbml(ls: LanguageServer, args): + sbml = '\n'.join(args[0].split('\n')[1:]) + sbml_doc = libsbml.readSBMLFromString(sbml) + vscode_logger.info('parsed sbml: ') + vscode_logger.info(sbml_doc) + return True #### Annotations #### @server.command('antimony.getAnnotated') From 96a2f55a04ae2ed7828ab25b0a99268a68b22103 Mon Sep 17 00:00:00 2001 From: evaliu2002 Date: Fri, 22 Sep 2023 21:24:36 -0700 Subject: [PATCH 02/11] fixed bug for check sbml file --- vscode-antimony/src/extension.ts | 4 ++++ vscode-antimony/src/server/main.py | 19 ++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/vscode-antimony/src/extension.ts b/vscode-antimony/src/extension.ts index ccdb55da..a5928c53 100644 --- a/vscode-antimony/src/extension.ts +++ b/vscode-antimony/src/extension.ts @@ -216,8 +216,12 @@ export async function activate(context: vscode.ExtensionContext) { if (path.extname(vscode.window.activeTextEditor.document.fileName) === '.xml' && roundTripping) { triggerSBMLEditor(vscode.window.activeTextEditor.document, sbmlFileNameToPath); } + console.log('check sbml') + const bool = await vscode.commands.executeCommand('antimony.checkSbml', doc.getText()); + console.log("checked sbml") } + async function triggerSBMLEditor(event: TextDocument, sbmlFileNameToPath: Map) { await client.onReady(); diff --git a/vscode-antimony/src/server/main.py b/vscode-antimony/src/server/main.py index b589d85e..58be44e6 100644 --- a/vscode-antimony/src/server/main.py +++ b/vscode-antimony/src/server/main.py @@ -53,15 +53,6 @@ antfile_cache = None uri = None -#### Check sbml files #### -@server.command('antimony.checkSbml') -def check_sbml(ls: LanguageServer, args): - sbml = '\n'.join(args[0].split('\n')[1:]) - sbml_doc = libsbml.readSBMLFromString(sbml) - vscode_logger.info('parsed sbml: ') - vscode_logger.info(sbml_doc) - return True - #### Annotations #### @server.command('antimony.getAnnotated') def get_annotated(ls: LanguageServer, args): @@ -249,6 +240,16 @@ def get_rate_law_dict(ls: LanguageServer, args): } return reader.relevant_rate_laws +#### Check sbml files #### +@server.thread() +@server.command('antimony.checkSbml') +def check_sbml(ls: LanguageServer, args): + sbml = '\n'.join(args[0].split('\n')[1:]) + sbml_doc = libsbml.readSBMLFromString(sbml) + vscode_logger.info('parsed sbml: ') + vscode_logger.info(sbml_doc) + return True + # @server.thread() # @server.command('antimony.recommender') # def recommend(ls: LanguageServer, args): From c087fcefe97e3b66bfcf58efd7132fb41553ed3c Mon Sep 17 00:00:00 2001 From: evaliu2002 Date: Fri, 22 Sep 2023 21:59:50 -0700 Subject: [PATCH 03/11] progress Co-authored-by: Anish --- examples/BioModels/BIOMD0000000253_url.xml | 660 +++++++++++++++++++++ vscode-antimony/src/extension.ts | 2 +- vscode-antimony/src/server/main.py | 9 +- 3 files changed, 666 insertions(+), 5 deletions(-) create mode 100644 examples/BioModels/BIOMD0000000253_url.xml diff --git a/examples/BioModels/BIOMD0000000253_url.xml b/examples/BioModels/BIOMD0000000253_url.xml new file mode 100644 index 00000000..f4a1e967 --- /dev/null +++ b/examples/BioModels/BIOMD0000000253_url.xml @@ -0,0 +1,660 @@ + + + + + +

This is the model described in the article:
+ The danger of metabolic pathways with turbo design +
+ Teusink B, Walsh MC, van Dam K, Westerhoff HV Trends Biochem. Sci. + 1998 May; Volume: 23 (Issue: 5 ): 162-9 9612078 + ,
+ Abstract: +
+ Many catabolic pathways begin with an ATP-requiring activation step, after which further metabolism yields a surplus of ATP. Such a 'turbo' principle is useful but also contains an inherent risk. This is illustrated by a detailed kinetic analysis of a paradoxical Saccharomyces cerevisiae mutant; the mutant fails to grow on glucose because of overactive initial enzymes of glycolysis, but is defective only in an enzyme (trehalose 6-phosphate synthase) that appears to have little relevance to glycolysis. The ubiquity of pathways that possess an initial activation step, suggests that there might be many more genes that, when deleted, cause rather paradoxical regulation phenotypes (i.e. growth defects caused by enhanced utilization of growth substrate).

+

The model represents the wild-type cell: 'guarded' glycolysis, which is the inhibition of the HK module by hexose monophosphate. The model reproduces figures 3c and 3d of the reference publication.

+

To reproduce unguarded glycolysis, set parameter wild_type to '0'.

+

This model originates from BioModels Database: A Database of Annotated Published Models (http://www.ebi.ac.uk/biomodels/). It is copyright (c) 2005-2010 The BioModels.net Team.
+ For more information see the terms of use + .
+ To cite BioModels Database, please use: Li C, Donizelli M, Rodriguez N, Dharuri H, Endler L, Chelliah V, Li L, He E, Henry A, Stefan MI, Snoep JL, Hucka M, Le Novère N, Laibe C (2010) BioModels Database: An enhanced, curated and annotated resource for published quantitative kinetic models. BMC Syst Biol., 4:92. +

+ + +
+ + + + + + + + Smallbone + Kieran + + kieran.smallbone@manchester.ac.uk + + University of Manchester + + + + + + 2010-07-20T00:00:00Z + + + 2010-12-02T22:45:30Z + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + HMP + 2 + + + + + + + + 5 + ATP + + + + + + + + HMP + KRHMP + + + + + + + + ATP + KRATP + + + + + + + + ATP + KiATP + + + + + + + + 1 + lambda1 + lambda2 + + + gR + lambda1 + lambda2 + + + + + + + + + 1 + + + c1 + lambda1 + + + + c2 + lambda2 + + + + gT + c1 + lambda1 + c2 + lambda2 + + + + + + + + + L0 + + + + + + + 1 + + + ci + lambda3 + + + + + 1 + lambda3 + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cell + VHK + Glc + ATP + + + + KGlc + KATP + + + + + + + 1 + + + Glc + KGlc + + + + + + wild_type + Tre6P + + KiTre6P + + + + + 1 + + + ATP + KATP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cell + VPFK + gR + lambda1 + lambda2 + R + + + + + + R + 2 + + + + L + + + T + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cell + Vlower + Fru16P2 + ADP + + + + KFru16P2 + KADP + + + + + + + 1 + + + Fru16P2 + KFru16P2 + + + + + 1 + + + ADP + KADP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cell + VATPase + ATP + + + + KATP + ATP + + + + + + + + + + +
+
\ No newline at end of file diff --git a/vscode-antimony/src/extension.ts b/vscode-antimony/src/extension.ts index a5928c53..f95e3db7 100644 --- a/vscode-antimony/src/extension.ts +++ b/vscode-antimony/src/extension.ts @@ -217,7 +217,7 @@ export async function activate(context: vscode.ExtensionContext) { triggerSBMLEditor(vscode.window.activeTextEditor.document, sbmlFileNameToPath); } console.log('check sbml') - const bool = await vscode.commands.executeCommand('antimony.checkSbml', doc.getText()); + const bool = await vscode.commands.executeCommand('antimony.checkSbml', doc.uri.path); console.log("checked sbml") } diff --git a/vscode-antimony/src/server/main.py b/vscode-antimony/src/server/main.py index 58be44e6..a0721a7e 100644 --- a/vscode-antimony/src/server/main.py +++ b/vscode-antimony/src/server/main.py @@ -10,7 +10,7 @@ import antimony -import libsbml +from libsbml import * sys.path.append(os.path.join(EXTENSION_ROOT, "server", "stibium")) @@ -244,10 +244,11 @@ def get_rate_law_dict(ls: LanguageServer, args): @server.thread() @server.command('antimony.checkSbml') def check_sbml(ls: LanguageServer, args): - sbml = '\n'.join(args[0].split('\n')[1:]) - sbml_doc = libsbml.readSBMLFromString(sbml) +# sbml = '\n'.join(args[0].split('\n')[1:]) + sbml = args[0] + sbml_doc = readSBML(sbml) vscode_logger.info('parsed sbml: ') - vscode_logger.info(sbml_doc) + vscode_logger.info(sbml_doc.getListOfAllElements()) return True # @server.thread() From c59be2c933bd648eb85773ce2355fee562ab04df Mon Sep 17 00:00:00 2001 From: evaliu2002 Date: Mon, 25 Sep 2023 19:55:15 -0700 Subject: [PATCH 04/11] implemented check sbml features --- vscode-antimony/src/extension.ts | 8 +++-- vscode-antimony/src/server/main.py | 57 ++++++++++++++++++++++++++++-- 2 files changed, 60 insertions(+), 5 deletions(-) diff --git a/vscode-antimony/src/extension.ts b/vscode-antimony/src/extension.ts index f95e3db7..1891e908 100644 --- a/vscode-antimony/src/extension.ts +++ b/vscode-antimony/src/extension.ts @@ -217,8 +217,12 @@ export async function activate(context: vscode.ExtensionContext) { triggerSBMLEditor(vscode.window.activeTextEditor.document, sbmlFileNameToPath); } console.log('check sbml') - const bool = await vscode.commands.executeCommand('antimony.checkSbml', doc.uri.path); - console.log("checked sbml") + await vscode.commands.executeCommand('antimony.checkSbml', doc.uri.path).then((result: any) => { + if (result === true) { + console.log('checked sbml') + vscode.window.showWarningMessage("This SBML file contains notes, model history, algebraic rules and unsupported packages. Proceed conversion to Antimony with caution.") + } + }); } diff --git a/vscode-antimony/src/server/main.py b/vscode-antimony/src/server/main.py index a0721a7e..74482448 100644 --- a/vscode-antimony/src/server/main.py +++ b/vscode-antimony/src/server/main.py @@ -244,12 +244,63 @@ def get_rate_law_dict(ls: LanguageServer, args): @server.thread() @server.command('antimony.checkSbml') def check_sbml(ls: LanguageServer, args): -# sbml = '\n'.join(args[0].split('\n')[1:]) + feature_exists = False sbml = args[0] sbml_doc = readSBML(sbml) - vscode_logger.info('parsed sbml: ') + model = sbml_doc.getModel() + + # Check for packages + if model.isPackageEnabled('comp'): + vscode_logger.info('Comp Package is enabled') + feature_exists = True + elif model.isPackageEnabled('fbc'): + vscode_logger.info('FBC Package is enabled') + feature_exists = True + elif model.isPackageEnabled('distrib'): + vscode_logger.info('Distrib Package is enabled') + feature_exists = True + elif model.isPackageEnabled('layout'): + vscode_logger.info('Layout Package is enabled') + feature_exists = True + elif model.isPackageEnabled('render'): + vscode_logger.info('Render Package is enabled') + feature_exists = True + elif model.isPackageEnabled('spatial'): + vscode_logger.info('Spatial Package is enabled') + feature_exists = True + elif model.isPackageEnabled('multi'): + vscode_logger.info('Multi Package is enabled') + feature_exists = True + elif model.isPackageEnabled('qual'): + vscode_logger.info('Qual Package is enabled') + feature_exists = True + + # Check for model history + if model.isSetModelHistory(): + vscode_logger.info('Model History is set') + feature_exists = True + + # Check for Notes + elementsList = sbml_doc.getListOfAllElements() + vscode_logger.info('List of Elements: ') vscode_logger.info(sbml_doc.getListOfAllElements()) - return True + vscode_logger.info('elementsList') + for x in elementsList: + vscode_logger.info(x) + if (x.isSetNotes()): + vscode_logger.info('Notes are set') + feature_exists = True + + # Check for Algebraic Rules + for r in range(model.getNumRules()): + rule = model.getRule(r) + vscode_logger.info('Rule Type Code: ') + vscode_logger.info(rule.getTypeCode()) + if rule.getTypeCode() == SBML_ALGEBRAIC_RULE: + vscode_logger.info('Algebraic Rule is set') + feature_exists = True + + return feature_exists # @server.thread() # @server.command('antimony.recommender') From 760c6dbd7106d9f657045df1e851eb8044354467 Mon Sep 17 00:00:00 2001 From: evaliu2002 Date: Tue, 26 Sep 2023 15:32:46 -0700 Subject: [PATCH 05/11] persisting sbml check --- vscode-antimony/src/extension.ts | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/vscode-antimony/src/extension.ts b/vscode-antimony/src/extension.ts index 1891e908..0a8ff44a 100644 --- a/vscode-antimony/src/extension.ts +++ b/vscode-antimony/src/extension.ts @@ -216,15 +216,31 @@ export async function activate(context: vscode.ExtensionContext) { if (path.extname(vscode.window.activeTextEditor.document.fileName) === '.xml' && roundTripping) { triggerSBMLEditor(vscode.window.activeTextEditor.document, sbmlFileNameToPath); } - console.log('check sbml') - await vscode.commands.executeCommand('antimony.checkSbml', doc.uri.path).then((result: any) => { - if (result === true) { - console.log('checked sbml') - vscode.window.showWarningMessage("This SBML file contains notes, model history, algebraic rules and unsupported packages. Proceed conversion to Antimony with caution.") - } - }); + if (fileExtension == '.xml') { + console.log('check sbml') + vscode.commands.executeCommand('antimony.checkSbml', doc.uri.path).then((result: any) => { + if (result === true) { + console.log('checked sbml') + vscode.window.showWarningMessage("This SBML file contains notes, model history, algebraic rules and unsupported packages. Proceed conversion to Antimony with caution.") + } + }); + } } +vscode.window.onDidChangeActiveTextEditor(() => { + const doc = vscode.window.activeTextEditor.document; + const uri = doc.uri.toString(); + const fileExtension = path.extname(uri); + if (fileExtension == '.xml') { + console.log('check sbml active') + vscode.commands.executeCommand('antimony.checkSbml', doc.uri.path).then((result: any) => { + if (result === true) { + console.log('checked sbml') + vscode.window.showWarningMessage("This SBML file contains notes, model history, algebraic rules and unsupported packages. Proceed conversion to Antimony with caution.") + } + }); + } +}) async function triggerSBMLEditor(event: TextDocument, sbmlFileNameToPath: Map) { await client.onReady(); From f81f0d806ed870789a35864dc6ff6d05ed4c51e2 Mon Sep 17 00:00:00 2001 From: evaliu2002 Date: Tue, 26 Sep 2023 15:42:19 -0700 Subject: [PATCH 06/11] document bug --- vscode-antimony/src/extension.ts | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/vscode-antimony/src/extension.ts b/vscode-antimony/src/extension.ts index 0a8ff44a..a82830cc 100644 --- a/vscode-antimony/src/extension.ts +++ b/vscode-antimony/src/extension.ts @@ -228,19 +228,22 @@ export async function activate(context: vscode.ExtensionContext) { } vscode.window.onDidChangeActiveTextEditor(() => { - const doc = vscode.window.activeTextEditor.document; - const uri = doc.uri.toString(); - const fileExtension = path.extname(uri); - if (fileExtension == '.xml') { - console.log('check sbml active') - vscode.commands.executeCommand('antimony.checkSbml', doc.uri.path).then((result: any) => { - if (result === true) { - console.log('checked sbml') - vscode.window.showWarningMessage("This SBML file contains notes, model history, algebraic rules and unsupported packages. Proceed conversion to Antimony with caution.") - } - }); + const activeTextEditor = vscode.window.activeTextEditor; + if (activeTextEditor) { + const doc = activeTextEditor.document; + const uri = doc.uri.toString(); + const fileExtension = path.extname(uri); + if (fileExtension == '.xml') { + console.log('check sbml active'); + vscode.commands.executeCommand('antimony.checkSbml', doc.uri.path).then((result: any) => { + if (result === true) { + console.log('checked sbml'); + vscode.window.showWarningMessage("This SBML file contains notes, model history, algebraic rules, and unsupported packages. Proceed conversion to Antimony with caution."); + } + }); + } } -}) +}); async function triggerSBMLEditor(event: TextDocument, sbmlFileNameToPath: Map) { await client.onReady(); From 1747480f8a9b623538ab181cffb018091d3035f3 Mon Sep 17 00:00:00 2001 From: evaliu2002 Date: Wed, 27 Sep 2023 15:01:33 -0700 Subject: [PATCH 07/11] finished implementing sbml checking feature --- vscode-antimony/src/extension.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-antimony/src/extension.ts b/vscode-antimony/src/extension.ts index a82830cc..44134738 100644 --- a/vscode-antimony/src/extension.ts +++ b/vscode-antimony/src/extension.ts @@ -238,7 +238,7 @@ vscode.window.onDidChangeActiveTextEditor(() => { vscode.commands.executeCommand('antimony.checkSbml', doc.uri.path).then((result: any) => { if (result === true) { console.log('checked sbml'); - vscode.window.showWarningMessage("This SBML file contains notes, model history, algebraic rules, and unsupported packages. Proceed conversion to Antimony with caution."); + vscode.window.showWarningMessage("This SBML file contains notes, model history, algebraic rules, and/or unsupported packages. Proceed conversion to Antimony with caution."); } }); } From fcf9fce6a7f3ec13cfb7562fa09c78571074f83b Mon Sep 17 00:00:00 2001 From: evaliu2002 Date: Wed, 27 Sep 2023 15:05:00 -0700 Subject: [PATCH 08/11] comment out vscode logger for production --- vscode-antimony/src/server/main.py | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/vscode-antimony/src/server/main.py b/vscode-antimony/src/server/main.py index 74482448..da61be8c 100644 --- a/vscode-antimony/src/server/main.py +++ b/vscode-antimony/src/server/main.py @@ -43,9 +43,9 @@ import io # TODO remove this for production -logging.basicConfig(filename='vscode-antimony-dep.log', filemode='w', level=logging.DEBUG) -vscode_logger = logging.getLogger("vscode-antimony logger") -vscode_logger.addHandler(logging.FileHandler('vscode-antimony-ext.log', mode="w")) +# logging.basicConfig(filename='vscode-antimony-dep.log', filemode='w', level=logging.DEBUG) +# vscode_logger = logging.getLogger("vscode-antimony logger") +# vscode_logger.addHandler(logging.FileHandler('vscode-antimony-ext.log', mode="w")) server = LanguageServer() services = WebServices() @@ -251,53 +251,53 @@ def check_sbml(ls: LanguageServer, args): # Check for packages if model.isPackageEnabled('comp'): - vscode_logger.info('Comp Package is enabled') + # vscode_logger.info('Comp Package is enabled') feature_exists = True elif model.isPackageEnabled('fbc'): - vscode_logger.info('FBC Package is enabled') + # vscode_logger.info('FBC Package is enabled') feature_exists = True elif model.isPackageEnabled('distrib'): - vscode_logger.info('Distrib Package is enabled') + # vscode_logger.info('Distrib Package is enabled') feature_exists = True elif model.isPackageEnabled('layout'): - vscode_logger.info('Layout Package is enabled') + # vscode_logger.info('Layout Package is enabled') feature_exists = True elif model.isPackageEnabled('render'): - vscode_logger.info('Render Package is enabled') + # vscode_logger.info('Render Package is enabled') feature_exists = True elif model.isPackageEnabled('spatial'): - vscode_logger.info('Spatial Package is enabled') + # vscode_logger.info('Spatial Package is enabled') feature_exists = True elif model.isPackageEnabled('multi'): - vscode_logger.info('Multi Package is enabled') + # vscode_logger.info('Multi Package is enabled') feature_exists = True elif model.isPackageEnabled('qual'): - vscode_logger.info('Qual Package is enabled') + # vscode_logger.info('Qual Package is enabled') feature_exists = True # Check for model history if model.isSetModelHistory(): - vscode_logger.info('Model History is set') + # vscode_logger.info('Model History is set') feature_exists = True # Check for Notes elementsList = sbml_doc.getListOfAllElements() - vscode_logger.info('List of Elements: ') - vscode_logger.info(sbml_doc.getListOfAllElements()) - vscode_logger.info('elementsList') + # vscode_logger.info('List of Elements: ') + # vscode_logger.info(sbml_doc.getListOfAllElements()) + # vscode_logger.info('elementsList') for x in elementsList: - vscode_logger.info(x) + # vscode_logger.info(x) if (x.isSetNotes()): - vscode_logger.info('Notes are set') + # vscode_logger.info('Notes are set') feature_exists = True # Check for Algebraic Rules for r in range(model.getNumRules()): rule = model.getRule(r) - vscode_logger.info('Rule Type Code: ') - vscode_logger.info(rule.getTypeCode()) + # vscode_logger.info('Rule Type Code: ') + # vscode_logger.info(rule.getTypeCode()) if rule.getTypeCode() == SBML_ALGEBRAIC_RULE: - vscode_logger.info('Algebraic Rule is set') + # vscode_logger.info('Algebraic Rule is set') feature_exists = True return feature_exists From 8977107d9e0fbdfbea23e17da40a6f8f53b184ab Mon Sep 17 00:00:00 2001 From: evaliu2002 Date: Sun, 1 Oct 2023 22:23:45 -0700 Subject: [PATCH 09/11] removed console.log statements --- examples/BioModels/1.ant | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/BioModels/1.ant b/examples/BioModels/1.ant index 1de94937..2d2c5792 100644 --- a/examples/BioModels/1.ant +++ b/examples/BioModels/1.ant @@ -89,6 +89,7 @@ model *BIOMD0000000001() const comp1, t2, kr_0, kr_1, kf_2, kr_2, kr_3, kr_4, kf_5, kr_5, kf_6, kr_6; const kr_7, kr_8, kf_9, kr_9, kf_10, kr_10, kf_11, kr_11, kr_12, kr_13; const kf_14, kr_14, kf_15, kr_15, kf_16, kr_16; + unit kf_17 = 1.66057788110262e; // Display Names: comp1 is "compartment1"; From 81ca2ca01f80606836ee53361ff14478f4782fd9 Mon Sep 17 00:00:00 2001 From: evaliu2002 Date: Sun, 1 Oct 2023 22:23:54 -0700 Subject: [PATCH 10/11] removed console.log statements --- vscode-antimony/src/extension.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/vscode-antimony/src/extension.ts b/vscode-antimony/src/extension.ts index 44134738..0956512a 100644 --- a/vscode-antimony/src/extension.ts +++ b/vscode-antimony/src/extension.ts @@ -217,10 +217,8 @@ export async function activate(context: vscode.ExtensionContext) { triggerSBMLEditor(vscode.window.activeTextEditor.document, sbmlFileNameToPath); } if (fileExtension == '.xml') { - console.log('check sbml') vscode.commands.executeCommand('antimony.checkSbml', doc.uri.path).then((result: any) => { if (result === true) { - console.log('checked sbml') vscode.window.showWarningMessage("This SBML file contains notes, model history, algebraic rules and unsupported packages. Proceed conversion to Antimony with caution.") } }); @@ -234,10 +232,8 @@ vscode.window.onDidChangeActiveTextEditor(() => { const uri = doc.uri.toString(); const fileExtension = path.extname(uri); if (fileExtension == '.xml') { - console.log('check sbml active'); vscode.commands.executeCommand('antimony.checkSbml', doc.uri.path).then((result: any) => { if (result === true) { - console.log('checked sbml'); vscode.window.showWarningMessage("This SBML file contains notes, model history, algebraic rules, and/or unsupported packages. Proceed conversion to Antimony with caution."); } }); From f4fc2f71300e8b0db775ef9d1a2c3f3ac44126be Mon Sep 17 00:00:00 2001 From: evaliu2002 Date: Sun, 1 Oct 2023 22:24:01 -0700 Subject: [PATCH 11/11] removed console.log statements --- examples/BioModels/BIOMD0000000253_url.xml | 660 --------------------- 1 file changed, 660 deletions(-) delete mode 100644 examples/BioModels/BIOMD0000000253_url.xml diff --git a/examples/BioModels/BIOMD0000000253_url.xml b/examples/BioModels/BIOMD0000000253_url.xml deleted file mode 100644 index f4a1e967..00000000 --- a/examples/BioModels/BIOMD0000000253_url.xml +++ /dev/null @@ -1,660 +0,0 @@ - - - - - -

This is the model described in the article:
- The danger of metabolic pathways with turbo design -
- Teusink B, Walsh MC, van Dam K, Westerhoff HV Trends Biochem. Sci. - 1998 May; Volume: 23 (Issue: 5 ): 162-9 9612078 - ,
- Abstract: -
- Many catabolic pathways begin with an ATP-requiring activation step, after which further metabolism yields a surplus of ATP. Such a 'turbo' principle is useful but also contains an inherent risk. This is illustrated by a detailed kinetic analysis of a paradoxical Saccharomyces cerevisiae mutant; the mutant fails to grow on glucose because of overactive initial enzymes of glycolysis, but is defective only in an enzyme (trehalose 6-phosphate synthase) that appears to have little relevance to glycolysis. The ubiquity of pathways that possess an initial activation step, suggests that there might be many more genes that, when deleted, cause rather paradoxical regulation phenotypes (i.e. growth defects caused by enhanced utilization of growth substrate).

-

The model represents the wild-type cell: 'guarded' glycolysis, which is the inhibition of the HK module by hexose monophosphate. The model reproduces figures 3c and 3d of the reference publication.

-

To reproduce unguarded glycolysis, set parameter wild_type to '0'.

-

This model originates from BioModels Database: A Database of Annotated Published Models (http://www.ebi.ac.uk/biomodels/). It is copyright (c) 2005-2010 The BioModels.net Team.
- For more information see the terms of use - .
- To cite BioModels Database, please use: Li C, Donizelli M, Rodriguez N, Dharuri H, Endler L, Chelliah V, Li L, He E, Henry A, Stefan MI, Snoep JL, Hucka M, Le Novère N, Laibe C (2010) BioModels Database: An enhanced, curated and annotated resource for published quantitative kinetic models. BMC Syst Biol., 4:92. -

- - -
- - - - - - - - Smallbone - Kieran - - kieran.smallbone@manchester.ac.uk - - University of Manchester - - - - - - 2010-07-20T00:00:00Z - - - 2010-12-02T22:45:30Z - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - HMP - 2 - - - - - - - - 5 - ATP - - - - - - - - HMP - KRHMP - - - - - - - - ATP - KRATP - - - - - - - - ATP - KiATP - - - - - - - - 1 - lambda1 - lambda2 - - - gR - lambda1 - lambda2 - - - - - - - - - 1 - - - c1 - lambda1 - - - - c2 - lambda2 - - - - gT - c1 - lambda1 - c2 - lambda2 - - - - - - - - - L0 - - - - - - - 1 - - - ci - lambda3 - - - - - 1 - lambda3 - - - 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - cell - VHK - Glc - ATP - - - - KGlc - KATP - - - - - - - 1 - - - Glc - KGlc - - - - - - wild_type - Tre6P - - KiTre6P - - - - - 1 - - - ATP - KATP - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - cell - VPFK - gR - lambda1 - lambda2 - R - - - - - - R - 2 - - - - L - - - T - 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - cell - Vlower - Fru16P2 - ADP - - - - KFru16P2 - KADP - - - - - - - 1 - - - Fru16P2 - KFru16P2 - - - - - 1 - - - ADP - KADP - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - cell - VATPase - ATP - - - - KATP - ATP - - - - - - - - - - -
-
\ No newline at end of file