This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to retrive the most recent entry from uscs databese to build a bed file

I am trying to perform the following mysql query on ucsc server

select knownGene.chrom,knownGene.exonStarts,knownGene.exonEnds,kgXref.geneSymbol from kgXref,knownGene, where kgXref.kgID=knownGene.name and kgXref.geneSymbo='RELN';

Ir returns 3 entries with the kgID's uc022ajq.1, uc010liz.3 ,and uc022ajr.1. How can I know which entry is the most recent one? I read that the most recent has the higher .n number, but in this case, I also have 3 different codes

thanks

uscs bed gene id mysql

You could use the identifiers you have in UCSC table browser and output a BED file that way.

1 answer

the correct query is

select knownGene.chrom,knownGene.exonStarts,knownGene.exonEnds,kgXref.geneSymbol
from kgXref,knownGene, knownCanonical where kgXref.kgID=knownGene.name
and kgXref.geneSymbol='RELN' and
kgXref.kgID=knownCanonical.transcript;

Log in to answer this question.