Skip to content

Commit

Permalink
Minor fixes to simdiff.py
Browse files Browse the repository at this point in the history
  • Loading branch information
upibhalla committed Aug 13, 2023
1 parent fc4493b commit 5cb808a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions simdiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

'''
*******************************************************************
* File: scramParam.py
* Description: Utility to scramble model parameters
* File: simdiff.py
* Description: Utility to compare model entities and parameters
* Author: Upinder S. Bhalla
* E-mail: [email protected]
* Copyright (c) U.S. Bhalla 2023
Expand Down Expand Up @@ -49,7 +49,7 @@ def __init__( self, fname, mapfname ):
elif file_extension == ".json":
self.model = HTScram( self )
else:
print( "Error, model has to be either SBML (.xml) or HillTau (.json)" )
print( "Error, model has to be either SBML (.xml), kkit (.g) or HillTau (.json)" )

with open( mapfname ) as fd:
self.objMap = json.load( fd )
Expand Down Expand Up @@ -281,10 +281,10 @@ def matchParamByName( path, name ):


def main():
""" This program accesses parameters of SBML or HillTau models to scramble them, compare them, or otherwise manipulate them.
""" This program compares ODE or HillTau models.
"""
parser = argparse.ArgumentParser( description = 'scramParam argument parser.\n'
'This program loads a kinetic model, and compares or scrambles the parameters\n')
parser = argparse.ArgumentParser( description = 'simdiff argument parser.\n'
'This program loads two kinetic models, and compares them for presence of entities and for values of parameters\n')

parser.add_argument( 'model', type = str, help='Required: filename of first model, which can be SBML, .g or HillTau.')
parser.add_argument( 'map', type = str, help='Required: mapping file from shortcut names to sim-specific strings. JSON format.' )
Expand All @@ -299,9 +299,9 @@ def main():
scram.model.clear()

if args.listParams:
print( "Number of non-zero parameters = ", len( pd ) )
for ii, key in enumerate( sorted( pd ) ):
print( "{:<4d}{:65s} {:.3g}".format( ii+1, key, pd[key] ) )
print( "Number of non-zero parameters = ", len( pd1 ) )
for ii, key in enumerate( sorted( pd1 ) ):
print( "{:<4d}{:65s} {:.3g}".format( ii+1, key, pd1[key] ) )
quit()


Expand Down

0 comments on commit 5cb808a

Please sign in to comment.