Skip to content

Commit

Permalink
fix ambiguity
Browse files Browse the repository at this point in the history
  • Loading branch information
cactuskid committed Aug 30, 2024
1 parent 19befe4 commit 809ad83
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/HogProf/lshbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ def __init__(self,h5_oma=None,fileglob = None, taxa=None,masterTree=None, saving
else:
self.HAM_PIPELINE = functools.partial( pyhamutils.get_ham_treemap_from_row, tree=self.tree_string , swap_ids=self.swap2taxcode ,
orthoXML_as_string = False , reformat_names = self.reformat_names , use_phyloxml = self.use_phyloxml , orthomapper = self.idmapper )



self.HASH_PIPELINE = functools.partial( hashutils.row2hash , taxaIndex=self.taxaIndex, treeweights=self.treeweights, wmg=wmg , lossonly = lossonly, duplonly = duplonly)
if self.h5OMA:

Expand Down Expand Up @@ -323,7 +322,7 @@ def saver(self, i, q, retq, matq, l ):
h5hashes[taxstr][fam, :] = hashes[fam].hashvalues.ravel()
count += 1
if self.fileglob:
if not savedf:
if savedf is not None:
savedf = this_dataframe[['Fam', 'ortho']]
else:
savedf = savedf.append(this_dataframe[['Fam', 'ortho']])
Expand All @@ -343,9 +342,6 @@ def saver(self, i, q, retq, matq, l ):
print(savedf)
savedf.to_csv(self.saving_path + 'fam2orthoxml.csv')
save_start = t.time()



else:
print(this_dataframe)
else:
Expand Down
4 changes: 3 additions & 1 deletion src/HogProf/utils/pyhamutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ def orthoxml2numerical(orthoxml , mapper):
orthoxml = ET.tostring(root, encoding='unicode', method='xml')
return orthoxml

def get_ham_treemap_from_row(row, tree , level = None , swap_ids = True , orthoXML_as_string = True , use_phyloxml = False , use_internal_name = True ,reformat_names= False, orthomapper = None ):


def get_ham_treemap_from_row(row, tree , level = None , swap_ids = True , orthoXML_as_string = True , use_phyloxml = False , use_internal_name = True ,reformat_names= False, orthomapper = None ):
fam, orthoxml = row
format = 'newick_string'
if use_phyloxml:
Expand Down

0 comments on commit 809ad83

Please sign in to comment.