Git Product home page Git Product logo

igvf-metadata-submitter's Introduction

IGVF metadata submitter

IGVF metadata submitter based on Google Sheet + Google Apps Script.

Installation

Make a copy of the following spreadsheet.

v0.3.3: https://docs.google.com/spreadsheets/d/1XUSZtwHUsvzS308vp_Fyg0D7YI-RtV8f_PMfixbUMi4/edit?usp=sharing

Click on the menu item IGVF and then Authorize for IGVF. You will see an error message Authorization Required. Click on Continue, choose your Google account. Click on Advanced and Go to IGVF Metadata Submitter (unsafe) and then click on Allow.

To build and deploy a new spreadsheet directly from a code, see INSTALL.md.

Authorization

Get a key/secret pair from portal's Profile menu. Click on menu Authorize for IGVF and enter credentials.

Endpoint

Click on menu Set endpoint. We provide multiple endpoints to communicate with the portal. For example, https://api.sandbox.igvf.org is an endpoint for testing purpose and https://api.data.igvf.org is for production. Click on menu Set endpoint and enter supported endpoints.

Profile

Create a new sheet and click on menu Set endpoint. An endpoint is set for each sheet. Only snake_case (recommended) or capitalized CamelCase works. For example, measurement_set, sequence_file, award and Lab. The script will automatically create a template row for the given profile.

Functions

This metadata submitter converts each row into a JSON object and then submit it to the portal.

You can skip any row by setting #skip column as 1 or by hiding the row itself (right-click on the selected rows and Hide).

Also, if cell's value is empty for a certain property then such property is simply ignored (not included in the JSON object when being sent to the portal).

GET

GET will send a GET request to the portal and will convert retrieved metadata to a row on the sheet.

POST

POST sends a POST request to the portal. Use this to submit a new metadata and generate an accession/ID.

PATCH

PATCH will send a patch request to the portal in order to patch properties of SELECTED columns. Only selected columns will be affected by this request. Properties in other columns will not be included in the request.

PUT (Admin only)

PUT sends a PUT request to the portal so that the whole metadata on the portal is replaced with a row on the sheet. Beware that this will remove any missing properties on the sheet from the portal.

Before you PUT to the portal, make sure to GET the metadata with GET (ADMIN) first.

Attachment

For a profile with attachment property (e.g. document profile), you can define attachment column as a JSON string {"path":"/GOOGLE/DRIVE/PATH/TO/FILE/me.pdf"}.

It is recommended to make a local directory for document files only on your computer, and then drag and drop the folder itself to your Google Drive. Then all files in it will be transferred to Google Drive while keeping the directory structure.

Local file uploading (sidebar)

You can directly upload local files to portal's S3 bucket on the upload sidebar. Use it after POSTing metadata to the portal. Make sure that there is at least one identifying property in the header (e.g. accession, uuid).

Click on menu IGVF - Upload local files (sidebar) and it will automatically add two columns to the current sheet: #upload_status and #upload_abspath. Define absolute paths of files to be uploaded under the column #upload_abspath. #upload_status will show uploading status.

On the sidebar, you need to drag and drop a root folder that contains all files to be uploaded. Such action is necessary to grant read permission of files to the sidebar. Therefore, make sure that all files are organized under a single root directory.

Local file uploading (S3 command line)

Install AWS CLI first on your local computer/cluster where your files are.

$ pip install awscli

Click on menu IGVF - Generate S3 command line for file uploading and then the script will generate required columns for the feature: #upload_abspath and #upload_cmd. Define #upload_abspath for each row and click on the menu again. Use shell command line under #upload_cmd column to manually upload your files to the portal.

Property legends

Color and style represents a type of property.

Property color

  • Blue: Identifying property
  • Red: Required property
  • Gray: Admin-only/non-submittable property
  • Black: Submittable property

Property style

  • Underline: Searchable property
  • Italic+Bold: Array type property

Developer notes

See DEV.md for details how to maintain this tool.

igvf-metadata-submitter's People

Contributors

leepc12 avatar mingjiecn avatar

Stargazers

 avatar Alejandro Barrera avatar

Watchers

Ben Hitz avatar  avatar  avatar

Forkers

pankbase-db

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.