本文整理汇总了Python中src.sgd.model.nex.UpdateByJsonMixin.to_min_json方法的典型用法代码示例。如果您正苦于以下问题:Python UpdateByJsonMixin.to_min_json方法的具体用法?Python UpdateByJsonMixin.to_min_json怎么用?Python UpdateByJsonMixin.to_min_json使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类src.sgd.model.nex.UpdateByJsonMixin
的用法示例。
在下文中一共展示了UpdateByJsonMixin.to_min_json方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: to_min_json
# 需要导入模块: from src.sgd.model.nex import UpdateByJsonMixin [as 别名]
# 或者: from src.sgd.model.nex.UpdateByJsonMixin import to_min_json [as 别名]
def to_min_json(self, include_description=False):
obj_json = UpdateByJsonMixin.to_min_json(self, include_description=include_description)
obj_json['length'] = len(self.residues)
obj_json['is_chromosome'] = True if self.is_chromosome == 1 else False
obj_json['centromere_start'] = self.centromere_start
obj_json['centromere_end'] = self.centromere_end
return obj_json
示例2: to_semi_json
# 需要导入模块: from src.sgd.model.nex import UpdateByJsonMixin [as 别名]
# 或者: from src.sgd.model.nex.UpdateByJsonMixin import to_min_json [as 别名]
def to_semi_json(self):
obj_json = UpdateByJsonMixin.to_min_json(self)
obj_json['pcl_filename'] = self.pcl_filename
obj_json['geo_id'] = self.geo_id
obj_json['short_description'] = self.short_description
obj_json['condition_count'] = self.condition_count
obj_json['reference'] = None if self.reference is None else self.reference.to_min_json()
obj_json['tags'] = [x.tag.to_min_json() for x in self.bioitem_tags]
obj_json['display_name'] = self.display_name.replace('.', '. ')
return obj_json
示例3: to_semi_json
# 需要导入模块: from src.sgd.model.nex import UpdateByJsonMixin [as 别名]
# 或者: from src.sgd.model.nex.UpdateByJsonMixin import to_min_json [as 别名]
def to_semi_json(self):
obj_json = UpdateByJsonMixin.to_min_json(self)
obj_json["description"] = self.description
return obj_json
示例4: to_min_json
# 需要导入模块: from src.sgd.model.nex import UpdateByJsonMixin [as 别名]
# 或者: from src.sgd.model.nex.UpdateByJsonMixin import to_min_json [as 别名]
def to_min_json(self):
obj_json = UpdateByJsonMixin.to_min_json(self)
obj_json['category'] = self.category
return obj_json
示例5: to_min_json
# 需要导入模块: from src.sgd.model.nex import UpdateByJsonMixin [as 别名]
# 或者: from src.sgd.model.nex.UpdateByJsonMixin import to_min_json [as 别名]
def to_min_json(self, include_description=False):
obj_json = UpdateByJsonMixin.to_min_json(self, include_description=include_description)
obj_json['pubmed_id'] = self.pubmed_id
obj_json['year'] = self.year
return obj_json