Skip to content

Commit

Permalink
MIN Slightly more detailed debug outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
luispedro committed Oct 3, 2023
1 parent 329da49 commit 6dc33b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SemiBin/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,14 @@ def run_embed_infomap(logger, model, data, * ,
from scipy import sparse
import torch
import numpy as np

train_data_input = data.values[:, 0:136] if not is_combined else data.values

if is_combined:
if train_data_input.shape[1] - 136 > 20:
train_data_kmer = train_data_input[:, 0:136]
train_data_depth = train_data_input[:, 136:len(data.values[0])]
from sklearn.preprocessing import normalize
import numpy as np
train_data_depth = normalize(train_data_depth, axis=1, norm='l1')
train_data_input = np.concatenate((train_data_kmer, train_data_depth), axis=1)

Expand Down Expand Up @@ -179,6 +178,7 @@ def run_embed_infomap(logger, model, data, * ,
g.add_vertices(np.arange(num_contigs))
g.add_edges(edges)
length_weight = np.array([len(contig_dict[name]) for name in data.index])
logger.debug(f'Running infomap with {num_process} processes...')
result = run_infomap(g,
edge_weights=edge_weights,
vertex_weights=length_weight,
Expand Down

0 comments on commit 6dc33b0

Please sign in to comment.