This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Download Snp Data From Dbsnp Using Eutils?

can i download SNPs data(rsID,chromosomal position, function, variation class, contig,contig position,Allele etc..) of a gene from dbSNP using eUtils?

eg. i want to download SNPs data(rsID,chromosomal position, function, variation class, contig,contig position,Allele etc..) of DMD gene using eUtils.

snp ncbi eutils

1 answer

Get the ID of your gene: e.g: http://www.ncbi.nlm.nih.gov/gene/4853

retrieves the SNP id with NCBI ELink: http://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=gene&db=snp&id=4853


http://www.ncbi.nlm.nih.gov/entrez/query/DTD/eLink_101123.dtd">
<eLinkResult>

    <LinkSet>
        <DbFrom>gene</DbFrom>
        <IdList>
            <Id>4853</Id>
        </IdList>
        <LinkSetDb>
            <DbTo>snp</DbTo>
            <LinkName>gene_snp</LinkName>
            <Link>
                <Id>207460413</Id>
            </Link>
            <Link>
                <Id>202240453</Id>
            </Link>
             (....)

fetch the SNP data with ncbi efetch:

http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=snp&id=202240453&retmode=xml

Log in to answer this question.