Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wf and tutorial extraction #233

Merged
merged 1 commit into from
Nov 7, 2024
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 sources/bin/extract_all_tutorials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ then
python sources/bin/extract_gtn_tutorials.py \
extract \
--all "communities/all/resources/test_tutorials.json" \
--tools "communities/all/resources/tools.json" \
--tools "communities/all/resources/test_tools.json" \
--api $PLAUSIBLE_API_KEY \
--test
else
Expand Down
2 changes: 1 addition & 1 deletion sources/bin/extract_all_workflows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if [ ! -z $1 ]
then
python sources/bin/extract_galaxy_workflows.py extract \
--all communities/all/resources/test_workflows.json \
--tools communities/all/resources/tools.json \
--tools communities/all/resources/test_tools.json \
--test
else
python sources/bin/extract_galaxy_workflows.py extract \
Expand Down
10 changes: 5 additions & 5 deletions sources/bin/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ def read_suite_per_tool_id(tool_fp: str) -> Dict:
tool_suites = load_json(tool_fp)
tools = {}
for suite in tool_suites:
for tool in suite["Galaxy tool ids"]:
for tool in suite["Suite ID"]:
tools[tool] = {
"Galaxy wrapper id": suite["Galaxy wrapper id"],
"Galaxy wrapper owner": suite["Galaxy wrapper id"],
"EDAM operation": suite["EDAM operation"],
"Suite ID": suite["Suite ID"],
"Suite owner": suite["Suite owner"],
"EDAM operations": suite["EDAM operations"],
}
return tools

Expand Down Expand Up @@ -154,7 +154,7 @@ def get_edam_operation_from_tools(selected_tools: list, all_tools: dict) -> List
edam_operation = set()
for t in selected_tools:
if t in all_tools:
edam_operation.update(set(all_tools[t]["EDAM operation"]))
edam_operation.update(set(all_tools[t]["EDAM operations"]))
else:
print(f"{t} not found in all tools")
return list(edam_operation)