EC2 Default User commited on
Commit
8f67062
1 Parent(s): 0236f5a

Remove human data temp

Browse files
oas-paired-sequence-data.py CHANGED
@@ -24,9 +24,9 @@ _HOMEPAGE = "https://opig.stats.ox.ac.uk/webapps/oas/"
24
 
25
  _LICENSE = "cc-by-4.0"
26
 
27
- _BASE_URL = "https://aws-hcls-ml.s3.amazonaws.com/oas-paired-sequence-data/"
28
  _URLS = {
29
- "human": _BASE_URL + "human.zip",
30
  "rat_SD": _BASE_URL + "rat_SD.zip",
31
  "mouse_BALB_c": _BASE_URL + "mouse_BALB_c.zip",
32
  "mouse_C57BL_6": _BASE_URL + "mouse_C57BL_6.zip",
@@ -43,18 +43,18 @@ _FEATURES = datasets.Features(
43
  "cdr1_aa_light": datasets.Value("string"),
44
  "cdr2_aa_light": datasets.Value("string"),
45
  "cdr3_aa_light": datasets.Value("string"),
46
- "cdr1_aa_heavy_start": datasets.Value("int16"),
47
- "cdr1_aa_heavy_end": datasets.Value("int16"),
48
- "cdr1_aa_light_start": datasets.Value("int16"),
49
- "cdr1_aa_light_end": datasets.Value("int16"),
50
- "cdr2_aa_heavy_start": datasets.Value("int16"),
51
- "cdr2_aa_heavy_end": datasets.Value("int16"),
52
- "cdr2_aa_light_start": datasets.Value("int16"),
53
- "cdr2_aa_light_end": datasets.Value("int16"),
54
- "cdr3_aa_heavy_start": datasets.Value("int16"),
55
- "cdr3_aa_heavy_end": datasets.Value("int16"),
56
- "cdr3_aa_light_start": datasets.Value("int16"),
57
- "cdr3_aa_light_end": datasets.Value("int16"),
58
  }
59
  )
60
 
@@ -64,7 +64,7 @@ class OasPairedSequenceData(datasets.GeneratorBasedBuilder):
64
 
65
  VERSION = datasets.Version("1.2.0")
66
  BUILDER_CONFIGS = [
67
- datasets.BuilderConfig(name="human", version=VERSION, description="Human"),
68
  datasets.BuilderConfig(name="rat_SD", version=VERSION, description="rat_SD"),
69
  datasets.BuilderConfig(
70
  name="mouse_BALB_c", version=VERSION, description="mouse_BALB_c"
@@ -97,7 +97,7 @@ class OasPairedSequenceData(datasets.GeneratorBasedBuilder):
97
  ]
98
 
99
  def _generate_examples(self, filepath, split):
100
- with open(filepath, newline="") as f:
101
  reader = csv.reader(f, delimiter=",")
102
  for key, row in enumerate(reader):
103
  if key == 0:
@@ -112,17 +112,17 @@ class OasPairedSequenceData(datasets.GeneratorBasedBuilder):
112
  "cdr1_aa_light": row[6],
113
  "cdr2_aa_light": row[7],
114
  "cdr3_aa_light": row[8],
115
- "cdr1_aa_heavy_start": row[9],
116
- "cdr1_aa_heavy_end": row[10],
117
- "cdr1_aa_light_start": row[11],
118
- "cdr1_aa_light_end": row[12],
119
- "cdr2_aa_heavy_start": row[13],
120
- "cdr2_aa_heavy_end": row[14],
121
- "cdr2_aa_light_start": row[15],
122
- "cdr2_aa_light_end": row[16],
123
- "cdr3_aa_heavy_start": row[17],
124
- "cdr3_aa_heavy_end": row[18],
125
- "cdr3_aa_light_start": row[19],
126
- "cdr3_aa_light_end": row[20],
127
  }
128
 
 
24
 
25
  _LICENSE = "cc-by-4.0"
26
 
27
+ _BASE_URL = "https://aws-hcls-ml.s3.amazonaws.com/oas-paired-sequence-data/processed/"
28
  _URLS = {
29
+ # "human": _BASE_URL + "human.zip",
30
  "rat_SD": _BASE_URL + "rat_SD.zip",
31
  "mouse_BALB_c": _BASE_URL + "mouse_BALB_c.zip",
32
  "mouse_C57BL_6": _BASE_URL + "mouse_C57BL_6.zip",
 
43
  "cdr1_aa_light": datasets.Value("string"),
44
  "cdr2_aa_light": datasets.Value("string"),
45
  "cdr3_aa_light": datasets.Value("string"),
46
+ # "cdr1_aa_heavy_start": datasets.Value("int16"),
47
+ # "cdr1_aa_heavy_end": datasets.Value("int16"),
48
+ # "cdr1_aa_light_start": datasets.Value("int16"),
49
+ # "cdr1_aa_light_end": datasets.Value("int16"),
50
+ # "cdr2_aa_heavy_start": datasets.Value("int16"),
51
+ # "cdr2_aa_heavy_end": datasets.Value("int16"),
52
+ # "cdr2_aa_light_start": datasets.Value("int16"),
53
+ # "cdr2_aa_light_end": datasets.Value("int16"),
54
+ # "cdr3_aa_heavy_start": datasets.Value("int16"),
55
+ # "cdr3_aa_heavy_end": datasets.Value("int16"),
56
+ # "cdr3_aa_light_start": datasets.Value("int16"),
57
+ # "cdr3_aa_light_end": datasets.Value("int16"),
58
  }
59
  )
60
 
 
64
 
65
  VERSION = datasets.Version("1.2.0")
66
  BUILDER_CONFIGS = [
67
+ # datasets.BuilderConfig(name="human", version=VERSION, description="Human"),
68
  datasets.BuilderConfig(name="rat_SD", version=VERSION, description="rat_SD"),
69
  datasets.BuilderConfig(
70
  name="mouse_BALB_c", version=VERSION, description="mouse_BALB_c"
 
97
  ]
98
 
99
  def _generate_examples(self, filepath, split):
100
+ with open(filepath, encoding="utf-8", newline="") as f:
101
  reader = csv.reader(f, delimiter=",")
102
  for key, row in enumerate(reader):
103
  if key == 0:
 
112
  "cdr1_aa_light": row[6],
113
  "cdr2_aa_light": row[7],
114
  "cdr3_aa_light": row[8],
115
+ # "cdr1_aa_heavy_start": row[9],
116
+ # "cdr1_aa_heavy_end": row[10],
117
+ # "cdr1_aa_light_start": row[11],
118
+ # "cdr1_aa_light_end": row[12],
119
+ # "cdr2_aa_heavy_start": row[13],
120
+ # "cdr2_aa_heavy_end": row[14],
121
+ # "cdr2_aa_light_start": row[15],
122
+ # "cdr2_aa_light_end": row[16],
123
+ # "cdr3_aa_heavy_start": row[17],
124
+ # "cdr3_aa_heavy_end": row[18],
125
+ # "cdr3_aa_light_start": row[19],
126
+ # "cdr3_aa_light_end": row[20],
127
  }
128
 
