One time funky gene name cleanup
Jump to navigation
Jump to search
era - summer 2016. jji
put on wiki put the following text into the wiki ———— Create a remapping table with old_id, new_id for all names with trailing spaces and the their trimmed counterpart then update sea, ortholog, and activity to set gene_fk=new_id where gene_id=old_id new version: create temp table genefix as select x.gene_id as old_id, y.gene_id as new_id from chembl21a.gene as x join chembl21a.gene as y on y.name=trim (trailing ' ' from x.name) where y.gene_id != x.gene_id ; update chembl21a.annotation set gene_fk=new_id from genefix where gene_fk=old_id; Update chembl21a.sea set gene_fk=new_id from genefix where gene_fk=old_id Update chembl21a.activity set gene_fk=new_id from genefix where gene_fk=old_id 88675 92117 Create temp table genefix as select x.gene_id as old_id, y.gene_id as new_id from gene as x join gene as y on y.name=trim (trailing ' ' from x.name) where x.name like '% '; Update chemb21a.annotation set gene_fk=new_id from genefix where gene_fk=old_id Update chembl21a.sea set gene_fk=new_id from genefix where gene_fk=old_id Update chembl21a.activity set gene_fk=new_id from genefix where gene_fk=old_id update chembl21a.gene delete from chembl21a.gene where … ————