Giter VIP home page Giter VIP logo

elixir-europe / plant-brapi-etl-faidare Goto Github PK

View Code? Open in Web Editor NEW
7.0 11.0 8.0 25.84 MB

Harvest and index meta data from BrAPI endpoints for data access through the plant-faidare data lookup portal (https://github.com/elixir-europe/plant-faidare).

Home Page: https://urgi.versailles.inra.fr/faidare/

License: BSD 3-Clause "New" or "Revised" License

Shell 0.45% Python 99.49% Dockerfile 0.06%
etl brapi elixir-plant breeding-api

plant-brapi-etl-faidare's Introduction

Elixir plant Breeding API JSON ETL

  • Extract BrAPI endpoint.
  • Transform extracted data (into Elasticsearch bulk json, into JSON-LD, into RDF)
  • Load JSON into Elasticsearch or RDF into a virtuoso

I. Execution

From source code

Requirements:

  • Python version 3.6+
  • Python dependencies (pip install -r requirements.txt)
  • OR (prepeferd) use a virtual environment (pipenv, virtualenv, conda, etc) : pipenv install
The `main.py` script can be used to launch the full BrAPI to elasticsearch or BrAPI to virtuoso ETL. To get the usage help run the following command:

```sh
$ pipenv run python main.py --help

OR (if you have installed the dependencies in your environment)

$ python3 main.py

II. Configuration

ETL process configurations

The configurations for the ETL process is defined in the ./config folder.

Data sources

The BrAPI data source are described in the ./sources folder in JSON-LD format using the schema.org vocabulary. You can add data sources in this folder using one of the other data source as an example.

Here is an example of data source description:

{
  "@context": {
    "schema": "http://schema.org/",
    "brapi": "https://brapi.org/rdf/"
  },
  "@type": "schema:DataCatalog",
  "@id": "http://pippa.psb.ugent.be",
  "schema:identifier": "VIB",
  "schema:name": "VIB PIPPA",
  "brapi:endpointUrl": "https://pippa.psb.ugent.be/pippa_experiments/brapi/v1/"
} 

The @id field contains the URI identifying the data source (we use the URL of the official web site for convinience), the schema:identifier contains a short identifier for this data source, the schema:name contains the display name and brapi:endpoint contains the URL of the BrAPI endpoint.

BrAPI endpoints requirements

Current BrAPI version: 1.3. Backward compatibility with 1.2 is ensured to a certain extent.

The BrAPI endpoint must implement the required calls (also listed in ./config/entities/ json files, note that the first element of each "call" array is the recomended implementation): Mandatory:

  • /brapi/v1/calls GET
  • /brapi/v1/studies GET
  • /brapi/v1/studies/{studyDbId}

Recommended:

  • /brapi/v1/germplasm GET
  • /brapi/v1/germplasm/{germplasmDbId} GET
  • /brapi/v1/variables GET
  • /brapi/v1/locations GET
  • /brapi/v1/locations/{locationDbId} GET
  • /brapi/v1/studies/{studyDbId}/germplasm GET
  • /brapi/v1/studies/{studyDbId}/observationvariables GET
  • /brapi/v1/trials GET
  • /brapi/v1/trials/{trialDbId} GET

Optional:

  • /brapi/v1/germplasm/{germplasmDbId}/attributes GET
  • /brapi/v1/germplasm/{germplasmDbId}/pedigree GET
  • /brapi/v1/programs GET

Experimental:

  • /brapi/v1/observationunits GET (backward compatibility with phenotype-search)
  • /brapi/v1/studies/{studyDbId}/observationunits GET

See README-extract-transform-for-FAIDARE.md for specific details on BrAPI to elasticsearch ETL.

plant-brapi-etl-faidare's People

Contributors

bedroesb avatar bilalix avatar buymel avatar cmichotey avatar cpommier avatar dlebauer avatar gcornut avatar jerem-info avatar maudmarty avatar papoutsogloue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plant-brapi-etl-faidare's Issues

Add T3 endpoints

wheat.triticeaetoolbox.org/brapi/v2
barley.triticeaetoolbox.org/brapi/v2
oat.triticeaetoolbox.org/brapi/v2

Restore RDF transformation

TODO:

  • Refactor Agg parsing. in cli.py the transform jsonld argument is working but help is badly documented
  • Check elasticsearch transform still fully funcitonnal
  • Complete Ontology.jsonld definition

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.