This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How To Find Nearest Gene Upstream Using Mysql And Perl Program

How to Find nearest gene upstream using mysql and perl program

There is a table of genes in mysql. I have a list of reg. elements, their start position on a chromosome, and their end position on a chromosome. How do you write perl program with mysql commands (DBI, DBD Mysql module) to search for the gene (from a table of genes downloaded in mysql) nearest each element. How do you make the perl program run faster since there are many elements for which you have to search for the nearest gene?

I am new to mysql and perl and have little programming background. Please explain step by step how to go about doing an example. I must use a table of genes (that has over a 150K genes) that I downloaded into a mysql database. So i have a regulatory element and its start position, end position, and chromosome number. I have a mysql table of genes. how do i match the gene closest upstream or downstream to this reg. element most easily? i will also need to include a subroutine for finding the closest gene too. The thing I'm really stuck on is how to find the closest gene.

deleted-post

0 answers

No answers yet.

Log in to answer this question.