Skip to content

Commit

Permalink
fix tool filter
Browse files Browse the repository at this point in the history
  • Loading branch information
paulzierep committed Jul 18, 2024
1 parent 3096f46 commit 68f8311
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions bin/extract_galaxy_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,9 +761,16 @@ def get_tools(repo_list: list, edam_ontology: dict) -> List[Dict]:

# filter tool lists
ts_filtered_tools, filtered_tools = filter_tools(tools, categories, status)
export_tools_to_tsv(ts_filtered_tools, args.ts_filtered, format_list_col=True)
# if there are no filtered tools return the ts filtered tools
if filtered_tools:
export_tools_to_tsv(filtered_tools, args.filtered, format_list_col=True)

if ts_filtered_tools:

export_tools_to_tsv(ts_filtered_tools, args.ts_filtered, format_list_col=True)
# if there are no filtered tools return the ts filtered tools
if filtered_tools:
export_tools_to_tsv(filtered_tools, args.filtered, format_list_col=True)
else:
export_tools_to_tsv(ts_filtered_tools, args.filtered, format_list_col=True)

else:
export_tools_to_tsv(ts_filtered_tools, args.filtered, format_list_col=True)
# if there are no ts filtered tools
print(f"No tools found for category {args.filtered}")

0 comments on commit 68f8311

Please sign in to comment.