-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Question) Adding Variants/Evidences via API #413
Comments
We currently do not support programmatically adding variant or evidence records via the API to our production database. If you would like to add data to a local CIViC instance, we recommend a Ruby script. |
Thank you Susanna, we are quite new on Ruby/Rails, do you have examples or suggestion of 'good practices' for performing bulk data imports? We have in-house repository to be shared with collaborators, and currently evaluating if setting up local CIViC instance for sharing, and push our in-house repository to the local CIViC instance is a feasible option for us. |
I don't have any example at hand but my colleague @acoffman might. He has done data import from spreadsheets for CIViC in the past. What format is the data in currently in? In regards to your workflow, are you talking about pushing data to the CIViC production database? We'd have to come up with a strategy for doing so. We have done bulk data imports from trusted source before but we strongly prefer data import through the web interface as bulk imports tend to be laborious and error prone. May I ask what organization you work for? |
For local CIViC instance, is there facility for data import through web interface? There are a few sources from spreadsheets and mysql database; grooming the structure to fit CIViC (optimistically) should be doable. I mentioned pushing data to CIViC production is a long term prospect, at the moment we aim to kickstart unifying collaboration efforts via local CIViC instance. Therefore for short and medium term, we need either data import via web interface, or bulk imports for our local instance. Do you mind to share more on your strategy on getting the data from trusted sources? I suppose this is the same scenario we are facing, although locally. |
There are a few different data objects in the CIViC schema the most import being genes, variants, and evidence_items. Evidence items can be added through the civic client web interface, e.g. https://civicdb.org/add/evidence/basic. Variants get created as part of evidence item creation if the variant doesn't yet exist in the database. Genes are the only object that would need to be pre-populated in your local instance. In CIViC we use Entrez as the canonical gene source so this import could happen in a Ruby script and utilizing the Entrez API. At a minimum the CIViC database schema requires the fields For evidence items, we recommend using the above endpoint on your local instance instead of doing a bulk import as that interface will give you the most features and will be the easier and less error-prone than a bulk import. |
I see, thanks Susanna - if you could an example of gene import scripts that will be very helpful for us. I'm with PeterMacCallum Cancer Centre (Australia) by the way; I'll have a look on data schema and workflow in CIViC closer. |
@NThio I don't have the code at the moment but I do know we get them from the NCBI Entrez API. https://www.ncbi.nlm.nih.gov/books/NBK25501/ |
Hi, is it possible to add variant and evidence records programmatically via API? The examples at (https://github.com/griffithlab/civic-api-client) and the API docs (http://griffithlab.org/civic-api-docs/) only describes queries only.
The text was updated successfully, but these errors were encountered: