Skip to content

Importing Data via command line

Don edited this page Oct 15, 2021 · 2 revisions

Contents

  1. Preparation
  2. External Uploads

Preparation

You will need a running and accessible Pretzel instance in order to run through the following examples.

External Uploads

Maps can also be added to Pretzel via external means, such as the command line tool, curl. A recommended method to upload maps outside of the app is by using Postman.

Datasets which are too large for upload via the frontend GUI app can be uploaded via command-line HTTP post, which may be done on the server host after the data files have been copied there.

Using curl

These maps can be uploaded using curl:

curl -X POST \
     -H "Accept: application/json" \
     -H "Content-type: application/json" \
     -H "Authorization: YOUR_TOKEN" \
     -d @example_map1.json \
     localhost:5000/api/geneticmaps/upload

curl -X POST \
     -H "Accept: application/json" \
     -H "Content-type: application/json" \
     -H "Authorization: YOUR_TOKEN" \
     -d @example_map2.json \
     localhost:5000/api/geneticmaps/upload

You should now be able to load localhost:5000 in a browser and select the two maps for alignment.

// ### Using Postman // TODO