Skip to content

Commit

Permalink
Remove HaplotypeLibrary.py.load() and save()
Browse files Browse the repository at this point in the history
  • Loading branch information
sthorn committed Aug 25, 2020
1 parent 93691dc commit 37ea74f
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions HaplotypeLibrary.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,6 @@ def topk_indices(genotype, haplotypes, n_topk):
return indices[args[:n_topk]]


def save(filepath, haplotype_library):
"""Save haplotype library
Note: the format of this is likely to change
Note: need to handle case where args.out contains an output path"""
f = open(filepath, 'wb')
pickle.dump(haplotype_library, f)
f.close()

def load(filepath):
"""Load haplotype library
Note: the format of this is likely to change"""
f = open(filepath, 'rb')
haplotype_library = pickle.load(f)
f.close()
return haplotype_library


class HaplotypeLibrary(object):
"""A library of haplotypes
Each haplotype can have an identifier (any Python object, but typically a str or int)
Expand Down

0 comments on commit 37ea74f

Please sign in to comment.