Visualize EBV cube data with Panoply netCDF viewer

Overview
Questions:
  • How to start Panoply interactive environment in Galaxy?

  • How to inspect EBV cube netCDF data?

  • How to make a plot with Panoply?

  • Where to save your plots in Panoply?

  • How to customize plots in Panoply?

  • How to generate animation in Panoply?

Objectives:
  • Learn to use Panoply in Galaxy to visuallize EBV cube netCDF geo-referenced data

  • Learn how Panoply plots are exported to Galaxy

Requirements:
Time estimation: 1 hour
Supporting Materials:
Last modification: Jan 24, 2023
License: Tutorial Content is licensed under Creative Commons Attribution 4.0 International License The GTN Framework is licensed under MIT

Introduction

Comment

This tutorial is significantly based on the Panoply documentation and the Galaxy climate dedicated tutorial.

The practical aims at familiarzing you with the Panoply Galaxy interactive tool. Panoply is among the most popular tool to visualize geo-referenced data stored in Network Common Data Form (netCDF). It provides a graphical interface for inspecting (show metadata) and visualizing netCDF data. It supports many features to customize your plots and we will introduce some of them in this lesson.

In this tutorial, you will learn to:

  • Plot EBV cube arrays.
  • Use any of numerous color tables for the scale colorbar
  • Save plots to GIF, JPEG, PNG or TIFF bitmap images or as PDF or PostScript graphics files.
  • Export animations as MOV or AVI videos
Agenda

In this tutorial, we will cover:

  1. Introduction
    1. NetCDF format
    2. Get data
  2. Panoply
    1. Opening up Panoply
    2. Inspect metadata
    3. Create Geo-referenced Longitude-Latitude plot
    4. Changing map projection
    5. Export Animation
    6. Quit Panoply
  3. Conclusion
Comment: Background

In this tutorial, we will be focusing on the usage of Biodiversity data in Network Common data Form (netCDF) because it is the data format used to store data on the EBV data portal. We will be using a freely available dataset representing Essential Biodiversity Variables from GEO BON data portal. We will learn to use panoply to visualize the Local bird diversity for last century.

NetCDF format

NetCDF data format is a binary format and to be able to read or visualize it, we would need to use dedicated software or libraries that can handle this “special” format. It is self-describing and machine-independent data format that supports the creation, access, and sharing of array-oriented scientific data. NetCDF files usually have the extension .nc or .netcdf.

For climate and forecast data stored in NetCDF format there are (non-mandatory) conventions on metadata (CF Convention).

In this tutorial, we will be using data from the GEO BON EBV data portal.

Get data

Hands-on: Data upload
  1. Create a new history for this tutorial. If you are not inspired, you can name it Panoply for example…

    Click the new-history icon at the top of the history panel.

    If the new-history is missing:

    1. Click on the galaxy-gear icon (History options) on the top of the history panel
    2. Select the option Create New from the menu
  2. Import the file from EBV data portal

    https://portal.geobon.org/data/upload/1/public/martins_comcom_id1_20220208_v1.nc
    
    • Copy the link location
    • Open the Galaxy Upload Manager (galaxy-upload on the top-right of the tool panel)

    • Select Paste/Fetch Data
    • Paste the link into the text field

    • Press Start

    • Close the window

    As an alternative to uploading the data from a URL or your computer, the files may also have been made available from a shared data library:

    • Go into Shared data (top panel) then Data libraries
    • Navigate to the correct folder as indicated by your instructor
    • Select the desired files
    • Click on the To History button near the top and select as Datasets from the dropdown menu
    • In the pop-up window, select the history you want to import the files to (or create a new one)
    • Click on Import
  3. Check that the datatype is netcdf

    Files you uploaded are in netcdf format. In Galaxy, Datatypes are, by default, automatically guessed. Here, as netcdf is a derivative of the h5 format, Galaxy automatically affect the h5 datatype to netcdf files. To cope with that, one can change the datatype manually, once datasets uploaded (as shown below) OR you can directly specify datatype on the upload tool form so Galaxy will not try to automatically guess it.

    • Click on the galaxy-pencil pencil icon for the dataset to edit its attributes
    • In the central panel, click on the galaxy-chart-select-data Datatypes tab on the top
    • Select datatypes
      • tip: you can start typing the datatype into the field to filter the dropdown menu
    • Click the Save button
  4. Rename Datasets galaxy-pencil

    As the original name martins_comcom_id1_20220208_v1.nc can be not so good to use, don’t hesitate to modify it in Local bird diversity (cSAR/BES-SIM) martins dataset for example.

    • Click on the galaxy-pencil pencil icon for the dataset to edit its attributes
    • In the central panel, change the Name field
    • Click the Save button
  5. Add a tag galaxy-tags to the dataset corresponding to #EBV

    • Click on the dataset
    • Click on galaxy-tags Add Tags
    • Add a tag starting with #

      Tags starting with # will be automatically propagated to the outputs of tools using this dataset.

    • Check that the tag is appearing below the dataset name

