widget5.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:MMinte 作者: mendessoares 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号