当前位置: 首页>>代码示例>>Python>>正文


Python MetadataMap.isNumericCategory方法代码示例

本文整理汇总了Python中qiime.util.MetadataMap.isNumericCategory方法的典型用法代码示例。如果您正苦于以下问题:Python MetadataMap.isNumericCategory方法的具体用法?Python MetadataMap.isNumericCategory怎么用?Python MetadataMap.isNumericCategory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在qiime.util.MetadataMap的用法示例。


在下文中一共展示了MetadataMap.isNumericCategory方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: MetadataMap

# 需要导入模块: from qiime.util import MetadataMap [as 别名]
# 或者: from qiime.util.MetadataMap import isNumericCategory [as 别名]
        # the MetadataMap object makes some checks easier
        map_object = MetadataMap(mapping_file_to_dict(mapping_data, header), [])
        for axis in custom_axes:
            # append the field to the error queue that it belongs to
            if axis not in lookup_header:
                offending_fields.append(axis)
                break
            # make sure this value is in the mapping file
            elif axis not in color_by_column_names:
                color_by_column_names.append(axis)
        # perform only if the for loop does not call break
        else:
            # make sure all these axes are numeric
            for axis in custom_axes:
                if map_object.isNumericCategory(axis) == False:
                    non_numeric_categories.append(axis)

    # make multiple checks for the add_vectors option
    if add_vectors != [None, None]:
        add_vectors = add_vectors.split(',')
        # check there are at the most two categories specified for this option
        if len(add_vectors) > 2:
            option_parser.error("The '--add_vectors' option can accept up to "
                "two different fields from the mapping file; currently trying "
                "to use %d (%s)." % (len(add_vectors), ', '.join(add_vectors)))
        # make sure the field(s) exist
        for col in add_vectors:
            # concatenated fields are allowed now so check for each field
            if '&&' in col:
                for _col in col.split('&&'):
开发者ID:jessicalmetcalf,项目名称:emperor,代码行数:32,代码来源:make_emperor.py


注:本文中的qiime.util.MetadataMap.isNumericCategory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。