def removeStrand(self, strand: StrandT, use_undostack: bool = True, solo: bool = True): """Remove a :class:`Strand` from the set Args: strand: the :class:`Strand` to remove use_undostack (optional): default = ``True`` solo ( optional): solo is an argument to enable limiting signals emiting from the command in the case the command is instantiated part of a larger command, default=``True`` """ cmds = [] if not self.isStrandInSet(strand): raise IndexError("Strandset.removeStrand: strand not in set") if strand.sequence() is not None: cmds.append(strand.oligo().applySequenceCMD(None)) cmds += strand.clearDecoratorCommands() cmds.append(RemoveStrandCommand(self, strand, solo=solo)) util.execCommandList(self, cmds, desc="Remove strand", use_undostack=use_undostack)
def oligoStrandRemover(self, strand: StrandT, cmds: List[UndoCommand], solo: bool = True): """Used for removing all :class:`Strand`s from an :class:`Oligo` Args: strand: a strand to remove cmds: a list of :class:`UndoCommand` objects to append to solo (:optional): to pass on to ``RemoveStrandCommand``, default=``True`` """ if not self.isStrandInSet(strand): raise IndexError("Strandset.oligoStrandRemover: strand not in set") cmds += strand.clearDecoratorCommands() cmds.append(RemoveStrandCommand(self, strand, solo=solo))
def oligoStrandRemover(self, strand: StrandT, cmds: List[UndoCommand], solo: bool = True): """Used for removing all :class:`Strand`s from an :class:`Oligo` Args: strand: a strand to remove cmds: a list of :class:`UndoCommand` objects to append to solo (:optional): to pass on to ``RemoveStrandCommand``, default=``True`` """ if not self.isStrandInSet(strand): raise IndexError("Strandset.oligoStrandRemover: strand not in set") cmds += strand.clearDecoratorCommands() cmds.append(RemoveStrandCommand(self, strand, solo=solo))
def removeStrand(self, strand: StrandT, use_undostack: bool = True, solo: bool = True): """Remove a :class:`Strand` from the set Args: strand: the :class:`Strand` to remove use_undostack (optional): default = ``True`` solo ( optional): solo is an argument to enable limiting signals emiting from the command in the case the command is instantiated part of a larger command, default=``True`` """ cmds = [] if not self.isStrandInSet(strand): raise IndexError("Strandset.removeStrand: strand not in set") if strand.sequence() is not None: cmds.append(strand.oligo().applySequenceCMD(None)) cmds += strand.clearDecoratorCommands() cmds.append(RemoveStrandCommand(self, strand, solo=solo)) util.execCommandList(self, cmds, desc="Remove strand", use_undostack=use_undostack)