Skip to content

Commit

Permalink
Add table with all tools
Browse files Browse the repository at this point in the history
  • Loading branch information
bebatut committed Nov 2, 2023
1 parent 205e641 commit 2d8ad6e
Show file tree
Hide file tree
Showing 5 changed files with 25,974 additions and 62 deletions.
6 changes: 4 additions & 2 deletions bin/create_interactive_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ def generate_table(
output_path: str,
) -> None:
df = pd.read_csv(tsv_path, sep="\t").assign(Expand=lambda df: "").fillna("")
df["To keep"] = df["To keep"].replace("", True)
df = df.query("`To keep`").loc[:, COLUMNS].reindex(columns=COLUMNS)
if "To keep" in df.columns:
df["To keep"] = df["To keep"].replace("", True)
df = df.query("`To keep`")
df = df.loc[:, COLUMNS].reindex(columns=COLUMNS)
table = df.to_html(border=0, table_id="dataframe", classes=["display", "nowrap"], index=False)

with open(template_path) as template_file:
Expand Down
7 changes: 6 additions & 1 deletion bin/extract_all_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@ mkdir -p 'results/'
python bin/extract_galaxy_tools.py \
extractools \
--api $GITHUB_API_KEY \
--all_tools 'results/all_tools.tsv'
--all_tools 'results/all_tools.tsv'

python bin/create_interactive_table.py \
--table "results/all_tools.tsv" \
--template "data/interactive_table_template.html" \
--output "results/index.html"
58 changes: 0 additions & 58 deletions data/datatable_template.html

This file was deleted.

2 changes: 1 addition & 1 deletion data/interactive_table_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
background-color: #00FFFF;
color: #000000;
min-width: 400px;
}
}
</style>

<script>
Expand Down
Loading

0 comments on commit 2d8ad6e

Please sign in to comment.