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

Create interactive_pampa.xml #168

Open
wants to merge 60 commits into
base: release_23.0_europe
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
94fe574
EU: LOCALONLY Fix FTP URL in UI
gmauro Jul 23, 2020
78faa2a
EU: Favico
hexylena May 17, 2019
e38f7c6
EU: Expand velvet kmer values
hexylena May 15, 2019
c2325a9
EU: LOCALONLY fix loading of tools
hexylena Dec 11, 2018
e8335f5
EU: Add local phinch site in lieu of GIE
gmauro Jul 23, 2020
d954c79
EU: add SEEK data source
bgruening Sep 8, 2019
97422ca
EU: Adding support for juicer hic and test data for it (#49)
gmauro Jul 23, 2020
9ab22f5
add OMICS-DI
bgruening Jan 31, 2021
88c5b6b
Update recommendations.py
anuprulez Mar 6, 2023
1380505
EU: Add ARC Gitlab File Source Plugin
davelopez Mar 8, 2023
ca13546
Temporary disable Release Notes icon
davelopez Mar 15, 2023
18c90ba
backport new cellxgene tool
bgruening Mar 16, 2023
6011cff
add interactive_blobtoolkit.xml
bgruening Mar 24, 2023
9790105
change name of the interactive blobtool
bgruening Mar 24, 2023
5225c34
add interactive_blobtoolkit.xml
bgruening Mar 24, 2023
2128b21
change name of the interactive blobtool
bgruening Mar 24, 2023
db58507
updaged pangeo notebook and added pangeo ml-notebook for machine lear…
annefou Mar 26, 2023
6139a7a
Update MetaShARK for 1.7.3 version ok on 22.05
yvanlebras Apr 3, 2023
3fe5b53
Create interactivetool_audiolabeler.xml
yvanlebras Apr 3, 2023
4925da4
Fix issue with d3 js tree for tool recommendations (#153)
anuprulez Apr 5, 2023
1d7c2e4
Update interactive Blobtoolkit folder structure (#158)
gallardoalba Apr 6, 2023
046dc6b
Add DIVAnd interactive tool (#160)
Marie59 Apr 28, 2023
c150228
Try fixing ITs callback
bgruening May 1, 2023
df5b6ec
Add support for visualizing HDF5 datasets. This contribution is split…
jarrah42 Jan 25, 2023
b3ef2ae
Fix lint warnings
jarrah42 Jan 25, 2023
c673130
Fix data api test. Ran make format.
jarrah42 Jan 25, 2023
7d9d53d
Fix OpenAPI linting. Remove unused dependencies.
jarrah42 Jan 25, 2023
38b0d7f
Add dependency to data package.
jarrah42 Jan 26, 2023
e721757
Fix failing tests.
jarrah42 Jan 26, 2023
73f5ec1
Fix mypy errors
jarrah42 Jan 26, 2023
467715b
Fix another linting problem.
jarrah42 Jan 30, 2023
3f70374
Fix problems loading dataset in some instances.
jarrah42 Feb 9, 2023
fd0dff4
Fix linting and add type to input settings.
jarrah42 Apr 3, 2023
9f49713
Update @h5web to 7.1.0
jarrah42 May 4, 2023
1a3f5e9
Update python version upper pin
dannon May 5, 2023
ef408cc
remove generated file from git
ElectronicBlueberry May 5, 2023
a6a6cbc
update gitignore
ElectronicBlueberry May 5, 2023
586272c
Fixes the parcel2 build for hdf5 viz when using node18. The underlying
dannon May 5, 2023
f3b2712
Update interactivetool_divand.xml
bgruening May 13, 2023
d26545a
update DIVAnd
bgruening May 15, 2023
a0cc7e5
Add scoop3 from FAIR EASE as IT
bgruening May 17, 2023
8b49204
add citations
bgruening May 17, 2023
437c3bb
Add hdfview interactive tool
TheoMathurin May 17, 2023
2f22e41
small edits
bgruening May 17, 2023
1e8bef3
Update interactivetool_hdfview.xml
bgruening May 17, 2023
c5a6b61
don't start application after the server
bgruening May 17, 2023
a374ca8
few more fixes to hdfview
bgruening May 17, 2023
13748f7
Add hdf4 support to hdfview tool
TheoMathurin May 21, 2023
71e867c
Merge pull request #164 from TheoMathurin/add-hdf4-support
bgruening May 24, 2023
8fffd56
Odv (#166)
Marie59 Jun 7, 2023
587db02
Create interactivetool_metashrimps.xml (#167)
yvanlebras Jun 9, 2023
11e2a48
Create interactive_pampa.xml
yvanlebras Jun 10, 2023
7072895
Update interactive_pampa.xml
yvanlebras Jun 10, 2023
c9bcecc
add &&
yvanlebras Jun 10, 2023
956f97f
Finalize a first operational version of the app
yvanlebras Jun 10, 2023
4076736
Update interactive_pampa.xml
yvanlebras Jun 10, 2023
b393a8c
Update interactive_pampa.xml
yvanlebras Jun 10, 2023
bf01b20
Update and rename interactive_pampa.xml to interactivetool_pampa.xml
bgruening Jun 10, 2023
3138efc
Update interactivetool_pampa.xml
bgruening Jun 10, 2023
17e81cd
Update interactivetool_pampa.xml
yvanlebras Jun 10, 2023
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ workflow_schedulers_conf.xml
config/*
config/plugins/interactive_environments/**/*.ini
config/plugins/**/.cache
config/plugins/**/.parcel-cache
!config/plugins
static/welcome.html.*
static/welcome.html
Expand Down Expand Up @@ -179,6 +180,7 @@ config/plugins/**/static/*.map
# viz-specific build artifacts to ignore (until these are removed from codebase)
config/plugins/visualizations/annotate_image/static/jquery.contextMenu.css
config/plugins/visualizations/nvd3/nvd3_bar/static/nvd3.js
config/plugins/visualizations/h5web/static/script.css

# CWL conformance tests
lib/galaxy_test/api/cwl/test_cwl_conformance_v1_?.py
Expand Down
7 changes: 6 additions & 1 deletion client/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const STATIC_PLUGIN_BUILD_IDS = [
"drawrna",
"editor",
"example",
"h5web",
"heatmap/heatmap_default",
"hyphyvision",
"jqplot/jqplot_bar",
Expand Down Expand Up @@ -156,7 +157,11 @@ function buildPlugins(callback, forceRebuild) {
};
// if node version is >16, set NODE_OPTIONS to use legacy openssl provider
if (process.versions.node.split(".")[0] > "16") {
opts.env = { ...process.env, NODE_OPTIONS: "--openssl-legacy-provider" };
opts.env = {
...process.env,
PARCEL_WORKER_BACKEND: "process",
NODE_OPTIONS: "--openssl-legacy-provider",
};
}
if (child_process.spawnSync("yarn", ["build"], opts).status === 0) {
console.log(`Successfully built, saving build state to ${hashFilePath}`);
Expand Down
121 changes: 63 additions & 58 deletions client/src/components/ToolRecommendation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,32 +86,59 @@ export default {
const duration = 750;
const maxTextLength = 20;
const svg = d3.select("#tool-recommendation").append("svg").attr("class", "tree-size").append("g");
const gElem = svg[0][0];
const svgElem = gElem.parentNode;
const svgElem = svg.node().parentElement;
const clientH = svgElem.clientHeight;
const clientW = svgElem.clientWidth;
const translateX = parseInt(clientW * 0.15);

svgElem.setAttribute("viewBox", -translateX + " 0 " + 0.5 * clientW + " " + clientH);
svgElem.setAttribute("preserveAspectRatio", "xMidYMid meet");

const tree = d3.tree().size([clientH, clientW]);
const diagonal = d3.svg.diagonal().projection((d) => {
return [d.y, d.x];
const d3Tree = d3.tree().size([clientH, clientW]);
root = d3.hierarchy(predictedTools, (d) => {
return d.children;
});
root.x0 = parseInt(clientH / 2);
root.y0 = 0;
const collapse = (d) => {
if (d.children) {
d._children = d.children;
d._children.forEach(collapse);
d.children = null;
}
};
root.children.forEach(collapse);
const diagonal = (s, d) => {
const path = `M ${s.y} ${s.x}
C ${(s.y + d.y) / 2} ${s.x},
${(s.y + d.y) / 2} ${d.x},
${d.y} ${d.x}`;
return path;
};
const click = (e, d) => {
if (d.children) {
d._children = d.children;
d.children = null;
} else {
d.children = d._children;
d._children = null;
}
if (d.parent == null) {
update(d);
}
const tId = d.data.id;
if (tId !== undefined && tId !== "undefined" && tId !== null && tId !== "") {
document.location.href = `${getAppRoot()}tool_runner?tool_id=${tId}`;
}
};
const update = (source) => {
// Compute the new tree layout.
const nodes = tree.nodes(root).reverse();
const links = tree.links(nodes);
// Normalize for fixed-depth.
const predictedTools = d3Tree(root);
const nodes = predictedTools.descendants();
const links = predictedTools.descendants().slice(1);
nodes.forEach((d) => {
d.y = d.depth * (clientW / 10);
});
// Update the nodes
const node = svg.selectAll("g.node").data(nodes, (d) => {
return d.id || (d.id = ++i);
});
// Enter any new nodes at the parent's previous position.
const nodeEnter = node
.enter()
.append("g")
Expand All @@ -120,97 +147,75 @@ export default {
return "translate(" + source.y0 + "," + source.x0 + ")";
})
.on("click", click);
nodeEnter.append("circle").attr("r", 1e-6);
nodeEnter.append("circle").attr("class", "node").attr("r", 1e-6);
nodeEnter
.append("text")
.attr("dy", ".35em")
.attr("x", (d) => {
return d.children || d._children ? -10 : 10;
})
.attr("dy", ".35em")
.attr("text-anchor", (d) => {
return d.children || d._children ? "end" : "start";
})
.text((d) => {
const tName = d.name;
const tName = d.data.name;
if (tName.length > maxTextLength) {
return tName.slice(0, maxTextLength) + "...";
}
return d.name;
return d.data.name;
});
nodeEnter.append("title").text((d) => {
return d.children || d._children ? d.name : "Open tool - " + d.name;
return d.children ? d.data.name : "Open tool - " + d.data.name;
});
// Transition nodes to their new position.
const nodeUpdate = node
const nodeUpdate = nodeEnter.merge(node);
nodeUpdate
.transition()
.duration(duration)
.attr("transform", (d) => {
return "translate(" + d.y + "," + d.x + ")";
});
nodeUpdate.select("circle").attr("r", 2.5);
// Transition exiting nodes to the parent's new position.
node.exit()
nodeUpdate.select("circle.node").attr("r", 2.5);
const nodeExit = node
.exit()
.transition()
.duration(duration)
.attr("transform", (d) => {
return "translate(" + source.y + "," + source.x + ")";
})
.remove();
// Update the links
nodeExit.select("circle").attr("r", 1e-6);
const link = svg.selectAll("path.link").data(links, (d) => {
return d.target.id;
return d.data.id;
});
// Enter any new links at the parent's previous position.
link.enter()
const linkEnter = link
.enter()
.insert("path", "g")
.attr("class", "link")
.attr("d", (d) => {
const o = { x: source.x0, y: source.y0 };
return diagonal({ source: o, target: o });
return diagonal(o, o);
});
const linkUpdate = linkEnter.merge(link);
linkUpdate
.transition()
.duration(duration)
.attr("d", (d) => {
return diagonal(d, d.parent);
});
// Transition links to their new position.
link.transition().duration(duration).attr("d", diagonal);
// Transition exiting nodes to the parent's new position.
link.exit()
.transition()
.duration(duration)
.attr("d", (d) => {
const o = { x: source.x, y: source.y };
return diagonal({ source: o, target: o });
return diagonal(o, o);
})
.remove();
// Stash the old positions for transition.
nodes.forEach((d) => {
d.x0 = d.x;
d.y0 = d.y;
});
};
// Toggle children on click.
const click = (d) => {
if (d.children) {
d._children = d.children;
d.children = null;
} else {
d.children = d._children;
d._children = null;
}
update(d);
const tId = d.id;
if (tId !== undefined && tId !== "undefined" && tId !== null && tId !== "") {
document.location.href = `${getAppRoot()}tool_runner?tool_id=${tId}`;
}
};
const collapse = (d) => {
if (d.children) {
d._children = d.children;
d._children.forEach(collapse);
d.children = null;
}
};
root = predictedTools;
root.x0 = parseInt(clientH / 2);
root.y0 = 0;
root.children.forEach(collapse);
update(root);
},
},
Expand Down
2 changes: 1 addition & 1 deletion client/src/mvc/upload/upload-ftp.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default Backbone.View.extend({
help_enabled: true,
oidc_text: `<br/>If you are signed-in to Galaxy using a third-party identity and you <strong>do not have a Galaxy password</strong> please use the reset password option in the login form with your email to create a password for your account.`,
help_text: `This Galaxy server allows you to upload files via FTP. To upload some files, log in to the FTP server at <strong>${options.ftp_upload_site}</strong> using your Galaxy credentials.
For help visit the <a href="https://galaxyproject.org/ftp-upload/" target="_blank">tutorial</a>.`,
For help visit the <a href="https://galaxyproject.eu/ftp/" target="_blank">documentation</a>.`,
collection: null,
onchange: function () {},
onadd: function () {},
Expand Down
38 changes: 38 additions & 0 deletions client/src/schema/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ export interface paths {
*/
get: operations["show_api_datasets__dataset_id__get"];
};
"/api/datasets/{dataset_id}/content/{content_type}": {
/** Retrieve information about the content of a dataset. */
get: operations["get_structured_content_api_datasets__dataset_id__content__content_type__get"];
};
"/api/datasets/{dataset_id}/converted": {
/**
* Return a a map with all the existing converted datasets associated with this instance.
Expand Down Expand Up @@ -2339,6 +2343,12 @@ export interface components {
* @description Represents a collection of elements contained in the dataset collection.
*/
DatasetCollectionContentElements: components["schemas"]["DCESummary"][];
/**
* DatasetContentType
* @description For retrieving content from a structured dataset (e.g. HDF5)
* @enum {string}
*/
DatasetContentType: "meta" | "attr" | "stats" | "data";
/**
* DatasetErrorMessage
* @description Base model definition with common configuration used by all derived models.
Expand Down Expand Up @@ -7957,6 +7967,34 @@ export interface operations {
};
};
};
get_structured_content_api_datasets__dataset_id__content__content_type__get: {
/** Retrieve information about the content of a dataset. */
parameters: {
/** @description The user ID that will be used to effectively make this API call. Only admins and designated users can make API calls on behalf of other users. */
header?: {
"run-as"?: string;
};
/** @description The encoded database identifier of the dataset. */
path: {
dataset_id: string;
content_type: components["schemas"]["DatasetContentType"];
};
};
responses: {
/** @description Successful Response */
200: {
content: {
"application/json": Record<string, never>;
};
};
/** @description Validation Error */
422: {
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
converted_api_datasets__dataset_id__converted_get: {
/**
* Return a a map with all the existing converted datasets associated with this instance.
Expand Down
22 changes: 22 additions & 0 deletions config/plugins/visualizations/h5web/config/h5web.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE visualization SYSTEM "../../visualization.dtd">
<visualization name="H5Web" embeddable="false">
<description>HDF5 data visualization and exploration</description>
<data_sources>
<data_source>
<model_class>HistoryDatasetAssociation</model_class>
<test type="isinstance" test_attr="datatype" result_type="datatype">binary.H5</test>
</data_source>
</data_sources>
<params>
<param type="dataset" var_name_in_template="hda" required="true">dataset_id</param>
</params>
<entry_point entry_point_type="chart" src="script.js" css="script.css"/>
<settings>
<input>
<name>explorer</name>
<value>false</value>
<type>boolean</type>
</input>
</settings>
</visualization>
27 changes: 27 additions & 0 deletions config/plugins/visualizations/h5web/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "visualization",
"version": "0.1.0",
"keywords": [
"galaxy",
"visualization"
],
"license": "AFL-3.0",
"dependencies": {
"@galaxyproject/charts": "^0.0.6",
"@h5web/app": "^7.1.0",
"backbone": "^1.3.3",
"normalize.css": "^8.0.1",
"react": "17.0.2",
"react-dom": "17.0.2"
},
"scripts": {
"build": "parcel build src/script.js --dist-dir static"
},
"devDependencies": {
"@types/react": "^17.0.52",
"@types/react-dom": "^17.0.18",
"buffer": "^5.7.1",
"parcel": "^2.0.0",
"typescript": "4.9.3"
}
}
47 changes: 47 additions & 0 deletions config/plugins/visualizations/h5web/src/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* Visualizer interface for h5web (https://github.com/silx-kit/h5web)
*
* This relies on Galaxy being able to serve files using the
* h5grove protocol (https://silx-kit.github.io/h5grove/).
* This provides efficient access to the contents of the
* HDF5 file and avoids having to read the whole file at any
* point.
*/

import './styles.css';
import React, { StrictMode } from 'react'
import {render as reactRender} from 'react-dom'
import {App, H5GroveProvider} from '@h5web/app'

function MyApp(props) {
return (
<H5GroveProvider
url={props.url}
filepath={props.name}
axiosConfig={{ params: { file: props.name } }}
>
<App explorerOpen={props.explorer} />
</H5GroveProvider>
);
}

window.bundleEntries = window.bundleEntries || {};
window.bundleEntries.load = function (options) {
var dataset = options.dataset;
var settings = options.chart.settings;
var explorer = settings.get('explorer');
var url = window.location.origin + "/api/datasets/" + dataset.id + "/content";
reactRender(
<MyApp
url={url}
name={dataset.name}
filepath={dataset.file_name}
explorer={explorer}
/>,
document.getElementById(options.target)
)
options.chart.state('ok', 'Chart drawn.');
options.process.resolve();
};

export default MyApp;
Loading