Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/diffupy/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def diffuse(
threshold,
)

click.secho(f'Computing the diffusion algorithm.')
click.secho('Computing the diffusion algorithm.')

results = run_diffusion(
input_scores_dict,
Expand Down
16 changes: 9 additions & 7 deletions src/diffupy/process_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ def _load_data_input_from_file(path: str, **further_parse_args) -> Union[pd.Data

else:
raise IOError(
f'There is a problem with your file. Please ensure the file you submitted is correctly formatted with a'
f'.csv or .tsv file extension.'
'There is a problem with your file. Please ensure the file you submitted is correctly formatted with a'
'.csv or .tsv file extension.'
)


Expand Down Expand Up @@ -231,9 +231,9 @@ def _codify_input_data(

# Standardize the title of the node column labeling column to 'Label', for later processing.
if LABEL not in df.columns:
for l in list(df.columns):
if l in NODE_LABELING:
df = df.rename(columns={l: LABEL})
for column_label in list(df.columns):
if column_label in NODE_LABELING:
df = df.rename(columns={column_label: LABEL})
break

# If node type provided in a column, classify in a dictionary the input codification by its node type.
Expand Down Expand Up @@ -852,7 +852,8 @@ def format_categorical_input_vector_from_label_list(
)
)

return input_mat.match_missing_rows(kernel.rows_labels, missing_value).match_rows(kernel)
return input_mat.match_delete_rows(kernel.rows_labels).match_missing_rows(kernel.rows_labels,
missing_value).match_rows(kernel)


def format_categorical_input_matrix_from_label_list(
Expand Down Expand Up @@ -935,7 +936,8 @@ def format_input_vector_from_label_score_dict(
)
)

return input_mat.match_missing_rows(kernel.rows_labels, missing_value).match_rows(kernel)
return input_mat.match_delete_rows(kernel.rows_labels).match_missing_rows(kernel.rows_labels,
missing_value).match_rows(kernel)


def format_input_matrix_from_type_label_score_dict(
Expand Down