How can I get a list of all SNPs from a gene of my interest?
2
1
Entering edit mode
8.7 years ago
Mahan ▴ 70

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?

SNP Gene NCBI HapMap • 5.7k views
ADD COMMENT
1
Entering edit mode

A: How do I ask a question on Biostars?

Search first - Make sure the question on your mind hasn't been answered already. Search on biostars AND on google.

ADD REPLY
5
Entering edit mode
8.7 years ago

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.

ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
1
Entering edit mode
8.7 years ago

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
ADD COMMENT
0
Entering edit mode

Can you possibly give a real example? I dont know linux and dont know what is the order of commands and for example how to enter 'SELECT chrom, chromStart, chromEnd, name FROM snp142Common'

ADD REPLY

Login before adding your answer.

Traffic: 1670 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6