-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcs_stats.sql
381 lines (329 loc) · 18.7 KB
/
cs_stats.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
-- To generate data files:
--
-- run this file in psql
--
--
-- entries with aromatic and/or paramagnetic ligand
--
create temporary table cs_stat_exclude_all (id text);
insert into cs_stat_exclude_all select distinct c."Entry_ID" from macromolecules."Chem_comp" c
join macromolecules."Chem_comp_bond" b on b."Comp_ID"=c."ID" and b."Entry_ID"=c."Entry_ID"
where (c."Aromatic"='yes' or b."Aromatic_flag"='yes' or b."Value_order"='AROM')
union select distinct "Entry_ID" from macromolecules."Entity" where "Paramagnetic"='yes';
--
-- the easy one
--
-- RNA full set
--
drop table if exists web.cs_stat_rna_full;
select comp_id,atom_id,count(val) as count,min(val) as min,max(val) as max,round(avg(val),3) as avg,round(stddev(val),3) as std
into table web.cs_stat_rna_full
from
(select "Comp_ID" as comp_id,"Atom_ID" as atom_id,cast("Val" as numeric) as val from
macromolecules."Atom_chem_shift" where "Comp_ID" in ('A','C','G','U')) as qry
group by comp_id,atom_id order by comp_id,atom_id;
-- add outlier count
alter table web.cs_stat_rna_full
add column num_outliers integer;
update web.cs_stat_rna_full set num_outliers=
(select count(*) from macromolecules."Atom_chem_shift" where
"Comp_ID"=web.cs_stat_rna_full.comp_id and
"Atom_ID"=web.cs_stat_rna_full.atom_id and
(cast( "Val" as float ) > web.cs_stat_rna_full.avg + 3 * web.cs_stat_rna_full.std
or cast( "Val" as float ) < web.cs_stat_rna_full.avg - 3 * web.cs_stat_rna_full.std));
--
-- RNA exclusion list
--
create temporary table cs_stat_exclude_rna (id text);
insert into cs_stat_exclude_rna select distinct a."Entry_ID" from macromolecules."Atom_chem_shift" a
where "Comp_ID" in ('A','C','G','U') and not (cast(a."Val" as numeric)
between (select avg - 8 * std from web.cs_stat_rna_full where comp_id=a."Comp_ID" and atom_id=a."Atom_ID")
and (select avg + 8 * std from web.cs_stat_rna_full where comp_id=a."Comp_ID" and atom_id=a."Atom_ID"));
--
-- RNA restricted set
--
drop table if exists web.cs_stat_rna_filt;
select comp_id,atom_id,count(val) as count,min(val) as min,max(val) as max,round(avg(val),3) as avg,round(stddev(val),3) as std
into table web.cs_stat_rna_filt
from
(select "Comp_ID" as comp_id,"Atom_ID" as atom_id,cast("Val" as numeric) as val from
macromolecules."Atom_chem_shift" where "Comp_ID" in ('A','C','G','U') and "Entry_ID" not in
(select distinct id from cs_stat_exclude_all union select distinct id from cs_stat_exclude_rna)) as qry
group by comp_id,atom_id order by comp_id,atom_id;
-- add outlier count
alter table web.cs_stat_rna_filt
add column num_outliers integer;
update web.cs_stat_rna_filt set num_outliers=
(select count(*) from macromolecules."Atom_chem_shift" where
"Comp_ID"=web.cs_stat_rna_filt.comp_id and
"Atom_ID"=web.cs_stat_rna_filt.atom_id and
(cast( "Val" as float ) > web.cs_stat_rna_filt.avg + 3 * web.cs_stat_rna_filt.std
or cast( "Val" as float ) < web.cs_stat_rna_filt.avg - 3 * web.cs_stat_rna_filt.std));
--
--
-- DNA full set
--
select comp_id,atom_id,count(val) as count,min(val) as min,max(val) as max,round(avg(val),3) as avg,round(stddev(val),3) as std
into temporary table cs_stat_dna_full_raw
from
(select "Comp_ID" as comp_id,"Atom_ID" as atom_id,cast("Val" as numeric) as val from
macromolecules."Atom_chem_shift" where "Comp_ID" in ('DA','DC','DG','DT')) as qry
group by comp_id,atom_id order by comp_id,atom_id;
--
-- DNA exclusion list
--
create temporary table cs_stat_exclude_dna (id text);
insert into cs_stat_exclude_dna select distinct a."Entry_ID" from macromolecules."Atom_chem_shift" a
where "Comp_ID" in ('DA','DC','DG','DT') and not (cast(a."Val" as numeric)
between (select avg - 8 * std from cs_stat_dna_full_raw where comp_id=a."Comp_ID" and atom_id=a."Atom_ID")
and (select avg + 8 * std from cs_stat_dna_full_raw where comp_id=a."Comp_ID" and atom_id=a."Atom_ID"));
--
-- DNA restricted set for validator
--
select distinct comp_id,atom_id,count(val), min(val) as min,max(val) as max,round(avg(val),3) as avg,round(stddev(val),3) as std
into temporary table cs_stat_dna_filt_raw
from
(select "Comp_ID" as comp_id,"Atom_ID" as atom_id,cast("Val" as numeric) as val
from macromolecules."Atom_chem_shift"
where "Comp_ID" in ('DA','DC','DG','DT') and "Entry_ID" not in
(select distinct id from cs_stat_exclude_all union select distinct id from cs_stat_exclude_dna)) as qry
group by comp_id,atom_id order by comp_id,atom_id;
--
-- re-do DNA full set with methyls collapsed
-- (collapsing methyls after calculating statistics produces multiple rows due to round-off error)
--
drop table if exists web.cs_stat_dna_full;
select distinct comp_id,atom_id,
case when comp_id='DT' and atom_id='M7' then count(val)/3 else count(val) end as count,
min(val) as min,max(val) as max,round(avg(val),3) as avg,round(stddev(val),3) as std
into table web.cs_stat_dna_full
from
(select "Comp_ID" as comp_id,
case when "Comp_ID"='DT' and "Atom_ID" similar to 'H7[123]' then 'M7' else "Atom_ID" end as atom_id,
cast("Val" as numeric) as val
from macromolecules."Atom_chem_shift"
where "Comp_ID" in ('DA','DC','DG','DT')) as qry
group by comp_id,atom_id order by comp_id,atom_id;
-- add outlier count
alter table web.cs_stat_dna_full
add column num_outliers integer;
update web.cs_stat_dna_full set num_outliers=
(select count(*) from macromolecules."Atom_chem_shift" where
"Comp_ID"=web.cs_stat_dna_full.comp_id and
"Atom_ID"=(case when web.cs_stat_dna_full.atom_id='M7' then 'H71' else web.cs_stat_dna_full.atom_id end) and
(cast( "Val" as float ) > web.cs_stat_dna_full.avg + 3 * web.cs_stat_dna_full.std
or cast( "Val" as float ) < web.cs_stat_dna_full.avg - 3 * web.cs_stat_dna_full.std));
--
-- DNA restricted set with methyls collapsed
--
drop table if exists web.cs_stat_dna_filt;
select distinct comp_id,atom_id,case when comp_id='DT' and atom_id='M7' then count(val)/3 else count(val) end as count,
min(val) as min,max(val) as max,round(avg(val),3) as avg,round(stddev(val),3) as std
into table web.cs_stat_dna_filt
from
(select "Comp_ID" as comp_id,
case when "Comp_ID"='DT' and "Atom_ID" similar to 'H7[123]' then 'M7' else "Atom_ID" end as atom_id,
cast("Val" as numeric) as val
from macromolecules."Atom_chem_shift"
where "Comp_ID" in ('DA','DC','DG','DT') and "Entry_ID" not in
(select distinct id from cs_stat_exclude_all union select distinct id from cs_stat_exclude_dna)) as qry
group by comp_id,atom_id order by comp_id,atom_id;
-- add outlier count
alter table web.cs_stat_dna_filt
add column num_outliers integer;
update web.cs_stat_dna_filt set num_outliers=
(select count(*) from macromolecules."Atom_chem_shift" where
"Comp_ID"=web.cs_stat_dna_filt.comp_id and
"Atom_ID"=(case when web.cs_stat_dna_filt.atom_id='M7' then 'H71' else web.cs_stat_dna_filt.atom_id end) and
(cast( "Val" as float ) > web.cs_stat_dna_filt.avg + 3 * web.cs_stat_dna_filt.std
or cast( "Val" as float ) < web.cs_stat_dna_filt.avg - 3 * web.cs_stat_dna_filt.std));
--
-- peptide full set
--
select comp_id,atom_id,count(val) as count,min(val) as min,max(val) as max,round(avg(val),3) as avg,round(stddev(val),3) as std
into temporary table cs_stat_aa_full_raw
from
(select "Comp_ID" as comp_id,"Atom_ID" as atom_id,cast("Val" as numeric) as val from macromolecules."Atom_chem_shift"
where "Comp_ID" in ('ALA','ARG','ASN','ASP','CYS','GLN','GLU','GLY','HIS','ILE','LEU','LYS','MET','PHE','PRO','SER','THR','TRP','TYR','VAL')) as qry
group by comp_id,atom_id order by comp_id,atom_id;
--
-- peptide exclusion list
--
create temporary table cs_stat_exclude_aa (id text);
insert into cs_stat_exclude_aa select distinct a."Entry_ID" from macromolecules."Atom_chem_shift" a
where "Comp_ID" in ('ALA','ARG','ASN','ASP','CYS','GLN','GLU','GLY','HIS','ILE','LEU','LYS','MET','PHE','PRO','SER','THR','TRP','TYR','VAL')
and not (cast(a."Val" as numeric) between (select avg - 8 * std from cs_stat_aa_full_raw where comp_id=a."Comp_ID" and atom_id=a."Atom_ID")
and (select avg + 8 * std from cs_stat_aa_full_raw where comp_id=a."Comp_ID" and atom_id=a."Atom_ID"));
insert into cs_stat_exclude_aa select distinct "Entry_ID" from macromolecules."Atom_chem_shift"
where "Comp_ID" in ('ALA','ARG','ASN','ASP','CYS','GLN','GLU','GLY','HIS','ILE','LEU','LYS','MET','PHE','PRO','SER','THR','TRP','TYR','VAL')
and "Atom_ID"='H' and not (cast("Val" as numeric) between -2.5 and 22.0);
insert into cs_stat_exclude_aa select distinct "Entry_ID" from macromolecules."Atom_chem_shift"
where "Comp_ID"='HIS' and "Atom_ID"='HD1' and cast("Val" as numeric) < 2.0;
insert into cs_stat_exclude_aa select distinct "Entry_ID" from macromolecules."Atom_chem_shift"
where "Comp_ID"='HIS' and "Atom_ID"='HD2' and cast("Val" as numeric) > 12.0;
insert into cs_stat_exclude_aa select distinct "Entry_ID" from macromolecules."Atom_chem_shift"
where "Comp_ID"='HIS' and "Atom_ID"='HE1' and cast("Val" as numeric) > 15.0;
insert into cs_stat_exclude_aa select distinct "Entry_ID" from macromolecules."Atom_chem_shift"
where "Comp_ID"='HIS' and "Atom_ID"='HE2' and cast("Val" as numeric) < 2.0;
insert into cs_stat_exclude_aa select distinct "Entry_ID" from macromolecules."Atom_chem_shift"
where "Comp_ID" in ('ALA','ARG','ASN','ASP','CYS','GLN','GLU','GLY','HIS','ILE','LEU','LYS','MET','PHE','PRO','SER','THR','TRP','TYR','VAL')
and "Atom_type"='H' and "Atom_ID" not in ('H','HE','HE1','HE2','HD1','HD2','HZ','HH')
and not (cast("Val" as numeric) between -2.5 and 10.0);
insert into cs_stat_exclude_aa select distinct "Entry_ID" from macromolecules."Atom_chem_shift"
where "Comp_ID"='ARG' and "Atom_ID"='NE' and not (cast("Val" as numeric) between 60.0 and 100.0);
insert into cs_stat_exclude_aa select distinct "Entry_ID" from macromolecules."Atom_chem_shift"
where "Comp_ID"='ARG' and "Atom_ID" similar to 'NH[12]' and not (cast("Val" as numeric) between 50 and 90);
insert into cs_stat_exclude_aa select distinct "Entry_ID" from macromolecules."Atom_chem_shift"
where "Comp_ID"='PRO' and "Atom_ID"='N' and not (cast("Val" as numeric) between 110 and 150);
insert into cs_stat_exclude_aa select distinct "Entry_ID" from macromolecules."Atom_chem_shift"
where "Comp_ID"='LYS' and "Atom_ID"='NZ' and not (cast("Val" as numeric) between 12 and 52);
insert into cs_stat_exclude_aa select distinct "Entry_ID" from macromolecules."Atom_chem_shift"
where "Comp_ID"='HIS' and ("Atom_ID"='ND1' or "Atom_ID"='NE2') and not (cast("Val" as numeric) between 160 and 230);
insert into cs_stat_exclude_aa select distinct "Entry_ID" from macromolecules."Atom_chem_shift"
where "Comp_ID"='HIS' and "Atom_ID" similar to 'CD[12]' and cast("Val" as numeric) < 90;
insert into cs_stat_exclude_aa select distinct "Entry_ID" from macromolecules."Atom_chem_shift"
where "Comp_ID"='TYR' and "Atom_ID"='CZ' and cast("Val" as numeric) < 90;
--
-- peptide restricted set for validator
--
select distinct comp_id,atom_id,count(val),min(val) as min,max(val) as max,round(avg(val),3) as avg,round(stddev(val),3) as std
into temporary table cs_stat_aa_filt_raw
from
(select "Comp_ID" as comp_id,"Atom_ID" atom_id,cast("Val" as numeric) as val from macromolecules."Atom_chem_shift"
where "Comp_ID" in ('ALA','ARG','ASN','ASP','CYS','GLN','GLU','GLY','HIS','ILE','LEU','LYS','MET','PHE','PRO','SER','THR','TRP','TYR','VAL')
and "Entry_ID" not in (select distinct id from cs_stat_exclude_all union select distinct id from cs_stat_exclude_aa)) as qry
group by comp_id,atom_id order by comp_id,atom_id;
--
-- re-do peptide full set with H3s collapsed
--
drop table if exists web.cs_stat_aa_full;
select distinct comp_id,atom_id,
case when comp_id='ALA' and atom_id='MB' then count(val)/3
when comp_id='VAL' and atom_id='MG1' then count(val)/3
when comp_id='VAL' and atom_id='MG2' then count(val)/3
when comp_id='ILE' and atom_id='MG' then count(val)/3
when comp_id='ILE' and atom_id='MD' then count(val)/3
when comp_id='LEU' and atom_id='MD1' then count(val)/3
when comp_id='LEU' and atom_id='MD2' then count(val)/3
when comp_id='THR' and atom_id='MG' then count(val)/3
when comp_id='MET' and atom_id='ME' then count(val)/3
when comp_id='LYS' and atom_id='QZ' then count(val)/3
else count(val) end as count,
min(val) as min,max(val) as max,round(avg(val),3) as avg,round(stddev(val),3) as std
into table web.cs_stat_aa_full
from
(select "Comp_ID" as comp_id,
case when "Comp_ID"='ALA' and "Atom_ID" similar to 'HB[123]' then 'MB'
when "Comp_ID"='VAL' and "Atom_ID" similar to 'HG1[123]' then 'MG1'
when "Comp_ID"='VAL' and "Atom_ID" similar to 'HG2[123]' then 'MG2'
when "Comp_ID"='ILE' and "Atom_ID" similar to 'HG2[123]' then 'MG'
when "Comp_ID"='ILE' and "Atom_ID" similar to 'HD1[123]' then 'MD'
when "Comp_ID"='LEU' and "Atom_ID" similar to 'HD1[123]' then 'MD1'
when "Comp_ID"='LEU' and "Atom_ID" similar to 'HD2[123]' then 'MD2'
when "Comp_ID"='THR' and "Atom_ID" similar to 'HG2[123]' then 'MG'
when "Comp_ID"='MET' and "Atom_ID" similar to 'HE[123]' then 'ME'
when "Comp_ID"='LYS' and "Atom_ID" similar to 'HZ[123]' then 'QZ'
else "Atom_ID" end as atom_id,
cast("Val" as numeric) as val from macromolecules."Atom_chem_shift"
where "Comp_ID" in ('ALA','ARG','ASN','ASP','CYS','GLN','GLU','GLY','HIS','ILE','LEU','LYS','MET','PHE','PRO','SER','THR','TRP','TYR','VAL')) as qry
group by comp_id,atom_id order by comp_id,atom_id;
-- add outlier count
alter table web.cs_stat_aa_full
add column num_outliers integer;
update web.cs_stat_aa_full set num_outliers=
(select count(*) from macromolecules."Atom_chem_shift" where
"Comp_ID"=web.cs_stat_aa_full.comp_id and
"Atom_ID"=(case when web.cs_stat_aa_full.atom_id='MB' then 'HB1'
when web.cs_stat_aa_full.atom_id='MG1' then 'HG11'
when web.cs_stat_aa_full.atom_id='MG2' then 'HG21'
when web.cs_stat_aa_full.atom_id='MG' then 'HG21'
when web.cs_stat_aa_full.atom_id='MD' then 'HD11'
when web.cs_stat_aa_full.atom_id='MD1' then 'HD11'
when web.cs_stat_aa_full.atom_id='MD2' then 'HD21'
when web.cs_stat_aa_full.atom_id='ME' then 'HE1'
when web.cs_stat_aa_full.atom_id='QZ' then 'HZ1'
else web.cs_stat_aa_full.atom_id end) and
(cast( "Val" as float ) > web.cs_stat_aa_full.avg + 3 * web.cs_stat_aa_full.std
or cast( "Val" as float ) < web.cs_stat_aa_full.avg - 3 * web.cs_stat_aa_full.std));
--
-- peptide restricted set
--
drop table if exists web.cs_stat_aa_filt;
select distinct comp_id,atom_id,
case when comp_id='ALA' and atom_id='MB' then count(val)/3
when comp_id='VAL' and atom_id='MG1' then count(val)/3
when comp_id='VAL' and atom_id='MG2' then count(val)/3
when comp_id='ILE' and atom_id='MG' then count(val)/3
when comp_id='ILE' and atom_id='MD' then count(val)/3
when comp_id='LEU' and atom_id='MD1' then count(val)/3
when comp_id='LEU' and atom_id='MD2' then count(val)/3
when comp_id='THR' and atom_id='MG' then count(val)/3
when comp_id='MET' and atom_id='ME' then count(val)/3
when comp_id='LYS' and atom_id='QZ' then count(val)/3
else count(val) end as count,
min(val) as min,max(val) as max,round(avg(val),3) as avg,round(stddev(val),3) as std
into table web.cs_stat_aa_filt
from
(select "Comp_ID" as comp_id,
case when "Comp_ID"='ALA' and "Atom_ID" similar to 'HB[123]' then 'MB'
when "Comp_ID"='VAL' and "Atom_ID" similar to 'HG1[123]' then 'MG1'
when "Comp_ID"='VAL' and "Atom_ID" similar to 'HG2[123]' then 'MG2'
when "Comp_ID"='ILE' and "Atom_ID" similar to 'HG2[123]' then 'MG'
when "Comp_ID"='ILE' and "Atom_ID" similar to 'HD1[123]' then 'MD'
when "Comp_ID"='LEU' and "Atom_ID" similar to 'HD1[123]' then 'MD1'
when "Comp_ID"='LEU' and "Atom_ID" similar to 'HD2[123]' then 'MD2'
when "Comp_ID"='THR' and "Atom_ID" similar to 'HG2[123]' then 'MG'
when "Comp_ID"='MET' and "Atom_ID" similar to 'HE[123]' then 'ME'
when "Comp_ID"='LYS' and "Atom_ID" similar to 'HZ[123]' then 'QZ'
else "Atom_ID" end as atom_id,
cast("Val" as numeric) as val from macromolecules."Atom_chem_shift"
where "Comp_ID" in ('ALA','ARG','ASN','ASP','CYS','GLN','GLU','GLY','HIS','ILE','LEU','LYS','MET','PHE','PRO','SER','THR','TRP','TYR','VAL')
and "Entry_ID" not in (select distinct id from cs_stat_exclude_all union select distinct id from cs_stat_exclude_aa)) as qry
group by comp_id,atom_id order by comp_id,atom_id;
-- add outlier count
alter table web.cs_stat_aa_filt
add column num_outliers integer;
update web.cs_stat_aa_filt set num_outliers=
(select count(*) from macromolecules."Atom_chem_shift" where
"Comp_ID"=web.cs_stat_aa_filt.comp_id and
"Atom_ID"=(case when web.cs_stat_aa_filt.atom_id='MB' then 'HB1'
when web.cs_stat_aa_filt.atom_id='MG1' then 'HG11'
when web.cs_stat_aa_filt.atom_id='MG2' then 'HG21'
when web.cs_stat_aa_filt.atom_id='MG' then 'HG21'
when web.cs_stat_aa_filt.atom_id='MD' then 'HD11'
when web.cs_stat_aa_filt.atom_id='MD1' then 'HD11'
when web.cs_stat_aa_filt.atom_id='MD2' then 'HD21'
when web.cs_stat_aa_filt.atom_id='ME' then 'HE1'
when web.cs_stat_aa_filt.atom_id='QZ' then 'HZ1'
else web.cs_stat_aa_filt.atom_id end) and
(cast( "Val" as float ) > web.cs_stat_aa_filt.avg + 3 * web.cs_stat_aa_filt.std
or cast( "Val" as float ) < web.cs_stat_aa_filt.avg - 3 * web.cs_stat_aa_filt.std));
--
-- everything else
--
drop table if exists web.cs_stat_nstd;
select comp_id,atom_id,count(val) as count,min(val) as min,max(val) as max,round(avg(val),3) as avg,round(stddev(val),3) as std
into table web.cs_stat_nstd
from
(select "Comp_ID" as comp_id,"Atom_ID" as atom_id,cast("Val" as numeric) as val from macromolecules."Atom_chem_shift"
where "Comp_ID" not in ('A','C','G','U','DA','DC','DG','DT','ALA','ARG','ASN','ASP','CYS','GLN','GLU','GLY',
'HIS','ILE','LEU','LYS','MET','PHE','PRO','SER','THR','TRP','TYR','VAL')) as qry
group by comp_id,atom_id order by comp_id,atom_id;
--
-- export
--
\copy web.cs_stat_rna_full to '/projects/BMRB/public/ftp/pub/bmrb/statistics/chem_shifts/rna_full.csv' csv header
\copy web.cs_stat_rna_filt to '/projects/BMRB/public/ftp/pub/bmrb/statistics/chem_shifts/rna_filt.csv' csv header
\copy web.cs_stat_dna_full to '/projects/BMRB/public/ftp/pub/bmrb/statistics/chem_shifts/dna_full.csv' csv header
\copy web.cs_stat_dna_filt to '/projects/BMRB/public/pub/bmrb/statistics/chem_shifts/dna_filt.csv' csv header
\copy web.cs_stat_aa_full to '/projects/BMRB/public/ftp/pub/bmrb/statistics/chem_shifts/aa_full.csv' csv header
\copy web.cs_stat_aa_filt to '/projects/BMRB/public/ftp/pub/bmrb/statistics/chem_shifts/aa_filt.csv' csv header
\copy web.cs_stat_nstd to '/projects/BMRB/public/ftp/pub/bmrb/statistics/chem_shifts/others.csv' csv header
--
-- these are for validator
--
-- \copy web.cs_stat_rna_filt to 'rna_refdb.csv' csv header
-- \copy cs_stat_dna_filt_raw to 'dna_refdb.csv' csv header
-- \copy cs_stat_aa_filt_raw to 'aa_refdb.csv' csv header
--
-- eof