galaxy-charts 0.0.21 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/galaxy-charts.css +1 -0
- package/dist/galaxy-charts.js +21275 -0
- package/dist/galaxy-charts.umd.cjs +2073 -0
- package/{src/types.ts → dist/types.d.ts} +8 -7
- package/package.json +7 -1
- package/.github/workflows/main.yml +0 -64
- package/.vscode/extensions.json +0 -3
- package/docs/.vitepress/cache/deps/_metadata.json +0 -40
- package/docs/.vitepress/cache/deps/chunk-G3PMV62Z.js +0 -36
- package/docs/.vitepress/cache/deps/chunk-G3PMV62Z.js.map +0 -7
- package/docs/.vitepress/cache/deps/chunk-XYSSNQS4.js +0 -12492
- package/docs/.vitepress/cache/deps/chunk-XYSSNQS4.js.map +0 -7
- package/docs/.vitepress/cache/deps/naive-ui.js +0 -107113
- package/docs/.vitepress/cache/deps/naive-ui.js.map +0 -7
- package/docs/.vitepress/cache/deps/package.json +0 -3
- package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +0 -4494
- package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +0 -7
- package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +0 -9345
- package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +0 -7
- package/docs/.vitepress/cache/deps/vue.js +0 -344
- package/docs/.vitepress/cache/deps/vue.js.map +0 -7
- package/docs/.vitepress/config.mts +0 -55
- package/docs/.vitepress/theme/index.js +0 -7
- package/docs/.vitepress/theme/tailwind.css +0 -7
- package/docs/content/configuration.md +0 -45
- package/docs/content/deploy-plugin.md +0 -22
- package/docs/content/deploy-request.md +0 -65
- package/docs/content/installation.md +0 -42
- package/docs/content/introduction.md +0 -45
- package/docs/content/vue-introduction.md +0 -38
- package/docs/content/vue-utilities.md +0 -70
- package/docs/content/xml-datasources.md +0 -34
- package/docs/content/xml-framework.md +0 -140
- package/docs/content/xml-inputs.md +0 -248
- package/docs/content/xml-introduction.md +0 -23
- package/docs/content/xml-sections.md +0 -50
- package/docs/index.md +0 -27
- package/docs/package-lock.json +0 -4203
- package/docs/package.json +0 -21
- package/docs/postcss.config.js +0 -6
- package/docs/public/eslint.svg +0 -7
- package/docs/public/galaxy-charts-demo.gif +0 -0
- package/docs/public/galaxy-charts-starter.jpg +0 -0
- package/docs/public/galaxy-charts.svg +0 -7
- package/docs/public/javascript.svg +0 -8
- package/docs/public/naive-ui.svg +0 -9
- package/docs/public/next-js.svg +0 -25
- package/docs/public/nuxt.svg +0 -3
- package/docs/public/prettier.svg +0 -46
- package/docs/public/react.svg +0 -1
- package/docs/public/tailwind.svg +0 -12
- package/docs/public/typescript.svg +0 -8
- package/docs/public/vite.svg +0 -15
- package/docs/public/vitest.svg +0 -9
- package/docs/public/vue.svg +0 -8
- package/docs/public/vuetify.svg +0 -9
- package/docs/tailwind.config.js +0 -9
- package/index.html +0 -13
- package/lib/galaxy-charts.js +0 -7
- package/postcss.config.js +0 -6
- package/prettier.config.js +0 -5
- package/public/galaxy-charts.xml +0 -138
- package/src/App.vue +0 -23
- package/src/Plugin.vue +0 -37
- package/src/api/client.ts +0 -46
- package/src/api/datasets.ts +0 -34
- package/src/api/visualizations.ts +0 -33
- package/src/components/AlertNotify.vue +0 -35
- package/src/components/ApiStatus.vue +0 -39
- package/src/components/GalaxyCharts.vue +0 -136
- package/src/components/InputConditional.vue +0 -109
- package/src/components/InputData.vue +0 -74
- package/src/components/InputDataColumn.vue +0 -54
- package/src/components/InputForm.vue +0 -119
- package/src/components/InputRepeats.vue +0 -70
- package/src/components/SidePanel.vue +0 -158
- package/src/main.js +0 -27
- package/src/store/columnsStore.ts +0 -59
- package/src/store/configStore.ts +0 -29
- package/src/style.css +0 -3
- package/src/utilities/getFileName.test.js +0 -8
- package/src/utilities/getFileName.ts +0 -4
- package/src/utilities/parseColumns.ts +0 -34
- package/src/utilities/parseDefaults.test.js +0 -13
- package/src/utilities/parseDefaults.ts +0 -17
- package/src/utilities/parseIncoming.ts +0 -32
- package/src/utilities/parsePlugin.ts +0 -95
- package/src/utilities/parseXML.ts +0 -156
- package/src/utilities/simpleError.ts +0 -21
- package/src/utilities/toBoolean.test.js +0 -12
- package/src/utilities/toBoolean.ts +0 -5
- package/tailwind.config.js +0 -8
- package/tsconfig.json +0 -28
- package/vite.config.js +0 -70
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
# Utilities
|
|
2
|
-
|
|
3
|
-
Galaxy Charts is bundled with utilities to simplify interaction with Galaxy.
|
|
4
|
-
|
|
5
|
-
## Function: `fetchColumns`
|
|
6
|
-
|
|
7
|
-
### Description
|
|
8
|
-
Fetches and caches tabular column data from a Galaxy server for use in visualizations. This utility function simplifies access to specific columns within a dataset by retrieving data based on column identifiers provided in the form of keys.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
### Syntax
|
|
13
|
-
```javascript
|
|
14
|
-
const store = useColumnsStore();
|
|
15
|
-
const response = await store.fetchColumns(datasetId, tracks, keys);
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
### Parameters
|
|
19
|
-
|
|
20
|
-
| Variable | Type | Description |
|
|
21
|
-
|----------|------|-------------|
|
|
22
|
-
| **datasetId** | `string` | The unique ID of the tabular dataset on the Galaxy server. |
|
|
23
|
-
| **tracks** | `Array<Object>` | An array of track objects, each containing attribute-value pairs where values represent column indices. |
|
|
24
|
-
| **keys** | `Array<string>` | An array of attribute names from the tracks array, each specifying a column number to fetch. |
|
|
25
|
-
|
|
26
|
-
### Return Value
|
|
27
|
-
|
|
28
|
-
Returns an `Array<Object>`, where each object represents a track with properties defined by the keys in `keys`. Each property contains an array of data from the specified column.
|
|
29
|
-
|
|
30
|
-
### Example
|
|
31
|
-
|
|
32
|
-
Here’s an example of using fetchColumns to prepare data for a plot library.
|
|
33
|
-
|
|
34
|
-
```javascript
|
|
35
|
-
// Define input parameters
|
|
36
|
-
const datasetId = "Dataset ID of tabular dataset with 4 or more columns"
|
|
37
|
-
const tracks [{ color: "blue", name: "Series 1", x: 0, y: 1 },
|
|
38
|
-
{ color: "gray", name: "Series 2", x: 2, y: 3 }];
|
|
39
|
-
const keys = ["x", "y"];
|
|
40
|
-
|
|
41
|
-
// Make request to column data provider of Galaxy instance
|
|
42
|
-
const store = useColumnsStore();
|
|
43
|
-
const response = await store.fetchColumns(datasetId, tracks, keys);
|
|
44
|
-
|
|
45
|
-
// Prepare results for plotting library
|
|
46
|
-
const plotData = [];
|
|
47
|
-
response.forEach((columns, index) => {
|
|
48
|
-
const track = props.tracks[index];
|
|
49
|
-
plotData.push({
|
|
50
|
-
marker: {
|
|
51
|
-
color: track.color,
|
|
52
|
-
},
|
|
53
|
-
name: track.name,
|
|
54
|
-
x: columns.x,
|
|
55
|
-
y: columns.y,
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
In this example, `columnsList` provides the column data for each track, which is then mapped to `x` and `y` values for plotting. Each track object is styled based on properties like `color` and `name`, before rendering.
|
|
61
|
-
|
|
62
|
-
### Remarks
|
|
63
|
-
|
|
64
|
-
- **Galaxy API Dependency**: This function depends on Galaxy's API to retrieve column data, so ensure that you are connected to a Galaxy server.
|
|
65
|
-
|
|
66
|
-
- **Data Formatting**: The function structures the returned data to align with the attributes specified in keys, simplifying its direct use in visualizations.
|
|
67
|
-
|
|
68
|
-
- **Caching**: Data is cached for efficient access; repeated calls with the same datasetId, tracks, and keys avoid redundant requests to the server.
|
|
69
|
-
|
|
70
|
-
This utility is particularly useful for quickly integrating Galaxy’s tabular data with visualization libraries, allowing for flexible and efficient data handling.
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
outline: deep
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Data Sources
|
|
6
|
-
|
|
7
|
-
The Data Sources section is required in the Visualization XML to inform Galaxy of the compatible data types for your visualization.
|
|
8
|
-
|
|
9
|
-
```xml
|
|
10
|
-
<data_sources>
|
|
11
|
-
<data_source>
|
|
12
|
-
<model_class>HistoryDatasetAssociation</model_class>
|
|
13
|
-
<test test_attr="ext" result_type="datatype">{{ COMPATIBLE_EXTENSION }}</test>
|
|
14
|
-
<to_param param_attr="id">dataset_id</to_param>
|
|
15
|
-
</data_source>
|
|
16
|
-
</data_sources>
|
|
17
|
-
<params>
|
|
18
|
-
<param type="dataset" var_name_in_template="hda" required="true">dataset_id</param>
|
|
19
|
-
</params>
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Galaxy supports a variety of datatype extensions:
|
|
23
|
-
<span v-for="(dt, index) of DATATYPES" class="font-italic">
|
|
24
|
-
<span>`{{ dt }}`</span>
|
|
25
|
-
<span v-if="index === DATATYPES.length - 1">.</span>
|
|
26
|
-
<span v-else>,</span>
|
|
27
|
-
</span>
|
|
28
|
-
|
|
29
|
-
For more information on datatypes please refer to the Galaxy Documentation at: https://docs.galaxyproject.org/en/master/dev/data_types.html.
|
|
30
|
-
|
|
31
|
-
<script setup>
|
|
32
|
-
const DATATYPES = ["4dn_pairs","4dn_pairsam","a3m","ab1","affybatch","agilentbrukeryep.d.tar","agilentmasshunter.d.tar","agp","ampvis2","analyze75","arff","asn1","asn1-binary","augustus","avi","axt","bam","bcf","bcf_uncompressed","bcsl.model","bcsl.ts","bed","bed12","bed6","bed_tabix.gz","bedgraph","bedstrict","bgzip","bigbed","bigwig","bil","biom1","biom2","blastxml","blib","bref3","brukerbaf.d.tar","brukertdf.d.tar","bus","castep","cel","cell","chain","chira.sqlite","chrint","cif","cisml","ckpt","cmap","cml","cnn","cnr","cns","colab.tar","colab.tar.gz","consensusxml","cool","cps","cpt","cram","csfasta","csv","ct","ctl.result","cuffdiff.sqlite","cxb","d3_hierarchy","daa","dada2_dada","dada2_errorrates","dada2_mergepairs","dada2_sequencetable","dada2_uniques","dbn","dbnsfp.tabular","dcd","deeptools_compute_matrix_archive","deeptools_coverage_matrix","den_fmt","dlib","drf","dta","dta2d","dzi","edr","edta","eland","elandmulti","elib","embl","encodepeak","eset","excel.xls","expression.json","extxyz","fai","fast5.tar","fast5.tar.bz2","fast5.tar.gz","fast5.tar.xz","fasta","fasta.gz","fastg","fastk_hist","fastk_ktab","fastk_prof","fastq","fastq.bz2","fastq.gz","fastqcssanger","fastqcssanger.bz2","fastqcssanger.gz","fastqillumina","fastqillumina.bz2","fastqillumina.gz","fastqsanger","fastqsanger.bz2","fastqsanger.gz","fastqsolexa","fastqsolexa.bz2","fastqsolexa.gz","fcs","featurexml","ffdata","ffindex","fits","flowclr","flowframe","flowmfi","flowscore","flowset","flowstat1","flowstat2","flowstat3","flowtext","flv","fped","fphe","fps","fqtoc","fsom","gafa.sqlite","gal","gatk_dbsnp","gatk_interval","gatk_recal","gatk_report","gatk_tranche","gemini.sqlite","genbank","genbank.gz","genenotebook","geojson","gfa1","gfa1.gz","gfa2","gfa2.gz","gff","gff3","gff3.bz2","gff3.gz","gff_tabix.gz","gii","gii.gz","gmsh.geo","gmsh.msh","gpr","grd","grd.tgz","grib","gro","gtf","h5","h5ad","h5mlm","hdf4","hdr","hdt","hep.root","hexrd.accepted_orientations","hexrd.eta_ome.npz","hexrd.images.npz","hexrd.materials.h5","hexrd.scored_orientations.npz","hexrd.yml","hhr","hlf","hmm2","hmm3","icm","idat","ideaspre","idpdb","idxml","imgt.json","imzml","inchi","inp","inpcrd","intermine_tabular","interval","ipynb","isa-json","isa-tab","itp","jellyfish","jp2","json","jsonld","juicer_medium_tabix.gz","kallisto.idx","kroenik","lav","ldindep","len","loom","lped","ludwig_model","maf","magres","malist","mascotxml","maskinfo-asn1","maskinfo-asn1-binary","mcool","mdp","memepsp","memexml","meryldb","metacyto_clr.txt","metacyto_stats.txt","metacyto_summary.txt","mgf","mkv","mol","mol2","mongodb","mothur.accnos","mothur.align","mothur.align.check","mothur.align.report","mothur.axes","mothur.cons.taxonomy","mothur.count_table","mothur.design","mothur.dist","mothur.filter","mothur.filtered.masked.quan","mothur.filtered.quan","mothur.freq","mothur.groups","mothur.list","mothur.lower.dist","mothur.map","mothur.masked.quan","mothur.names","mothur.oligos","mothur.otu","mothur.otu.corr","mothur.otulabels","mothur.pair.dist","mothur.quan","mothur.rabund","mothur.rdp.taxonomy","mothur.ref.taxonomy","mothur.relabund","mothur.sabund","mothur.seq.taxonomy","mothur.sff.flow","mothur.shared","mothur.square.dist","mothur.summary","mothur.tax.summary","mothur.tre","mov","mp3","mp4","mpg","mrc","mrm","ms2","msh","msp","mtx","mz.sqlite","mz5","mzdata","mzid","mzml","mzq","mzqc","mztab","mztab2","mzxml","n3","ncbi_genome_dataset.zip","ncbitaxonomy.sqlite","ndx","neostore.zip","neper.mscell","neper.points","neper.points.tsv","neper.tesr","neper.tess","netcdf","newick","nex","nhx","nii1","nii1.gz","nii2","nii2.gz","nmrml","npy","npz","nt","obfs","obo","odgi","ogg","ome.tiff","onnx","osw","owl","oxlicg","oxligl","oxling","oxliss","oxlist","oxlits","paf","paf.gz","par","param","paramxml","parquet","pbed","pdb","pdbqt","pdf","peff","peplist","peptideshaker_archive","pepxml","pepxml.tsv","phar","phylip","phyloseq","phyloxml","picard_interval_list","pileup","pithya.model","pithya.property","pithya.result","plyascii","plybinary","png","pod5","postgresql","pov","pphe","pqp","pqr","pretext","prj","prmtop","probam","probed","protobuf2","protobuf3","protxml","protxml.tsv","psl","psms","pssm-asn1","ptkscmp","qcml","qiime2.tabular","qname_sorted.bam","qual454","qualillumina","qualsolexa","qualsolid","qza","qzv","rdata","rdata.camera.negative","rdata.camera.positive","rdata.camera.quick","rdata.msnbase.raw","rdata.sce","rdata.se","rdata.xcms.fillpeaks","rdata.xcms.findchrompeaks","rdata.xcms.group","rdata.xcms.raw","rdata.xcms.retcor","rdf","rdock_as","rds","rma6","rna_eps","sam","sbml","sbol","scf","scidx","scool","sdf","searchgui_archive","sf3","sff","shp","sif","smat","smi","snaphmm","snpeffdb","snpmatrix","snpsiftdbnsfp","snptest","source.c","source.cpp","source.cs","source.go","source.h","source.py","source.rs","spalndba","spalndbnp","spec.xml","splib","splib_noindex","sqlite","sqmass","sra","sra_manifest.tabular","star","stl","stockholm","storm.check","storm.sample","tabular","tabular.gz","tandem","tar","taxonomy","tck","textgrid","tgz","thermo.raw","tiff","toml","top","tpr","trackhub","trafoxml","traml","trk","trr","tsv","ttl","twobit","txt","ucsc.net","uniprotxml","unsorted.bam","vcf","vcf_bgzip","vel","velvet","vg","visium.tar.gz","vtkascii","vtkbinary","watersmasslynx.raw.tar","wav","webm","wiff","wiff.tar","wiff2","wiff2.tar","wig","wma","wmv","xg","xgmml","xlsx","xmfa","xml","xquest.xml","xsd","xtc","xvg","xyz","yaml","zip","zset.geof"];
|
|
33
|
-
|
|
34
|
-
</script>
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
# Understanding the Galaxy Visualization Framework
|
|
2
|
-
|
|
3
|
-
The following sections are not mandatory for developing Galaxy Charts visualizations, but they offer valuable insights into Galaxy's underlying visualization framework. These details enhance understanding of the framework’s flexibility and the range of possibilities it offers.
|
|
4
|
-
|
|
5
|
-
## XML Parsing During Galaxy Startup
|
|
6
|
-
|
|
7
|
-
Let's break down the XML structure and examine how Galaxy processes it to understand the Galaxy visualization framework. This will highlight the full capabilities of the framework, which can support any JavaScript-based plugin, not just Vue-based ones.
|
|
8
|
-
|
|
9
|
-
Galaxy expects the XML file to reside in the `config` subdirectory of the visualization plugin. This file should be accessible from the Galaxy root directory at `config/plugins/visualizations/MY_VISUALIZATION/config/MY_VISUALIZATION.xml`.
|
|
10
|
-
|
|
11
|
-
On startup, Galaxy validates the XML file and adds the visualization to the list available in the activity bar. It also scans the XML for a `requirements` tag. When detected, Galaxy installs the specified npm packages and copies all files from each package’s `static` directory to `config/plugins/visualizations/MY_VISUALIZATION/static`.
|
|
12
|
-
|
|
13
|
-
This completes the installation of the visualization in Galaxy.
|
|
14
|
-
|
|
15
|
-
## Selection and Dataset Assignment
|
|
16
|
-
|
|
17
|
-
When a user selects a visualization in the Galaxy interface, Galaxy requires a dataset to be assigned to it. It will either select a dataset from the user's history, or prompt the user to choose a compatible dataset. For information on specifying compatible data types, see the `data_sources` XML section in [Data Sources](xml-datasources).
|
|
18
|
-
|
|
19
|
-
## Initialization Process
|
|
20
|
-
|
|
21
|
-
Once the visualization and dataset are selected, Galaxy reads the `entry_point` section in the XML:
|
|
22
|
-
|
|
23
|
-
```xml
|
|
24
|
-
<entry_point entry_point_type="script" src="dist/index.js" css="dist/index.css" container="app" />
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
The entry_point section includes the following parameters:
|
|
28
|
-
|
|
29
|
-
| Variable | Description |
|
|
30
|
-
|----------|-------------|
|
|
31
|
-
| **entry_point_type** | Specifies the type of entry point. Galaxy supports two types: mako and script. For JavaScript-based visualizations, this should always be set to script. |
|
|
32
|
-
| **src** | The path to the JavaScript bundle within the visualization’s static directory. |
|
|
33
|
-
| **css** | (Optional) The path to a CSS file within the visualization’s static directory. |
|
|
34
|
-
| **container** | The DOM container ID that the visualization will use (default is "app"). |
|
|
35
|
-
|
|
36
|
-
## Populating the Script Template
|
|
37
|
-
|
|
38
|
-
Galaxy Charts leverages Galaxy’s minimal JavaScript-based visualization interface, which can be used independently of Galaxy Charts and is compatible with any JavaScript framework. To understand this framework, let’s examine the interface:
|
|
39
|
-
|
|
40
|
-
```html
|
|
41
|
-
<html>
|
|
42
|
-
<head>
|
|
43
|
-
<link rel="stylesheet" href="{{ entry_point.css }}" />
|
|
44
|
-
<script src="{{ entry_point.src }}"></script>
|
|
45
|
-
</head>
|
|
46
|
-
<body>
|
|
47
|
-
<div id="{{ entry_point.container }}" data-incoming="{{ DATA_FROM_GALAXY }}"></div>
|
|
48
|
-
</body>
|
|
49
|
-
</html>
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
In this template, Galaxy populates the css, src, and container attributes with static values from the visualization XML. The data-incoming attribute is dynamically populated by Galaxy with details such as the dataset ID, settings, and visualization plugin metadata.
|
|
53
|
-
|
|
54
|
-
## Minimal Visualization Plugin
|
|
55
|
-
|
|
56
|
-
Armed with this foundational knowledge, let’s explore a simple, concrete example of a visualization plugin, implemented with just two files.
|
|
57
|
-
|
|
58
|
-
The plugin XML file (`plugin.xml`) defines the plugin’s name, a brief description, and specifies `minimal.js` as the entry point for the functionality:
|
|
59
|
-
|
|
60
|
-
```xml
|
|
61
|
-
<visualization name="Minimal Plugin">
|
|
62
|
-
<description>A basic example of a visualization plugin.</description>
|
|
63
|
-
<entry_point entry_point_type="script" src="minimal.js" />
|
|
64
|
-
</visualization>
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
The core of the plugin, contained in minimal.js, is minimalistic: it retrieves the data injected into the DOM container by Galaxy, then formats and displays it within a new div element. This approach demonstrates a straightforward method to access and render data within a plugin.
|
|
68
|
-
|
|
69
|
-
```javascript
|
|
70
|
-
// minimal.js
|
|
71
|
-
var element = document.getElementById("app");
|
|
72
|
-
var div = document.createElement('div');
|
|
73
|
-
div.innerText = JSON.stringify(JSON.parse(element.getAttribute("data-incoming")));
|
|
74
|
-
document.body.appendChild(div);
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
This basic setup captures the essentials of a visualization plugin: it identifies where to find the incoming data, processes it (in this case, by parsing and converting it to a readable format), and outputs it to the screen.
|
|
78
|
-
|
|
79
|
-
This minimal plugin example provides a foundation on which more complex visualization functionalities can be built, with ease of modification and scalability in mind.
|
|
80
|
-
|
|
81
|
-
::: tip Note
|
|
82
|
-
For this plugin, as well as any other, all further interactions with Galaxy should be conducted through the Galaxy API.
|
|
83
|
-
:::
|
|
84
|
-
|
|
85
|
-
## Use any JavaScript Technology!
|
|
86
|
-
|
|
87
|
-
In summary, the Galaxy framework is designed to be highly flexible, supporting any JavaScript-based framework or tool of choice. To integrate with Galaxy, the only requirement is to include the bundled JavaScript and CSS files within the static directory of the npm package. This approach allows developers to work with their preferred frameworks and tools, ensuring compatibility without additional configuration or dependencies. This streamlined setup makes it easy to extend Galaxy's functionality while maintaining consistency and simplicity across various plugin implementations.
|
|
88
|
-
|
|
89
|
-
Here is a list of popular tools to consider for your visualization plugin:
|
|
90
|
-
|
|
91
|
-
<div class="grid grid-cols-4 gap-12 text-center my-10">
|
|
92
|
-
<div class="flex flex-col items-center">
|
|
93
|
-
<img src="/javascript.svg" alt="JavaScript" class="w-16 h-16">
|
|
94
|
-
<span class="font-bold mt-2">JavaScript</span>
|
|
95
|
-
</div>
|
|
96
|
-
<div class="flex flex-col items-center">
|
|
97
|
-
<img src="/typescript.svg" alt="TypeScript" class="w-16 h-16">
|
|
98
|
-
<span class="font-bold mt-2">TypeScript</span>
|
|
99
|
-
</div>
|
|
100
|
-
<div class="flex flex-col items-center">
|
|
101
|
-
<img src="/react.svg" alt="React" class="w-16 h-16">
|
|
102
|
-
<span class="font-bold mt-2">React</span>
|
|
103
|
-
</div>
|
|
104
|
-
<div class="flex flex-col items-center">
|
|
105
|
-
<img src="/next-js.svg" alt="Next.js" class="w-16 h-16">
|
|
106
|
-
<span class="font-bold mt-2">Next.js</span>
|
|
107
|
-
</div>
|
|
108
|
-
<div class="flex flex-col items-center">
|
|
109
|
-
<img src="/vue.svg" alt="Vue" class="w-16 h-16">
|
|
110
|
-
<span class="font-bold mt-2">Vue</span>
|
|
111
|
-
</div>
|
|
112
|
-
<div class="flex flex-col items-center">
|
|
113
|
-
<img src="/vite.svg" alt="Vite" class="w-16 h-16">
|
|
114
|
-
<span class="font-bold mt-2">Vite</span>
|
|
115
|
-
</div>
|
|
116
|
-
<div class="flex flex-col items-center">
|
|
117
|
-
<img src="/vuetify.svg" alt="Vuetify" class="w-16 h-16">
|
|
118
|
-
<span class="font-bold mt-2">Vuetify</span>
|
|
119
|
-
</div>
|
|
120
|
-
<div class="flex flex-col items-center">
|
|
121
|
-
<img src="/nuxt.svg" alt="Nuxt" class="w-16 h-16">
|
|
122
|
-
<span class="font-bold mt-2">Nuxt</span>
|
|
123
|
-
</div>
|
|
124
|
-
<div class="flex flex-col items-center">
|
|
125
|
-
<img src="/naive-ui.svg" alt="Naive UI" class="w-16 h-16">
|
|
126
|
-
<span class="font-bold mt-2">Naive UI</span>
|
|
127
|
-
</div>
|
|
128
|
-
<div class="flex flex-col items-center">
|
|
129
|
-
<img src="/tailwind.svg" alt="Tailwind CSS" class="w-16 h-16">
|
|
130
|
-
<span class="font-bold mt-2">Tailwind CSS</span>
|
|
131
|
-
</div>
|
|
132
|
-
<div class="flex flex-col items-center">
|
|
133
|
-
<img src="/eslint.svg" alt="ES Lint" class="w-16 h-16">
|
|
134
|
-
<span class="font-bold mt-2">ES Lint</span>
|
|
135
|
-
</div>
|
|
136
|
-
<div class="flex flex-col items-center">
|
|
137
|
-
<img src="/prettier.svg" alt="Prettier" class="w-16 h-16">
|
|
138
|
-
<span class="font-bold mt-2">Prettier</span>
|
|
139
|
-
</div>
|
|
140
|
-
</div>
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
# Inputs
|
|
2
|
-
|
|
3
|
-
You can specify input elements within the settings and tracks sections, allowing users to parameterize and customize their visualization. Galaxy Charts currently supports the following input types: `boolean`, `color`, `data`, `float`, `integer`, `select`, and `text`.
|
|
4
|
-
|
|
5
|
-
Below is a template for a generic input element. It includes attributes such as `label`, `help`, `name`, and `type`, along with an optional `data` array used for `select` inputs:
|
|
6
|
-
|
|
7
|
-
```xml
|
|
8
|
-
<input>
|
|
9
|
-
<label>My Input Label</label>
|
|
10
|
-
<help>My Input Help</help>
|
|
11
|
-
<name>my_input_name</name>
|
|
12
|
-
<type>boolean | color | float | integer | select | text</type>
|
|
13
|
-
<data>
|
|
14
|
-
<data>
|
|
15
|
-
<label>My Option 1 Label</label>
|
|
16
|
-
<value>my_option_1</value>
|
|
17
|
-
</data>
|
|
18
|
-
...
|
|
19
|
-
</data>
|
|
20
|
-
</input>
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Boolean Input
|
|
24
|
-
|
|
25
|
-
Boolean inputs are useful to display yes/no options to the user e.g.
|
|
26
|
-
|
|
27
|
-
```xml
|
|
28
|
-
<input>
|
|
29
|
-
<label>My Boolean Label</label>
|
|
30
|
-
<help>My Boolean Help</help>
|
|
31
|
-
<name>my_boolean_name</name>
|
|
32
|
-
<type>boolean</type>
|
|
33
|
-
</input>
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Translates to:
|
|
37
|
-
|
|
38
|
-
<ClientOnly>
|
|
39
|
-
<div class="rounded border p-4">
|
|
40
|
-
<div class="font-bold pb-1">My Boolean Label</div>
|
|
41
|
-
<div class="text-xs pb-1">My Boolean Help</div>
|
|
42
|
-
<n-switch v-model:value="booleanInput"/>
|
|
43
|
-
</div>
|
|
44
|
-
</ClientOnly>
|
|
45
|
-
|
|
46
|
-
`my_boolean_name`
|
|
47
|
-
<span class="font-thin"> = {{ booleanInput }}</span>
|
|
48
|
-
|
|
49
|
-
## Color Input
|
|
50
|
-
|
|
51
|
-
Users may also select colors, this can be particular useful to distinguish data tracks e.g. in bar or line diagrams:
|
|
52
|
-
|
|
53
|
-
```xml
|
|
54
|
-
<input>
|
|
55
|
-
<label>My Color Label</label>
|
|
56
|
-
<help>My Color Help</help>
|
|
57
|
-
<name>my_color_name</name>
|
|
58
|
-
<type>color</type>
|
|
59
|
-
</input>
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Translates to:
|
|
63
|
-
|
|
64
|
-
<ClientOnly>
|
|
65
|
-
<div class="rounded border p-4">
|
|
66
|
-
<div class="font-bold pb-1">My Color Label</div>
|
|
67
|
-
<div class="text-xs pb-1">My Color Help</div>
|
|
68
|
-
<n-color-picker
|
|
69
|
-
v-model:value="colorInput"
|
|
70
|
-
:modes="['hex']"
|
|
71
|
-
:show-alpha="false"/>
|
|
72
|
-
</div>
|
|
73
|
-
</ClientOnly>
|
|
74
|
-
|
|
75
|
-
`my_color_name`
|
|
76
|
-
<span class="font-thin"> = {{ colorInput }}</span>
|
|
77
|
-
|
|
78
|
-
## Data Input
|
|
79
|
-
|
|
80
|
-
Using a `data` input field you can allow users to select a dataset from Galaxy:
|
|
81
|
-
|
|
82
|
-
```xml
|
|
83
|
-
<input>
|
|
84
|
-
<label>My Data Label</label>
|
|
85
|
-
<help>My Data Help</help>
|
|
86
|
-
<name>my_data_name</name>
|
|
87
|
-
<type>data</type>
|
|
88
|
-
</input>
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Translates to:
|
|
92
|
-
|
|
93
|
-
<ClientOnly>
|
|
94
|
-
<div class="rounded border p-4">
|
|
95
|
-
<div class="font-bold pb-1">My Data Label</div>
|
|
96
|
-
<div class="text-xs pb-1">My Data Help</div>
|
|
97
|
-
<n-select v-model:value="dataInput" :options="dataOptions" filterable />
|
|
98
|
-
</div>
|
|
99
|
-
</ClientOnly>
|
|
100
|
-
|
|
101
|
-
`my_data_name`
|
|
102
|
-
<span class="font-thin"> = {{ dataInput }}</span>
|
|
103
|
-
|
|
104
|
-
## Float Input
|
|
105
|
-
|
|
106
|
-
```xml
|
|
107
|
-
<input>
|
|
108
|
-
<label>My Float Label</label>
|
|
109
|
-
<help>My Float Help</help>
|
|
110
|
-
<name>my_float_name</name>
|
|
111
|
-
<type>float</type>
|
|
112
|
-
<min>0</min>
|
|
113
|
-
<max>100</max>
|
|
114
|
-
</input>
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Translates to:
|
|
118
|
-
|
|
119
|
-
<ClientOnly>
|
|
120
|
-
<div class="rounded border p-4">
|
|
121
|
-
<div class="font-bold pb-1">My Float Label</div>
|
|
122
|
-
<div class="text-xs pb-1">My Float Help</div>
|
|
123
|
-
<n-slider
|
|
124
|
-
class="mb-2"
|
|
125
|
-
v-model:value="floatInput"
|
|
126
|
-
:min="0"
|
|
127
|
-
:max="10"
|
|
128
|
-
:step="0.01" />
|
|
129
|
-
<n-input-number
|
|
130
|
-
v-model:value="floatInput"
|
|
131
|
-
size="small"
|
|
132
|
-
:min="0"
|
|
133
|
-
:max="10"
|
|
134
|
-
:step="0.01" />
|
|
135
|
-
</div>
|
|
136
|
-
</ClientOnly>
|
|
137
|
-
|
|
138
|
-
`my_float_name`
|
|
139
|
-
<span class="font-thin"> = {{ floatInput }}</span>
|
|
140
|
-
|
|
141
|
-
## Integer Input
|
|
142
|
-
|
|
143
|
-
```xml
|
|
144
|
-
<input>
|
|
145
|
-
<label>My Integer Label</label>
|
|
146
|
-
<help>My Integer Help</help>
|
|
147
|
-
<name>my_integer_name</name>
|
|
148
|
-
<type>integer</type>
|
|
149
|
-
<min>0</min>
|
|
150
|
-
<max>100</max>
|
|
151
|
-
</input>
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
## Select Input
|
|
155
|
-
|
|
156
|
-
```xml
|
|
157
|
-
<input>
|
|
158
|
-
<label>My Select Label</label>
|
|
159
|
-
<help>My Select Help</help>
|
|
160
|
-
<name>my_select_name</name>
|
|
161
|
-
<type>select</type>
|
|
162
|
-
<value>my_option_a</value>
|
|
163
|
-
<data>
|
|
164
|
-
<data>
|
|
165
|
-
<label>My Option A Label</label>
|
|
166
|
-
<value>my_option_a</value>
|
|
167
|
-
</data>
|
|
168
|
-
<data>
|
|
169
|
-
<label>My Option B Label</label>
|
|
170
|
-
<value>my_option_b</value>
|
|
171
|
-
</data>
|
|
172
|
-
...
|
|
173
|
-
</data>
|
|
174
|
-
</input>
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
Translates to:
|
|
178
|
-
|
|
179
|
-
<ClientOnly>
|
|
180
|
-
<div class="rounded border p-4">
|
|
181
|
-
<div class="font-bold pb-1">My Select Label</div>
|
|
182
|
-
<div class="text-xs pb-1">My Select Help</div>
|
|
183
|
-
<n-select v-model:value="selectInput" :options="selectOptions" />
|
|
184
|
-
</div>
|
|
185
|
-
</ClientOnly>
|
|
186
|
-
|
|
187
|
-
`my_select_name`
|
|
188
|
-
<span class="font-thin"> = {{ selectInput }}</span>
|
|
189
|
-
|
|
190
|
-
## Text Input
|
|
191
|
-
|
|
192
|
-
Last but not least, `text` inputs can be declared.
|
|
193
|
-
|
|
194
|
-
```xml
|
|
195
|
-
<input>
|
|
196
|
-
<label>My Text Label</label>
|
|
197
|
-
<help>My Text Help</help>
|
|
198
|
-
<name>my_text_name</name>
|
|
199
|
-
<type>text</type>
|
|
200
|
-
</input>
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
Translates to:
|
|
204
|
-
|
|
205
|
-
<ClientOnly>
|
|
206
|
-
<div class="rounded border p-4">
|
|
207
|
-
<div class="font-bold pb-1">My Text Label</div>
|
|
208
|
-
<div class="text-xs pb-1">My Text Help</div>
|
|
209
|
-
<n-input v-model:value="textInput" />
|
|
210
|
-
</div>
|
|
211
|
-
</ClientOnly>
|
|
212
|
-
|
|
213
|
-
`my_text_name`
|
|
214
|
-
<span class="font-thin"> = {{ textInput }}</span>
|
|
215
|
-
|
|
216
|
-
<script setup>
|
|
217
|
-
import * as naiveui from 'naive-ui';
|
|
218
|
-
const { NSwitch, NColorPicker, NSelect, NSlider, NInputNumber, NInput } = naiveui;
|
|
219
|
-
import { ref } from "vue";
|
|
220
|
-
const booleanInput = ref(true);
|
|
221
|
-
const colorInput = ref("#0284c7");
|
|
222
|
-
const floatInput = ref(1);
|
|
223
|
-
const dataInput = ref("dataset_id_a");
|
|
224
|
-
const textInput = ref("My Text");
|
|
225
|
-
const selectInput = ref("my_option_a");
|
|
226
|
-
|
|
227
|
-
const dataOptions = [
|
|
228
|
-
{
|
|
229
|
-
label: 'Galaxy Dataset A',
|
|
230
|
-
value: 'dataset_id_a',
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
label: 'Galaxy Dataset B',
|
|
234
|
-
value: 'dataset_id_b'
|
|
235
|
-
},
|
|
236
|
-
];
|
|
237
|
-
|
|
238
|
-
const selectOptions = [
|
|
239
|
-
{
|
|
240
|
-
label: 'My Option A',
|
|
241
|
-
value: 'my_option_a',
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
label: 'My Option B',
|
|
245
|
-
value: 'my_option_b'
|
|
246
|
-
},
|
|
247
|
-
];
|
|
248
|
-
</script>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# XML Wrapper
|
|
2
|
-
|
|
3
|
-
Galaxy Visualizations are configured using XML files. The files contain Visualization specific attributes such as the `name`, `description` and the associated npm package details.
|
|
4
|
-
|
|
5
|
-
```xml
|
|
6
|
-
<visualization name="MY_VISUALIZATION">
|
|
7
|
-
<description>MY_DESCRIPTION</description>
|
|
8
|
-
<requirements>
|
|
9
|
-
<requirement type="npm" version="MY_NPM_PACKAGE_VERSION" package="MY_NPM_PACKAGE_NAME"/>
|
|
10
|
-
</requirements>
|
|
11
|
-
<entry_point entry_point_type="script" src="dist/index.js" css="dist/index.css" />
|
|
12
|
-
...
|
|
13
|
-
</visualization>
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
This XML template includes the following variables:
|
|
17
|
-
|
|
18
|
-
| Variable | Description |
|
|
19
|
-
|----------|-------------|
|
|
20
|
-
| **MY_VISUALIZATION** | Specifies the name of the visualization. |
|
|
21
|
-
| **MY_DESCRIPTION** | Provides a brief description of the visualization, including references if it’s a third-party plugin. |
|
|
22
|
-
| **MY_NPM_PACKAGE_NAME** | Indicates the npm package name. Update this field with the correct package name before publishing. |
|
|
23
|
-
| **MY_NPM_PACKAGE_VERSION** | Specifies the version number of the npm package upon publishing. |
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# Sections
|
|
2
|
-
|
|
3
|
-
Galaxy Charts provides three XML sections: `settings`, `specs`, and `tracks`. These sections allow you to define dynamic input parameters, which users can interact with, or static values to configure your visualization.
|
|
4
|
-
|
|
5
|
-
- **`settings`**: Contains a single set of input elements displayed to the user for customization.
|
|
6
|
-
- **`specs`**: Holds static key/value pairs that configure visualization settings without user interaction.
|
|
7
|
-
- **`tracks`**: Includes input elements specific to each data track, allowing customization per track.
|
|
8
|
-
|
|
9
|
-
Use these sections to tailor the visualization experience based on user input or preset configurations.
|
|
10
|
-
|
|
11
|
-
## Settings Section
|
|
12
|
-
|
|
13
|
-
The `settings` section includes an `array` of `input` elements that allow users to customize the visualization. These customization options are also available when embedding the visualization in Galaxy workflow reports. Below is an example of a `settings` section with a single `text` input element:
|
|
14
|
-
|
|
15
|
-
```xml
|
|
16
|
-
<settings>
|
|
17
|
-
<input>
|
|
18
|
-
<label>Setting: Text</label>
|
|
19
|
-
<name>setting_text</name>
|
|
20
|
-
<type>text</type>
|
|
21
|
-
</input>
|
|
22
|
-
...
|
|
23
|
-
</settings>
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Specs Section
|
|
27
|
-
|
|
28
|
-
The `specs` section includes an `array` of static `key-value` pairs for general use, such as:
|
|
29
|
-
|
|
30
|
-
```xml
|
|
31
|
-
<specs>
|
|
32
|
-
<my_key>my_value</my_key>
|
|
33
|
-
...
|
|
34
|
-
</specs>
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Tracks Section
|
|
38
|
-
|
|
39
|
-
The `tracks` section includes an `array` of `input` elements that allow users to configure individual data tracks, for example:
|
|
40
|
-
|
|
41
|
-
```xml
|
|
42
|
-
<tracks>
|
|
43
|
-
<input>
|
|
44
|
-
<label>Track: Color</label>
|
|
45
|
-
<name>track_color</name>
|
|
46
|
-
<type>color</type>
|
|
47
|
-
</input>
|
|
48
|
-
...
|
|
49
|
-
</tracks>
|
|
50
|
-
```
|
package/docs/index.md
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# https://vitepress.dev/reference/default-theme-home-page
|
|
3
|
-
layout: home
|
|
4
|
-
|
|
5
|
-
hero:
|
|
6
|
-
name: Galaxy Charts
|
|
7
|
-
text: Visualization Plugin Framework for Galaxy
|
|
8
|
-
tagline: Develop, Test and Deploy JavaScript Visualizations
|
|
9
|
-
actions:
|
|
10
|
-
- theme: brand
|
|
11
|
-
text: What is Galaxy Charts?
|
|
12
|
-
link: /content/introduction
|
|
13
|
-
- theme: alt
|
|
14
|
-
text: Quick Start
|
|
15
|
-
link: /content/installation
|
|
16
|
-
|
|
17
|
-
features:
|
|
18
|
-
- title: Standalone
|
|
19
|
-
details: Build your visualization in an independent, standalone environment with modern tools like Vite and Vue 3.
|
|
20
|
-
icon: 🖥️
|
|
21
|
-
- title: Data Access
|
|
22
|
-
details: Connect to local or public Galaxy instances to test your visualization with real-world data.
|
|
23
|
-
icon: 🔗
|
|
24
|
-
- title: Deployment
|
|
25
|
-
details: When your visualization is ready, deploy it to Galaxy for use by researchers worldwide.
|
|
26
|
-
icon: 🚀
|
|
27
|
-
---
|