Skip to content

Commit

Permalink
doc: (re)add repr
Browse files Browse the repository at this point in the history
  • Loading branch information
maxibor committed Jul 23, 2024
1 parent fd54950 commit 97ba7a4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pydamage/damage.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ def __init__(self, reference, al_handle, wlen, g2a, subsample):
self.wlen = wlen
self.g2a = g2a
self.subsample = subsample
# self.alignments = al_file

def __repr__(self):
return(f"Reference {reference}")
return(f"Reference {self.reference}")

def get_damage(self, show_al):
"""Compute CtoT substitutions
Expand Down Expand Up @@ -68,7 +67,7 @@ def get_damage(self, show_al):
iterator = self.alignments
for al in iterator:
if al.is_unmapped is False and (
self.subsample is None or np.random.rand() < self.subsample
not self.subsample or np.random.rand() < self.subsample
):
all_damage = damage_al(
reference=al.get_reference_sequence(),
Expand Down

0 comments on commit 97ba7a4

Please sign in to comment.