Panoply

Opening up Panoply

Hands-on: Launch Panoply

Panoply is available as a Galaxy interactive tool and may not be available on all Galaxy servers.

Currently Panoply in Galaxy is available on useGalaxy.eu instance, on the “Interactive tools” tool panel section.

  1. Open the Panoply Tool: interactive_tool_panoply by clicking on the Panoply interactive tool shortcut
  2. Check martins_comcom_id1_20220208_v1.nc dataset selected in the netcdf input field
  3. Click Run Tool
  4. The tool will start running and will stay running permanently
  5. Click on the “User” menu at the top and go to “Active Interactive Tools” and locate the Panoply instance you started.
  6. Click on your Panoply instance
    Panoply dataset selection.
    Figure 1: Select dataset
  7. Click on martins_comcom_id1_20220208_v1.nc dataset and open.

Inspect metadata

Hands-on: Inspect dataset
  1. Inspect dataset content

    Here you can look at the dataset (martins_comcom_id1_20220208_v1.nc) and related variables (crs, entity, lat, lon, metric_1, ebv_cube, time)

    Question

    what is the unit of the ebv_cube variable of metric_1and its shape?

    The unit of ebv_cube is “Percentage points”. ebv_cube is a 4D array (entity, time, latitude, longitude).

  2. Take a look at the general properties of the dataset

    Question

    Can you find the title, summary, EBV class and EBV name informations?

    Double click on “martins_comcom_id1_2022…” element of the “Name” column to display these general information Title: Local bird diversity (cSAR/BES-SIM). Summary: Changes in bird diversity at 1-degree resolution caused by land use, estimated by the cSAR model for 1900-2015 using LUH2.0 historical reconstruction of land-use. EBV Class: Community composition. EBV name: Taxonomic and phylogenetic diversity.

    Question

    Can you find the biodviersity metrics names?

    metric_1: Relative change in the number of species (%) metric_2: Absolute change in the number of species

Create Geo-referenced Longitude-Latitude plot

