Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Revert "CGNC update"

This reverts commit 58cac9f.
  • Loading branch information...
commit b47cd320b007ef26c0af6e70002159ae443fd682 1 parent 58cac9f
pc79 authored October 09, 2012

Showing 1 changed file with 0 additions and 360 deletions. Show diff stats Hide diff stats

  1. 360  CGNC_update.pl
360  CGNC_update.pl
... ...
@@ -1,360 +0,0 @@
1  
-#!/local/bin/perl 
2  
-
3  
-
4  
-##############################################################################
5  
-# Syntax  : perl CGNC_update.pl 
6  
-#
7  
-# 
8  
-###############################################################################
9  
-
10  
-use Time::localtime;
11  
-use DBI;
12  
-
13  
-#select last ID (Count is not a good idea, since if some records are deleted you won't get the last ID right)
14  
-$dbargs = {AutoCommit => 0, PrintError => 1};
15  
-$dbh = DBI->connect("DBI:mysql:database=db_biocurate;host=localhost", "user", "pass", $dbargs);
16  
-
17  
-#$cmd = "select MAX(CAST(Substring(CGNC_ID,2) as Unsigned)) from db_biocurate.tblCGNC where CGNC_ID like 'A%'";
18  
-$cmd = "select MAX(CAST(CGNC_ID as Unsigned)) from db_biocurate.tblCGNC";
19  
-$sth = $dbh->prepare($cmd);
20  
-$sth->execute();
21  
-@row = ();
22  
-@row = $sth->fetchrow_array;
23  
-$count = 0 + $row[0];
24  
-
25  
-#print "A-recrod count: $count\n";
26  
-
27  
-
28  
-#prepare Entrez GeneIDs with taxon = '9031', this will be used by the GenesNotInCGNC view
29  
-#$dbh->do("delete from db_biocurate.tbl_gg_EntrezGeneIDs"); 
30  
-#if ($dbh->err()) { die "$DBI::errstr\n"; }
31  
-#$dbh->commit();
32  
-
33  
-#$dbh->do("insert into db_biocurate.tbl_gg_EntrezGeneIDs (gene_id) select gene_id from db_biocurate.tbl_gene_info where tax_id = '9031'"); 
34  
-#if ($dbh->err()) { die "$DBI::errstr\n"; }
35  
-#$dbh->commit();
36  
-
37  
-
38  
-#select Genes not in CGNC
39  
-$dbh->do("delete from db_biocurate.tblTemp_OneColumn"); 
40  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
41  
-$dbh->commit();
42  
-
43  
-$dbh->do("insert into db_biocurate.tblTemp_OneColumn (Column1) select Symbol from db_biocurate.GenesNotInCGNC group by Symbol having count(*) > 1"); 
44  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
45  
-$dbh->commit();
46  
-
47  
-$cmd = "select * from db_biocurate.GenesNotInCGNC where Symbol not in (select Column1 from db_biocurate.tblTemp_OneColumn)";
48  
-$sth2 = $dbh->prepare($cmd);
49  
-$sth2->execute();
50  
-@row = ();
51  
-
52  
-$tm=localtime;
53  
-my ($day,$month,$year)=($tm->mday,$tm->mon+1,$tm->year+1900);
54  
-$d = "$year-$month-$day";
55  
-
56  
-while(@row = $sth2->fetchrow_array) 
57  
-{
58  
-	$count++;
59  
-	$id = "$count";
60  
-	
61  
-	$row[0] =~ s/'/''/g; # Entrez gene ID
62  
-	$row[3] =~ s/'/''/g; # name
63  
-	$row[7] =~ s/'/''/g; # symbol
64  
-	$row[10] =~ s/'/''/g; # synonym
65  
-	
66  
-	#insert row into tblCGNC
67  
-	$dbh->do("INSERT INTO tblCGNC (CGNC_ID, EntrezGene_ID, EntrezGene_version, Ensembl_id, Ensembl_version, Gene_Symbol, Gene_Symbol_from_NomAuth, Gene_Name, Gene_Synonym, Comments, Curation_Status, private_ind, last_edit_date, last_edit_name, biotype_id, Species, ErrorCodes, OrthologyTypeAtApproval) VALUES ('$id', '$row[0]', NULL, NULL, NULL, '$row[7]', '-', '$row[3]', '$row[10]', NULL, '1', '0', '$d', NULL, NULL, 'Gallus gallus', '0', '')"); 
68  
-	if ($dbh->err()) { die "$DBI::errstr\n"; }
69  
-
70  
-
71  
-}
72  
-$dbh->commit();
73  
-
74  
-
75  
-
76  
-#Update automatic records matching to gene_info records (on EntrezGeneID) without CGNC dbXrefs
77  
-$dbh->do("update db_biocurate.tblCGNC c inner join db_biocurate.NonCGNC_Xref_Genes x on x.gene_id = c.EntrezGene_ID set c.Gene_Symbol = x.Symbol, c.Gene_Name = x.Name, c.Gene_Synonym = x.synonyms where c.Curation_Status = '1'"); 
78  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
79  
-$dbh->commit();
80  
-
81  
-
82  
-
83  
-
84  
-#Remove records with obsolete NCBI gene IDs 
85  
-$dbh->do("delete from db_biocurate.tblTemp_OneColumn"); 
86  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
87  
-$dbh->commit();
88  
-
89  
-$dbh->do("insert into db_biocurate.tblTemp_OneColumn (Column1) select c.CGNC_ID from db_biocurate.tblEntrezGeneHistory d inner join db_biocurate.tblCGNC c on d.Discontinued_GeneID = c.EntrezGene_ID where d.tax_id = '9031'"); 
90  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
91  
-$dbh->commit();
92  
-
93  
-$dbh->do("delete from db_biocurate.tblCGNC where CGNC_ID in (select Column1 from db_biocurate.tblTemp_OneColumn) and Curation_Status = '1'"); 
94  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
95  
-$dbh->commit();
96  
-
97  
-#update comments
98  
-#$dbh->do("update db_biocurate.tblCGNC set Comments = concat('Obsolete Entrez Gene ID|', Comments) where CGNC_ID in (select Column1 from db_biocurate.tblTemp_OneColumn)"); 
99  
-#if ($dbh->err()) { die "$DBI::errstr\n"; }
100  
-#$dbh->commit();
101  
-
102  
-#Update error code 01 - manual record obsolete entrez
103  
-$dbh->do("update db_biocurate.tblCGNC set ErrorCodes = concat('01|', ErrorCodes) where CGNC_ID in (select Column1 from db_biocurate.tblTemp_OneColumn) and ErrorCodes <> '0' and ErrorCodes not like '%01%'"); 
104  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
105  
-$dbh->commit();
106  
-
107  
-$dbh->do("update db_biocurate.tblCGNC set ErrorCodes = '01' where CGNC_ID in (select Column1 from db_biocurate.tblTemp_OneColumn) and ErrorCodes = '0'"); 
108  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
109  
-$dbh->commit();
110  
-
111  
-
112  
-$dbh->do("delete from db_biocurate.tblTemp_OneColumn"); 
113  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
114  
-$dbh->commit();
115  
-
116  
-
117  
-#Update Ensembl gene ids based on Ensembl2Gene overwritten by custom mappings
118  
-$dbh->do("delete from db_biocurate.tblTemp_Entrez_Ens"); 
119  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
120  
-$dbh->commit();
121  
-
122  
-$dbh->do("insert into db_biocurate.tblTemp_Entrez_Ens (Entrez_ID, Ensembl_ID) select distinct geneID, ensembl_gene_id from db_biocurate.tblGene2Ensembl where taxon = '9031'"); 
123  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
124  
-$dbh->commit();
125  
-
126  
-$dbh->do("delete from db_biocurate.tblTemp_Entrez_Ens where Entrez_ID in (select Entrez_ID from db_biocurate.tblCGNC_Merged_Entrez_Ens)"); 
127  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
128  
-$dbh->commit();
129  
-
130  
-$dbh->do("insert into db_biocurate.tblTemp_Entrez_Ens (Entrez_ID, Ensembl_ID) select distinct Entrez_ID, Ensembl_ID from db_biocurate.tblCGNC_Merged_Entrez_Ens"); 
131  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
132  
-$dbh->commit();
133  
-
134  
-$dbh->do("update db_biocurate.tblCGNC c inner join db_biocurate.tblTemp_Entrez_Ens t on t.Entrez_ID = c.EntrezGene_ID set c.Ensembl_id = t.Ensembl_ID"); 
135  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
136  
-$dbh->commit();
137  
-
138  
-$dbh->do("delete from db_biocurate.tblTemp_Entrez_Ens"); 
139  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
140  
-$dbh->commit();
141  
-
142  
-
143  
-
144  
-
145  
-#Remove records with obsolete Ensembl gene IDs 
146  
-$dbh->do("delete from db_biocurate.tblCGNC where Ensembl_id not in (select GeneID from db_biocurate.tblEnsemblCurrentGenes) and Curation_Status = '1' and Ensembl_id is not NULL and Ensembl_id <> ''"); 
147  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
148  
-$dbh->commit();
149  
-
150  
-#update comments
151  
-#$dbh->do("update db_biocurate.tblCGNC set Comments = concat('Obsolete Ensembl Gene ID|', Comments) where Ensembl_id not in (select GeneID from db_biocurate.tblEnsemblCurrentGenes) and Ensembl_id is not NULL"); 
152  
-#if ($dbh->err()) { die "$DBI::errstr\n"; }
153  
-#$dbh->commit();
154  
-
155  
-#Update error code 02 - manual record obsolete ensembl
156  
-$dbh->do("update db_biocurate.tblCGNC set ErrorCodes = concat('02|', ErrorCodes) where Ensembl_id not in (select GeneID from db_biocurate.tblEnsemblCurrentGenes) and Ensembl_id is not NULL and Ensembl_id <> '' and ErrorCodes <> '0' and ErrorCodes not like '%02%'"); 
157  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
158  
-$dbh->commit();
159  
-
160  
-$dbh->do("update db_biocurate.tblCGNC set ErrorCodes = '02' where Ensembl_id not in (select GeneID from db_biocurate.tblEnsemblCurrentGenes) and Ensembl_id is not NULL and Ensembl_id <> '' and ErrorCodes = '0'"); 
161  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
162  
-$dbh->commit();
163  
-
164  
-
165  
-#Do HCOP transfers
166  
-
167  
-$dbh->do("update db_biocurate.tblCGNC set Gene_Synonym = '' where Gene_Synonym = '-' or Gene_Synonym is null"); 
168  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
169  
-$dbh->commit();
170  
-
171  
-
172  
-#moving LOC* symbol to synonym
173  
-$dbh->do("update db_biocurate.tblCGNC c inner join db_biocurate.tblHCOP h on h.chicken_entrez = c.EntrezGene_ID set Gene_Synonym = concat(concat(c.Gene_Synonym, '|'), c.Gene_Symbol) where h.ortholog_type = '1:1' and c.Curation_Status = '1' and (h.human_name <> c.Gene_Name or h.human_symbol <> c.Gene_Symbol) and h.human_symbol <> '-' and h.human_symbol not like 'C%ORF%' and c.Gene_Symbol like 'LOC%' and c.Gene_Synonym <> '' and c.Gene_Synonym not like 'LOC%'"); 
174  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
175  
-#$dbh->commit();
176  
-
177  
-#moving LOC* symbol to empty synonym
178  
-$dbh->do("update db_biocurate.tblCGNC c inner join db_biocurate.tblHCOP h on h.chicken_entrez = c.EntrezGene_ID set Gene_Synonym = Gene_Symbol where h.ortholog_type = '1:1' and c.Curation_Status = '1' and (h.human_name <> c.Gene_Name or h.human_symbol <> c.Gene_Symbol) and h.human_symbol <> '-' and h.human_symbol not like 'C%ORF%' and c.Gene_Symbol like 'LOC%' and c.Gene_Synonym = ''"); 
179  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
180  
-#$dbh->commit();
181  
-
182  
-#transfer HCOP data to record with empty Comments
183  
-$dbh->do("update db_biocurate.tblHCOP h inner join db_biocurate.tblCGNC c on h.chicken_entrez = c.EntrezGene_ID set c.Gene_Symbol = h.human_symbol, c.Gene_Name = h.human_name, c.Comments = 'Symbol and Name transferred from HCOP' where h.ortholog_type = '1:1' and c.Curation_Status = '1' and (h.human_name <> c.Gene_Name or h.human_symbol <> c.Gene_Symbol) and h.human_symbol <> '-' and h.human_symbol not like 'C%ORF%' and c.Comments is null"); 
184  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
185  
-#$dbh->commit();
186  
-
187  
-#transfer HCOP data to record with non-empty Comments
188  
-$dbh->do("update db_biocurate.tblHCOP h inner join db_biocurate.tblCGNC c on h.chicken_entrez = c.EntrezGene_ID set c.Gene_Symbol = h.human_symbol, c.Gene_Name = h.human_name, c.Comments = concat(c.Comments, '|Symbol and Name transferred from HCOP') where h.ortholog_type = '1:1' and c.Curation_Status = '1' and (h.human_name <> c.Gene_Name or h.human_symbol <> c.Gene_Symbol) and h.human_symbol <> '-' and h.human_symbol not like 'C%ORF%' and c.Comments is not null"); 
189  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
190  
-$dbh->commit();
191  
-
192  
-
193  
-$dbh->do("update db_biocurate.tblCGNC set Gene_Name = '' where Gene_Name = '-' or Gene_Name is null"); 
194  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
195  
-$dbh->commit();
196  
-
197  
-
198  
-
199  
-#Remove Gene_Name and Gene_Symbol from Gene_Synonym
200  
-$dbh->do("update db_biocurate.tblCGNC set Gene_Synonym = replace(Gene_Synonym, concat('|', Gene_Name, '|'), '|') where Gene_Synonym like CONCAT('%|', Gene_Name,'|%')"); 
201  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
202  
-$dbh->commit();
203  
-
204  
-$dbh->do("update db_biocurate.tblCGNC set Gene_Synonym = replace(Gene_Synonym, concat('|', Gene_Name), '') where Gene_Synonym like CONCAT('%|', Gene_Name)"); 
205  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
206  
-$dbh->commit();
207  
-
208  
-$dbh->do("update db_biocurate.tblCGNC set Gene_Synonym = replace(Gene_Synonym, concat(Gene_Name, '|'), '') where Gene_Synonym like CONCAT(Gene_Name, '|%')"); 
209  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
210  
-$dbh->commit();
211  
-
212  
-$dbh->do("update db_biocurate.tblCGNC set Gene_Synonym = replace(Gene_Synonym, concat('|', Gene_Symbol, '|'), '|') where Gene_Synonym like CONCAT('%|', Gene_Symbol,'|%')"); 
213  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
214  
-$dbh->commit();
215  
-
216  
-$dbh->do("update db_biocurate.tblCGNC set Gene_Synonym = replace(Gene_Synonym, concat('|', Gene_Symbol), '') where Gene_Synonym like CONCAT('%|', Gene_Symbol)"); 
217  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
218  
-$dbh->commit();
219  
-
220  
-$dbh->do("update db_biocurate.tblCGNC set Gene_Synonym = replace(Gene_Synonym, concat(Gene_Symbol, '|'), '') where Gene_Synonym like CONCAT(Gene_Symbol, '|%')"); 
221  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
222  
-$dbh->commit();
223  
-
224  
-
225  
-#recalculate error codes
226  
-
227  
-#manual record nolonger 1:1 (code 03)
228  
-$dbh->do("update db_biocurate.tblHCOP h inner join db_biocurate.tblCGNC c on h.chicken_entrez = c.EntrezGene_ID set c.ErrorCodes = concat(c.ErrorCodes, '|03') where h.ortholog_type <> '1:1' and c.Curation_Status = '3' and c.OrthologyTypeAtApproval = '1:1' and c.ErrorCodes <> '0' and c.ErrorCodes not like '%03%'"); 
229  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
230  
-$dbh->commit();
231  
-
232  
-$dbh->do("update db_biocurate.tblHCOP h inner join db_biocurate.tblCGNC c on h.chicken_entrez = c.EntrezGene_ID set c.ErrorCodes = '03' where h.ortholog_type <> '1:1' and c.Curation_Status = '3' and c.OrthologyTypeAtApproval = '1:1' and c.ErrorCodes = '0'"); 
233  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
234  
-$dbh->commit();
235  
-
236  
-
237  
-# For manual records, 1:1 ortholog has different name (code 04)
238  
-$dbh->do("update db_biocurate.tblHCOP h inner join db_biocurate.tblCGNC c on h.chicken_entrez = c.EntrezGene_ID set c.ErrorCodes = concat(c.ErrorCodes, '|04') where h.ortholog_type = '1:1' and c.Curation_Status = '3' and (h.human_name <> c.Gene_Name) and h.human_symbol <> '-' and h.human_symbol not like 'C%ORF%' and c.ErrorCodes <> '0' and c.ErrorCodes not like '%04%'"); 
239  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
240  
-$dbh->commit();
241  
-
242  
-$dbh->do("update db_biocurate.tblHCOP h inner join db_biocurate.tblCGNC c on h.chicken_entrez = c.EntrezGene_ID set c.ErrorCodes = '04' where h.ortholog_type = '1:1' and c.Curation_Status = '3' and (h.human_name <> c.Gene_Name) and h.human_symbol <> '-' and h.human_symbol not like 'C%ORF%' and c.ErrorCodes = '0'"); 
243  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
244  
-$dbh->commit();
245  
-
246  
-
247  
-# For manual records, 1:1 ortholog has different symbol (code 05)
248  
-$dbh->do("update db_biocurate.tblHCOP h inner join db_biocurate.tblCGNC c on h.chicken_entrez = c.EntrezGene_ID set c.ErrorCodes = concat(c.ErrorCodes, '|05') where h.ortholog_type = '1:1' and c.Curation_Status = '3' and (h.human_symbol <> c.Gene_Symbol) and h.human_symbol <> '-' and h.human_symbol not like 'C%ORF%' and c.ErrorCodes <> '0' and c.ErrorCodes not like '%05%'"); 
249  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
250  
-$dbh->commit();
251  
-
252  
-$dbh->do("update db_biocurate.tblHCOP h inner join db_biocurate.tblCGNC c on h.chicken_entrez = c.EntrezGene_ID set c.ErrorCodes = '05' where h.ortholog_type = '1:1' and c.Curation_Status = '3' and (h.human_symbol <> c.Gene_Symbol) and h.human_symbol <> '-' and h.human_symbol not like 'C%ORF%' and c.ErrorCodes = '0'"); 
253  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
254  
-$dbh->commit();
255  
-
256  
-
257  
-# Duplicate symbols (code 06)
258  
-$dbh->do("delete from db_biocurate.tblTemp_OneColumn"); 
259  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
260  
-$dbh->commit();
261  
-
262  
-$dbh->do("insert into db_biocurate.tblTemp_OneColumn (Column1) select Gene_Symbol from db_biocurate.tblCGNC group by Gene_Symbol having count(*)>1 and Gene_Symbol <> '' and Gene_Symbol is not null"); 
263  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
264  
-$dbh->commit();
265  
-
266  
-$dbh->do("update db_biocurate.tblCGNC set ErrorCodes = concat(ErrorCodes, '|06') where Gene_Symbol in (select Column1 from db_biocurate.tblTemp_OneColumn) and ErrorCodes <> '0' and ErrorCodes not like '%06%'"); 
267  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
268  
-$dbh->commit();
269  
-
270  
-$dbh->do("update db_biocurate.tblCGNC set ErrorCodes = '06' where Gene_Symbol in (select Column1 from db_biocurate.tblTemp_OneColumn) and ErrorCodes = '0'"); 
271  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
272  
-$dbh->commit();
273  
-
274  
-$dbh->do("delete from db_biocurate.tblTemp_OneColumn"); 
275  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
276  
-$dbh->commit();
277  
-
278  
-
279  
-# Duplicate entrez id (code 07)
280  
-$dbh->do("insert into db_biocurate.tblTemp_OneColumn (Column1) select EntrezGene_ID from db_biocurate.tblCGNC group by EntrezGene_ID having count(*)>1 and EntrezGene_ID <> '' and EntrezGene_ID is not null"); 
281  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
282  
-$dbh->commit();
283  
-
284  
-$dbh->do("update db_biocurate.tblCGNC set ErrorCodes = concat(ErrorCodes, '|07') where EntrezGene_ID in (select Column1 from db_biocurate.tblTemp_OneColumn) and ErrorCodes <> '0' and ErrorCodes not like '%07%'"); 
285  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
286  
-$dbh->commit();
287  
-
288  
-$dbh->do("update db_biocurate.tblCGNC set ErrorCodes = '07' where EntrezGene_ID in (select Column1 from db_biocurate.tblTemp_OneColumn) and ErrorCodes = '0'"); 
289  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
290  
-$dbh->commit();
291  
-
292  
-$dbh->do("delete from db_biocurate.tblTemp_OneColumn"); 
293  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
294  
-$dbh->commit();
295  
-
296  
-
297  
-# Duplicate ensembl id (code 08)
298  
-$dbh->do("insert into db_biocurate.tblTemp_OneColumn (Column1) select Ensembl_id from db_biocurate.tblCGNC group by Ensembl_id having count(*)>1 and Ensembl_id <> '' and Ensembl_id is not null"); 
299  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
300  
-$dbh->commit();
301  
-
302  
-$dbh->do("update db_biocurate.tblCGNC set ErrorCodes = concat(ErrorCodes, '|08') where Ensembl_id in (select Column1 from db_biocurate.tblTemp_OneColumn) and ErrorCodes <> '0' and ErrorCodes not like '%08%'"); 
303  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
304  
-$dbh->commit();
305  
-
306  
-$dbh->do("update db_biocurate.tblCGNC set ErrorCodes = '08' where Ensembl_id in (select Column1 from db_biocurate.tblTemp_OneColumn) and ErrorCodes = '0'"); 
307  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
308  
-$dbh->commit();
309  
-
310  
-$dbh->do("delete from db_biocurate.tblTemp_OneColumn"); 
311  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
312  
-$dbh->commit();
313  
-
314  
-
315  
-# missing symbol (code 09)
316  
-$dbh->do("update db_biocurate.tblCGNC set ErrorCodes = concat(ErrorCodes, '|09') where (Gene_Symbol = '' or Gene_Symbol is null) and ErrorCodes <> '0' and ErrorCodes not like '%09%'"); 
317  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
318  
-$dbh->commit();
319  
-
320  
-$dbh->do("update db_biocurate.tblCGNC set ErrorCodes = '09' where (Gene_Symbol = '' or Gene_Symbol is null) and ErrorCodes = '0'"); 
321  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
322  
-$dbh->commit();
323  
-
324  
-
325  
-# missing name (code 10)
326  
-$dbh->do("update db_biocurate.tblCGNC set ErrorCodes = concat(ErrorCodes, '|10') where (Gene_Name = '' or Gene_Name is null) and ErrorCodes <> '0' and ErrorCodes not like '%10%'"); 
327  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
328  
-$dbh->commit();
329  
-
330  
-$dbh->do("update db_biocurate.tblCGNC set ErrorCodes = '10' where (Gene_Name = '' or Gene_Name is null) and ErrorCodes = '0'"); 
331  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
332  
-$dbh->commit();
333  
-
334  
-
335  
-# Symbol starts with LOC (code 11)
336  
-$dbh->do("update db_biocurate.tblCGNC set ErrorCodes = concat(ErrorCodes, '|11') where Gene_Symbol like 'LOC%' and ErrorCodes <> '0' and ErrorCodes not like '%11%'"); 
337  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
338  
-$dbh->commit();
339  
-
340  
-$dbh->do("update db_biocurate.tblCGNC set ErrorCodes = '11' where Gene_Symbol like 'LOC%' and ErrorCodes = '0'"); 
341  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
342  
-$dbh->commit();
343  
-
344  
-
345  
-# Symbol starts with KIAA (code 12)
346  
-$dbh->do("update db_biocurate.tblCGNC set ErrorCodes = concat(ErrorCodes, '|12') where Gene_Symbol like 'KIAA%' and ErrorCodes <> '0' and ErrorCodes not like '%12%'"); 
347  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
348  
-$dbh->commit();
349  
-
350  
-$dbh->do("update db_biocurate.tblCGNC set ErrorCodes = '12' where Gene_Symbol like 'KIAA%' and ErrorCodes = '0'"); 
351  
-if ($dbh->err()) { die "$DBI::errstr\n"; }
352  
-$dbh->commit();
353  
-
354  
-
355  
-$sth->finish();
356  
-$sth2->finish();
357  
-
358  
-$dbh->disconnect();
359  
-#the end
360  
-

0 notes on commit b47cd32

Please sign in to comment.
Something went wrong with that request. Please try again.