def getListOfModels(comFolder):
'''
This function creates a list with all the community models that will be used in the analysis. It creates this list by listing the metabolic models in SBML format present in the user specified folder that contains the community models.
:param comFolder: path to the folder that contains the community metabolic models.
:return listOfModels: list object containing the filenames for all the models that will be analysed in the function calculateGR
'''
import os
cherrypy.log('We will first get the full list of community models from the %s folder' %comFolder)
path = comFolder
listOfFiles = os.listdir(path)
listOfModels = []
for file in listOfFiles:
if file.endswith('.sbml'):
pathToFile = path + file
listOfModels.append(pathToFile)
cherrypy.log('There are %s community models what will be analyzed.'%listOfModels)
return listOfModels
评论列表
文章目录