本文整理汇总了Python中Table.Table.key方法的典型用法代码示例。如果您正苦于以下问题:Python Table.key方法的具体用法?Python Table.key怎么用?Python Table.key使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Table.Table
的用法示例。
在下文中一共展示了Table.key方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: classify
# 需要导入模块: from Table import Table [as 别名]
# 或者: from Table.Table import key [as 别名]
def classify(C,lnc,AM,discard):
result=Table()
result.key=1
result.col_names=['gid','class']
for i in C:
result.data.append([i,'novel_coding'])
result.row_names[i]=len(result.row_names)
for i in lnc:
result.data.append([i,'novel_lincRNA'])
result.row_names[i]=len(result.row_names)
for i in AM:
result.data.append([i,'ambiguous_genes'])
result.row_names[i]=len(result.row_names)
for i in discard:
result.data.append([i,'filter_out_noncoding'])
result.row_names[i]=len(result.row_names)
return result
示例2: classify
# 需要导入模块: from Table import Table [as 别名]
# 或者: from Table.Table import key [as 别名]
def classify(KC,overlap_KC,KN,overlap_KN,discard_cnc_tmap_gids,unannotated):
result=Table()
result.key=1
result.col_names=['gid','class']
for i in KC:
result.data.append([i,'known_coding'])
result.row_names[i]=len(result.row_names)
for i in overlap_KC:
result.data.append([i,'undefinable'])
result.row_names[i]=len(result.row_names)
for i in KN:
result.data.append([i,'known_lincRNA'])
result.row_names[i]=len(result.row_names)
for i in overlap_KN:
result.data.append([i,'undefinable'])
result.row_names[i]=len(result.row_names)
# for i in discard_cnc_tmap_gids:
# result.data.append([i,'discarded'])
# result.row_names[i]=len(result.row_names)
for i in unannotated:
result.data.append([i,'potentially_novel'])
result.row_names[i]=len(result.row_names)
return result