src/human_oas_data_units.txt ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ SRR10358523_paired.csv.gz
2
+ SRR10358524_paired.csv.gz
3
+ SRR10358525_paired.csv.gz
4
+ 1287156_1_Paired_All.csv.gz
5
+ 1279049_1_Paired_All.csv.gz
6
+ 1287155_1_Paired_All.csv.gz
7
+ 1279050_1_Paired_All.csv.gz
8
+ 1287157_1_Paired_All.csv.gz
9
+ 1279051_1_Paired_All.csv.gz
10
+ 1287158_1_Paired_All.csv.gz
11
+ 1279052_1_Paired_All.csv.gz
12
+ 1287163_1_Paired_All.csv.gz
13
+ 1279053_1_Paired_All.csv.gz
14
+ 1287164_1_Paired_All.csv.gz
15
+ 1279054_1_Paired_All.csv.gz
16
+ 1287165_1_Paired_All.csv.gz
17
+ 1279055_1_Paired_All.csv.gz
18
+ 1287166_1_Paired_All.csv.gz
19
+ 1279057_1_Paired_All.csv.gz
20
+ 1287167_1_Paired_All.csv.gz
21
+ 1279058_1_Paired_All.csv.gz
22
+ 1287168_1_Paired_All.csv.gz
23
+ 1279059_1_Paired_All.csv.gz
24
+ 1287169_1_Paired_All.csv.gz
25
+ 1279060_1_Paired_All.csv.gz
26
+ 1287170_1_Paired_All.csv.gz
27
+ 1279061_1_Paired_All.csv.gz
28
+ 1287171_1_Paired_All.csv.gz
29
+ 1279062_1_Paired_All.csv.gz
30
+ 1287172_1_Paired_All.csv.gz
31
+ 1279063_1_Paired_All.csv.gz
32
+ 1287173_1_Paired_All.csv.gz
33
+ 1279065_1_Paired_All.csv.gz
34
+ 1287174_1_Paired_All.csv.gz
35
+ 1279066_1_Paired_All.csv.gz
36
+ 1287175_1_Paired_All.csv.gz
37
+ 1279067_1_Paired_All.csv.gz
38
+ 1287176_1_Paired_All.csv.gz
39
+ 1279068_1_Paired_All.csv.gz
40
+ 1287177_1_Paired_All.csv.gz
41
+ 1279069_1_Paired_All.csv.gz
42
+ 1287178_1_Paired_All.csv.gz
43
+ 1279070_1_Paired_All.csv.gz
44
+ 1287179_1_Paired_All.csv.gz
45
+ 1279071_1_Paired_All.csv.gz
46
+ 1287180_1_Paired_All.csv.gz
47
+ 1279072_1_Paired_All.csv.gz
48
+ 1287181_1_Paired_All.csv.gz
49
+ 1279073_1_Paired_All.csv.gz
50
+ 1287182_1_Paired_All.csv.gz
51
+ 1279074_1_Paired_All.csv.gz
52
+ 1287183_1_Paired_All.csv.gz
53
+ 1279075_1_Paired_All.csv.gz
54
+ 1287184_1_Paired_All.csv.gz
55
+ 1279076_1_Paired_All.csv.gz
56
+ 1287185_1_Paired_All.csv.gz
57
+ 1279077_1_Paired_All.csv.gz
58
+ 1287186_1_Paired_All.csv.gz
59
+ 1279078_1_Paired_All.csv.gz
60
+ 1287187_1_Paired_All.csv.gz
61
+ 1279079_1_Paired_All.csv.gz
62
+ 1287188_1_Paired_All.csv.gz
63
+ 1279080_1_Paired_All.csv.gz
64
+ 1287189_1_Paired_All.csv.gz
65
+ 1287144_1_Paired_All.csv.gz
66
+ 1287190_1_Paired_All.csv.gz
67
+ 1287145_1_Paired_All.csv.gz
68
+ 1287191_1_Paired_All.csv.gz
69
+ 1287146_1_Paired_All.csv.gz
70
+ 1287192_1_Paired_All.csv.gz
71
+ 1287147_1_Paired_All.csv.gz
72
+ 1287193_1_Paired_All.csv.gz
73
+ 1287148_1_Paired_All.csv.gz
74
+ 1287194_1_Paired_All.csv.gz
75
+ 1287149_1_Paired_All.csv.gz
76
+ 1287195_1_Paired_All.csv.gz
77
+ 1287150_1_Paired_All.csv.gz
78
+ 1287196_1_Paired_All.csv.gz
79
+ 1287151_1_Paired_All.csv.gz
80
+ 1287197_1_Paired_All.csv.gz
81
+ 1287152_1_Paired_All.csv.gz
82
+ 1287198_1_Paired_All.csv.gz
83
+ 1287153_1_Paired_All.csv.gz
84
+ 1287199_1_Paired_All.csv.gz
85
+ 1287154_1_Paired_All.csv.gz
86
+ 1287159_1_Paired_All.csv.gz
87
+ 1287200_1_Paired_All.csv.gz
88
+ 1287160_1_Paired_All.csv.gz
89
+ 1287201_1_Paired_All.csv.gz
90
+ 1287161_1_Paired_All.csv.gz
91
+ 1287202_1_Paired_All.csv.gz
92
+ 1287162_1_Paired_All.csv.gz
93
+ 1287203_1_Paired_All.csv.gz
94
+ 1287204_1_Paired_All.csv.gz
95
+ 1287205_1_Paired_All.csv.gz
96
+ 1287206_1_Paired_All.csv.gz
97
+ 1287207_1_Paired_All.csv.gz
98
+ ERR4082227_paired.csv.gz
99
+ ERR4082235_paired.csv.gz
100
+ ERR4082243_paired.csv.gz
101
+ ERR4082251_paired.csv.gz
102
+ ERR4082259_paired.csv.gz
103
+ ERR4082263_paired.csv.gz
104
+ ERR4082267_paired.csv.gz
105
+ ERR4082275_paired.csv.gz
106
+ ERR4082283_paired.csv.gz
107
+ ERR4082291_paired.csv.gz
108
+ ERR4082299_paired.csv.gz
109
+ ERR4082303_paired.csv.gz
110
+ SRR12875348_1_Paired_All.csv.gz
111
+ SRR12875349_1_Paired_All.csv.gz
112
+ SRR12875350_1_Paired_All.csv.gz
113
+ SRR12875351_1_Paired_All.csv.gz
114
+ SRR12875352_1_Paired_All.csv.gz
115
+ SRR12875353_1_Paired_All.csv.gz
116
+ SRR12875354_1_Paired_All.csv.gz
117
+ SRR12875355_1_Paired_All.csv.gz
118
+ SRR12875356_1_Paired_All.csv.gz
119
+ SRR12875357_1_Paired_All.csv.gz
120
+ SRR12875358_1_Paired_All.csv.gz
121
+ SRR12875359_1_Paired_All.csv.gz
122
+ SRR12875360_1_Paired_All.csv.gz
123
+ SRR12875361_1_Paired_All.csv.gz
124
+ SRR12875362_1_Paired_All.csv.gz
125
+ SRR10313332_paired.csv.gz
126
+ SRR10313335_paired.csv.gz
127
+ SRR12113363_1_Paired_All.csv.gz
128
+ SRR12113364_1_Paired_All.csv.gz
129
+ 1_S1__1_Paired_All.csv.gz
130
+ 1a_S1__1_Paired_All.csv.gz
131
+ BT4p2_S2__1_Paired_All.csv.gz
132
+ 1a_S1mod2_S1__1_Paired_All.csv.gz
133
+ BT4p1_S1__1_Paired_All.csv.gz
134
+ 1a_S1mod_S1__1_Paired_All.csv.gz
135
+ 1b_S2__1_Paired_All.csv.gz
136
+ 1b_S2mod2_S1__1_Paired_All.csv.gz
137
+ 1b_S2mod_S1__1_Paired_All.csv.gz
138
+ 1c_S3__1_Paired_All.csv.gz
139
+ 1c_S3mod_S1__1_Paired_All.csv.gz
140
+ 1d_S4__1_Paired_All.csv.gz
141
+ 1d_S4mod_S1__1_Paired_All.csv.gz
142
+ 1e_S5__1_Paired_All.csv.gz
143
+ 1e_S5pc__1_Paired_All.csv.gz
144
+ 1f_S6__1_Paired_All.csv.gz
145
+ 2_S2__1_Paired_All.csv.gz
146
+ 2_S7__1_Paired_All.csv.gz
147
+ 2a_S3__1_Paired_All.csv.gz
148
+ 2a_S6__1_Paired_All.csv.gz
149
+ 2b_S7__1_Paired_All.csv.gz
150
+ 2c_S8__1_Paired_All.csv.gz
151
+ 3a_S3__1_Paired_All.csv.gz
152
+ 3a_S4__1_Paired_All.csv.gz
153
+ 3b_S4__1_Paired_All.csv.gz
154
+ 3b_S5__1_Paired_All.csv.gz
155
+ 3c_S5__1_Paired_All.csv.gz
156
+ 3c_S6__1_Paired_All.csv.gz
157
+ 3d_S6__1_Paired_All.csv.gz
158
+ 3d_S7__1_Paired_All.csv.gz
159
+ 3e_S7__1_Paired_All.csv.gz
160
+ 3e_S8__1_Paired_All.csv.gz
161
+ AT6md_S1__1_Paired_All.csv.gz
162
+ AT6me_S2__1_Paired_All.csv.gz
163
+ AT6p2a_S3__1_Paired_All.csv.gz
164
+ AT6p2b_S4__1_Paired_All.csv.gz
165
+ AT6p2c_S5__1_Paired_All.csv.gz
166
+ AT7ma_S7__1_Paired_All.csv.gz
167
+ AT7mb_S1__1_Paired_All.csv.gz
168
+ AT7mc_S2__1_Paired_All.csv.gz
169
+ AT7md_S3__1_Paired_All.csv.gz
170
+ AT7me_S4__1_Paired_All.csv.gz
src/human_oas_paired.txt DELETED
@@ -1,170 +0,0 @@
1
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Eccles_2020/csv/SRR10358523_paired.csv.gz
2
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Eccles_2020/csv/SRR10358524_paired.csv.gz
3
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Eccles_2020/csv/SRR10358525_paired.csv.gz
4
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287156_1_Paired_All.csv.gz
5
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279049_1_Paired_All.csv.gz
6
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287155_1_Paired_All.csv.gz
7
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279050_1_Paired_All.csv.gz
8
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287157_1_Paired_All.csv.gz
9
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279051_1_Paired_All.csv.gz
10
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287158_1_Paired_All.csv.gz
11
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279052_1_Paired_All.csv.gz
12
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287163_1_Paired_All.csv.gz
13
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279053_1_Paired_All.csv.gz
14
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287164_1_Paired_All.csv.gz
15
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279054_1_Paired_All.csv.gz
16
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287165_1_Paired_All.csv.gz
17
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279055_1_Paired_All.csv.gz
18
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287166_1_Paired_All.csv.gz
19
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279057_1_Paired_All.csv.gz
20
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287167_1_Paired_All.csv.gz
21
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279058_1_Paired_All.csv.gz
22
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287168_1_Paired_All.csv.gz
23
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279059_1_Paired_All.csv.gz
24
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287169_1_Paired_All.csv.gz
25
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279060_1_Paired_All.csv.gz
26
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287170_1_Paired_All.csv.gz
27
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279061_1_Paired_All.csv.gz
28
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287171_1_Paired_All.csv.gz
29
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279062_1_Paired_All.csv.gz
30
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287172_1_Paired_All.csv.gz
31
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279063_1_Paired_All.csv.gz
32
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287173_1_Paired_All.csv.gz
33
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279065_1_Paired_All.csv.gz
34
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287174_1_Paired_All.csv.gz
35
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279066_1_Paired_All.csv.gz
36
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287175_1_Paired_All.csv.gz
37
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279067_1_Paired_All.csv.gz
38
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287176_1_Paired_All.csv.gz
39
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279068_1_Paired_All.csv.gz
40
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287177_1_Paired_All.csv.gz
41
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279069_1_Paired_All.csv.gz
42
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287178_1_Paired_All.csv.gz
43
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279070_1_Paired_All.csv.gz
44
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287179_1_Paired_All.csv.gz
45
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279071_1_Paired_All.csv.gz
46
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287180_1_Paired_All.csv.gz
47
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279072_1_Paired_All.csv.gz
48
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287181_1_Paired_All.csv.gz
49
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279073_1_Paired_All.csv.gz
50
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287182_1_Paired_All.csv.gz
51
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279074_1_Paired_All.csv.gz
52
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287183_1_Paired_All.csv.gz
53
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279075_1_Paired_All.csv.gz
54
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287184_1_Paired_All.csv.gz
55
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279076_1_Paired_All.csv.gz
56
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287185_1_Paired_All.csv.gz
57
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279077_1_Paired_All.csv.gz
58
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287186_1_Paired_All.csv.gz
59
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279078_1_Paired_All.csv.gz
60
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287187_1_Paired_All.csv.gz
61
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279079_1_Paired_All.csv.gz
62
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287188_1_Paired_All.csv.gz
63
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1279080_1_Paired_All.csv.gz
64
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287189_1_Paired_All.csv.gz
65
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287144_1_Paired_All.csv.gz
66
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287190_1_Paired_All.csv.gz
67
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287145_1_Paired_All.csv.gz
68
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287191_1_Paired_All.csv.gz
69
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287146_1_Paired_All.csv.gz
70
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287192_1_Paired_All.csv.gz
71
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287147_1_Paired_All.csv.gz
72
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287193_1_Paired_All.csv.gz
73
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287148_1_Paired_All.csv.gz
74
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287194_1_Paired_All.csv.gz
75
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287149_1_Paired_All.csv.gz
76
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287195_1_Paired_All.csv.gz
77
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287150_1_Paired_All.csv.gz
78
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287196_1_Paired_All.csv.gz
79
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287151_1_Paired_All.csv.gz
80
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287197_1_Paired_All.csv.gz
81
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287152_1_Paired_All.csv.gz
82
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287198_1_Paired_All.csv.gz
83
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287153_1_Paired_All.csv.gz
84
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287199_1_Paired_All.csv.gz
85
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287154_1_Paired_All.csv.gz
86
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287159_1_Paired_All.csv.gz
87
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287200_1_Paired_All.csv.gz
88
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287160_1_Paired_All.csv.gz
89
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287201_1_Paired_All.csv.gz
90
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287161_1_Paired_All.csv.gz
91
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287202_1_Paired_All.csv.gz
92
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287162_1_Paired_All.csv.gz
93
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287203_1_Paired_All.csv.gz
94
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287204_1_Paired_All.csv.gz
95
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287205_1_Paired_All.csv.gz
96
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287206_1_Paired_All.csv.gz
97
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Jaffe_2022/csv/1287207_1_Paired_All.csv.gz
98
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/King_2020_2/csv/ERR4082227_paired.csv.gz
99
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/King_2020_2/csv/ERR4082235_paired.csv.gz
100
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/King_2020_2/csv/ERR4082243_paired.csv.gz
101
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/King_2020_2/csv/ERR4082251_paired.csv.gz
102
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/King_2020_2/csv/ERR4082259_paired.csv.gz
103
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/King_2020_2/csv/ERR4082263_paired.csv.gz
104
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/King_2020_2/csv/ERR4082267_paired.csv.gz
105
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/King_2020_2/csv/ERR4082275_paired.csv.gz
106
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/King_2020_2/csv/ERR4082283_paired.csv.gz
107
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/King_2020_2/csv/ERR4082291_paired.csv.gz
108
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/King_2020_2/csv/ERR4082299_paired.csv.gz
109
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/King_2020_2/csv/ERR4082303_paired.csv.gz
110
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Mor_2021/csv/SRR12875348_1_Paired_All.csv.gz
111
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Mor_2021/csv/SRR12875349_1_Paired_All.csv.gz
112
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Mor_2021/csv/SRR12875350_1_Paired_All.csv.gz
113
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Mor_2021/csv/SRR12875351_1_Paired_All.csv.gz
114
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Mor_2021/csv/SRR12875352_1_Paired_All.csv.gz
115
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Mor_2021/csv/SRR12875353_1_Paired_All.csv.gz
116
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Mor_2021/csv/SRR12875354_1_Paired_All.csv.gz
117
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Mor_2021/csv/SRR12875355_1_Paired_All.csv.gz
118
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Mor_2021/csv/SRR12875356_1_Paired_All.csv.gz
119
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Mor_2021/csv/SRR12875357_1_Paired_All.csv.gz
120
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Mor_2021/csv/SRR12875358_1_Paired_All.csv.gz
121
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Mor_2021/csv/SRR12875359_1_Paired_All.csv.gz
122
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Mor_2021/csv/SRR12875360_1_Paired_All.csv.gz
123
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Mor_2021/csv/SRR12875361_1_Paired_All.csv.gz
124
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Mor_2021/csv/SRR12875362_1_Paired_All.csv.gz
125
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Setliff_2019/csv/SRR10313332_paired.csv.gz
126
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Setliff_2019/csv/SRR10313335_paired.csv.gz
127
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Woodruff_2020/csv/SRR12113363_1_Paired_All.csv.gz
128
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Woodruff_2020/csv/SRR12113364_1_Paired_All.csv.gz
129
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/1_S1__1_Paired_All.csv.gz
130
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/1a_S1__1_Paired_All.csv.gz
131
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/BT4p2_S2__1_Paired_All.csv.gz
132
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/1a_S1mod2_S1__1_Paired_All.csv.gz
133
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/BT4p1_S1__1_Paired_All.csv.gz
134
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/1a_S1mod_S1__1_Paired_All.csv.gz
135
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/1b_S2__1_Paired_All.csv.gz
136
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/1b_S2mod2_S1__1_Paired_All.csv.gz
137
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/1b_S2mod_S1__1_Paired_All.csv.gz
138
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/1c_S3__1_Paired_All.csv.gz
139
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/1c_S3mod_S1__1_Paired_All.csv.gz
140
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/1d_S4__1_Paired_All.csv.gz
141
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/1d_S4mod_S1__1_Paired_All.csv.gz
142
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/1e_S5__1_Paired_All.csv.gz
143
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/1e_S5pc__1_Paired_All.csv.gz
144
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/1f_S6__1_Paired_All.csv.gz
145
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/2_S2__1_Paired_All.csv.gz
146
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/2_S7__1_Paired_All.csv.gz
147
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/2a_S3__1_Paired_All.csv.gz
148
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/2a_S6__1_Paired_All.csv.gz
149
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/2b_S7__1_Paired_All.csv.gz
150
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/2c_S8__1_Paired_All.csv.gz
151
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/3a_S3__1_Paired_All.csv.gz
152
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/3a_S4__1_Paired_All.csv.gz
153
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/3b_S4__1_Paired_All.csv.gz
154
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/3b_S5__1_Paired_All.csv.gz
155
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/3c_S5__1_Paired_All.csv.gz
156
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/3c_S6__1_Paired_All.csv.gz
157
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/3d_S6__1_Paired_All.csv.gz
158
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/3d_S7__1_Paired_All.csv.gz
159
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/3e_S7__1_Paired_All.csv.gz
160
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/3e_S8__1_Paired_All.csv.gz
161
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/AT6md_S1__1_Paired_All.csv.gz
162
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/AT6me_S2__1_Paired_All.csv.gz
163
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/AT6p2a_S3__1_Paired_All.csv.gz
164
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/AT6p2b_S4__1_Paired_All.csv.gz
165
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/AT6p2c_S5__1_Paired_All.csv.gz
166
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/AT7ma_S7__1_Paired_All.csv.gz
167
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/AT7mb_S1__1_Paired_All.csv.gz
168
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/AT7mc_S2__1_Paired_All.csv.gz
169
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/AT7md_S3__1_Paired_All.csv.gz
170
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/AT7me_S4__1_Paired_All.csv.gz
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/mouse_BALB_c_oas_data_units.txt ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ SRR9179273_paired.csv.gz
2
+ SRR9179274_paired.csv.gz
3
+ SRR9179279_paired.csv.gz
4
+ SRR9179280_paired.csv.gz
5
+ SRR9179283_paired.csv.gz
6
+ SRR9179284_paired.csv.gz
7
+ SRR9179285_paired.csv.gz
8
+ SRR9179286_paired.csv.gz
src/mouse_BALB_c_oas_paired.txt DELETED
@@ -1,8 +0,0 @@
1
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179273_paired.csv.gz
2
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179274_paired.csv.gz
3
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179279_paired.csv.gz
4
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179280_paired.csv.gz
5
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179283_paired.csv.gz
6
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179284_paired.csv.gz
7
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179285_paired.csv.gz
8
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179286_paired.csv.gz
 
 
 
 
 
 
 
 
 
