egrace479 commited on
Commit
75897a8
1 Parent(s): 07c867c

Add notebook that adds mimicry groups and fixes clysonymus typo

Browse files
Files changed (1) hide show
  1. notebooks/Data-gen-1-3.ipynb +1445 -0
notebooks/Data-gen-1-3.ipynb ADDED
@@ -0,0 +1,1445 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "metadata": {},
6
+ "source": [
7
+ "# Add Mimicry Group Information for Heliconius Species\n",
8
+ "\n",
9
+ "This notebook will add mimicry group information for the Heliconius species (at the subspecies level) included in this dataset."
10
+ ]
11
+ },
12
+ {
13
+ "cell_type": "code",
14
+ "execution_count": 1,
15
+ "metadata": {},
16
+ "outputs": [],
17
+ "source": [
18
+ "import pandas as pd"
19
+ ]
20
+ },
21
+ {
22
+ "cell_type": "markdown",
23
+ "metadata": {},
24
+ "source": [
25
+ "Load in master CSVs and Heliconius mimicry group csvs."
26
+ ]
27
+ },
28
+ {
29
+ "cell_type": "code",
30
+ "execution_count": 2,
31
+ "metadata": {},
32
+ "outputs": [],
33
+ "source": [
34
+ "# Master CSVs\n",
35
+ "full_df = pd.read_csv(\"../Jiggins_Zenodo_Img_Master.csv\", low_memory = False)\n",
36
+ "dorsal_df = pd.read_csv(\"../Jiggins_Zenodo_dorsal_Img_Master.csv\", low_memory = False)\n",
37
+ "heli_df = pd.read_csv(\"../Jiggins_Heliconius_Master.csv\", low_memory = False)\n",
38
+ "\n",
39
+ "# Heliconius Mimicry Group CSV\n",
40
+ "mimic_gp_df = pd.read_csv(\"../metadata/heliconius_mimic_groups.csv\", low_memory = False)"
41
+ ]
42
+ },
43
+ {
44
+ "cell_type": "code",
45
+ "execution_count": 3,
46
+ "metadata": {},
47
+ "outputs": [
48
+ {
49
+ "data": {
50
+ "text/plain": [
51
+ "Index(['CAMID', 'X', 'Image_name', 'View', 'zenodo_name', 'zenodo_link',\n",
52
+ " 'Sequence', 'Taxonomic_Name', 'Locality', 'Sample_accession',\n",
53
+ " 'Collected_by', 'Other_ID', 'Date', 'Dataset', 'Store', 'Brood',\n",
54
+ " 'Death_Date', 'Cross_Type', 'Stage', 'Sex', 'Unit_Type', 'file_type',\n",
55
+ " 'record_number', 'species', 'subspecies', 'genus', 'file_url',\n",
56
+ " 'hybrid_stat', 'filename', 'filepath', 'md5'],\n",
57
+ " dtype='object')"
58
+ ]
59
+ },
60
+ "execution_count": 3,
61
+ "metadata": {},
62
+ "output_type": "execute_result"
63
+ }
64
+ ],
65
+ "source": [
66
+ "full_df.columns"
67
+ ]
68
+ },
69
+ {
70
+ "cell_type": "markdown",
71
+ "metadata": {},
72
+ "source": [
73
+ "First, we need to fix a typo found in the subspecies (\"clysonomus\" should be \"clysonymus\")."
74
+ ]
75
+ },
76
+ {
77
+ "cell_type": "code",
78
+ "execution_count": 4,
79
+ "metadata": {},
80
+ "outputs": [
81
+ {
82
+ "data": {
83
+ "text/plain": [
84
+ "136"
85
+ ]
86
+ },
87
+ "execution_count": 4,
88
+ "metadata": {},
89
+ "output_type": "execute_result"
90
+ }
91
+ ],
92
+ "source": [
93
+ "full_df.loc[full_df[\"subspecies\"] == \"clysonymus\"].shape[0]"
94
+ ]
95
+ },
96
+ {
97
+ "cell_type": "code",
98
+ "execution_count": 5,
99
+ "metadata": {},
100
+ "outputs": [
101
+ {
102
+ "data": {
103
+ "text/html": [
104
+ "<div>\n",
105
+ "<style scoped>\n",
106
+ " .dataframe tbody tr th:only-of-type {\n",
107
+ " vertical-align: middle;\n",
108
+ " }\n",
109
+ "\n",
110
+ " .dataframe tbody tr th {\n",
111
+ " vertical-align: top;\n",
112
+ " }\n",
113
+ "\n",
114
+ " .dataframe thead th {\n",
115
+ " text-align: right;\n",
116
+ " }\n",
117
+ "</style>\n",
118
+ "<table border=\"1\" class=\"dataframe\">\n",
119
+ " <thead>\n",
120
+ " <tr style=\"text-align: right;\">\n",
121
+ " <th></th>\n",
122
+ " <th>CAMID</th>\n",
123
+ " <th>X</th>\n",
124
+ " <th>Image_name</th>\n",
125
+ " <th>View</th>\n",
126
+ " <th>zenodo_name</th>\n",
127
+ " <th>zenodo_link</th>\n",
128
+ " <th>Sequence</th>\n",
129
+ " <th>Taxonomic_Name</th>\n",
130
+ " <th>Locality</th>\n",
131
+ " <th>Sample_accession</th>\n",
132
+ " <th>...</th>\n",
133
+ " <th>file_type</th>\n",
134
+ " <th>record_number</th>\n",
135
+ " <th>species</th>\n",
136
+ " <th>subspecies</th>\n",
137
+ " <th>genus</th>\n",
138
+ " <th>file_url</th>\n",
139
+ " <th>hybrid_stat</th>\n",
140
+ " <th>filename</th>\n",
141
+ " <th>filepath</th>\n",
142
+ " <th>md5</th>\n",
143
+ " </tr>\n",
144
+ " </thead>\n",
145
+ " <tbody>\n",
146
+ " <tr>\n",
147
+ " <th>24962</th>\n",
148
+ " <td>CAM041233</td>\n",
149
+ " <td>14103</td>\n",
150
+ " <td>CAM041233_d.JPG</td>\n",
151
+ " <td>dorsal</td>\n",
152
+ " <td>CAM.coll.images.batch9.csv</td>\n",
153
+ " <td>https://zenodo.org/record/2714333</td>\n",
154
+ " <td>41,233</td>\n",
155
+ " <td>Heliconius clysonomus ssp. clysonomus</td>\n",
156
+ " <td>Wild Sumaco Hummingbird Trail</td>\n",
157
+ " <td>NaN</td>\n",
158
+ " <td>...</td>\n",
159
+ " <td>jpg</td>\n",
160
+ " <td>2714333</td>\n",
161
+ " <td>Heliconius clysonomus</td>\n",
162
+ " <td>clysonomus</td>\n",
163
+ " <td>Heliconius</td>\n",
164
+ " <td>https://zenodo.org/record/2714333/files/CAM041...</td>\n",
165
+ " <td>non-hybrid</td>\n",
166
+ " <td>14103_CAM041233_d.JPG</td>\n",
167
+ " <td>images/Heliconius clysonomus ssp. clysonomus/1...</td>\n",
168
+ " <td>2236af310ed7d7027cbec678a636b5ee</td>\n",
169
+ " </tr>\n",
170
+ " <tr>\n",
171
+ " <th>24963</th>\n",
172
+ " <td>CAM041233</td>\n",
173
+ " <td>14104</td>\n",
174
+ " <td>CAM041233_v.JPG</td>\n",
175
+ " <td>ventral</td>\n",
176
+ " <td>CAM.coll.images.batch9.csv</td>\n",
177
+ " <td>https://zenodo.org/record/2714333</td>\n",
178
+ " <td>41,233</td>\n",
179
+ " <td>Heliconius clysonomus ssp. clysonomus</td>\n",
180
+ " <td>Wild Sumaco Hummingbird Trail</td>\n",
181
+ " <td>NaN</td>\n",
182
+ " <td>...</td>\n",
183
+ " <td>jpg</td>\n",
184
+ " <td>2714333</td>\n",
185
+ " <td>Heliconius clysonomus</td>\n",
186
+ " <td>clysonomus</td>\n",
187
+ " <td>Heliconius</td>\n",
188
+ " <td>https://zenodo.org/record/2714333/files/CAM041...</td>\n",
189
+ " <td>non-hybrid</td>\n",
190
+ " <td>14104_CAM041233_v.JPG</td>\n",
191
+ " <td>images/Heliconius clysonomus ssp. clysonomus/1...</td>\n",
192
+ " <td>d45a9ef82f9cd4646c4ea51e266b2814</td>\n",
193
+ " </tr>\n",
194
+ " <tr>\n",
195
+ " <th>24964</th>\n",
196
+ " <td>CAM041234</td>\n",
197
+ " <td>14105</td>\n",
198
+ " <td>CAM041234_d.JPG</td>\n",
199
+ " <td>dorsal</td>\n",
200
+ " <td>CAM.coll.images.batch9.csv</td>\n",
201
+ " <td>https://zenodo.org/record/2714333</td>\n",
202
+ " <td>41,234</td>\n",
203
+ " <td>Heliconius clysonomus ssp. clysonomus</td>\n",
204
+ " <td>Wild Sumaco Hummingbird Trail</td>\n",
205
+ " <td>NaN</td>\n",
206
+ " <td>...</td>\n",
207
+ " <td>jpg</td>\n",
208
+ " <td>2714333</td>\n",
209
+ " <td>Heliconius clysonomus</td>\n",
210
+ " <td>clysonomus</td>\n",
211
+ " <td>Heliconius</td>\n",
212
+ " <td>https://zenodo.org/record/2714333/files/CAM041...</td>\n",
213
+ " <td>non-hybrid</td>\n",
214
+ " <td>14105_CAM041234_d.JPG</td>\n",
215
+ " <td>images/Heliconius clysonomus ssp. clysonomus/1...</td>\n",
216
+ " <td>2c19b958ad77e448d7ad2ad41273bb65</td>\n",
217
+ " </tr>\n",
218
+ " <tr>\n",
219
+ " <th>24965</th>\n",
220
+ " <td>CAM041234</td>\n",
221
+ " <td>14106</td>\n",
222
+ " <td>CAM041234_v.JPG</td>\n",
223
+ " <td>ventral</td>\n",
224
+ " <td>CAM.coll.images.batch9.csv</td>\n",
225
+ " <td>https://zenodo.org/record/2714333</td>\n",
226
+ " <td>41,234</td>\n",
227
+ " <td>Heliconius clysonomus ssp. clysonomus</td>\n",
228
+ " <td>Wild Sumaco Hummingbird Trail</td>\n",
229
+ " <td>NaN</td>\n",
230
+ " <td>...</td>\n",
231
+ " <td>jpg</td>\n",
232
+ " <td>2714333</td>\n",
233
+ " <td>Heliconius clysonomus</td>\n",
234
+ " <td>clysonomus</td>\n",
235
+ " <td>Heliconius</td>\n",
236
+ " <td>https://zenodo.org/record/2714333/files/CAM041...</td>\n",
237
+ " <td>non-hybrid</td>\n",
238
+ " <td>14106_CAM041234_v.JPG</td>\n",
239
+ " <td>images/Heliconius clysonomus ssp. clysonomus/1...</td>\n",
240
+ " <td>8249c142e90bda050accab7e59e9821d</td>\n",
241
+ " </tr>\n",
242
+ " <tr>\n",
243
+ " <th>24966</th>\n",
244
+ " <td>CAM041235</td>\n",
245
+ " <td>14107</td>\n",
246
+ " <td>CAM041235_d.JPG</td>\n",
247
+ " <td>dorsal</td>\n",
248
+ " <td>CAM.coll.images.batch9.csv</td>\n",
249
+ " <td>https://zenodo.org/record/2714333</td>\n",
250
+ " <td>41,235</td>\n",
251
+ " <td>Heliconius clysonomus ssp. clysonomus</td>\n",
252
+ " <td>Wild Sumaco Hummingbird Trail</td>\n",
253
+ " <td>NaN</td>\n",
254
+ " <td>...</td>\n",
255
+ " <td>jpg</td>\n",
256
+ " <td>2714333</td>\n",
257
+ " <td>Heliconius clysonomus</td>\n",
258
+ " <td>clysonomus</td>\n",
259
+ " <td>Heliconius</td>\n",
260
+ " <td>https://zenodo.org/record/2714333/files/CAM041...</td>\n",
261
+ " <td>non-hybrid</td>\n",
262
+ " <td>14107_CAM041235_d.JPG</td>\n",
263
+ " <td>images/Heliconius clysonomus ssp. clysonomus/1...</td>\n",
264
+ " <td>a988e503bbe0404e07c89405c05e0f9d</td>\n",
265
+ " </tr>\n",
266
+ " <tr>\n",
267
+ " <th>24967</th>\n",
268
+ " <td>CAM041235</td>\n",
269
+ " <td>14108</td>\n",
270
+ " <td>CAM041235_v.JPG</td>\n",
271
+ " <td>ventral</td>\n",
272
+ " <td>CAM.coll.images.batch9.csv</td>\n",
273
+ " <td>https://zenodo.org/record/2714333</td>\n",
274
+ " <td>41,235</td>\n",
275
+ " <td>Heliconius clysonomus ssp. clysonomus</td>\n",
276
+ " <td>Wild Sumaco Hummingbird Trail</td>\n",
277
+ " <td>NaN</td>\n",
278
+ " <td>...</td>\n",
279
+ " <td>jpg</td>\n",
280
+ " <td>2714333</td>\n",
281
+ " <td>Heliconius clysonomus</td>\n",
282
+ " <td>clysonomus</td>\n",
283
+ " <td>Heliconius</td>\n",
284
+ " <td>https://zenodo.org/record/2714333/files/CAM041...</td>\n",
285
+ " <td>non-hybrid</td>\n",
286
+ " <td>14108_CAM041235_v.JPG</td>\n",
287
+ " <td>images/Heliconius clysonomus ssp. clysonomus/1...</td>\n",
288
+ " <td>495869bf772c8d4d95b07620d3e3c6dd</td>\n",
289
+ " </tr>\n",
290
+ " <tr>\n",
291
+ " <th>24968</th>\n",
292
+ " <td>CAM041236</td>\n",
293
+ " <td>14109</td>\n",
294
+ " <td>CAM041236_d.JPG</td>\n",
295
+ " <td>dorsal</td>\n",
296
+ " <td>CAM.coll.images.batch9.csv</td>\n",
297
+ " <td>https://zenodo.org/record/2714333</td>\n",
298
+ " <td>41,236</td>\n",
299
+ " <td>Heliconius clysonomus ssp. clysonomus</td>\n",
300
+ " <td>Wild Sumaco Hummingbird Trail</td>\n",
301
+ " <td>NaN</td>\n",
302
+ " <td>...</td>\n",
303
+ " <td>jpg</td>\n",
304
+ " <td>2714333</td>\n",
305
+ " <td>Heliconius clysonomus</td>\n",
306
+ " <td>clysonomus</td>\n",
307
+ " <td>Heliconius</td>\n",
308
+ " <td>https://zenodo.org/record/2714333/files/CAM041...</td>\n",
309
+ " <td>non-hybrid</td>\n",
310
+ " <td>14109_CAM041236_d.JPG</td>\n",
311
+ " <td>images/Heliconius clysonomus ssp. clysonomus/1...</td>\n",
312
+ " <td>15f796491b44543453b6f7ce0311c9dc</td>\n",
313
+ " </tr>\n",
314
+ " <tr>\n",
315
+ " <th>24969</th>\n",
316
+ " <td>CAM041236</td>\n",
317
+ " <td>14110</td>\n",
318
+ " <td>CAM041236_v.JPG</td>\n",
319
+ " <td>ventral</td>\n",
320
+ " <td>CAM.coll.images.batch9.csv</td>\n",
321
+ " <td>https://zenodo.org/record/2714333</td>\n",
322
+ " <td>41,236</td>\n",
323
+ " <td>Heliconius clysonomus ssp. clysonomus</td>\n",
324
+ " <td>Wild Sumaco Hummingbird Trail</td>\n",
325
+ " <td>NaN</td>\n",
326
+ " <td>...</td>\n",
327
+ " <td>jpg</td>\n",
328
+ " <td>2714333</td>\n",
329
+ " <td>Heliconius clysonomus</td>\n",
330
+ " <td>clysonomus</td>\n",
331
+ " <td>Heliconius</td>\n",
332
+ " <td>https://zenodo.org/record/2714333/files/CAM041...</td>\n",
333
+ " <td>non-hybrid</td>\n",
334
+ " <td>14110_CAM041236_v.JPG</td>\n",
335
+ " <td>images/Heliconius clysonomus ssp. clysonomus/1...</td>\n",
336
+ " <td>20684478a650287e49f64675deb80ed6</td>\n",
337
+ " </tr>\n",
338
+ " <tr>\n",
339
+ " <th>25055</th>\n",
340
+ " <td>CAM041280</td>\n",
341
+ " <td>14196</td>\n",
342
+ " <td>CAM041280_d.JPG</td>\n",
343
+ " <td>dorsal</td>\n",
344
+ " <td>CAM.coll.images.batch9.csv</td>\n",
345
+ " <td>https://zenodo.org/record/2714333</td>\n",
346
+ " <td>41,280</td>\n",
347
+ " <td>Heliconius clysonomus ssp. clysonomus</td>\n",
348
+ " <td>Reventador road</td>\n",
349
+ " <td>NaN</td>\n",
350
+ " <td>...</td>\n",
351
+ " <td>jpg</td>\n",
352
+ " <td>2714333</td>\n",
353
+ " <td>Heliconius clysonomus</td>\n",
354
+ " <td>clysonomus</td>\n",
355
+ " <td>Heliconius</td>\n",
356
+ " <td>https://zenodo.org/record/2714333/files/CAM041...</td>\n",
357
+ " <td>non-hybrid</td>\n",
358
+ " <td>14196_CAM041280_d.JPG</td>\n",
359
+ " <td>images/Heliconius clysonomus ssp. clysonomus/1...</td>\n",
360
+ " <td>9363c286d5fb4790b99fd2bc2fe8aaad</td>\n",
361
+ " </tr>\n",
362
+ " <tr>\n",
363
+ " <th>25056</th>\n",
364
+ " <td>CAM041280</td>\n",
365
+ " <td>14197</td>\n",
366
+ " <td>CAM041280_v.JPG</td>\n",
367
+ " <td>ventral</td>\n",
368
+ " <td>CAM.coll.images.batch9.csv</td>\n",
369
+ " <td>https://zenodo.org/record/2714333</td>\n",
370
+ " <td>41,280</td>\n",
371
+ " <td>Heliconius clysonomus ssp. clysonomus</td>\n",
372
+ " <td>Reventador road</td>\n",
373
+ " <td>NaN</td>\n",
374
+ " <td>...</td>\n",
375
+ " <td>jpg</td>\n",
376
+ " <td>2714333</td>\n",
377
+ " <td>Heliconius clysonomus</td>\n",
378
+ " <td>clysonomus</td>\n",
379
+ " <td>Heliconius</td>\n",
380
+ " <td>https://zenodo.org/record/2714333/files/CAM041...</td>\n",
381
+ " <td>non-hybrid</td>\n",
382
+ " <td>14197_CAM041280_v.JPG</td>\n",
383
+ " <td>images/Heliconius clysonomus ssp. clysonomus/1...</td>\n",
384
+ " <td>9085c0f1bb0230d7ccc9089f1a299aed</td>\n",
385
+ " </tr>\n",
386
+ " <tr>\n",
387
+ " <th>25057</th>\n",
388
+ " <td>CAM041281</td>\n",
389
+ " <td>14198</td>\n",
390
+ " <td>CAM041281_d.JPG</td>\n",
391
+ " <td>dorsal</td>\n",
392
+ " <td>CAM.coll.images.batch9.csv</td>\n",
393
+ " <td>https://zenodo.org/record/2714333</td>\n",
394
+ " <td>41,281</td>\n",
395
+ " <td>Heliconius clysonomus ssp. clysonomus</td>\n",
396
+ " <td>Reventador road</td>\n",
397
+ " <td>NaN</td>\n",
398
+ " <td>...</td>\n",
399
+ " <td>jpg</td>\n",
400
+ " <td>2714333</td>\n",
401
+ " <td>Heliconius clysonomus</td>\n",
402
+ " <td>clysonomus</td>\n",
403
+ " <td>Heliconius</td>\n",
404
+ " <td>https://zenodo.org/record/2714333/files/CAM041...</td>\n",
405
+ " <td>non-hybrid</td>\n",
406
+ " <td>14198_CAM041281_d.JPG</td>\n",
407
+ " <td>images/Heliconius clysonomus ssp. clysonomus/1...</td>\n",
408
+ " <td>d371321547ec020347275e7b89cf6af2</td>\n",
409
+ " </tr>\n",
410
+ " <tr>\n",
411
+ " <th>25058</th>\n",
412
+ " <td>CAM041281</td>\n",
413
+ " <td>14199</td>\n",
414
+ " <td>CAM041281_v.JPG</td>\n",
415
+ " <td>ventral</td>\n",
416
+ " <td>CAM.coll.images.batch9.csv</td>\n",
417
+ " <td>https://zenodo.org/record/2714333</td>\n",
418
+ " <td>41,281</td>\n",
419
+ " <td>Heliconius clysonomus ssp. clysonomus</td>\n",
420
+ " <td>Reventador road</td>\n",
421
+ " <td>NaN</td>\n",
422
+ " <td>...</td>\n",
423
+ " <td>jpg</td>\n",
424
+ " <td>2714333</td>\n",
425
+ " <td>Heliconius clysonomus</td>\n",
426
+ " <td>clysonomus</td>\n",
427
+ " <td>Heliconius</td>\n",
428
+ " <td>https://zenodo.org/record/2714333/files/CAM041...</td>\n",
429
+ " <td>non-hybrid</td>\n",
430
+ " <td>14199_CAM041281_v.JPG</td>\n",
431
+ " <td>images/Heliconius clysonomus ssp. clysonomus/1...</td>\n",
432
+ " <td>13e5a78afa77e0b1fb238377600fc9b8</td>\n",
433
+ " </tr>\n",
434
+ " <tr>\n",
435
+ " <th>25059</th>\n",
436
+ " <td>CAM041282</td>\n",
437
+ " <td>14201</td>\n",
438
+ " <td>CAM041282_v.JPG</td>\n",
439
+ " <td>ventral</td>\n",
440
+ " <td>CAM.coll.images.batch9.csv</td>\n",
441
+ " <td>https://zenodo.org/record/2714333</td>\n",
442
+ " <td>41,282</td>\n",
443
+ " <td>Heliconius clysonomus ssp. clysonomus</td>\n",
444
+ " <td>Reventador road</td>\n",
445
+ " <td>NaN</td>\n",
446
+ " <td>...</td>\n",
447
+ " <td>jpg</td>\n",
448
+ " <td>2714333</td>\n",
449
+ " <td>Heliconius clysonomus</td>\n",
450
+ " <td>clysonomus</td>\n",
451
+ " <td>Heliconius</td>\n",
452
+ " <td>https://zenodo.org/record/2714333/files/CAM041...</td>\n",
453
+ " <td>non-hybrid</td>\n",
454
+ " <td>14201_CAM041282_v.JPG</td>\n",
455
+ " <td>images/Heliconius clysonomus ssp. clysonomus/1...</td>\n",
456
+ " <td>922f2db6299e004bcb09906f99c038ba</td>\n",
457
+ " </tr>\n",
458
+ " <tr>\n",
459
+ " <th>25060</th>\n",
460
+ " <td>CAM041282</td>\n",
461
+ " <td>14200</td>\n",
462
+ " <td>CAM041282_d.JPG</td>\n",
463
+ " <td>dorsal</td>\n",
464
+ " <td>CAM.coll.images.batch9.csv</td>\n",
465
+ " <td>https://zenodo.org/record/2714333</td>\n",
466
+ " <td>41,282</td>\n",
467
+ " <td>Heliconius clysonomus ssp. clysonomus</td>\n",
468
+ " <td>Reventador road</td>\n",
469
+ " <td>NaN</td>\n",
470
+ " <td>...</td>\n",
471
+ " <td>jpg</td>\n",
472
+ " <td>2714333</td>\n",
473
+ " <td>Heliconius clysonomus</td>\n",
474
+ " <td>clysonomus</td>\n",
475
+ " <td>Heliconius</td>\n",
476
+ " <td>https://zenodo.org/record/2714333/files/CAM041...</td>\n",
477
+ " <td>non-hybrid</td>\n",
478
+ " <td>14200_CAM041282_d.JPG</td>\n",
479
+ " <td>images/Heliconius clysonomus ssp. clysonomus/1...</td>\n",
480
+ " <td>8b40ba830d38f9f4061a63a854c86404</td>\n",
481
+ " </tr>\n",
482
+ " <tr>\n",
483
+ " <th>25061</th>\n",
484
+ " <td>CAM041283</td>\n",
485
+ " <td>14203</td>\n",
486
+ " <td>CAM041283_v.JPG</td>\n",
487
+ " <td>ventral</td>\n",
488
+ " <td>CAM.coll.images.batch9.csv</td>\n",
489
+ " <td>https://zenodo.org/record/2714333</td>\n",
490
+ " <td>41,283</td>\n",
491
+ " <td>Heliconius clysonomus ssp. clysonomus</td>\n",
492
+ " <td>Reventador road</td>\n",
493
+ " <td>NaN</td>\n",
494
+ " <td>...</td>\n",
495
+ " <td>jpg</td>\n",
496
+ " <td>2714333</td>\n",
497
+ " <td>Heliconius clysonomus</td>\n",
498
+ " <td>clysonomus</td>\n",
499
+ " <td>Heliconius</td>\n",
500
+ " <td>https://zenodo.org/record/2714333/files/CAM041...</td>\n",
501
+ " <td>non-hybrid</td>\n",
502
+ " <td>14203_CAM041283_v.JPG</td>\n",
503
+ " <td>images/Heliconius clysonomus ssp. clysonomus/1...</td>\n",
504
+ " <td>349520a30aee4bb098789b0b24d0a288</td>\n",
505
+ " </tr>\n",
506
+ " <tr>\n",
507
+ " <th>25062</th>\n",
508
+ " <td>CAM041283</td>\n",
509
+ " <td>14202</td>\n",
510
+ " <td>CAM041283_d.JPG</td>\n",
511
+ " <td>dorsal</td>\n",
512
+ " <td>CAM.coll.images.batch9.csv</td>\n",
513
+ " <td>https://zenodo.org/record/2714333</td>\n",
514
+ " <td>41,283</td>\n",
515
+ " <td>Heliconius clysonomus ssp. clysonomus</td>\n",
516
+ " <td>Reventador road</td>\n",
517
+ " <td>NaN</td>\n",
518
+ " <td>...</td>\n",
519
+ " <td>jpg</td>\n",
520
+ " <td>2714333</td>\n",
521
+ " <td>Heliconius clysonomus</td>\n",
522
+ " <td>clysonomus</td>\n",
523
+ " <td>Heliconius</td>\n",
524
+ " <td>https://zenodo.org/record/2714333/files/CAM041...</td>\n",
525
+ " <td>non-hybrid</td>\n",
526
+ " <td>14202_CAM041283_d.JPG</td>\n",
527
+ " <td>images/Heliconius clysonomus ssp. clysonomus/1...</td>\n",
528
+ " <td>810791d8777381676724cbee09f4c9b6</td>\n",
529
+ " </tr>\n",
530
+ " <tr>\n",
531
+ " <th>25063</th>\n",
532
+ " <td>CAM041284</td>\n",
533
+ " <td>14204</td>\n",
534
+ " <td>CAM041284_d.JPG</td>\n",
535
+ " <td>dorsal</td>\n",
536
+ " <td>CAM.coll.images.batch9.csv</td>\n",
537
+ " <td>https://zenodo.org/record/2714333</td>\n",
538
+ " <td>41,284</td>\n",
539
+ " <td>Heliconius clysonomus ssp. clysonomus</td>\n",
540
+ " <td>Reventador road</td>\n",
541
+ " <td>NaN</td>\n",
542
+ " <td>...</td>\n",
543
+ " <td>jpg</td>\n",
544
+ " <td>2714333</td>\n",
545
+ " <td>Heliconius clysonomus</td>\n",
546
+ " <td>clysonomus</td>\n",
547
+ " <td>Heliconius</td>\n",
548
+ " <td>https://zenodo.org/record/2714333/files/CAM041...</td>\n",
549
+ " <td>non-hybrid</td>\n",
550
+ " <td>14204_CAM041284_d.JPG</td>\n",
551
+ " <td>images/Heliconius clysonomus ssp. clysonomus/1...</td>\n",
552
+ " <td>040da0a338a3318baef1de8f275912dd</td>\n",
553
+ " </tr>\n",
554
+ " <tr>\n",
555
+ " <th>25064</th>\n",
556
+ " <td>CAM041284</td>\n",
557
+ " <td>14205</td>\n",
558
+ " <td>CAM041284_v.JPG</td>\n",
559
+ " <td>ventral</td>\n",
560
+ " <td>CAM.coll.images.batch9.csv</td>\n",
561
+ " <td>https://zenodo.org/record/2714333</td>\n",
562
+ " <td>41,284</td>\n",
563
+ " <td>Heliconius clysonomus ssp. clysonomus</td>\n",
564
+ " <td>Reventador road</td>\n",
565
+ " <td>NaN</td>\n",
566
+ " <td>...</td>\n",
567
+ " <td>jpg</td>\n",
568
+ " <td>2714333</td>\n",
569
+ " <td>Heliconius clysonomus</td>\n",
570
+ " <td>clysonomus</td>\n",
571
+ " <td>Heliconius</td>\n",
572
+ " <td>https://zenodo.org/record/2714333/files/CAM041...</td>\n",
573
+ " <td>non-hybrid</td>\n",
574
+ " <td>14205_CAM041284_v.JPG</td>\n",
575
+ " <td>images/Heliconius clysonomus ssp. clysonomus/1...</td>\n",
576
+ " <td>955d38ec86c457378e8b9e1a8a3776f8</td>\n",
577
+ " </tr>\n",
578
+ " <tr>\n",
579
+ " <th>25065</th>\n",
580
+ " <td>CAM041285</td>\n",
581
+ " <td>14206</td>\n",
582
+ " <td>CAM041285_d.JPG</td>\n",
583
+ " <td>dorsal</td>\n",
584
+ " <td>CAM.coll.images.batch9.csv</td>\n",
585
+ " <td>https://zenodo.org/record/2714333</td>\n",
586
+ " <td>41,285</td>\n",
587
+ " <td>Heliconius clysonomus ssp. clysonomus</td>\n",
588
+ " <td>Reventador road</td>\n",
589
+ " <td>NaN</td>\n",
590
+ " <td>...</td>\n",
591
+ " <td>jpg</td>\n",
592
+ " <td>2714333</td>\n",
593
+ " <td>Heliconius clysonomus</td>\n",
594
+ " <td>clysonomus</td>\n",
595
+ " <td>Heliconius</td>\n",
596
+ " <td>https://zenodo.org/record/2714333/files/CAM041...</td>\n",
597
+ " <td>non-hybrid</td>\n",
598
+ " <td>14206_CAM041285_d.JPG</td>\n",
599
+ " <td>images/Heliconius clysonomus ssp. clysonomus/1...</td>\n",
600
+ " <td>2af97a0ad748065aecc88dfa1649c51c</td>\n",
601
+ " </tr>\n",
602
+ " <tr>\n",
603
+ " <th>25066</th>\n",
604
+ " <td>CAM041285</td>\n",
605
+ " <td>14207</td>\n",
606
+ " <td>CAM041285_v.JPG</td>\n",
607
+ " <td>ventral</td>\n",
608
+ " <td>CAM.coll.images.batch9.csv</td>\n",
609
+ " <td>https://zenodo.org/record/2714333</td>\n",
610
+ " <td>41,285</td>\n",
611
+ " <td>Heliconius clysonomus ssp. clysonomus</td>\n",
612
+ " <td>Reventador road</td>\n",
613
+ " <td>NaN</td>\n",
614
+ " <td>...</td>\n",
615
+ " <td>jpg</td>\n",
616
+ " <td>2714333</td>\n",
617
+ " <td>Heliconius clysonomus</td>\n",
618
+ " <td>clysonomus</td>\n",
619
+ " <td>Heliconius</td>\n",
620
+ " <td>https://zenodo.org/record/2714333/files/CAM041...</td>\n",
621
+ " <td>non-hybrid</td>\n",
622
+ " <td>14207_CAM041285_v.JPG</td>\n",
623
+ " <td>images/Heliconius clysonomus ssp. clysonomus/1...</td>\n",
624
+ " <td>24acf462d66c712f3be5aab7f1c85b6e</td>\n",
625
+ " </tr>\n",
626
+ " </tbody>\n",
627
+ "</table>\n",
628
+ "<p>20 rows × 31 columns</p>\n",
629
+ "</div>"
630
+ ],
631
+ "text/plain": [
632
+ " CAMID X Image_name View zenodo_name \\\n",
633
+ "24962 CAM041233 14103 CAM041233_d.JPG dorsal CAM.coll.images.batch9.csv \n",
634
+ "24963 CAM041233 14104 CAM041233_v.JPG ventral CAM.coll.images.batch9.csv \n",
635
+ "24964 CAM041234 14105 CAM041234_d.JPG dorsal CAM.coll.images.batch9.csv \n",
636
+ "24965 CAM041234 14106 CAM041234_v.JPG ventral CAM.coll.images.batch9.csv \n",
637
+ "24966 CAM041235 14107 CAM041235_d.JPG dorsal CAM.coll.images.batch9.csv \n",
638
+ "24967 CAM041235 14108 CAM041235_v.JPG ventral CAM.coll.images.batch9.csv \n",
639
+ "24968 CAM041236 14109 CAM041236_d.JPG dorsal CAM.coll.images.batch9.csv \n",
640
+ "24969 CAM041236 14110 CAM041236_v.JPG ventral CAM.coll.images.batch9.csv \n",
641
+ "25055 CAM041280 14196 CAM041280_d.JPG dorsal CAM.coll.images.batch9.csv \n",
642
+ "25056 CAM041280 14197 CAM041280_v.JPG ventral CAM.coll.images.batch9.csv \n",
643
+ "25057 CAM041281 14198 CAM041281_d.JPG dorsal CAM.coll.images.batch9.csv \n",
644
+ "25058 CAM041281 14199 CAM041281_v.JPG ventral CAM.coll.images.batch9.csv \n",
645
+ "25059 CAM041282 14201 CAM041282_v.JPG ventral CAM.coll.images.batch9.csv \n",
646
+ "25060 CAM041282 14200 CAM041282_d.JPG dorsal CAM.coll.images.batch9.csv \n",
647
+ "25061 CAM041283 14203 CAM041283_v.JPG ventral CAM.coll.images.batch9.csv \n",
648
+ "25062 CAM041283 14202 CAM041283_d.JPG dorsal CAM.coll.images.batch9.csv \n",
649
+ "25063 CAM041284 14204 CAM041284_d.JPG dorsal CAM.coll.images.batch9.csv \n",
650
+ "25064 CAM041284 14205 CAM041284_v.JPG ventral CAM.coll.images.batch9.csv \n",
651
+ "25065 CAM041285 14206 CAM041285_d.JPG dorsal CAM.coll.images.batch9.csv \n",
652
+ "25066 CAM041285 14207 CAM041285_v.JPG ventral CAM.coll.images.batch9.csv \n",
653
+ "\n",
654
+ " zenodo_link Sequence \\\n",
655
+ "24962 https://zenodo.org/record/2714333 41,233 \n",
656
+ "24963 https://zenodo.org/record/2714333 41,233 \n",
657
+ "24964 https://zenodo.org/record/2714333 41,234 \n",
658
+ "24965 https://zenodo.org/record/2714333 41,234 \n",
659
+ "24966 https://zenodo.org/record/2714333 41,235 \n",
660
+ "24967 https://zenodo.org/record/2714333 41,235 \n",
661
+ "24968 https://zenodo.org/record/2714333 41,236 \n",
662
+ "24969 https://zenodo.org/record/2714333 41,236 \n",
663
+ "25055 https://zenodo.org/record/2714333 41,280 \n",
664
+ "25056 https://zenodo.org/record/2714333 41,280 \n",
665
+ "25057 https://zenodo.org/record/2714333 41,281 \n",
666
+ "25058 https://zenodo.org/record/2714333 41,281 \n",
667
+ "25059 https://zenodo.org/record/2714333 41,282 \n",
668
+ "25060 https://zenodo.org/record/2714333 41,282 \n",
669
+ "25061 https://zenodo.org/record/2714333 41,283 \n",
670
+ "25062 https://zenodo.org/record/2714333 41,283 \n",
671
+ "25063 https://zenodo.org/record/2714333 41,284 \n",
672
+ "25064 https://zenodo.org/record/2714333 41,284 \n",
673
+ "25065 https://zenodo.org/record/2714333 41,285 \n",
674
+ "25066 https://zenodo.org/record/2714333 41,285 \n",
675
+ "\n",
676
+ " Taxonomic_Name Locality \\\n",
677
+ "24962 Heliconius clysonomus ssp. clysonomus Wild Sumaco Hummingbird Trail \n",
678
+ "24963 Heliconius clysonomus ssp. clysonomus Wild Sumaco Hummingbird Trail \n",
679
+ "24964 Heliconius clysonomus ssp. clysonomus Wild Sumaco Hummingbird Trail \n",
680
+ "24965 Heliconius clysonomus ssp. clysonomus Wild Sumaco Hummingbird Trail \n",
681
+ "24966 Heliconius clysonomus ssp. clysonomus Wild Sumaco Hummingbird Trail \n",
682
+ "24967 Heliconius clysonomus ssp. clysonomus Wild Sumaco Hummingbird Trail \n",
683
+ "24968 Heliconius clysonomus ssp. clysonomus Wild Sumaco Hummingbird Trail \n",
684
+ "24969 Heliconius clysonomus ssp. clysonomus Wild Sumaco Hummingbird Trail \n",
685
+ "25055 Heliconius clysonomus ssp. clysonomus Reventador road \n",
686
+ "25056 Heliconius clysonomus ssp. clysonomus Reventador road \n",
687
+ "25057 Heliconius clysonomus ssp. clysonomus Reventador road \n",
688
+ "25058 Heliconius clysonomus ssp. clysonomus Reventador road \n",
689
+ "25059 Heliconius clysonomus ssp. clysonomus Reventador road \n",
690
+ "25060 Heliconius clysonomus ssp. clysonomus Reventador road \n",
691
+ "25061 Heliconius clysonomus ssp. clysonomus Reventador road \n",
692
+ "25062 Heliconius clysonomus ssp. clysonomus Reventador road \n",
693
+ "25063 Heliconius clysonomus ssp. clysonomus Reventador road \n",
694
+ "25064 Heliconius clysonomus ssp. clysonomus Reventador road \n",
695
+ "25065 Heliconius clysonomus ssp. clysonomus Reventador road \n",
696
+ "25066 Heliconius clysonomus ssp. clysonomus Reventador road \n",
697
+ "\n",
698
+ " Sample_accession ... file_type record_number species \\\n",
699
+ "24962 NaN ... jpg 2714333 Heliconius clysonomus \n",
700
+ "24963 NaN ... jpg 2714333 Heliconius clysonomus \n",
701
+ "24964 NaN ... jpg 2714333 Heliconius clysonomus \n",
702
+ "24965 NaN ... jpg 2714333 Heliconius clysonomus \n",
703
+ "24966 NaN ... jpg 2714333 Heliconius clysonomus \n",
704
+ "24967 NaN ... jpg 2714333 Heliconius clysonomus \n",
705
+ "24968 NaN ... jpg 2714333 Heliconius clysonomus \n",
706
+ "24969 NaN ... jpg 2714333 Heliconius clysonomus \n",
707
+ "25055 NaN ... jpg 2714333 Heliconius clysonomus \n",
708
+ "25056 NaN ... jpg 2714333 Heliconius clysonomus \n",
709
+ "25057 NaN ... jpg 2714333 Heliconius clysonomus \n",
710
+ "25058 NaN ... jpg 2714333 Heliconius clysonomus \n",
711
+ "25059 NaN ... jpg 2714333 Heliconius clysonomus \n",
712
+ "25060 NaN ... jpg 2714333 Heliconius clysonomus \n",
713
+ "25061 NaN ... jpg 2714333 Heliconius clysonomus \n",
714
+ "25062 NaN ... jpg 2714333 Heliconius clysonomus \n",
715
+ "25063 NaN ... jpg 2714333 Heliconius clysonomus \n",
716
+ "25064 NaN ... jpg 2714333 Heliconius clysonomus \n",
717
+ "25065 NaN ... jpg 2714333 Heliconius clysonomus \n",
718
+ "25066 NaN ... jpg 2714333 Heliconius clysonomus \n",
719
+ "\n",
720
+ " subspecies genus \\\n",
721
+ "24962 clysonomus Heliconius \n",
722
+ "24963 clysonomus Heliconius \n",
723
+ "24964 clysonomus Heliconius \n",
724
+ "24965 clysonomus Heliconius \n",
725
+ "24966 clysonomus Heliconius \n",
726
+ "24967 clysonomus Heliconius \n",
727
+ "24968 clysonomus Heliconius \n",
728
+ "24969 clysonomus Heliconius \n",
729
+ "25055 clysonomus Heliconius \n",
730
+ "25056 clysonomus Heliconius \n",
731
+ "25057 clysonomus Heliconius \n",
732
+ "25058 clysonomus Heliconius \n",
733
+ "25059 clysonomus Heliconius \n",
734
+ "25060 clysonomus Heliconius \n",
735
+ "25061 clysonomus Heliconius \n",
736
+ "25062 clysonomus Heliconius \n",
737
+ "25063 clysonomus Heliconius \n",
738
+ "25064 clysonomus Heliconius \n",
739
+ "25065 clysonomus Heliconius \n",
740
+ "25066 clysonomus Heliconius \n",
741
+ "\n",
742
+ " file_url hybrid_stat \\\n",
743
+ "24962 https://zenodo.org/record/2714333/files/CAM041... non-hybrid \n",
744
+ "24963 https://zenodo.org/record/2714333/files/CAM041... non-hybrid \n",
745
+ "24964 https://zenodo.org/record/2714333/files/CAM041... non-hybrid \n",
746
+ "24965 https://zenodo.org/record/2714333/files/CAM041... non-hybrid \n",
747
+ "24966 https://zenodo.org/record/2714333/files/CAM041... non-hybrid \n",
748
+ "24967 https://zenodo.org/record/2714333/files/CAM041... non-hybrid \n",
749
+ "24968 https://zenodo.org/record/2714333/files/CAM041... non-hybrid \n",
750
+ "24969 https://zenodo.org/record/2714333/files/CAM041... non-hybrid \n",
751
+ "25055 https://zenodo.org/record/2714333/files/CAM041... non-hybrid \n",
752
+ "25056 https://zenodo.org/record/2714333/files/CAM041... non-hybrid \n",
753
+ "25057 https://zenodo.org/record/2714333/files/CAM041... non-hybrid \n",
754
+ "25058 https://zenodo.org/record/2714333/files/CAM041... non-hybrid \n",
755
+ "25059 https://zenodo.org/record/2714333/files/CAM041... non-hybrid \n",
756
+ "25060 https://zenodo.org/record/2714333/files/CAM041... non-hybrid \n",
757
+ "25061 https://zenodo.org/record/2714333/files/CAM041... non-hybrid \n",
758
+ "25062 https://zenodo.org/record/2714333/files/CAM041... non-hybrid \n",
759
+ "25063 https://zenodo.org/record/2714333/files/CAM041... non-hybrid \n",
760
+ "25064 https://zenodo.org/record/2714333/files/CAM041... non-hybrid \n",
761
+ "25065 https://zenodo.org/record/2714333/files/CAM041... non-hybrid \n",
762
+ "25066 https://zenodo.org/record/2714333/files/CAM041... non-hybrid \n",
763
+ "\n",
764
+ " filename \\\n",
765
+ "24962 14103_CAM041233_d.JPG \n",
766
+ "24963 14104_CAM041233_v.JPG \n",
767
+ "24964 14105_CAM041234_d.JPG \n",
768
+ "24965 14106_CAM041234_v.JPG \n",
769
+ "24966 14107_CAM041235_d.JPG \n",
770
+ "24967 14108_CAM041235_v.JPG \n",
771
+ "24968 14109_CAM041236_d.JPG \n",
772
+ "24969 14110_CAM041236_v.JPG \n",
773
+ "25055 14196_CAM041280_d.JPG \n",
774
+ "25056 14197_CAM041280_v.JPG \n",
775
+ "25057 14198_CAM041281_d.JPG \n",
776
+ "25058 14199_CAM041281_v.JPG \n",
777
+ "25059 14201_CAM041282_v.JPG \n",
778
+ "25060 14200_CAM041282_d.JPG \n",
779
+ "25061 14203_CAM041283_v.JPG \n",
780
+ "25062 14202_CAM041283_d.JPG \n",
781
+ "25063 14204_CAM041284_d.JPG \n",
782
+ "25064 14205_CAM041284_v.JPG \n",
783
+ "25065 14206_CAM041285_d.JPG \n",
784
+ "25066 14207_CAM041285_v.JPG \n",
785
+ "\n",
786
+ " filepath \\\n",
787
+ "24962 images/Heliconius clysonomus ssp. clysonomus/1... \n",
788
+ "24963 images/Heliconius clysonomus ssp. clysonomus/1... \n",
789
+ "24964 images/Heliconius clysonomus ssp. clysonomus/1... \n",
790
+ "24965 images/Heliconius clysonomus ssp. clysonomus/1... \n",
791
+ "24966 images/Heliconius clysonomus ssp. clysonomus/1... \n",
792
+ "24967 images/Heliconius clysonomus ssp. clysonomus/1... \n",
793
+ "24968 images/Heliconius clysonomus ssp. clysonomus/1... \n",
794
+ "24969 images/Heliconius clysonomus ssp. clysonomus/1... \n",
795
+ "25055 images/Heliconius clysonomus ssp. clysonomus/1... \n",
796
+ "25056 images/Heliconius clysonomus ssp. clysonomus/1... \n",
797
+ "25057 images/Heliconius clysonomus ssp. clysonomus/1... \n",
798
+ "25058 images/Heliconius clysonomus ssp. clysonomus/1... \n",
799
+ "25059 images/Heliconius clysonomus ssp. clysonomus/1... \n",
800
+ "25060 images/Heliconius clysonomus ssp. clysonomus/1... \n",
801
+ "25061 images/Heliconius clysonomus ssp. clysonomus/1... \n",
802
+ "25062 images/Heliconius clysonomus ssp. clysonomus/1... \n",
803
+ "25063 images/Heliconius clysonomus ssp. clysonomus/1... \n",
804
+ "25064 images/Heliconius clysonomus ssp. clysonomus/1... \n",
805
+ "25065 images/Heliconius clysonomus ssp. clysonomus/1... \n",
806
+ "25066 images/Heliconius clysonomus ssp. clysonomus/1... \n",
807
+ "\n",
808
+ " md5 \n",
809
+ "24962 2236af310ed7d7027cbec678a636b5ee \n",
810
+ "24963 d45a9ef82f9cd4646c4ea51e266b2814 \n",
811
+ "24964 2c19b958ad77e448d7ad2ad41273bb65 \n",
812
+ "24965 8249c142e90bda050accab7e59e9821d \n",
813
+ "24966 a988e503bbe0404e07c89405c05e0f9d \n",
814
+ "24967 495869bf772c8d4d95b07620d3e3c6dd \n",
815
+ "24968 15f796491b44543453b6f7ce0311c9dc \n",
816
+ "24969 20684478a650287e49f64675deb80ed6 \n",
817
+ "25055 9363c286d5fb4790b99fd2bc2fe8aaad \n",
818
+ "25056 9085c0f1bb0230d7ccc9089f1a299aed \n",
819
+ "25057 d371321547ec020347275e7b89cf6af2 \n",
820
+ "25058 13e5a78afa77e0b1fb238377600fc9b8 \n",
821
+ "25059 922f2db6299e004bcb09906f99c038ba \n",
822
+ "25060 8b40ba830d38f9f4061a63a854c86404 \n",
823
+ "25061 349520a30aee4bb098789b0b24d0a288 \n",
824
+ "25062 810791d8777381676724cbee09f4c9b6 \n",
825
+ "25063 040da0a338a3318baef1de8f275912dd \n",
826
+ "25064 955d38ec86c457378e8b9e1a8a3776f8 \n",
827
+ "25065 2af97a0ad748065aecc88dfa1649c51c \n",
828
+ "25066 24acf462d66c712f3be5aab7f1c85b6e \n",
829
+ "\n",
830
+ "[20 rows x 31 columns]"
831
+ ]
832
+ },
833
+ "execution_count": 5,
834
+ "metadata": {},
835
+ "output_type": "execute_result"
836
+ }
837
+ ],
838
+ "source": [
839
+ "full_df.loc[full_df[\"subspecies\"] == \"clysonomus\"]"
840
+ ]
841
+ },
842
+ {
843
+ "cell_type": "code",
844
+ "execution_count": 6,
845
+ "metadata": {},
846
+ "outputs": [],
847
+ "source": [
848
+ "for x in list(full_df.loc[full_df[\"subspecies\"] == \"clysonomus\", \"X\"]):\n",
849
+ " filepath = full_df.loc[full_df[\"X\"] == x, \"filepath\"].values[0]\n",
850
+ " full_df.loc[full_df[\"X\"] == x, \"filepath\"] = filepath.replace(\"clysonomus\", \"clysonymus\")"
851
+ ]
852
+ },
853
+ {
854
+ "cell_type": "code",
855
+ "execution_count": 7,
856
+ "metadata": {},
857
+ "outputs": [
858
+ {
859
+ "data": {
860
+ "text/plain": [
861
+ "filepath\n",
862
+ "images/Heliconius clysonymus ssp. clysonymus/14103_CAM041233_d.JPG 1\n",
863
+ "images/Heliconius clysonymus ssp. clysonymus/14104_CAM041233_v.JPG 1\n",
864
+ "images/Heliconius clysonymus ssp. clysonymus/14206_CAM041285_d.JPG 1\n",
865
+ "images/Heliconius clysonymus ssp. clysonymus/14205_CAM041284_v.JPG 1\n",
866
+ "images/Heliconius clysonymus ssp. clysonymus/14204_CAM041284_d.JPG 1\n",
867
+ "images/Heliconius clysonymus ssp. clysonymus/14202_CAM041283_d.JPG 1\n",
868
+ "images/Heliconius clysonymus ssp. clysonymus/14203_CAM041283_v.JPG 1\n",
869
+ "images/Heliconius clysonymus ssp. clysonymus/14200_CAM041282_d.JPG 1\n",
870
+ "images/Heliconius clysonymus ssp. clysonymus/14201_CAM041282_v.JPG 1\n",
871
+ "images/Heliconius clysonymus ssp. clysonymus/14199_CAM041281_v.JPG 1\n",
872
+ "images/Heliconius clysonymus ssp. clysonymus/14198_CAM041281_d.JPG 1\n",
873
+ "images/Heliconius clysonymus ssp. clysonymus/14197_CAM041280_v.JPG 1\n",
874
+ "images/Heliconius clysonymus ssp. clysonymus/14196_CAM041280_d.JPG 1\n",
875
+ "images/Heliconius clysonymus ssp. clysonymus/14110_CAM041236_v.JPG 1\n",
876
+ "images/Heliconius clysonymus ssp. clysonymus/14109_CAM041236_d.JPG 1\n",
877
+ "images/Heliconius clysonymus ssp. clysonymus/14108_CAM041235_v.JPG 1\n",
878
+ "images/Heliconius clysonymus ssp. clysonymus/14107_CAM041235_d.JPG 1\n",
879
+ "images/Heliconius clysonymus ssp. clysonymus/14106_CAM041234_v.JPG 1\n",
880
+ "images/Heliconius clysonymus ssp. clysonymus/14105_CAM041234_d.JPG 1\n",
881
+ "images/Heliconius clysonymus ssp. clysonymus/14207_CAM041285_v.JPG 1\n",
882
+ "Name: count, dtype: int64"
883
+ ]
884
+ },
885
+ "execution_count": 7,
886
+ "metadata": {},
887
+ "output_type": "execute_result"
888
+ }
889
+ ],
890
+ "source": [
891
+ "full_df.loc[full_df[\"subspecies\"] == \"clysonomus\", \"filepath\"].value_counts()"
892
+ ]
893
+ },
894
+ {
895
+ "cell_type": "code",
896
+ "execution_count": 8,
897
+ "metadata": {},
898
+ "outputs": [],
899
+ "source": [
900
+ "full_df.loc[full_df[\"subspecies\"] == \"clysonomus\", \"Taxonomic_Name\"] = \"Heliconius clysonymus ssp. clysonymus\"\n",
901
+ "full_df.loc[full_df[\"subspecies\"] == \"clysonomus\", \"species\"] = \"Heliconius clysonymus\"\n",
902
+ "full_df.loc[full_df[\"subspecies\"] == \"clysonomus\", \"subspecies\"] = \"clysonymus\""
903
+ ]
904
+ },
905
+ {
906
+ "cell_type": "code",
907
+ "execution_count": 9,
908
+ "metadata": {},
909
+ "outputs": [
910
+ {
911
+ "data": {
912
+ "text/html": [
913
+ "<div>\n",
914
+ "<style scoped>\n",
915
+ " .dataframe tbody tr th:only-of-type {\n",
916
+ " vertical-align: middle;\n",
917
+ " }\n",
918
+ "\n",
919
+ " .dataframe tbody tr th {\n",
920
+ " vertical-align: top;\n",
921
+ " }\n",
922
+ "\n",
923
+ " .dataframe thead th {\n",
924
+ " text-align: right;\n",
925
+ " }\n",
926
+ "</style>\n",
927
+ "<table border=\"1\" class=\"dataframe\">\n",
928
+ " <thead>\n",
929
+ " <tr style=\"text-align: right;\">\n",
930
+ " <th></th>\n",
931
+ " <th>CAMID</th>\n",
932
+ " <th>X</th>\n",
933
+ " <th>Image_name</th>\n",
934
+ " <th>View</th>\n",
935
+ " <th>zenodo_name</th>\n",
936
+ " <th>zenodo_link</th>\n",
937
+ " <th>Sequence</th>\n",
938
+ " <th>Taxonomic_Name</th>\n",
939
+ " <th>Locality</th>\n",
940
+ " <th>Sample_accession</th>\n",
941
+ " <th>...</th>\n",
942
+ " <th>file_type</th>\n",
943
+ " <th>record_number</th>\n",
944
+ " <th>species</th>\n",
945
+ " <th>subspecies</th>\n",
946
+ " <th>genus</th>\n",
947
+ " <th>file_url</th>\n",
948
+ " <th>hybrid_stat</th>\n",
949
+ " <th>filename</th>\n",
950
+ " <th>filepath</th>\n",
951
+ " <th>md5</th>\n",
952
+ " </tr>\n",
953
+ " </thead>\n",
954
+ " <tbody>\n",
955
+ " </tbody>\n",
956
+ "</table>\n",
957
+ "<p>0 rows × 31 columns</p>\n",
958
+ "</div>"
959
+ ],
960
+ "text/plain": [
961
+ "Empty DataFrame\n",
962
+ "Columns: [CAMID, X, Image_name, View, zenodo_name, zenodo_link, Sequence, Taxonomic_Name, Locality, Sample_accession, Collected_by, Other_ID, Date, Dataset, Store, Brood, Death_Date, Cross_Type, Stage, Sex, Unit_Type, file_type, record_number, species, subspecies, genus, file_url, hybrid_stat, filename, filepath, md5]\n",
963
+ "Index: []\n",
964
+ "\n",
965
+ "[0 rows x 31 columns]"
966
+ ]
967
+ },
968
+ "execution_count": 9,
969
+ "metadata": {},
970
+ "output_type": "execute_result"
971
+ }
972
+ ],
973
+ "source": [
974
+ "full_df.loc[full_df[\"subspecies\"] == \"clysonomus\"]"
975
+ ]
976
+ },
977
+ {
978
+ "cell_type": "code",
979
+ "execution_count": 10,
980
+ "metadata": {},
981
+ "outputs": [
982
+ {
983
+ "name": "stdout",
984
+ "output_type": "stream",
985
+ "text": [
986
+ "species\n",
987
+ "Heliconius clysonymus 156\n",
988
+ "Name: count, dtype: int64\n"
989
+ ]
990
+ },
991
+ {
992
+ "data": {
993
+ "text/plain": [
994
+ "Taxonomic_Name\n",
995
+ "Heliconius clysonymus ssp. clysonymus 156\n",
996
+ "Name: count, dtype: int64"
997
+ ]
998
+ },
999
+ "execution_count": 10,
1000
+ "metadata": {},
1001
+ "output_type": "execute_result"
1002
+ }
1003
+ ],
1004
+ "source": [
1005
+ "print(full_df.loc[full_df[\"subspecies\"] == \"clysonymus\", \"species\"].value_counts())\n",
1006
+ "full_df.loc[full_df[\"subspecies\"] == \"clysonymus\", \"Taxonomic_Name\"].value_counts()"
1007
+ ]
1008
+ },
1009
+ {
1010
+ "cell_type": "markdown",
1011
+ "metadata": {},
1012
+ "source": [
1013
+ "Great, all fixed! Need to do the same for the other two CSVs."
1014
+ ]
1015
+ },
1016
+ {
1017
+ "cell_type": "code",
1018
+ "execution_count": 11,
1019
+ "metadata": {},
1020
+ "outputs": [],
1021
+ "source": [
1022
+ "df_list = [full_df, heli_df, dorsal_df]\n",
1023
+ "col_list = [\"filepath\", \"Taxonomic_Name\", \"species\", \"subspecies\"]"
1024
+ ]
1025
+ },
1026
+ {
1027
+ "cell_type": "code",
1028
+ "execution_count": 12,
1029
+ "metadata": {},
1030
+ "outputs": [
1031
+ {
1032
+ "name": "stdout",
1033
+ "output_type": "stream",
1034
+ "text": [
1035
+ "typos: 0\n",
1036
+ "actual: 156\n",
1037
+ "typos: 20\n",
1038
+ "actual: 136\n",
1039
+ "typos: 10\n",
1040
+ "actual: 68\n"
1041
+ ]
1042
+ }
1043
+ ],
1044
+ "source": [
1045
+ "for df in df_list:\n",
1046
+ " print(\"typos: \", df.loc[df[\"subspecies\"] == \"clysonomus\"].shape[0])\n",
1047
+ " print(\"actual: \", df.loc[df[\"subspecies\"] == \"clysonymus\"].shape[0])"
1048
+ ]
1049
+ },
1050
+ {
1051
+ "cell_type": "code",
1052
+ "execution_count": 13,
1053
+ "metadata": {},
1054
+ "outputs": [],
1055
+ "source": [
1056
+ "def fix_clysonymus(df):\n",
1057
+ " df = df.copy()\n",
1058
+ " for x in list(df.loc[df[\"subspecies\"] == \"clysonomus\", \"X\"]):\n",
1059
+ " for col in col_list:\n",
1060
+ " col_val = df.loc[df[\"X\"] == x, col].values[0]\n",
1061
+ " df.loc[df[\"X\"] == x, col] = col_val.replace(\"clysonomus\", \"clysonymus\")\n",
1062
+ " return df"
1063
+ ]
1064
+ },
1065
+ {
1066
+ "cell_type": "code",
1067
+ "execution_count": 14,
1068
+ "metadata": {},
1069
+ "outputs": [],
1070
+ "source": [
1071
+ "full_df_fixed = fix_clysonymus(full_df)\n",
1072
+ "heli_df_fixed = fix_clysonymus(heli_df)\n",
1073
+ "dorsal_df_fixed = fix_clysonymus(dorsal_df)"
1074
+ ]
1075
+ },
1076
+ {
1077
+ "cell_type": "code",
1078
+ "execution_count": 15,
1079
+ "metadata": {},
1080
+ "outputs": [
1081
+ {
1082
+ "name": "stdout",
1083
+ "output_type": "stream",
1084
+ "text": [
1085
+ "actual: ['Heliconius clysonymus ssp. clysonymus']\n",
1086
+ "actual: ['Heliconius clysonymus']\n",
1087
+ "actual: ['clysonymus']\n",
1088
+ "actual: ['Heliconius clysonymus ssp. clysonymus']\n",
1089
+ "actual: ['Heliconius clysonymus']\n",
1090
+ "actual: ['clysonymus']\n",
1091
+ "actual: ['Heliconius clysonymus ssp. clysonymus']\n",
1092
+ "actual: ['Heliconius clysonymus']\n",
1093
+ "actual: ['clysonymus']\n"
1094
+ ]
1095
+ }
1096
+ ],
1097
+ "source": [
1098
+ "for df in df_list:\n",
1099
+ " for col in col_list[1:]:\n",
1100
+ " print(\"actual: \", df.loc[df[\"subspecies\"] == \"clysonymus\", col].unique())"
1101
+ ]
1102
+ },
1103
+ {
1104
+ "cell_type": "code",
1105
+ "execution_count": 16,
1106
+ "metadata": {},
1107
+ "outputs": [],
1108
+ "source": [
1109
+ "for df in df_list:\n",
1110
+ " for filepath in list(df.loc[df[\"subspecies\"] == \"clysonymus\", \"filepath\"].unique()):\n",
1111
+ " if \"clysonomus\" in filepath:\n",
1112
+ " print(\"missed a typo\")"
1113
+ ]
1114
+ },
1115
+ {
1116
+ "cell_type": "markdown",
1117
+ "metadata": {},
1118
+ "source": [
1119
+ "### Save Fixed CSVs"
1120
+ ]
1121
+ },
1122
+ {
1123
+ "cell_type": "code",
1124
+ "execution_count": 17,
1125
+ "metadata": {},
1126
+ "outputs": [],
1127
+ "source": [
1128
+ "full_df_fixed.to_csv(\"../Jiggins_Zenodo_Img_Master.csv\",index = False)\n",
1129
+ "dorsal_df_fixed.to_csv(\"../Jiggins_Zenodo_dorsal_Img_Master.csv\", index = False)\n",
1130
+ "heli_df_fixed.to_csv(\"../Jiggins_Heliconius_Master.csv\", index = False)"
1131
+ ]
1132
+ },
1133
+ {
1134
+ "cell_type": "markdown",
1135
+ "metadata": {},
1136
+ "source": [
1137
+ "## Get Mimic Groups"
1138
+ ]
1139
+ },
1140
+ {
1141
+ "cell_type": "code",
1142
+ "execution_count": 18,
1143
+ "metadata": {},
1144
+ "outputs": [
1145
+ {
1146
+ "data": {
1147
+ "text/html": [
1148
+ "<div>\n",
1149
+ "<style scoped>\n",
1150
+ " .dataframe tbody tr th:only-of-type {\n",
1151
+ " vertical-align: middle;\n",
1152
+ " }\n",
1153
+ "\n",
1154
+ " .dataframe tbody tr th {\n",
1155
+ " vertical-align: top;\n",
1156
+ " }\n",
1157
+ "\n",
1158
+ " .dataframe thead th {\n",
1159
+ " text-align: right;\n",
1160
+ " }\n",
1161
+ "</style>\n",
1162
+ "<table border=\"1\" class=\"dataframe\">\n",
1163
+ " <thead>\n",
1164
+ " <tr style=\"text-align: right;\">\n",
1165
+ " <th></th>\n",
1166
+ " <th>subspecies</th>\n",
1167
+ " <th>group1</th>\n",
1168
+ " <th>group2_if_polymorphic</th>\n",
1169
+ " <th>group3_if_polymorphic</th>\n",
1170
+ " <th>Unnamed: 4</th>\n",
1171
+ " </tr>\n",
1172
+ " </thead>\n",
1173
+ " <tbody>\n",
1174
+ " <tr>\n",
1175
+ " <th>0</th>\n",
1176
+ " <td>cythera</td>\n",
1177
+ " <td>cyrbia</td>\n",
1178
+ " <td>NaN</td>\n",
1179
+ " <td>NaN</td>\n",
1180
+ " <td>NaN</td>\n",
1181
+ " </tr>\n",
1182
+ " <tr>\n",
1183
+ " <th>1</th>\n",
1184
+ " <td>cyrbia</td>\n",
1185
+ " <td>cyrbia</td>\n",
1186
+ " <td>NaN</td>\n",
1187
+ " <td>NaN</td>\n",
1188
+ " <td>NaN</td>\n",
1189
+ " </tr>\n",
1190
+ " <tr>\n",
1191
+ " <th>2</th>\n",
1192
+ " <td>venus</td>\n",
1193
+ " <td>postman</td>\n",
1194
+ " <td>NaN</td>\n",
1195
+ " <td>NaN</td>\n",
1196
+ " <td>NaN</td>\n",
1197
+ " </tr>\n",
1198
+ " <tr>\n",
1199
+ " <th>3</th>\n",
1200
+ " <td>vulcanus</td>\n",
1201
+ " <td>dennis_rayed</td>\n",
1202
+ " <td>NaN</td>\n",
1203
+ " <td>NaN</td>\n",
1204
+ " <td>NaN</td>\n",
1205
+ " </tr>\n",
1206
+ " <tr>\n",
1207
+ " <th>4</th>\n",
1208
+ " <td>chestertonii</td>\n",
1209
+ " <td>chestertonii</td>\n",
1210
+ " <td>NaN</td>\n",
1211
+ " <td>NaN</td>\n",
1212
+ " <td>NaN</td>\n",
1213
+ " </tr>\n",
1214
+ " </tbody>\n",
1215
+ "</table>\n",
1216
+ "</div>"
1217
+ ],
1218
+ "text/plain": [
1219
+ " subspecies group1 group2_if_polymorphic group3_if_polymorphic \\\n",
1220
+ "0 cythera cyrbia NaN NaN \n",
1221
+ "1 cyrbia cyrbia NaN NaN \n",
1222
+ "2 venus postman NaN NaN \n",
1223
+ "3 vulcanus dennis_rayed NaN NaN \n",
1224
+ "4 chestertonii chestertonii NaN NaN \n",
1225
+ "\n",
1226
+ " Unnamed: 4 \n",
1227
+ "0 NaN \n",
1228
+ "1 NaN \n",
1229
+ "2 NaN \n",
1230
+ "3 NaN \n",
1231
+ "4 NaN "
1232
+ ]
1233
+ },
1234
+ "execution_count": 18,
1235
+ "metadata": {},
1236
+ "output_type": "execute_result"
1237
+ }
1238
+ ],
1239
+ "source": [
1240
+ "mimic_gp_df.head()"
1241
+ ]
1242
+ },
1243
+ {
1244
+ "cell_type": "code",
1245
+ "execution_count": 19,
1246
+ "metadata": {},
1247
+ "outputs": [],
1248
+ "source": [
1249
+ "def add_mimic_group(df):\n",
1250
+ " df = df.copy()\n",
1251
+ " for subspecies in list(df.subspecies.dropna().unique()):\n",
1252
+ " if subspecies in list(mimic_gp_df.subspecies.unique()):\n",
1253
+ " temp_mimic = mimic_gp_df.loc[mimic_gp_df[\"subspecies\"] == subspecies]\n",
1254
+ " df.loc[df[\"subspecies\"] == subspecies, \"mimic_group\"] = temp_mimic[\"group1\"].values[0]\n",
1255
+ " if temp_mimic[\"group2_if_polymorphic\"] is not None:\n",
1256
+ " df.loc[df[\"subspecies\"] == subspecies, \"mimic_group_2\"] = temp_mimic[\"group2_if_polymorphic\"].values[0]\n",
1257
+ " if temp_mimic[\"group3_if_polymorphic\"] is not None:\n",
1258
+ " df.loc[df[\"subspecies\"] == subspecies, \"mimic_group_3\"] = temp_mimic[\"group3_if_polymorphic\"].values[0]\n",
1259
+ " return df"
1260
+ ]
1261
+ },
1262
+ {
1263
+ "cell_type": "code",
1264
+ "execution_count": 20,
1265
+ "metadata": {},
1266
+ "outputs": [],
1267
+ "source": [
1268
+ "full_df_mimic_gp = add_mimic_group(full_df_fixed)\n",
1269
+ "heli_df_mimic_gp = add_mimic_group(heli_df_fixed)\n",
1270
+ "dorsal_df_mimic_gp = add_mimic_group(dorsal_df_fixed)"
1271
+ ]
1272
+ },
1273
+ {
1274
+ "cell_type": "code",
1275
+ "execution_count": 21,
1276
+ "metadata": {},
1277
+ "outputs": [
1278
+ {
1279
+ "name": "stdout",
1280
+ "output_type": "stream",
1281
+ "text": [
1282
+ "mimic_group : 22\n",
1283
+ "mimic_group\n",
1284
+ "dennis_rayed 7031\n",
1285
+ "cyrbia 2164\n",
1286
+ "postman_yellowbar 1368\n",
1287
+ "postman 1236\n",
1288
+ "notabilis 617\n",
1289
+ "plesseni 500\n",
1290
+ "blue_yellow 473\n",
1291
+ "cydnides 304\n",
1292
+ "chioneus 239\n",
1293
+ "chestertonii 185\n",
1294
+ "inverse_postman 176\n",
1295
+ "telesiphe 72\n",
1296
+ "leuce 70\n",
1297
+ "bicoloratus 34\n",
1298
+ "Elzunia 18\n",
1299
+ "charithonia 12\n",
1300
+ "superioris 10\n",
1301
+ "silvana 9\n",
1302
+ "messene 6\n",
1303
+ "tarapotensis 4\n",
1304
+ "longarena 4\n",
1305
+ "zuleika 2\n",
1306
+ "Name: count, dtype: int64\n",
1307
+ "mimic_group_2 : 2\n",
1308
+ "mimic_group_2\n",
1309
+ "dennis_rayed 72\n",
1310
+ "postman_yellowbar 2\n",
1311
+ "Name: count, dtype: int64\n",
1312
+ "mimic_group_3 : 1\n",
1313
+ "mimic_group_3\n",
1314
+ "green 72\n",
1315
+ "Name: count, dtype: int64\n",
1316
+ "\n",
1317
+ "mimic_group : 22\n",
1318
+ "mimic_group\n",
1319
+ "dennis_rayed 7031\n",
1320
+ "cyrbia 2164\n",
1321
+ "postman_yellowbar 1368\n",
1322
+ "postman 1236\n",
1323
+ "notabilis 617\n",
1324
+ "plesseni 500\n",
1325
+ "blue_yellow 473\n",
1326
+ "cydnides 304\n",
1327
+ "chioneus 239\n",
1328
+ "chestertonii 185\n",
1329
+ "inverse_postman 176\n",
1330
+ "telesiphe 72\n",
1331
+ "leuce 70\n",
1332
+ "bicoloratus 34\n",
1333
+ "Elzunia 18\n",
1334
+ "charithonia 12\n",
1335
+ "superioris 10\n",
1336
+ "silvana 9\n",
1337
+ "messene 6\n",
1338
+ "tarapotensis 4\n",
1339
+ "longarena 4\n",
1340
+ "zuleika 2\n",
1341
+ "Name: count, dtype: int64\n",
1342
+ "mimic_group_2 : 2\n",
1343
+ "mimic_group_2\n",
1344
+ "dennis_rayed 72\n",
1345
+ "postman_yellowbar 2\n",
1346
+ "Name: count, dtype: int64\n",
1347
+ "mimic_group_3 : 1\n",
1348
+ "mimic_group_3\n",
1349
+ "green 72\n",
1350
+ "Name: count, dtype: int64\n",
1351
+ "\n",
1352
+ "mimic_group : 22\n",
1353
+ "mimic_group\n",
1354
+ "dennis_rayed 3150\n",
1355
+ "cyrbia 1085\n",
1356
+ "postman_yellowbar 681\n",
1357
+ "postman 619\n",
1358
+ "notabilis 310\n",
1359
+ "plesseni 251\n",
1360
+ "blue_yellow 240\n",
1361
+ "cydnides 153\n",
1362
+ "chioneus 120\n",
1363
+ "chestertonii 92\n",
1364
+ "inverse_postman 88\n",
1365
+ "telesiphe 36\n",
1366
+ "leuce 35\n",
1367
+ "bicoloratus 17\n",
1368
+ "Elzunia 9\n",
1369
+ "charithonia 6\n",
1370
+ "superioris 5\n",
1371
+ "silvana 4\n",
1372
+ "messene 3\n",
1373
+ "tarapotensis 2\n",
1374
+ "longarena 2\n",
1375
+ "zuleika 1\n",
1376
+ "Name: count, dtype: int64\n",
1377
+ "mimic_group_2 : 2\n",
1378
+ "mimic_group_2\n",
1379
+ "dennis_rayed 36\n",
1380
+ "postman_yellowbar 1\n",
1381
+ "Name: count, dtype: int64\n",
1382
+ "mimic_group_3 : 1\n",
1383
+ "mimic_group_3\n",
1384
+ "green 36\n",
1385
+ "Name: count, dtype: int64\n",
1386
+ "\n"
1387
+ ]
1388
+ }
1389
+ ],
1390
+ "source": [
1391
+ "for df in [full_df_mimic_gp, heli_df_mimic_gp, dorsal_df_mimic_gp]:\n",
1392
+ " for col in [\"mimic_group\", \"mimic_group_2\", \"mimic_group_3\"]:\n",
1393
+ " print(col, \": \", df[col].nunique())\n",
1394
+ " print(df[col].value_counts())\n",
1395
+ " print()"
1396
+ ]
1397
+ },
1398
+ {
1399
+ "cell_type": "markdown",
1400
+ "metadata": {},
1401
+ "source": [
1402
+ "### Save Mimic Group CSVs"
1403
+ ]
1404
+ },
1405
+ {
1406
+ "cell_type": "code",
1407
+ "execution_count": 22,
1408
+ "metadata": {},
1409
+ "outputs": [],
1410
+ "source": [
1411
+ "full_df_mimic_gp.to_csv(\"../Jiggins_Zenodo_Img_Master.csv\",index = False)\n",
1412
+ "dorsal_df_mimic_gp.to_csv(\"../Jiggins_Zenodo_dorsal_Img_Master.csv\", index = False)\n",
1413
+ "heli_df_mimic_gp.to_csv(\"../Jiggins_Heliconius_Master.csv\", index = False)"
1414
+ ]
1415
+ },
1416
+ {
1417
+ "cell_type": "code",
1418
+ "execution_count": null,
1419
+ "metadata": {},
1420
+ "outputs": [],
1421
+ "source": []
1422
+ }
1423
+ ],
1424
+ "metadata": {
1425
+ "kernelspec": {
1426
+ "display_name": "std",
1427
+ "language": "python",
1428
+ "name": "python3"
1429
+ },
1430
+ "language_info": {
1431
+ "codemirror_mode": {
1432
+ "name": "ipython",
1433
+ "version": 3
1434
+ },
1435
+ "file_extension": ".py",
1436
+ "mimetype": "text/x-python",
1437
+ "name": "python",
1438
+ "nbconvert_exporter": "python",
1439
+ "pygments_lexer": "ipython3",
1440
+ "version": "3.11.3"
1441
+ }
1442
+ },
1443
+ "nbformat": 4,
1444
+ "nbformat_minor": 2
1445
+ }