Skip to content
Permalink
Browse files

fix: more permissive reference matching

  • Loading branch information...
diljotgrewal committed Jun 27, 2019
1 parent b1e277b commit 67541526a5c22b93b01835b264c1735a385d2e9e
Showing with 8 additions and 1 deletion.
  1. +8 −1 museq/pybamapi.py
@@ -48,7 +48,14 @@ def __load_reference(self):
self.fasta.open(self.ref)

def is_matched_reference(self):
return self.get_reference_refnames() == self.get_refnames()
reference_refnames = self.get_reference_refnames()
refnames = self.get_refnames()

keys_of_interest = set(reference_refnames.keys()).intersection(set(refnames.keys()))
reference_refnames = {k:v for k,v in reference_refnames.iteritems() if k in keys_of_interest}
refnames = {k:v for k,v in refnames.iteritems() if k in keys_of_interest}

return refnames == reference_refnames

def get_reference_base(self, chromosome_id, position, index=False):
if position < 1:

0 comments on commit 6754152

Please sign in to comment.
You can’t perform that action at this time.