src/mouse_C57BL_6_oas_data_units.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ SRR11528761_paired.csv.gz
2
+ SRR11528762_paired.csv.gz
src/mouse_C57BL_6_oas_paired.txt DELETED
@@ -1,2 +0,0 @@
1
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Alsoiussi_2020/csv/SRR11528761_paired.csv.gz
2
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Alsoiussi_2020/csv/SRR11528762_paired.csv.gz
 
 
 
src/oas-data-cleaning.py CHANGED
@@ -3,27 +3,45 @@ import pandas as pd
3
  import re
4
  from zipfile import ZipFile
5
  import boto3
 
6
 
7
  data_dir = os.getcwd()
8
  output_path = os.getcwd()
9
 
10
  # species_list = ["rat_SD", "mouse_BALB_c", "mouse_C57BL_6", "human"]
11
- species_list = ["rat_SD"]
12
 
13
  S3_BUCKET = "aws-hcls-ml"
14
- S3_PREFIX = "oas-paired-sequence-data"
 
15
  s3 = boto3.client("s3")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  for species in species_list:
17
  print(f"Downloading {species} files")
18
  list_of_df = []
19
- species_url_file = os.path.join(data_dir, species + "_oas_paired.txt")
20
  with open(species_url_file, "r") as f:
21
  for csv_file in f.readlines():
