/data_curator

Data Ingest Shiny App

Primary LanguageRApache License 2.0Apache-2.0

Data Curator App for CSBC

Introduction

The Data Curator App is an R Shiny app that serves as the frontend to the schematic Python package. It allows data contributors to easily annotate, validate and submit their metadata.


Get Started and Installation

Follow the steps below to make sure the Data Curator App is fully setup to work with the schematic:

Data Curator App Setup

  1. Clone this repo (front-end) with one single branch (i.e., main):

    git clone --single-branch --branch main https://github.com/Sage-Bionetworks/data_curator.git
    
  2. Create and modify the configuration file (How to obtain OAuth Credential):

    cp example_oauth_config.yml oauth_config.yml
    chmod 400 oauth_config.yml
    
  3. Create and activate a virtual environment within which you can install the package:

    python -m venv .venv
    source .venv/bin/activate
    
  4. Install required R pacakges dependencies:

    R -f install-pkgs.R
    

Schematic Setup

  1. Clone the schematic (backend) as a folder schematic inside the data_curator folder:

    git clone --single-branch --branch develop https://github.com/Sage-Bionetworks/schematic.git
    
  2. Install the latest release of the schematic via pip. IF NOT USING CONDA, install the devel version below:

    python -m pip install schematicpy
    

    For development and test with the latest update from schematic, install the schematic via poetry:

    cd schematic
    poetry build
    pip install dist/schematicpy-1.0.0-py3-none-any.whl
    
  3. Modify the schematic_config.yml to set up schematic configuration. To do so, follow the instructions on the schematic's documentation

Data Model Configuration

Use the app configuration file www/config.json to adapt this app to your DCC.

  • manifest schemas: defines the list of schemas displayed under the "Choose a Metadata Template Type:" dropdown in the application.
    • display_name : The display name for the dropdown. (e.g. scRNA-seq Level 1)
    • schema_name: The name of the manifest in the JSON-LD schema (e.g. ScRNA-seqLevel1)
    • type: The type of manifest. As currently configured in app.R, will only display manifests of type assay.
  • community (optional): The abbreviated name of the community or project. (e.g. HTAN)
  • schema (optional): The version of data model
  • schematic_service (optional): The version of schematic service

Authentication

This utilizes a Synapse Authentication (OAuth) client (code motivated by ShinyOAuthExample and app.R. Each application is required to have its own OAuth client as these clients cannot be shared between one another. View instructions here to learn how to request a client. Once you obtain the client, make sure to add it to the configuration yaml file:

  • CLIENT_ID and CLIENT_SECRET
  • APP_URL: the redirection url to your app

Deployment

To deploy the app to shinyapps.io, please follow the instructions in the shinyapps_deploy.md.

Contributors

Main contributors and developers: