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


Python Strand.connection5p方法代码示例

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


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

示例1: _strandMergeUpdate

# 需要导入模块: from cadnano.strand import Strand [as 别名]
# 或者: from cadnano.strand.Strand import connection5p [as 别名]
    def _strandMergeUpdate(self, old_strand_low: Strand,
                                old_strand_high: Strand,
                                new_strand: Strand):
        """This method sets the isCircular status of the oligo and the oligo's
        5' strand.
        """
        # check loop status
        if old_strand_low.oligo() == old_strand_high.oligo():
            self._is_circular = True
            self._strand5p = new_strand
            return
            # leave the _strand5p as is?
        # end if

        # Now get correct 5p end to oligo
        if old_strand_low.isForward():
            if old_strand_low.connection5p() is not None:
                self._strand5p = old_strand_low.oligo()._strand5p
            else:
                self._strand5p = new_strand
        else:
            if old_strand_high.connection5p() is not None:
                self._strand5p = old_strand_high.oligo()._strand5p
            else:
                self._strand5p = new_strand
开发者ID:cadnano,项目名称:cadnano2.5,代码行数:27,代码来源:oligo.py

示例2: __init__

# 需要导入模块: from cadnano.strand import Strand [as 别名]
# 或者: from cadnano.strand.Strand import connection5p [as 别名]
    def __init__(self, strandset: StrandSetT, strand: Strand, solo: bool = True):
        super(RemoveStrandCommand, self).__init__("remove strands")
        self._strandset = strandset
        self._strand = strand
        self._solo = solo
        self._old_strand5p = strand.connection5p()
        self._old_strand3p = strand.connection3p()
        self._oligo = olg = strand.oligo()

        part = strand.part()
        # idxs = strand.idxs()
        self.mids = (part.getModID(strand, strand.lowIdx()),
                     part.getModID(strand, strand.highIdx()))

        # only create a new 5p oligo if there is a 3' connection
        self._new_oligo5p = olg.shallowCopy() if self._old_strand5p else None
        if olg.isCircular() or self._old_strand3p is None:
            self._new_oligo3p = olg3p = None
            if self._new_oligo5p:
                self._new_oligo5p._setLoop(False)
        else:
            self._new_oligo3p = olg3p = olg.shallowCopy()
            olg3p.setStrand5p(self._old_strand3p)
            # color_list = styles.STAP_COLORS if strandset.isStaple() else prefs.SCAF_COLORS
            color_list = pathstyles.STAP_COLORS
            color = random.choice(color_list)
            olg3p._setColor(color)
            olg3p.refreshLength(emit_signals=True)
开发者ID:cadnano,项目名称:cadnano2.5,代码行数:30,代码来源:removestrandcmd.py

示例3: _strandSplitUpdate

# 需要导入模块: from cadnano.strand import Strand [as 别名]
# 或者: from cadnano.strand.Strand import connection5p [as 别名]
 def _strandSplitUpdate(self, new_strand5p: Strand,
                             new_strand3p: Strand,
                             oligo3p: OligoT,
                             old_merged_strand: Strand):
     """If the oligo is a loop, splitting the strand does nothing. If the
     oligo isn't a loop, a new oligo must be created and assigned to the
     new_strand and everything connected to it downstream.
     """
     # if you split it can't be a loop
     self._is_circular = False
     if old_merged_strand.oligo().isCircular():
         self._strand5p = new_strand3p
         return
     else:
         if old_merged_strand.connection5p() is None:
             self._strand5p = new_strand5p
         else:
             self._strand5p = old_merged_strand.oligo()._strand5p
         oligo3p._strand5p = new_strand3p
开发者ID:cadnano,项目名称:cadnano2.5,代码行数:21,代码来源:oligo.py


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