22
  print(csv_file)
23
  filename = os.path.basename(csv_file)
24
  run_id = str(re.search(r"^(.*)_[Pp]aired", filename)[1])
 
 
25
  run_data = pd.read_csv(
26
- csv_file,
27
  header=1,
28
  compression="gzip",
29
  on_bad_lines="warn",
@@ -42,19 +60,7 @@ for species in species_list:
42
  ]
43
  ]
44
  run_data = run_data.dropna()
45
-
46
- def calc_cdr_coordinates(row):
47
- for i in range(1, 4):
48
- for j in ["heavy", "light"]:
49
- row[f"cdr{i}_aa_{j}_start"] = row[
50
- f"sequence_alignment_aa_{j}"
51
- ].find(row[f"cdr{i}_aa_{j}"])
52
- row[f"cdr{i}_aa_{j}_end"] = row[f"cdr{i}_aa_{j}_start"] + len(
53
- row[f"cdr{i}_aa_{j}"]
54
- )
55
- return row
56
-
57
- run_data = run_data.apply(calc_cdr_coordinates, axis=1)
58
  run_data.insert(
59
  0, "pair_id", run_id + "_" + run_data.reset_index().index.map(str)
60
  )
@@ -63,16 +69,20 @@ for species in species_list:
63
  print(f"{species} output summary:")
64
  print(species_df.head())
65
  print(species_df.shape)
66
- # output_file_name = os.path.join(output_path, species + ".zip")
67
  output_file_name = os.path.join(output_path, "train.csv")
68
  print(f"Creating {output_file_name}")
69
- species_df.to_csv(output_file_name, index=False, compression="zip")
70
- # species_df.to_csv(output_file_name, index=False)
71
- # zip_name = os.path.join(output_path, species + ".zip")
72
  zip_name = species + ".zip"
 
73
  with ZipFile(zip_name, "w") as myzip:
74
  myzip.write("train.csv")
75
- s3.upload_file(zip_name, S3_BUCKET, os.path.join(S3_PREFIX, zip_name))
 
 
 
 
76
  os.remove(output_file_name)
 
77
  os.remove(zip_name)
78
 
 
3
  import re
4
  from zipfile import ZipFile
5
  import boto3
6
+ import io
7
 
8
  data_dir = os.getcwd()
9
  output_path = os.getcwd()
10
 
11
  # species_list = ["rat_SD", "mouse_BALB_c", "mouse_C57BL_6", "human"]
12
+ species_list = ["mouse_BALB_c", "mouse_C57BL_6", "rat_SD"]
13
 
14
  S3_BUCKET = "aws-hcls-ml"
