Skip to content

Commit

Permalink
Modify BurrowsWheelerLibrary.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yqiqichen committed May 20, 2024
1 parent 14a2cd8 commit 9fa1964
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/alphaimpute2/Imputation/BurrowsWheelerLibrary.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ def removeMissingValues(self):
def setup_library(self, loci=None, create_reverse_library=False, create_a=False):
self.removeMissingValues()
self.haplotypes = np.array(self.haplotypes)

if self.haplotypes.size == 0:
return

if loci is not None:
bw_loci = np.array(loci, dtype=np.int64)
sub_library = self.haplotypes[:, bw_loci]
Expand Down

0 comments on commit 9fa1964

Please sign in to comment.