本文整理匯總了Python中oncotator.TranscriptProviderUtils.TranscriptProviderUtils.render_codon_change方法的典型用法代碼示例。如果您正苦於以下問題:Python TranscriptProviderUtils.render_codon_change方法的具體用法?Python TranscriptProviderUtils.render_codon_change怎麽用?Python TranscriptProviderUtils.render_codon_change使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類oncotator.TranscriptProviderUtils.TranscriptProviderUtils
的用法示例。
在下文中一共展示了TranscriptProviderUtils.render_codon_change方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: generate_codon_change_from_vc
# 需要導入模塊: from oncotator.TranscriptProviderUtils import TranscriptProviderUtils [as 別名]
# 或者: from oncotator.TranscriptProviderUtils.TranscriptProviderUtils import render_codon_change [as 別名]
def generate_codon_change_from_vc(self, t, start, end, vc):
"""
:param t: (Transcript)
:param start: (int)
:param end: (int)
:param vc: (VariantClassification)
:return:
"""
dist_from_exon = self._get_splice_site_coordinates(t, start, end, vc.get_exon_i())
exon_i = vc.get_exon_i()
if vc.get_vc() == VariantClassification.SPLICE_SITE and vc.get_secondary_vc() == VariantClassification.INTRON:
return TranscriptProviderUtils.render_intronic_splice_site_codon_change(dist_from_exon, exon_i)
if vc.get_ref_codon_start_in_exon() == "" or vc.get_ref_codon_end_in_exon() == "":
return ""
codon_position_start_cds_space = int(vc.get_ref_codon_start_in_exon()) - int(vc.get_cds_start_in_exon_space())+1
codon_position_end_cds_space = int(vc.get_ref_codon_end_in_exon()) - int(vc.get_cds_start_in_exon_space())+1
ref_codon_seq = vc.get_ref_codon()
alt_codon_seq = vc.get_alt_codon()
result = TranscriptProviderUtils.render_codon_change(vc.get_vt(), vc.get_vc(), int(codon_position_start_cds_space), int(codon_position_end_cds_space), ref_codon_seq, alt_codon_seq, dist_from_exon, exon_i, vc.get_secondary_vc())
return result