def test_parsing(self):
     #reactionDefinitions, useID = libsbml2bngl.selectReactionDefinitions('BIOMD%010i.xml' % self.param)
     #spEquivalence = detectCustomDefinitions(bioNumber)
     print self.param
     libsbml2bngl.analyzeFile('XMLExamples/curated/BIOMD%010i.xml' % self.param, 'reactionDefinitions/reactionDefinition7.json',
                 False, 'config/namingConventions.json',
                 'raw/output' + str(self.param) + '.bngl', speciesEquivalence=None,atomize=False,bioGrid=False)
def main():
    parser = defineConsole()
    namespace = parser.parse_args()

    options = checkInput(namespace)
    ls2b.analyzeFile(options['inputFile'],options['conventionFile'],options['useId'],options['namingConventions'],
                     options['outputFile'],speciesEquivalence=options['userStructure'],
                     atomize=options['atomize'],bioGrid=False, pathwaycommons=options['pathwaycommons'])
def main():
    parser = defineConsole()
    namespace = parser.parse_args()

    options = checkInput(namespace)
    
    ls2b.analyzeFile(options['inputFile'],options['conventionFile'],options['useId'],options['namingConventions'],
                     options['outputFile'],speciesEquivalence=options['userStructure'],
                     atomize=options['atomize'],bioGrid=options['biogrid'])
Exemple #4
0
def main():
    parser = defineConsole()
    namespace = parser.parse_args()

    options = checkInput(namespace)
    print options    
    
    ls2b.analyzeFile(options['inputFile'],options['conventionFile'],options['useId'],
                     options['outputFile'],speciesEquivalence=options['userStructure'],
                     atomize=options['atomize'],bioGrid=options['biogrid'])
Exemple #5
0
 def test_valid(self):
     print self.param,
     #deepreload.reload(libsbml2bngl)
     libsbml2bngl.analyzeFile('{0}/{1}/{1}-sbml-l2v4.xml'.format(self.param[0],self.param[1]), '../reactionDefinitions/reactionDefinition7.json',
                 False, '../config/namingConventions.json',
                 'tmp/output' + str(self.param[1]) + '.bngl', speciesEquivalence=None,atomize=True,bioGrid=False)
     settings = self.extractSimulationSettings('{0}/{1}/{1}-settings.txt'.format(self.param[0],self.param[1]))
     bnglValues,atol = bnglExecution('output{0}'.format(self.param[1]),settings)
     referenceValues = parseCSV('{0}/{1}/{1}-results.csv'.format(self.param[0],self.param[1]),settings['variables'])
     print float(atol),((bnglValues - referenceValues)**2).mean()
     self.assertAlmostEqual(((bnglValues - referenceValues)**2).mean(),0,delta=float(atol))
     dirs = [ f for f in listdir('./tmp') if self.param[1] in f]
     for element in dirs:
         os.remove('./tmp/{0}'.format(element))
Exemple #6
0
def main():
    parser = defineConsole()
    namespace = parser.parse_args()

    options = checkInput(namespace)
    returnArray = ls2b.analyzeFile(options['inputFile'],
                                   options['conventionFile'],
                                   options['useId'],
                                   options['namingConventions'],
                                   options['outputFile'],
                                   speciesEquivalence=options['userStructure'],
                                   atomize=options['atomize'],
                                   bioGrid=False,
                                   pathwaycommons=options['pathwaycommons'],
                                   ignore=options['ignore'],
                                   noConversion=options['noConversion'])

    if namespace.bionetgen_analysis and returnArray:
        ls2b.postAnalyzeFile(options['outputFile'],
                             namespace.bionetgen_analysis,
                             returnArray.database)

    if namespace.annotation and returnArray:
        with open(options['outputFile'] + '.yml', 'w') as f:
            f.write(yaml.dump(returnArray.annotation,
                              default_flow_style=False))
Exemple #7
0
def main():
    parser = defineConsole()
    namespace = parser.parse_args()

    options = checkInput(namespace)
    returnArray = ls2b.analyzeFile(options['inputFile'], options['conventionFile'], options['useId'], options['namingConventions'],
                     options['outputFile'], speciesEquivalence=options['userStructure'],
                     atomize=options['atomize'], bioGrid=False, pathwaycommons=options['pathwaycommons'])
    if namespace.bionetgen_analysis and returnArray:
        ls2b.postAnalyzeFile(options['outputFile'], namespace.bionetgen_analysis, returnArray.database)
Exemple #8
0
def main():
    parser = defineConsole()
    namespace = parser.parse_args()

    options = checkInput(namespace)
    returnArray = ls2b.analyzeFile(options['inputFile'], options['conventionFile'], options['useId'], options['namingConventions'],
                                   options['outputFile'], speciesEquivalence=options['userStructure'],
                                   atomize=options['atomize'], bioGrid=False, pathwaycommons=options['pathwaycommons'], ignore=options['ignore'], noConversion = options['noConversion'])

    if namespace.bionetgen_analysis and returnArray:
        ls2b.postAnalyzeFile(options['outputFile'], namespace.bionetgen_analysis, returnArray.database)

    if namespace.annotation and returnArray:
        with open(options['outputFile'] + '.yml', 'w') as f:
            f.write(yaml.dump(returnArray.annotation, default_flow_style=False))
def main():
    parser = defineConsole()
    namespace = parser.parse_args()

    options = checkInput(namespace)
    returnArray = ls2b.analyzeFile(
        options["inputFile"],
        options["conventionFile"],
        options["useId"],
        options["namingConventions"],
        options["outputFile"],
        speciesEquivalence=options["userStructure"],
        atomize=options["atomize"],
        bioGrid=False,
        pathwaycommons=options["pathwaycommons"],
        ignore=options["ignore"],
        noConversion=options["noConversion"],
        memoizedResolver=options["memoizedResolver"],
        replaceLocParams=options["replaceLocParams"],
        quietMode=options["quietMode"],
        logLevel=options["logLevel"],
        obs_map_file=options["obs_map_file"],
    )

    if namespace.bionetgen_analysis and returnArray:
        ls2b.postAnalyzeFile(
            options["outputFile"],
            namespace.bionetgen_analysis,
            returnArray.database,
            replaceLocParams=options["replaceLocParams"],
        )

    if namespace.annotation and returnArray:
        with open(options["outputFile"] + ".yml", "w") as f:
            f.write(yaml.dump(returnArray.annotation,
                              default_flow_style=False))