Hands-on: geographical map
  1. Double click on the variable ebv_cube from metric_1 and click on Create
    Panoply create Latitude longitude map.
    Figure 2: Create map
    Question
    1. What does it shows?
    2. What is the date of the generated plot?
    3. Can you plot other dates?
    1. The plot represent the relative change in the number of species (%).
      Panoply Latitude longitude map.
      Figure 3: Plot map
    2. The date of the default plot is 1st January 1900 at 00:00.

    3. To plot another date, change either:
      • Initial time of forecast (give a value between 1 and 12, corresponding to years between 1900 and 2010.
      • Click on the date and scroll down to select the date of your choice.
  2. Save your plot
    • Click on the tab File (from your plot window) to store your plot by selecting Save Image As
    • Double click on the folder outputs to enter this folder and save your plot. You need to make sure to save all your plot in the outputs folder otherwise you can loose all your plots once to close panoply.
  3. Change colormap Always make sure you use color blind friendly palettes.
    • To change the default colormap, click on tab “Scale” (bottom of your plot window) and select another “Color Table” (you can scroll down to go through all the different available colormap).
    • Save your plot using Save Image As and make sure to choose another name to avoid overwritting your preceding plot.
    Panoply colormap.
    Figure 4: Plot colormap

Changing map projection

Hands-on: Change projection

From your previous plot window, click on Tab Map and change Projection. Try a few of them and save each of your plot with File –> Save Image As.

Panoply change projection.
Figure 5: Change projection

Export Animation

Hands-on: Export animation
  1. From your previous plot window, click on File and select Export Animation. Save your plot using either MOV or AVI format. It goes through each plot e.g. for each month and create an animation where you can see the evolution of sea-ice extent from January 1979 to December 1979. You will be able to download the resulting movie from Galaxy once you quit Panoply.

Quit Panoply

Hands-on: Quit Panoply to keep your plots
  1. To make sure all your plots stored in outputs folder get exported to Galaxy, you need to quit panoply: File –> Quit Panoply.
  2. Go back to your current Galaxy history and you should find Panoply outputs
Panoply outputs.
Figure 6: Panoply outputs in Galaxy

Conclusion

We have now learnt how to visualize EBV cube data using Panoply. We only use one of the two datasets so we strongly encourage you to do the same exercises with others datasets from EBV data portal.

Key points
  • Inspect and view EBV cube netCDF data with Panoply

  • Interact with Galaxy to save your plots

Frequently Asked Questions

Have questions about this tutorial? Check out the FAQ page for the Ecology topic to see if your question is listed there. If not, please ask your question on the GTN Gitter Channel or the Galaxy Help Forum

Useful literature

Further information, including links to documentation and original publications, regarding the tools, analysis techniques and the interpretation of results described in this tutorial can be found here.

Feedback

Did you use this material as an instructor? Feel free to give us feedback on how it went.
Did you use this material as a learner or student? Click the form below to leave feedback.

Click here to load Google feedback frame

Citing this Tutorial

  1. Yvan Le Bras, Coline Royaux, Marie Josse, Anne Fouilloux, Visualize EBV cube data with Panoply netCDF viewer (Galaxy Training Materials). https://training.galaxyproject.org/training-material/topics/ecology/tutorials/panoply_ebv/tutorial.html Online; accessed TODAY
  2. Batut et al., 2018 Community-Driven Data Analysis Training for Biology Cell Systems 10.1016/j.cels.2018.05.012



@misc{ecology-panoply_ebv,
author = "Yvan Le Bras and Coline Royaux and Marie Josse and Anne Fouilloux",
title = "Visualize EBV cube data with Panoply netCDF viewer (Galaxy Training Materials)",
year = "",
month = "",
day = ""
url = "\url{https://training.galaxyproject.org/training-material/topics/ecology/tutorials/panoply_ebv/tutorial.html}",
note = "[Online; accessed TODAY]"
}
@article{Hiltemann_2023,
	doi = {10.1371/journal.pcbi.1010752},
	url = {https://doi.org/10.1371%2Fjournal.pcbi.1010752},
	year = 2023,
	month = {jan},
	publisher = {Public Library of Science ({PLoS})},
	volume = {19},
	number = {1},
	pages = {e1010752},
	author = {Saskia Hiltemann and Helena Rasche and Simon Gladman and Hans-Rudolf Hotz and Delphine Larivi{\`{e}}re and Daniel Blankenberg and Pratik D. Jagtap and Thomas Wollmann and Anthony Bretaudeau and Nadia Gou{\'{e}} and Timothy J. Griffin and Coline Royaux and Yvan Le Bras and Subina Mehta and Anna Syme and Frederik Coppens and Bert Droesbeke and Nicola Soranzo and Wendi Bacon and Fotis Psomopoulos and Crist{\'{o}}bal Gallardo-Alba and John Davis and Melanie Christine Föll and Matthias Fahrner and Maria A. Doyle and Beatriz Serrano-Solano and Anne Claire Fouilloux and Peter van Heusden and Wolfgang Maier and Dave Clements and Florian Heyl and Björn Grüning and B{\'{e}}r{\'{e}}nice Batut and},
	editor = {Francis Ouellette},
	title = {Galaxy Training: A powerful framework for teaching!},
	journal = {PLoS Comput Biol} Computational Biology}
}

                   

Congratulations on successfully completing this tutorial!