本文整理汇总了Python中component.Component.second_domain方法的典型用法代码示例。如果您正苦于以下问题:Python Component.second_domain方法的具体用法?Python Component.second_domain怎么用?Python Component.second_domain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类component.Component
的用法示例。
在下文中一共展示了Component.second_domain方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_dash_dash_state_from_string
# 需要导入模块: from component import Component [as 别名]
# 或者: from component.Component import second_domain [as 别名]
def get_dash_dash_state_from_string(self, state, state_str, state_id=None, loc_not_modifier=None):
"""
Complete Association or Intraprotein state from str.
Returns State object.
"""
comp = state_str.split('--')
compA_name = comp[0].split('_')[0]
compA_domain = self.df.get_association_domain_from_str(state_str, 'A')
compB_name = comp[1].split('_')[0]
compB_domain = self.df.get_association_domain_from_str(state_str, 'B')
if compB_name.startswith('['):
state.type = 'Intraprotein' # A_[a]--[b]
comp_object = Component(compA_name, compA_domain)
comp_object.second_domain = re.sub('[\[\]]', '', compB_name)
state.components = [comp_object]
else:
state.type = 'Association' # A--B
if state_id:
idA = state_id.split('--')[0]
idB = state_id.split('--')[1]
else:
idA = None
idB = None
compA_object = Component(compA_name, compA_domain, idA)
compB_object = Component(compB_name, compB_domain, idB)
state.components = [compA_object, compB_object]
if compA_name == compB_name:
state.homodimer = True
return state