From 803a9f4e2e5afaee8e3822ab358e8851549655ba Mon Sep 17 00:00:00 2001 From: Helena Rasche Date: Mon, 20 Nov 2023 12:49:51 +0100 Subject: [PATCH 1/3] fix bug in embeddable workflow listing --- workflows/embed.html | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/workflows/embed.html b/workflows/embed.html index 2808546cf21559..51dce0417cf1a1 100644 --- a/workflows/embed.html +++ b/workflows/embed.html @@ -61,14 +61,13 @@ } function search(params){ - const textQuery = params.get('query')?.toLowerCase(); - const filter_all = params.get('all')?.split(" ").map(f => f.trim().toLowerCase()); - const filter_any = params.get('any')?.split(" ").map(f => f.trim().toLowerCase()); - const filter_none = params.get('none')?.split(" ").map(f => f.trim().toLowerCase()); + const textQuery = params.get('query')?.toLowerCase().replace(/[^a-z0-9 ]/g, ''); + const filter_all = params.get('all')?.split(" ").map(f => f.trim().toLowerCase().replace(/[^a-z0-9 ]/g, '')); + const filter_any = params.get('any')?.split(" ").map(f => f.trim().toLowerCase().replace(/[^a-z0-9 ]/g, '')); + const filter_none = params.get('none')?.split(" ").map(f => f.trim().toLowerCase().replace(/[^a-z0-9 ]/g, '')); var to_hide = rows.filter(row => { - var text = clean(row.children[0].innerText.toLowerCase() + " " + - row.children[1].innerText.toLowerCase()); + var text = clean(row.children[0].innerText + " " + row.children[1].innerText); if (filter_all) { // Every term in filter_all must be present // Immediately reject if not all present. From 1eb5c84472ae9b3e93d8cf0448dc6b0031443df7 Mon Sep 17 00:00:00 2001 From: Helena Rasche Date: Mon, 20 Nov 2023 13:14:45 +0100 Subject: [PATCH 2/3] add news post about updated workflow search --- news/_posts/2023-11-20-workflow-search.md | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 news/_posts/2023-11-20-workflow-search.md diff --git a/news/_posts/2023-11-20-workflow-search.md b/news/_posts/2023-11-20-workflow-search.md new file mode 100644 index 00000000000000..7ac5b3ab99d096 --- /dev/null +++ b/news/_posts/2023-11-20-workflow-search.md @@ -0,0 +1,27 @@ +--- +title: "Update: Embeddable UseGalaxy Workflow List now includes searches WorkflowHub.eu" +contributions: + authorship: [hexylena] + testing: [paulzierep] +tags: [feature update, gtn] +layout: news +--- + +Based on [a request from Paul](https://github.com/galaxyproject/training-material/issues/4494), more advanced querying was needed. + +As such we've added a couple of alternative query parameters that you may use: + +Query Parameter | Example Values | Interpretation +--- | --- | --- +`?query=` | `?query=single-cell` | This will search for the text `singlecell` anywhere in the conjoined fields of title, tags, and authors. This is similar to `all` but will look for exact phrases including spaces, rather than splitting up queries word-by-word. +`?all=` | `?all=longreads+microbiome` | Each term, separated by a `+` (which is interpreted as a ` ` space character in URL parsing), must appear somewhere in those fields. If any term is missing, that workflow will not be included +`?any=` | `?any=longreads+shortread` | As long as one of these terms is present, the result will be shown. So long or short read workflows will match this query. (Assuming they're tagged properly!) +`?none=` | `?none=testing+training` | If you want to exclude one or more terms, you can list them here. + +Try some examples here: +- [microbiome tutorials, without nanopore]({% link workflows/embed.html %}?all=microbiome&none=nanopore) +- [single-cell tutorials using the 'old' text query]({% link workflows/embed.html %}?query=single-cell) +- [single-cell tutorials using the new ?all query (it's the same.)]({% link workflows/embed.html %}?all=single-cell) +- [Just Paul's workflows]({% link workflows/embed.html %}?all=paulzierep) + +If you have any ideas for new features or improvements, please [open an issue on GitHub](https://github.com/galaxyproject/training-material/issues/) From d500596cb10f0cb690088ab2091dfbf8fd9ee5a9 Mon Sep 17 00:00:00 2001 From: Helena Rasche Date: Mon, 20 Nov 2023 13:33:48 +0100 Subject: [PATCH 3/3] ok it seems nice enough now --- news/_posts/2023-11-20-workflow-search.md | 14 ++++++++++++-- workflows/embed.html | 9 ++++++++- workflows/list.html | 5 ++++- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/news/_posts/2023-11-20-workflow-search.md b/news/_posts/2023-11-20-workflow-search.md index 7ac5b3ab99d096..77ed2648252df7 100644 --- a/news/_posts/2023-11-20-workflow-search.md +++ b/news/_posts/2023-11-20-workflow-search.md @@ -1,12 +1,22 @@ --- -title: "Update: Embeddable UseGalaxy Workflow List now includes searches WorkflowHub.eu" +title: "Update: Workflow List now searches WorkflowHub.eu, advanced query syntax" contributions: authorship: [hexylena] - testing: [paulzierep] + testing: [paulzierep, wm75] tags: [feature update, gtn] layout: news --- +## WorkflowHub + +We have now added support for [WorkflowHub.eu](WorkflowHub.eu) in our [cross-galaxy workflow search]({% link workflows/list.html %}) interface that lets you find workflows from around the universe. The support for WorkflowHub helps us showcase all of the best-practice workflows currently available there! These can all be imported and run directly in Galaxy. + + + +The "Load in Galaxy" button uses our [my.galaxy.training]({{ site.baseurl }}/news/2023/04/20/my-galaxy-training.html) service to let you choose which Galaxy server you're redirected to. These links will work for any recent Galaxy server. + +## Querying + Based on [a request from Paul](https://github.com/galaxyproject/training-material/issues/4494), more advanced querying was needed. As such we've added a couple of alternative query parameters that you may use: diff --git a/workflows/embed.html b/workflows/embed.html index 51dce0417cf1a1..4048bdda206ee3 100644 --- a/workflows/embed.html +++ b/workflows/embed.html @@ -37,7 +37,14 @@ {{ workflow.updated }} {% for id in workflow.ids %} - {{ id[0] }} + {% if id[0] == "https://workflowhub.eu" %} + {{ id[0] }}
+ + Load in Galaxy +
+ {% else %} + {{ id[0] }} + {% endif %} {% endfor %} diff --git a/workflows/list.html b/workflows/list.html index 75793b3f52f26f..d728cc51e9ecb9 100644 --- a/workflows/list.html +++ b/workflows/list.html @@ -63,7 +63,10 @@ {% for id in workflow.ids %} {% if id[0] == "https://workflowhub.eu" %} - {{ id[0] }} + {{ id[0] }}
+ + Load in Galaxy + {% else %} {{ id[0] }} {% endif %}