Skip to content

Commit

Permalink
Merge branch 'partial_data'
Browse files Browse the repository at this point in the history
  • Loading branch information
tanaes committed Jan 18, 2023
2 parents 42d910f + 498bf4b commit d1b247a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drep/d_choose.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,18 @@ def score_genomes(genomes, Gdb, Edb=None, **kwargs):
else:
g2e = {}

# Test for NaNs in Gdb['strain_heterogeneity']
if 'strain_heterogeneity' in Gdb.columns:
if Gdb['strain_heterogeneity'].isnull().values.any():
kwargs['strain_heterogeneity_weight'] = 0
logging.warning ('NaNs found in Gdb strain_heterogeneity! '
'This may have happened if CheckM results '
'were imported for some but not all '
'genomes. \n\n'
'Setting strain_heterogeneity_weight to zero')
Gdb.drop('strain_heterogeneity',
axis=1, inplace=True)

Table = {'genome':[],'score':[]}
for genome in genomes:
if genome in g2e:
Expand Down

0 comments on commit d1b247a

Please sign in to comment.