Skip to content

Load data

Alessandro De Luca edited this page Nov 11, 2024 · 2 revisions

Load data by url

Produce your newick (tree.nwk) and metadata (meta.tsv) files and copy them inside DIR_SPREAD, then on your web browser:

http://127.0.0.1:8080?tree=tree.nwk&metadata=metadata.tsv

Load geoJSON or cooridates data

The dashboard is able to recognize .geojson file passed as geo parameter by query string:

&geo=points.geojson

Alternatively you can integrate in metadata.tsv longitute and latitude values and pass them as query string parameters in the place of geoJSON. For example, if in the .tsv you define x for longitude and y for latitude, just add &longitude=x&latitude=y in the url in this way:

&metadata=metadata.tsv&longitude=x&latitude=y

Using our data example:

http://127.0.0.1:8080?tree=/datasets/test/tree.nwk&metadata=/datasets/test/metadata.tsv&longitude=x&latitude=y

Important

If you use longitude and latitude to name coordinates in the .tsv file, there is no need to pass them as query string parameters, so simply use: &metadata=metadata.tsv

Please note that for the longitude and latitude values, decimal points should be used as separators instead of commas.

Upload files

It is possible also directly upload files by dragging them over the tree, over the initial droppable area or using load buttons provided in the UI. In this case you don't need to use parameters in the url. You can drag or load a .nwk file followed by a .tsv file containing metadata and optionally a .geojson file containing geo-spatial information.

Following video shows how to upload data in SPREAD.

Watch video

Important

.nwk file should be loaded before loading metadata or geoJson files.

Save or load a compatible JSON file

Dashboard allows you to download a complete JSON file including metadata and configurations. Generated JSON file can be loaded with the same drag or load by url (?tree=tree.json) functionalities seen previously, this is very useful if you want to save your work or share it.

Clone this wiki locally