This is a test version of Biostars. For the public version, visit https://www.biostars.org.
extract genes and functions +/-50kb around a SNP

Hi everyone,

I have a list of SNPs (rs) and I would like to extract all the genes and their functions that are located 50kb up- and downstream of them. I've been trying to generate the links to the corresponding pages of UCSC with Excel (which is more or less automatized). But I would like to find a way to directly obtain a file (.txtor .csv) with the information I need. Can anyone recommend a more automatized method with e.g an R package to obtain this information? Thank you very much in advanced!

snp gwas

Hi Pierre, I'm trying to use the mysql solution you proposed in your other post, but mysql gives me the following error: ERROR 1146 (42S02) at line 2: Table 'hg19.snp130' doesn't exist. Is this because I'm looking at a deprecated table? Is there maybe a more updated one for snp information? Thanks in advance!

Try snp151 which is the current one and be sure to have the corret genome version hg19 <=> hg38.

Great, working! But... where can I find the list of tables from which to choose the information?

which information?

I'd like to find the names of the genes that are 50kb up- and downstream of my list of rs and also their functions, pathways in which they are involved and their disease associations.

Hi Pierre, Would you please update your answer to reflect the current dbSNP version?

Get coordinates or the rs in BED format ( Get Rs Number Based On Chromosome and Position ), then define a 50kb window around these using BEDtools slop and then use BEDtools intersect to intersect these windows with a GTF annotation file to get the respective genes.

Hi, well if you only want genes, then I would suggest downloading complete gff or similar format for your organism, and then do simple selection of rows within desired range. In good gff, there is already some functional annotation present, but with accession number for the gene you certainly will be able to look into your favourite database. Best regards

0 answers

No answers yet.

Log in to answer this question.