Skip to content
This repository
Browse code

fixed a bug in the reverse_complement code

  • Loading branch information...
commit 450258385b28d4ed4160792360480e5dd46bffb8 1 parent b3031cb
Michiel de Hoon authored

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. +3 2 Bio/Motif/_Motif.py
5 Bio/Motif/_Motif.py
@@ -447,14 +447,15 @@ def reverse_complement(self):
447 447 """
448 448 Gives the reverse complement of the motif
449 449 """
  450 + alphabet = self.alphabet
450 451 if self.instances!=None:
451 452 instances = []
452 453 for instance in self.instances:
453 454 instance = instance.reverse_complement()
454 455 instances.append(instance)
455   - res = Motif(instances)
  456 + res = Motif(alphabet, instances)
456 457 else: # has counts
457   - res = Motif()
  458 + res = Motif(alphabet)
458 459 res.counts={}
459 460 res.counts["A"]=self.counts["T"][:]
460 461 res.counts["T"]=self.counts["A"][:]

0 comments on commit 4502583

Please sign in to comment.
Something went wrong with that request. Please try again.