Skip to content

Instantly share code, notes, and snippets.

@acoffman
acoffman / get_variants_for_gene.py
Created February 13, 2019 21:13
Get all variants in CIViC for a specific entrez symbol
import requests
entrez_symbol = 'BRAF'
gene_url = 'https://civicdb.org/api/genes/{}?identifier_type=entrez_symbol'.format(entrez_symbol)
gene_response = requests.get(gene_url)
gene_body = gene_response.json()
variant_details = []