def test_reverse(self):
     assert_equal(self.sequence,
                  sequence.reverse(sequence.reverse(self.sequence)))
     assert_equal(self.reverse,
                  sequence.reverse(self.sequence))
     assert_equal(self.complement,
                  sequence.reverse(self.reverse_complement))
Exemplo n.º 2
0
 def reverseComplement(self, preserveHeader=False):
     """
     Return a new FastaRecord with the reverse-complemented DNA sequence.
     Optionally, supply a name
     """
     rcSequence = sequence.reverseComplement(self.sequence)
     rcQuality = sequence.reverse(self.quality)
     if preserveHeader:
         return FastqRecord(self.header, rcSequence, rcQuality)
     else:
         rcName = '{0} [revcomp]'.format(self.header.strip())
         return FastqRecord(rcName, rcSequence, rcQuality)
Exemplo n.º 3
0
 def reverseComplement(self, preserveHeader=False):
     """
     Return a new FastaRecord with the reverse-complemented DNA sequence.
     Optionally, supply a name
     """
     rcSequence = sequence.reverseComplement(self.sequence)
     rcQuality = sequence.reverse(self.quality)
     if preserveHeader:
         return FastqRecord(self.header, rcSequence, rcQuality)
     else:
         rcName = '{0} [revcomp]'.format(self.header.strip())
         return FastqRecord(rcName, rcSequence, rcQuality)
Exemplo n.º 4
0
 def test_reverse(self):
     assert_equal(self.sequence,
                  sequence.reverse(sequence.reverse(self.sequence)))
     assert_equal(self.reverse, sequence.reverse(self.sequence))
     assert_equal(self.complement,
                  sequence.reverse(self.reverse_complement))
 def test_reverse(self):
     assert self.SEQUENCE == sequence.reverse(
         sequence.reverse(self.SEQUENCE))
     assert self.REVERSE == sequence.reverse(self.SEQUENCE)
     assert self.COMPLEMENT == sequence.reverse(self.REVERSE_COMPLEMENT)