A list of snp ID
e.g.:rs7754840
......
Need Condition(s) (Mode of inheritance)
I searched ClinVar data : XML, TXT, and VCF. No file contain both "snp ID" and "Phenotype" item.
Maybe I need to change snp ID to its Variation ID (e.g. Variation ID:986) at first. Then, crawling both item use python.
Dose anyone had successfully change snp ID to Variation ID of Clinvar database or has more directly solutions.
Thanks for help in advance!
3 answers
Try MyVariant.info API:
http://myvariant.info/v1/query?q=dbsnp.rsid:rs727503873&fields=clinvar
There is a "variant_id" field under "clinvar". Or maybe you don't need variant_id anymore, since you can get back ClinVar annotations from a rsid directly now.
Check out this "Access ClinVar Data from MyVariant.info Services" tutorial. Also this biostar answer:
With the UCSC Table Browser:
https://genome.ucsc.edu/cgi-bin/hgTables
Select your desired assembly version, group: Phenotype and Literature, track: ClinVar Variants. This table includes the snpID (without the leading rs).
When I tried this solution, myvariant.info was a bit outdated, but there is another way
In the clinvar FTP site, in the tab deliminated section, there is a file called "Cross References.txt". This will get you from dbsnp ID to allele ID. There is another file called "Variation allele.txt" that can get you from Allele ID to variation ID.
You can read these text files directly from in R or Python. And it will be up to date
Log in to answer this question.