Entering edit mode
14.1 years ago
D W
▴
150
I have a list of Ensembl gene IDs. I would like a file to cross reference them to aliases from kgAlias.
Preferably it would be some kind of mysql statements with a join of of some kind:
mysql -N -h genome-mysql.cse.ucsc.edu -A -u genome -D hg18 -e 'select name,name2,exonStarts,exonEnds from ensGene'
UPDATE: Pierre answered this question:
mysql -N -h genome-mysql.cse.ucsc.edu -A -u genome -D hg18 -e '\
select QUERY.name,QUERY.name2,QUERY.geneSymbol from
(select X.*,\
G.* from ensGene as G,\
knownToEnsembl as KE,\
kgXref as X where\
G.name=KE.value and KE.name=X.kgID)\
as QUERY'
Thanks very much. May I ask, how can I restrict the results to output only the name (ex.ENST00000250784), name2 (ex. ENSG00000129824), and geneSymbol (ex. RPS4Y1)?
add ... ' and G.name="ENST00000250784" and X.geneSymbol="RPS4Y1" ' at the end of the query. See. http://dev.mysql.com/doc/refman/5.0/en/select.html
thanks for the link