示例#1
0
 def sequence(self):
     temp = self.strand5p()
     if not temp:
         return None
     if temp.sequence():
         return ''.join([Strand.sequence(strand) \
                     for strand in self.strand5p().generator3pStrand()])
     else:
         return None
示例#2
0
文件: oligo.py 项目: vdt/cadnano2
 def sequence(self):
     temp = self.strand5p()
     if not temp:
         return None
     if temp.sequence():
         return ''.join([Strand.sequence(strand) \
                     for strand in self.strand5p().generator3pStrand()])
     else:
         return None
示例#3
0
 def sequenceExport(self):
     vhNum5p = self.strand5p().virtualHelix().number()
     idx5p = self.strand5p().idx5Prime()
     seq = ''
     if self.isLoop():
         print "A loop exists"
         raise Exception
     for strand in self.strand5p().generator3pStrand():
         seq = seq + Strand.sequence(strand, forExport=True)
         if strand.connection3p() == None:  # last strand in the oligo
             vhNum3p = strand.virtualHelix().number()
             idx3p = strand.idx3Prime()
     output = "%d[%d],%d[%d],%s,%s,%s\n" % \
             (vhNum5p, idx5p, vhNum3p, idx3p, seq, len(seq), self._color)
     return output
示例#4
0
文件: oligo.py 项目: vdt/cadnano2
 def sequenceExport(self):
     vhNum5p = self.strand5p().virtualHelix().number()
     idx5p = self.strand5p().idx5Prime()
     seq = ''
     if self.isLoop():
         # print "A loop exists"
         raise Exception
     for strand in self.strand5p().generator3pStrand():
         seq = seq + Strand.sequence(strand, forExport=True)
         if strand.connection3p() == None:  # last strand in the oligo
             vhNum3p = strand.virtualHelix().number()
             idx3p = strand.idx3Prime()
     output = "%d[%d],%d[%d],%s,%s,%s\n" % \
             (vhNum5p, idx5p, vhNum3p, idx3p, seq, len(seq), self._color)
     return output