15
+ S3_SRC_PREFIX = "oas-paired-sequence-data/raw"
16
+ S3_DEST_PREFIX = "oas-paired-sequence-data/processed"
17
  s3 = boto3.client("s3")
18
+
19
+
20
+ # def calc_cdr_coordinates(row):
21
+ # for i in range(1, 4):
22
+ # for j in ["heavy", "light"]:
23
+ # row[f"cdr{i}_aa_{j}_start"] = row[f"sequence_alignment_aa_{j}"].find(
24
+ # row[f"cdr{i}_aa_{j}"]
25
+ # )
26
+ # row[f"cdr{i}_aa_{j}_end"] = row[f"cdr{i}_aa_{j}_start"] + len(
27
+ # row[f"cdr{i}_aa_{j}"]
28
+ # )
29
+ # return row
30
+
31
+
32
  for species in species_list:
33
  print(f"Downloading {species} files")
34
  list_of_df = []
35
+ species_url_file = os.path.join(data_dir, species + "_oas_data_units.txt")
36
  with open(species_url_file, "r") as f:
37
  for csv_file in f.readlines():
38
  print(csv_file)
39
  filename = os.path.basename(csv_file)
40
  run_id = str(re.search(r"^(.*)_[Pp]aired", filename)[1])
41
+ s3_key = os.path.join(S3_SRC_PREFIX, species, csv_file.strip())
42
+ obj = s3.get_object(Bucket=S3_BUCKET, Key=s3_key)
43
  run_data = pd.read_csv(
44
+ io.BytesIO(obj["Body"].read()),
45
  header=1,
46
  compression="gzip",
47
  on_bad_lines="warn",
 
60
  ]
