| name | bio-clinical-databases-dbsnp-queries |
| description | Query dbSNP for rsID lookups, variant annotations, and cross-references to other databases. Use when mapping between rsIDs and genomic coordinates or retrieving basic variant information. |
| tool_type | python |
| primary_tool | myvariant |
Version Compatibility
Reference examples tested with: BioPython 1.83+, Entrez Direct 21.0+
Before using code patterns, verify installed versions match. If versions differ:
- Python:
pip show <package> then help(module.function) to check signatures
If code throws ImportError, AttributeError, or TypeError, introspect the installed
package and adapt the example to match the actual API rather than retrying.
dbSNP Queries
"Look up variant information by rsID" → Retrieve variant annotations, genomic coordinates, and cross-references to ClinVar/gnomAD from dbSNP using REST API queries.
- Python:
myvariant.MyVariantInfo().getvariant('rs12345')
Query rsID via myvariant.info
Goal: Retrieve variant information including dbSNP, ClinVar, and gnomAD annotations by rsID.
Approach: Query myvariant.info with the rsID and request specific annotation fields.
import myvariant
mv = myvariant.MyVariantInfo()
():
result = mv.getvariant(rsid, fields=[, , ])
result
result = get_rsid_info()