Exemplo n.º 1
0
    def undo(self):
        olg = self._oligo
        o_s = ''.join(self._old_sequence) if self._old_sequence else None

        oligo_list = [olg]

        for strand in olg.strand5p().generator3pStrand():
            used_seq, o_s = strand.setSequence(o_s)

            # get the compliment ahead of time
            used_seq = util.comp(used_seq) if used_seq else None
            comp_ss = strand.strandSet().complementStrandSet()
            for comp_strand in comp_ss._findOverlappingRanges(strand):
                sub_used_seq = comp_strand.setComplementSequence(
                    used_seq, strand)
                oligo_list.append(comp_strand.oligo())
            # end for
        # for

        for oligo in oligo_list:
            oligo.oligoSequenceAddedSignal.emit(oligo)

    # end def


# end class
Exemplo n.º 2
0
    def reapplySequence(self):
        """
        """
        comp_ss = self.strandSet().complementStrandSet()

        # the strand sequence will need to be regenerated from scratch
        # as there are no guarantees about the entirety of the strand moving
        # i.e. both endpoints thanks to multiple selections so just redo the
        # whole thing
        self._sequence = None

        for comp_strand in comp_ss.getOverlappingStrands(
                self._base_idx_low, self._base_idx_high):
            comp_seq = comp_strand.sequence()
            used_seq = util.comp(comp_seq) if comp_seq else None
            used_seq = self.setComplementSequence(used_seq, comp_strand)
Exemplo n.º 3
0
 def reapplySequence(self):
     """
     """
     comp_ss = self.strandSet().complementStrandSet()
     
     # the strand sequence will need to be regenerated from scratch
     # as there are no guarantees about the entirety of the strand moving
     # i.e. both endpoints thanks to multiple selections so just redo the 
     # whole thing
     self._sequence = None
     
     for comp_strand in comp_ss._findOverlappingRanges(self):
         compSeq = comp_strand.sequence()
         usedSeq = util.comp(compSeq) if compSeq else None
         usedSeq = self.setComplementSequence(
                                     usedSeq, comp_strand)
Exemplo n.º 4
0
    def undo(self):
        olg = self._oligo
        o_s = ''.join(self._old_sequence) if self._old_sequence else None

        oligo_list = [olg]

        for strand in olg.strand5p().generator3pStrand():
            used_seq, o_s = strand.setSequence(o_s)

            # get the compliment ahead of time
            used_seq = util.comp(used_seq) if used_seq else None
            for comp_strand in strand.getComplementStrands():
                comp_strand.setComplementSequence(used_seq, strand)
                oligo_list.append(comp_strand.oligo())
            # end for
        # for

        for oligo in oligo_list:
            oligo.oligoSequenceAddedSignal.emit(oligo)
Exemplo n.º 5
0
 def redo(self):
     olg = self._oligo
     n_s = ''.join(self._new_sequence) if self._new_sequence else None
     n_s_original = self._new_sequence
     oligo_list = [olg]
     for strand in olg.strand5p().generator3pStrand():
         used_seq, n_s = strand.setSequence(n_s)
         # get the compliment ahead of time
         used_seq = util.comp(used_seq) if used_seq else None
         for comp_strand in strand.getComplementStrands():
             comp_strand.setComplementSequence(used_seq, strand)
             oligo_list.append(comp_strand.oligo())
         # end for
         # as long as the new Applied Sequence is not None
         if n_s is None and n_s_original:
             break
     # end for
     for oligo in oligo_list:
         oligo.oligoSequenceAddedSignal.emit(oligo)
Exemplo n.º 6
0
    def undo(self):
        olg = self._oligo
        o_s = ''.join(self._old_sequence) if self._old_sequence else None

        oligo_list = [olg]

        for strand in olg.strand5p().generator3pStrand():
            used_seq, o_s = strand.setSequence(o_s)

            # get the compliment ahead of time
            used_seq = util.comp(used_seq) if used_seq else None
            for comp_strand in strand.getComplementStrands():
                sub_used_seq = comp_strand.setComplementSequence(used_seq, strand)
                oligo_list.append(comp_strand.oligo())
            # end for
        # for

        for oligo in oligo_list:
            oligo.oligoSequenceAddedSignal.emit(oligo)
Exemplo n.º 7
0
 def redo(self):
     olg = self._oligo
     n_s = ''.join(self._new_sequence) if self._new_sequence else None
     n_s_original = self._new_sequence
     oligo_list = [olg]
     for strand in olg.strand5p().generator3pStrand():
         used_seq, n_s = strand.setSequence(n_s)
         # get the compliment ahead of time
         used_seq = util.comp(used_seq) if used_seq else None
         for comp_strand in strand.getComplementStrands():
             sub_used_seq = comp_strand.setComplementSequence(used_seq, strand)
             oligo_list.append(comp_strand.oligo())
         # end for
         # as long as the new Applied Sequence is not None
         if n_s is None and n_s_original:
             break
     # end for
     for oligo in oligo_list:
         oligo.oligoSequenceAddedSignal.emit(oligo)