Interactive Shiny application for visualizing metabarcoding results on a map.
This application displays metabarcoding detection data for multiple sampling stations. Users can:
- View sampling stations on an interactive map colored by species richness
- Click stations to see detected species with images, common names, and links to external databases
- Browse ambiguous species groups that could not be distinguished
- Download all data as CSV files
The application requires project-specific data files in inst/extdata/:
- localisations.csv - Station coordinates
- Columns:
station,lat,long - Example:
ST1,51.6908819,-75.8168186
- Columns:
- species_table.csv - Detection data (wide format)
- Columns:
TaxonName,Group,Genus,Species,ST1,ST2, …,STn - Each station column contains read counts (numeric)
- Species with
Group="zMultiple"are treated as ambiguous detections - Ambiguous species may have colon-separated names:
"species1 : species2" - Ambiguous species may have underscore format:
"Group_Genus_Species"
- Columns:
- species_info.csv - Species metadata
- Columns:
species,English,French,gbif_url,col_url,itis_url,Native_Quebec,Exotic_Quebec,status_ca,status_qc,img species: Scientific name (Genus species)English/French: Common names*_url: Links to external databases (GBIF, Catalogue of Life, ITIS)Native_Quebec/Exotic_Quebec: Boolean flags for species status in Quebecstatus_ca: Conservation status under Canada’s Species at Risk Act (SARA/LEP) - values include “En voie de disparition” (Endangered), “Menacée” (Threatened), “Préoccupante” (Special Concern), “Disparue du pays” (Extirpated)status_qc: Conservation status under Quebec’s Loi sur les espèces menacées ou vulnérables (LEMV) - values include “Menacée” (Threatened), “Vulnérable” (Vulnerable), “Susceptible” (Likely to be designated)img: Path to species image (e.g.,inst/extdata/img/Species_name.jpg)
- Columns:
Species images should be placed in inst/extdata/img/ with filenames
matching the paths in species_info.csv.
These files should be downloaded from their respective sources and
placed in inst/extdata/:
- CA_especes_en_peril.csv - Canadian species at risk
- Source: Registre public des espèces en péril (LEP)
- Contains federal species at risk designations under Canada’s Species at Risk Act (SARA/LEP)
- QC_especes_en_peril.csv - Quebec species at risk
- Source: Liste de la faune vertébrée du Québec - Données Québec
- Contains provincial species at risk under Quebec’s Loi sur les espèces menacées ou vulnérables (LEMV)
Note: These files are not tracked in version control due to their
size. They must be downloaded manually before running
scripts/enrich_species.R.
# Install dependencies
remotes::install_local()
# Run the app
metabarMap::run_app()- Open SSH tunnel to remote server:
ssh -i ~/.ssh/id_compute_cloud -L 5001:localhost:5000 sviss@ip.to.compute.cloud.canada- Build and tag the image (replace
project-tagwith your project identifier):
docker build -t localhost:5001/metabarmap:project-tag .- Push to ShinyProxy registry:
docker push localhost:5001/metabarmap:project-tagPull the image localy from the registry
docker pull localhost:500/metabarmap:v1.0.0-nemaskaApplication settings are configured in inst/golem-config.yml:
default:
station_ids: ["ST1","ST2","ST3",...]
project_name: "Your Project Name"
project_logo: "https://your-logo-url.png"
methodology_file: "methodology.md"
partners:
- name: "Partner Name"
max_height: "80px"
url: "https://partner-website.org"
image: "img/partners/logo.png"-
station_ids: Array of station identifiers matching column names in
species_table.csv. These stations will be displayed on the map and available for selection. -
project_name: Application title displayed in the navigation bar and browser tab.
-
project_logo: URL to project logo image. Can be an external URL (https://) or path to local file in
inst/extdata/. -
methodology_file: Filename of markdown document in
inst/extdata/containing methodology description. Displayed in the “Methodology” tab panel. -
partners: List of partner organizations to display in the application footer. Each partner requires:
name: Organization name (used for alt text)max_height: Maximum logo height in CSS units (e.g., “80px”)url: Partner website URL (opens in new tab when logo is clicked)image: Path to logo file relative toinst/extdata/directory