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
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
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