I would like to download the list all SNPs for a gene of my interest with all their details like Chromosome, Physical position etc. How can I do this?
I would like to download the list all SNPs for a gene of my interest with all their details like Chromosome, Physical position etc. How can I do this?
Dear Mahantesh,
For people who are not used to command line, biomart has a very nice interface for downloading SNPs etc. Go to http://www.ensembl.org/biomart/martview/ . You can filter based on gene IDs, you will find these on ensembl/UCSC.
Thank you Ibrahim. I had a question; I followed your response and got a table. Why some refSNPs are listed more than once? Is that because of alternative splicing or I have done something wrong? Variant name Protein location (aa) Variant alleles
rs141402957------------------T/C
rs28934578-------175-------C/A/T
rs141402957----- 312-------T/C
rs28934578------- 136-------C/A/T
rs28934578------- 43---------C/A/T
rs141402957----- 219-------T/C
rs141402957-----192--------T/C
rs28934578-------16---------C/A/T
rs141402957------351-------T/C
rs28934578--------82--------C/A/T
rs28934578-------------------C/A/T
rs141402957-----340-------T/C
rs28934578-------164-------C/A/T
Hi there, sorry for the delay. I think I had a script that filters duplicates (https://github.com/IbrahimTanyalcin/I-PV/blob/master/ipv/script/invokeCircos.pl), though it is used for visualization. You can do the same with python/perl or whatever you fancy.
Get all SNP rs*
IDs via the command line:
$ mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -N -e 'SELECT chrom, chromStart, chromEnd, name FROM snp142Common' hg19 > snp142Common.bed
Get genes and convert to BED with gtf2bed
:
$ wget -qO- ftp://ftp.sanger.ac.uk/pub/gencode/Gencode_human/release_19/gencode.v19.annotation.gtf.gz \
| gunzip -c \
| grep -w "gene" \
| gtf2bed \
> genes.bed
Adjust this step for whichever annotations you use or prefer.
Filter gene names for the gene of interest, then map SNPs to gene, using bedmap
to look for SNPs whose positions overlap those of Gencode genes:
$ grep -w 'name-of-gene' genes.bed | bedmap --echo snp142Common.bed - > answer.bed
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
A: How do I ask a question on Biostars?