Skip to content

Commit

Permalink
Update recommendations.py
Browse files Browse the repository at this point in the history
  • Loading branch information
anuprulez authored Jun 3, 2024
1 parent f559dd8 commit c46d09b
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lib/galaxy/tools/recommendations.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,7 @@ def __filter_tool_predictions(self, trans, prediction_data, tool_ids, tool_score
c_dict = {}
for t_id in self.all_tools:
# select the name and tool id if it is installed in Galaxy
if (
t_id == child
and score >= 0.0
and child not in self.deprecated_tools
and child != last_tool_name
):
if t_id == child and score >= 0.0 and child not in self.deprecated_tools and child != last_tool_name:
full_tool_id = self.all_tools[t_id][0]
pred_input_extensions, _ = self.__get_tool_extensions(trans, full_tool_id)
c_dict["name"] = self.all_tools[t_id][1]
Expand Down Expand Up @@ -278,9 +273,7 @@ def __get_predicted_tools(self, pub_tools, predictions, last_tool_name, topk):
t_intersect, u_intersect = self.__sort_by_usage(
t_intersect, self.tool_weights_sorted, self.model_data_dictionary
)
t_diff, u_diff = self.__sort_by_usage(
t_diff, self.tool_weights_sorted, self.model_data_dictionary
)
t_diff, u_diff = self.__sort_by_usage(t_diff, self.tool_weights_sorted, self.model_data_dictionary)
t_intersect_compat = list(set(last_compatible_tools).intersection(set(t_diff)))
# filter against rare bad predictions for any tool
if len(t_intersect_compat) > 0:
Expand Down

0 comments on commit c46d09b

Please sign in to comment.