61
  ]
62
  run_data = run_data.dropna()
63
+ # run_data = run_data.apply(calc_cdr_coordinates, axis=1)
 
 
 
 
 
 
 
 
 
 
 
 
64
  run_data.insert(
65
  0, "pair_id", run_id + "_" + run_data.reset_index().index.map(str)
66
  )
 
69
  print(f"{species} output summary:")
70
  print(species_df.head())
71
  print(species_df.shape)
 
72
  output_file_name = os.path.join(output_path, "train.csv")
73
  print(f"Creating {output_file_name}")
74
+ # species_df.to_csv(output_file_name, index=False, compression="zip")
75
+ species_df.to_csv(output_file_name, index=False)
 
76
  zip_name = species + ".zip"
77
+ print(f"Creating {zip_name}")
78
  with ZipFile(zip_name, "w") as myzip:
79
  myzip.write("train.csv")
80
+ print(
81
+ f"Uploading {zip_name} to {os.path.join('s3://', S3_BUCKET, S3_DEST_PREFIX)}"
82
+ )
83
+ s3.upload_file(zip_name, S3_BUCKET, os.path.join(S3_DEST_PREFIX, zip_name))
84
+ print(f"Removing {output_file_name}")
85
  os.remove(output_file_name)
86
+ print(f"Removing {zip_name}")
87
  os.remove(zip_name)
88
 
src/rat_SD_oas_data_units.txt ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ SRR9179275_paired.csv.gz
2
+ SRR9179276_paired.csv.gz
3
+ SRR9179277_paired.csv.gz
4
+ SRR9179278_paired.csv.gz
5
+ SRR9179281_paired.csv.gz
6
+ SRR9179282_paired.csv.gz
7
+ SRR9179287_paired.csv.gz
8
+ SRR9179288_paired.csv.gz
9
+ SRR9179289_paired.csv.gz
10
+ SRR9179290_paired.csv.gz
11
+ SRR9179291_paired.csv.gz
12
+ SRR9179292_paired.csv.gz
13
+ SRR9179293_paired.csv.gz
14
+ SRR9179294_paired.csv.gz
15
+ SRR9179295_paired.csv.gz
16
+ SRR9179296_paired.csv.gz
17
+ SRR9179297_paired.csv.gz
18
+ SRR9179298_paired.csv.gz
19
+ SRR9179299_paired.csv.gz
20
+ SRR9179300_paired.csv.gz
src/rat_SD_oas_paired.txt DELETED
@@ -1,20 +0,0 @@
1
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179275_paired.csv.gz
2
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179276_paired.csv.gz
3
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179277_paired.csv.gz
4
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179278_paired.csv.gz
5
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179281_paired.csv.gz
6
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179282_paired.csv.gz
7
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179287_paired.csv.gz
8
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179288_paired.csv.gz
9
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179289_paired.csv.gz
10
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179290_paired.csv.gz
11
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179291_paired.csv.gz
12
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179292_paired.csv.gz
13
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179293_paired.csv.gz
14
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179294_paired.csv.gz
15
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179295_paired.csv.gz
16
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179296_paired.csv.gz
17
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179297_paired.csv.gz
18
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179298_paired.csv.gz
19
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179299_paired.csv.gz
20
- https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179300_paired.csv.gz