ucsc RSid to gene name
1
0
Entering edit mode
8.4 years ago
pinikoma • 0

Hi all,

Where can I find a table containing rsid to gene name transformation, preferably at the ucsc database?

gene ucsc rsid • 4.3k views
ADD COMMENT
1
Entering edit mode
ADD REPLY
0
Entering edit mode

so you are saying that position by kb is the only way to find out what gene a snp belongs to ?, there is no special table for this ?

ADD REPLY
1
Entering edit mode
8.4 years ago

Another way to get access to UCSC datasets and do genomic set operations is via the command line, using mysql, wget and BEDOPS tools like gtf2bed and bedmap.

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:

$ wget -O - ftp://ftp.sanger.ac.uk/pub/gencode/Gencode_human/release_19/gencode.v19.annotation.gtf.gz \
    | gunzip -c \
    | grep -w "gene" \
    | gtf2bed \
    > gencode.v19.genes.bed

Map gene names (in the gene ID field) to SNPs, using bedmap to look for SNPs whose positions overlap those of Gencode genes:

$ bedmap --echo --echo-map-id-uniq snp142Common.bed gencode.v19.genes.bed > snpsWithMappedGeneIds.bed

If you want, you can expand the window around a SNP by some number of bases to allow a looser search ("nearby" genes) by adding the --range option to bedmap.

For example, for a 1 kb window centered on each SNP, add --range 500:

$ bedmap --echo --echo-map-id-uniq --range 500 snp142Common.bed gencode.v19.genes.bed > snp1kbWindowsWithGeneIds.bed
ADD COMMENT

Login before adding your answer.

Traffic: 1498 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