diff --git a/ppanggolin/genome.py b/ppanggolin/genome.py index 743a4eb4..f1ebb682 100644 --- a/ppanggolin/genome.py +++ b/ppanggolin/genome.py @@ -362,7 +362,7 @@ def length(self, contig_len: int): if self.length is None: self._length = contig_len - elif self.length != contig_length: + elif self.length != contig_len: raise ValueError('Attempting to define a contig length different from the previously defined value.') diff --git a/ppanggolin/region.py b/ppanggolin/region.py index da434858..a2abcc3c 100644 --- a/ppanggolin/region.py +++ b/ppanggolin/region.py @@ -746,7 +746,7 @@ def organisms(self) -> Generator[Organism, None, None]: organisms = set() for fam in self.families: organisms |= set(fam.organisms) - return organisms + yield from organisms def mk_bitarray(self, index: Dict[Organism, int], partition: str = 'all'):