Ingest clinical data
If you have gotten this far, well done! Most of the hard work is done (hopefully). The output from the CSVConvert.py called something like $INPUT_DIR_map.json is the main file we need in order to ingest the clinical data into ingest.
Assuming that you have a configured ingest instance up and running and have access to a user with site curator or program curator credentials, you should be able to run through the instructions below.
It is preferable to attempt ingest using the API call. The API is described in ingest_openapi.md or can be explored using a swagger ui.
Ingesting clinical data into CanDIG
Before you can use the ingest endpoint, you will need an authorized bearer token. Users with site administration, site curator, or program curator for the program/s being ingested are able to ingest those programs. To get a bearer token:
-
Get a token by logging into the candig data portal as site admin and copying the API token.
a. Go to the icon in the top right of the screen and click the cog
b. Click ‘ *** Get API Token’
c. Click the token to copy the text
-
Open a terminal and save it into a variable called TOKEN
- User the clinical ingest endpoint to ingest data.
An example call to the clinical endpoint would look something like (note you will need to replace $CANDIG_URL with the root url of your instance):
If ingest worked correctly, you should get a response from the API giving you your queue_id to check the status of your ingest:
Since ingest is an asynchronous process, it can take some time to complete depending on the size of your clinical data. To check on the status of your clinical ingest, use the status endpoint:
While the data is still being ingested, the status will read "status": "still in queue"
. When clinical ingest is complete, a successful ingest will have a summary of what was ingested, you should check the numbers are as expected. If any errors were found that would prevent ingest, they will be listed in the errors key in the response.
Example response from the status endpoint when clinical ingest for a program is complete:
Once you have successfully ingested all your clinical data, you can proceed with ingesting your genomic files and linking them the the ingested Sample Registration objects.