<p>Hi,</p>

<p>I have a Python script which takes as input a list of SNPs, then calls <a href='http://samtools.sourceforge.net/tabix.shtml'><code>tabix</code></a> to retrieve .<em>VCF file and does some stuff with it.
The problem is that i need to manually add (</em>using UCSC genome browser web*) the coordinates of the SNP for tabix to work properly.</p>

<p>Does any one know any simple python API / function / module to easy add this information without having to perform the search manually?</p>

<p>Thanks!</p>

You could use an external database to find the coordinates of your rs## (not tested, please check the +0/+1 for the coordinates)

    for R in rs25 rs26 rs27 
    do
        mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -Dhg19 -N -e "select concat(chrom,':',chromStart+1,'-',chromEnd) from snp135 where name='$R';" |\
        xargs tabix my.vcf.gz
    done