bionetgen.atomizer package
Subpackages
- bionetgen.atomizer.atomizer package
- Submodules
- bionetgen.atomizer.atomizer.analyzeRDF module
- bionetgen.atomizer.atomizer.analyzeSBML module
SBMLAnalyzer
SBMLAnalyzer.analyzeSpeciesModification()
SBMLAnalyzer.analyzeSpeciesModification2()
SBMLAnalyzer.analyzeUserDefinedEquivalences()
SBMLAnalyzer.approximateMatching()
SBMLAnalyzer.approximateMatching2()
SBMLAnalyzer.breakByActionableUnit()
SBMLAnalyzer.checkCompliance()
SBMLAnalyzer.classifyReactions()
SBMLAnalyzer.classifyReactionsWithAnnotations()
SBMLAnalyzer.compareStrings()
SBMLAnalyzer.distanceToModification()
SBMLAnalyzer.findBiggestActionable()
SBMLAnalyzer.findClosestModification()
SBMLAnalyzer.findMatchingModification()
SBMLAnalyzer.fuzzyArtificialReaction()
SBMLAnalyzer.getReactionClassification()
SBMLAnalyzer.getReactionProperties()
SBMLAnalyzer.getUserDefinedComplexes()
SBMLAnalyzer.greedyModificationMatching()
SBMLAnalyzer.growString()
SBMLAnalyzer.identifyReactions2()
SBMLAnalyzer.levenshtein()
SBMLAnalyzer.loadConfigFiles()
SBMLAnalyzer.processAdHocNamingConventions()
SBMLAnalyzer.processAnnotations()
SBMLAnalyzer.processFuzzyReaction()
SBMLAnalyzer.processNamingConventions2()
SBMLAnalyzer.removeExactMatches()
SBMLAnalyzer.setConfigurationFile()
SBMLAnalyzer.species2Rules()
SBMLAnalyzer.testAgainstExistingConventions()
SBMLAnalyzer.userJsonToDataStructure()
addToDependencyGraph()
get_close_matches()
parseReactions()
sequenceMatcher()
- bionetgen.atomizer.atomizer.atomizationAux module
- bionetgen.atomizer.atomizer.atomizerUtils module
- bionetgen.atomizer.atomizer.detectOntology module
- bionetgen.atomizer.atomizer.moleculeCreation module
addBondToComponent()
addComponentToMolecule()
addStateToComponent()
atomize()
createBindingRBM()
createCatalysisRBM()
createEmptySpecies()
getBondNumber()
getComplexationComponents2()
getTrueTag()
identifyReaction()
isInComplexWith()
propagateChanges()
sanityCheck()
solveComplexBinding()
transformMolecules()
updateSpecies()
- bionetgen.atomizer.atomizer.resolveSCT module
SCTSolver
SCTSolver.bindingReactionsAnalysis()
SCTSolver.consolidateDependencyGraph()
SCTSolver.createSpeciesCompositionGraph()
SCTSolver.fillSCTwithAnnotationInformation()
SCTSolver.make_key_from_graph()
SCTSolver.measureGraph()
SCTSolver.measureGraph2()
SCTSolver.resolveDependencyGraph()
SCTSolver.resolveDependencyGraphHelper()
SCTSolver.unMemoizedResolveDependencyGraphHelper()
SCTSolver.weightDependencyGraph()
- Module contents
- bionetgen.atomizer.merging package
- bionetgen.atomizer.rulifier package
- Submodules
- bionetgen.atomizer.rulifier.arial10 module
- bionetgen.atomizer.rulifier.compareModels module
- bionetgen.atomizer.rulifier.componentGroups module
analyzeDependencies()
askQuestions()
componentStateSize()
defineConsole()
detectDependencies()
extractCenterContext()
formatComponent()
getChemicalStates()
getContextRequirements()
getExclusionClusters()
getMotifRelationships()
getMutualExclusions()
getRestrictedChemicalStates()
isActive()
molecule2stateTuples()
patternsFromString()
printDependencyLog()
removeCounter()
removeIndirectDependencies()
reverseContextDict()
reverseState()
sortChemicalStates()
- bionetgen.atomizer.rulifier.parameterExtraction module
- bionetgen.atomizer.rulifier.postAnalysis module
ModelLearning
ModelLearning.analyzeComplexReactions()
ModelLearning.analyzeRedundantBonds()
ModelLearning.classifyPairsByMotif()
ModelLearning.getComplexReactions()
ModelLearning.getContextMotifInformation()
ModelLearning.getDifference()
ModelLearning.getMotifFromPair()
ModelLearning.getPairsFromMotif()
ModelLearning.getParticipatingReactions()
ModelLearning.processContextMotifInformation()
ModelLearning.processRawSBML()
ModelLearning.scoreHypotheticalBonds()
ModelLearning.transposePatternsReactions()
defineConsole()
memoize()
resolveEntry()
runTests()
- bionetgen.atomizer.rulifier.stateTransitionDiagram module
- bionetgen.atomizer.rulifier.stdgraph module
- Module contents
- bionetgen.atomizer.utils package
- Submodules
- bionetgen.atomizer.utils.annotationComparison module
- bionetgen.atomizer.utils.annotationDeletion module
- bionetgen.atomizer.utils.annotationExtender module
- bionetgen.atomizer.utils.annotationExtractor module
- bionetgen.atomizer.utils.annotationResolver module
- bionetgen.atomizer.utils.consoleCommands module
- bionetgen.atomizer.utils.extractAtomic module
- bionetgen.atomizer.utils.modelComparison module
- bionetgen.atomizer.utils.nameNormalizer module
- bionetgen.atomizer.utils.pathwaycommons module
- bionetgen.atomizer.utils.readBNGXML module
- bionetgen.atomizer.utils.smallStructures module
Action
Component
Databases
Molecule
Molecule.addBond()
Molecule.addChunk()
Molecule.addComponent()
Molecule.compare()
Molecule.contains()
Molecule.copy()
Molecule.distance()
Molecule.extend()
Molecule.getBondNumbers()
Molecule.getComponent()
Molecule.getComponentById()
Molecule.getComponentWithBonds()
Molecule.graphVizGraph()
Molecule.hasWildcardBonds()
Molecule.removeComponent()
Molecule.removeComponents()
Molecule.reset()
Molecule.setCompartment()
Molecule.str2()
Molecule.str3()
Molecule.toString()
Molecule.update()
Rule
Species
Species.addChunk()
Species.addCompartment()
Species.addMolecule()
Species.append()
Species.contains()
Species.containsComponentIdx()
Species.copy()
Species.deleteMolecule()
Species.extend()
Species.extractAtomicPatterns()
Species.getBondNumbers()
Species.getMolecule()
Species.getMoleculeById()
Species.getMoleculeNames()
Species.getSize()
Species.graphVizGraph()
Species.hasWildCardBonds()
Species.listOfBonds()
Species.notContainsComponentIdx()
Species.reset()
Species.sort()
Species.str2()
Species.toString()
Species.updateBonds()
States
parseReactions()
readFromString()
- bionetgen.atomizer.utils.structures module
Component
Databases
Molecule
Molecule.addBond()
Molecule.addChunk()
Molecule.addComponent()
Molecule.contains()
Molecule.copy()
Molecule.evaluateBonds()
Molecule.evaluateMolecule()
Molecule.extend()
Molecule.getBondNumbers()
Molecule.getComponent()
Molecule.getComponentWithBonds()
Molecule.removeComponent()
Molecule.removeComponents()
Molecule.reset()
Molecule.setCompartment()
Molecule.signature()
Molecule.sort()
Molecule.str2()
Molecule.toString()
Molecule.update()
Species
Species.addChunk()
Species.addCompartment()
Species.addMolecule()
Species.append()
Species.contains()
Species.copy()
Species.deleteBond()
Species.deleteMolecule()
Species.extend()
Species.getBondNumbers()
Species.getMolecule()
Species.getMoleculeNames()
Species.getSize()
Species.reset()
Species.sort()
Species.str2()
Species.toString()
Species.updateBonds()
compareLists()
- bionetgen.atomizer.utils.util module
- Module contents
- bionetgen.atomizer.writer package
Submodules
bionetgen.atomizer.atomizeTool module
bionetgen.atomizer.biogrid module
Created on Tue Nov 12 13:44:53 2013
@author: proto
bionetgen.atomizer.bngModel module
- class bionetgen.atomizer.bngModel.bngModel[source]
Bases:
object
Takes in atomizer stuff and turns everything into objects which can be used to print the final model
- consolidate_arules()[source]
this figures out what to do with particular assignment rules pulled from SBML. a) A non-constant parameter gets turned into
a function
Any species in the system can be modified by an assignment rule. This turns the species into a function which also requires a modification of any reaction rules the species is associated with
rate rules get turned into syn reactions
bionetgen.atomizer.contactMap module
bionetgen.atomizer.contextAnalyzer module
bionetgen.atomizer.libsbml2bngl module
Created on Fri Mar 1 16:14:42 2013
@author: proto
- class bionetgen.atomizer.libsbml2bngl.AnalysisResults(rlength, slength, reval, reval2, clength, rdf, finalString, speciesDict, database, annotation, model)
Bases:
tuple
- property annotation
Alias for field number 9
- property clength
Alias for field number 4
- property database
Alias for field number 8
- property finalString
Alias for field number 6
- property model
Alias for field number 10
- property rdf
Alias for field number 5
- property reval
Alias for field number 2
- property reval2
Alias for field number 3
- property rlength
Alias for field number 0
- property slength
Alias for field number 1
- property speciesDict
Alias for field number 7
- bionetgen.atomizer.libsbml2bngl.analyzeFile(bioNumber, reactionDefinitions, useID, namingConventions, outputFile, speciesEquivalence=None, atomize=False, bioGrid=False, pathwaycommons=False, ignore=False, noConversion=False, memoizedResolver=True, replaceLocParams=True, quietMode=False, logLevel='WARNING', obs_map_file=None, app=None)[source]
one of the library’s main entry methods. Process data from a file
- bionetgen.atomizer.libsbml2bngl.analyzeHelper(document, reactionDefinitions, useID, outputFile, speciesEquivalence, atomize, translator, database, bioGrid=False, replaceLocParams=True, obs_map_file=None)[source]
taking the atomized dictionary and a series of data structure, this method does the actual string output.
- bionetgen.atomizer.libsbml2bngl.changeDefs(functions, dictionary)[source]
changes the names of the functions (RHS) instead of the LHS
- bionetgen.atomizer.libsbml2bngl.changeNames(functions, dictionary)[source]
changes instances of keys in dictionary appeareing in functions to their corresponding alternatives
- bionetgen.atomizer.libsbml2bngl.changeRates(reactions, dictionary)[source]
changes instances of keys in dictionary appeareing in reaction rules to their corresponding alternatives
- bionetgen.atomizer.libsbml2bngl.correctRulesWithParenthesis(rules, parameters)[source]
helper function. Goes through a list of rules and adds a parenthesis to the reaction rates of those functions whose rate is in list ‘parameters’.
- bionetgen.atomizer.libsbml2bngl.detectCustomDefinitions(bioNumber)[source]
returns a speciesDefinition<bioNumber>.json fileName if it exist for the current bioModels. None otherwise
- bionetgen.atomizer.libsbml2bngl.extractAtoms(species)[source]
given a list of structures, returns a list of individual molecules/compartment pairs appends a number for
- bionetgen.atomizer.libsbml2bngl.extractCompartmentStatistics(bioNumber, useID, reactionDefinitions, speciesEquivalence)[source]
Iterate over the translated species and check which compartments are used together, and how.
- bionetgen.atomizer.libsbml2bngl.getFiles(directory, extension)[source]
Gets a list of bngl files that could be correctly translated in a given ‘directory’
Keyword arguments: directory – The directory we will recurseviley get files from extension – A file extension filter
- bionetgen.atomizer.libsbml2bngl.getMoleculeByName(species, atom)[source]
returns the state of molecule-component contained in atom
- bionetgen.atomizer.libsbml2bngl.getRelationshipDegree(componentPair, statusQueryFunction, comparisonFunction, finalComparison)[source]
- bionetgen.atomizer.libsbml2bngl.listFiles(minReactions, directory)[source]
List of SBML files that meet a given condition
- bionetgen.atomizer.libsbml2bngl.postAnalyzeFile(outputFile, bngLocation, database, replaceLocParams=True, obs_map_file=None)[source]
Performs a postcreation file analysis based on context information
- bionetgen.atomizer.libsbml2bngl.processFile3(fileName, customDefinitions=None, atomize=True, bioGrid=False, output=None)[source]
processes a file. derp.
- bionetgen.atomizer.libsbml2bngl.processFunctions(functions, sbmlfunctions, artificialObservables, tfunc)[source]
this method goes through the list of functions and removes all sbml elements that are extraneous to bngl
- bionetgen.atomizer.libsbml2bngl.readFromString(inputString, reactionDefinitions, useID, speciesEquivalence=None, atomize=False, loggingStream=None, replaceLocParams=True, obs_map_file=None)[source]
one of the library’s main entry methods. Process data from a string
- bionetgen.atomizer.libsbml2bngl.reorderFunctions(functions)[source]
Analyze a list of sbml functions and make sure there are no forward dependencies. Reorder if necessary
- bionetgen.atomizer.libsbml2bngl.resource_path(relative_path)[source]
Get absolute path to resource, works for dev and for PyInstaller
bionetgen.atomizer.parseAnnotation module
bionetgen.atomizer.sbml2bngl module
Created on Tue Dec 6 17:42:31 2011
@author: proto
- class bionetgen.atomizer.sbml2bngl.SBML2BNGL(model, useID=True, replaceLocParams=True, obs_map_file=None)[source]
Bases:
object
contains methods for extracting and formatting those sbml elements that are translatable into bngl
- adjustInitialConditions(parameters, initialConditions, artificialObservables, observables, functions)[source]
assignment rules require further adjustment after parsed to their initial values.
- analyzeReactionRate(math, compartmentList, reversible, rReactant, rProduct, reactionID, parameterFunctions, rModifier=[], sbmlFunctions={}, split_rxn=False)[source]
This functions attempts to obtain the left and right hand sides of a rate reaction function given a MathML tree. It also removes compartments and chemical factors from the function
- Keyword arguments:
math – the MathML math object compartmentList – a list of all the compartments in the system reversible – a boolean indicated whether there’s should be a backward rate rReactant – a string list of the reactants. rProduct – a string list of the products. sbmlFunctions – a list of possible nested functiosn that we need to remove
- calculate_factor(react, prod, expr, removed)[source]
Calculates factors from reactants and products?
- getAssignmentRules(zparams, parameters, molecules, observablesDict, translator)[source]
this method obtains an SBML rate rules and assignment rules. They require special handling since rules are often both defined as rules and parameters initialized as 0, so they need to be removed from the parameters list
- getCompartments()[source]
Returns an array of triples, where each triple is defined as (compartmentName,dimensions,size)
- getInitialAssignments(translator, param, zparam, molecules, initialConditions)[source]
process the get initial assignments section. This can be used to initialize parameters or species, so we have to account for both checking both arrays
- getIsTreeNegative(math)[source]
walks through a series of * nodes and detects whether there’s a negative factor fixme: we should actually test if the number of negative factors is odd right now we are relying on the modelers not being malicious when writing their rates laws.
- getPrunnedTree(math, remainderPatterns, artificialObservables={})[source]
walks through a series of * nodes and removes the remainder reactant factors arg:remainderPatterns: argumetns to be removed from the tree it also changes references to time variables to the keyword ‘Time’
artificialObservables: species that are changed through an sbml assignment rule. their usage in bng requires special handling.
- getRawSpecies(species, parameters=[], logEntries=True)[source]
species is the element whose SBML information we will extract this method gets information directly from an SBML related to a particular species. It returns id,initialConcentration,(bool)isconstant and isboundary, and the compartment It also accounts for the fact that sometimes ppl use the same name for molecules with different identifiers
- getReactions(translator={}, isCompartments=False, extraParameters={}, atomize=False, parameterFunctions={}, database=None)[source]
@returns: a triple containing the parameters,reactions,functions
- getSpecies(translator={}, parameters=[])[source]
in sbml parameters and species have their own namespace. not so in bionetgen, so we need to rename things if they share the same name
- preProcessStoichiometry(reactants)[source]
checks for reactants with the same name in the reactant list. This is mainly to account for reactants that dont have the stoichiometry flag properly set and instead appear repeated
- reduceComponentSymmetryFactors(reaction, translator, functions)[source]
create symmetry factors for reactions with components and species with identical names. This checks for symmetry in the components names then.
- class bionetgen.atomizer.sbml2bngl.sympyAnd(*args)[source]
Bases:
Function
- default_assumptions = {}
- nargs = {2, 3, 4, 5}
- class bionetgen.atomizer.sbml2bngl.sympyGEQ(*args)[source]
Bases:
Function
- default_assumptions = {}
- nargs = {2}
- class bionetgen.atomizer.sbml2bngl.sympyGT(*args)[source]
Bases:
Function
- default_assumptions = {}
- nargs = {2}
- class bionetgen.atomizer.sbml2bngl.sympyIF(*args)[source]
Bases:
Function
- default_assumptions = {}
- nargs = {3}
- class bionetgen.atomizer.sbml2bngl.sympyLEQ(*args)[source]
Bases:
Function
- default_assumptions = {}
- nargs = {2}
- class bionetgen.atomizer.sbml2bngl.sympyLT(*args)[source]
Bases:
Function
- default_assumptions = {}
- nargs = {2}
- class bionetgen.atomizer.sbml2bngl.sympyNot(*args)[source]
Bases:
Function
- default_assumptions = {}
- nargs = {1}
- class bionetgen.atomizer.sbml2bngl.sympyOr(*args)[source]
Bases:
Function
- default_assumptions = {}
- nargs = {2, 3, 4, 5}
bionetgen.atomizer.sbml2json module
- class bionetgen.atomizer.sbml2json.SBML2JSON(model)[source]
Bases:
object
- adjustParameters(stoichoimetry, rate, parameters)[source]
adds avogadros number and other adjusting factors to the reaction rates
- getMolecules()[source]
species is the element whose SBML information we will extract this method gets information directly from an SBML related to a particular species. It returns id,initialConcentration,(bool)isconstant and isboundary, and the compartment