-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSQL-SRA-QRY-submission-joined-unannotated-count.txt
135 lines (128 loc) · 4.66 KB
/
SQL-SRA-QRY-submission-joined-unannotated-count.txt
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
-- ALL JOINED STUDY RECORDS (TOTAL STUDIES)
select 'Table: (study-exp join) - count of ALL study-experiment joined records';
select '(study-exp join)experiment:library_construction_protocol', 'all joined study records', count(*)
from
(
select
stu.study_accession id from study as stu
join
experiment as exp
on exp.study_accession = stu.study_accession
group by id
);
-- ALL UN-ANNOTATED STUDIES
-- Generate a list of unique study accessions (ids) for each group of annotation type
-- (fragment, ligate, pcr, all), then subtract this aggregated list of unique IDs (each
-- of which has some or all annotation) from the full list of unique studies.
select 'Table: (study-exp join) - count of ALL un-annotated study-experiment joined records';
select '(study-exp join)experiment:library_construction_protocol', 'not_anno', count(*)
from
(
select
stu.study_accession id from study as stu
join
experiment as exp
on exp.study_accession = stu.study_accession
where
id NOT IN
(
select
stu.study_accession id from study as stu
join
experiment as exp
on exp.study_accession = stu.study_accession
where
library_construction_protocol like "% shear%"
or library_construction_protocol like "% restriction%"
or library_construction_protocol like "% digest%"
or library_construction_protocol like "% fragment%"
or library_construction_protocol like "% breaks %"
or library_construction_protocol like "% nebulis%" or library_construction_protocol like "% nebuliz%"
or library_construction_protocol like "% acoustic%"
or library_construction_protocol like "% sonic%"
group by id
union all
select
stu.study_accession id from study as stu
join
experiment as exp
on exp.study_accession = stu.study_accession
where
library_construction_protocol like "% adapter%"
or library_construction_protocol like "% ligat%"
or library_construction_protocol like "% blunt%"
or library_construction_protocol like "% phosphorylat%"
or library_construction_protocol like "% overhang"
or library_construction_protocol like "% t4-PNK%"
or library_construction_protocol like "% t4%"
or library_construction_protocol like "% pnk%"
or library_construction_protocol like "% kinase%"
or library_construction_protocol like "% a-tail%"
group by id
union all
select
stu.study_accession id from study as stu
join
experiment as exp
on exp.study_accession = stu.study_accession
where
library_construction_protocol like "% clone%"
or library_construction_protocol like "% clonin%"
or library_construction_protocol like "% pcr %"
or library_construction_protocol like "% amplif%"
or library_construction_protocol like "% polymerase%"
or library_construction_protocol like "% taq%"
or library_construction_protocol like "% phusion%"
or library_construction_protocol like "% temperat%"
or library_construction_protocol like "% thermal%"
or library_construction_protocol like "% anneal%"
or library_construction_protocol like "% denature%"
group by id
union all
select
stu.study_accession id from study as stu
join
experiment as exp
on exp.study_accession = stu.study_accession
where
(
library_construction_protocol like "% shear%"
or library_construction_protocol like "% restriction%"
or library_construction_protocol like "% digest%"
or library_construction_protocol like "% fragment%"
or library_construction_protocol like "% breaks %"
or library_construction_protocol like "% nebulis%" or library_construction_protocol like "% nebuliz%"
or library_construction_protocol like "% acoustic%"
or library_construction_protocol like "% sonic%"
)
AND
(
library_construction_protocol like "% adapter%"
or library_construction_protocol like "% ligat%"
or library_construction_protocol like "% blunt%"
or library_construction_protocol like "% phosphorylat%"
or library_construction_protocol like "% overhang"
or library_construction_protocol like "% t4-PNK%"
or library_construction_protocol like "% t4%"
or library_construction_protocol like "% pnk%"
or library_construction_protocol like "% kinase%"
or library_construction_protocol like "% a-tail%"
)
AND
(
library_construction_protocol like "% clone%"
or library_construction_protocol like "% clonin%"
or library_construction_protocol like "% pcr %"
or library_construction_protocol like "% amplif%"
or library_construction_protocol like "% polymerase%"
or library_construction_protocol like "% taq%"
or library_construction_protocol like "% phusion%"
or library_construction_protocol like "% temperat%"
or library_construction_protocol like "% thermal%"
or library_construction_protocol like "% anneal%"
or library_construction_protocol like "% denature%"
)
group by id
)
group by id
);