-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsequences_cure_species_name.R
894 lines (882 loc) · 80.4 KB
/
sequences_cure_species_name.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
##########################################################################
## Codes for the paper:
## Global determinants of freshwater and marine fish genetic diversity
## Authors :
## Stephanie Manel, Pierre-Edouard Guerin, David Mouillot,
## Simon Blanchet, Laure Velez, Camille Albouy, Loic Pellissier
##
## Montpellier, 2017-2019
## Submited to Nature communications, 2019
##
## cure habitat assignation and species name for each individual sequences
##
##
##########################################################################
## Libraries
library(rfishbase)
##########################################################################
## Load data
## input file table of sequences with habitat column
seqdpf="11-sequences_taxonomy_habitat/sequences_withdemerpelag.csv"
## output file table of sequences with CURED habitat column
seqCuredf="11-sequences_taxonomy_habitat/cured_sequences_withdemerpelag.csv"
## sequences with demerpelag column
sequences=read.table(seqdpf, header=T, sep=",")
sequences$curedspecies=as.character(sequences$curedspecies)
##########################################################################
## curation of species name
sequences[which(sequences$curedspecies == "Acanthurus_cf._leucosternon_LvH-2007"),]$curedspecies= "Acanthurus_leucosternon"
sequences[which(sequences$curedspecies == "Acestrorhynchus_cf._lacustris"),]$curedspecies= "Acestrorhynchus_lacustris"
sequences[which(sequences$curedspecies == "Acipenser_ruthenus_x_baerii"),]$curedspecies= "Acipenser_ruthenus"
sequences[which(sequences$curedspecies == "Aethotaxis_mitopteryx"),]$curedspecies= "Aethotaxis_mitopteryx_mitopteryx"
sequences[which(sequences$curedspecies == "Albula_cf._vulpes"),]$curedspecies= "Albula_vulpes"
sequences[which(sequences$curedspecies == "Alburnus_sp."),]$curedspecies= "Alburnus_sp"
sequences[which(sequences$curedspecies == "Alburnus_sp._Volvi"),]$curedspecies= "Alburnus_volviticus"
sequences[which(sequences$curedspecies == "Alepocephalus_sp."),]$curedspecies= "Alepocephalus_sp"
sequences[which(sequences$curedspecies == "Alestes_sp."),]$curedspecies= "Alestes_sp"
sequences[which(sequences$curedspecies == "Alosa_sp."),]$curedspecies= "Alosa_sp"
sequences[which(sequences$curedspecies == "Ambassis_sp."),]$curedspecies= "Ambassis_sp"
sequences[which(sequences$curedspecies == "Ammodytes_cf._personatus"),]$curedspecies= "Ammodytes_personatus"
sequences[which(sequences$curedspecies == "Ammodytes_sp."),]$curedspecies= "Ammodytes_sp"
sequences[which(sequences$curedspecies == "Ancistrus_sp."),]$curedspecies= "Ancistrus_sp"
sequences[which(sequences$curedspecies == "Antigonia_cf._malayana"),]$curedspecies= "Antigonia_malayana"
sequences[which(sequences$curedspecies == "Aphanius_sp."),]$curedspecies= "Aphanius_sp"
sequences[which(sequences$curedspecies == "Apteronotus_cf._albifrons"),]$curedspecies= "Apteronotus_albifrons"
sequences[which(sequences$curedspecies == "Astyanax_aff._bimaculatus"),]$curedspecies= "Astyanax_bimaculatus"
sequences[which(sequences$curedspecies == "Astyanax_aff._bockmanni"),]$curedspecies= "Astyanax_bockmanni"
sequences[which(sequences$curedspecies == "Astyanax_aff._intermedius"),]$curedspecies= "Astyanax_intermedius"
sequences[which(sequences$curedspecies == "Astyanax_cf._anterior"),]$curedspecies= "Astyanax_anterior"
sequences[which(sequences$curedspecies == "Astyanax_cf._bimaculatus"),]$curedspecies= "Astyanax_bimaculatus"
sequences[which(sequences$curedspecies == "Astyanax_cf._fasciatus"),]$curedspecies= "Astyanax_fasciatus"
sequences[which(sequences$curedspecies == "Astyanax_cf._lacustris"),]$curedspecies= "Astyanax_lacustris"
sequences[which(sequences$curedspecies == "Astyanax_cf._pampa"),]$curedspecies= "Astyanax_pampa"
sequences[which(sequences$curedspecies == "Astyanax_fasciatus_cf._jequitinhonhae"),]$curedspecies= "Astyanax_parahybae"
sequences[which(sequences$curedspecies == "Astyanax_sp."),]$curedspecies= "Astyanax_sp"
sequences[which(sequences$curedspecies == "Atherina_sp."),]$curedspecies= "Atherina_sp"
sequences[which(sequences$curedspecies == "Aioliops_sp._MB062001"),]$curedspecies= "Aioliops_sp"
sequences[which(sequences$curedspecies == "Anaspidoglanis_macrostomus"),]$curedspecies= "Notoglanidium_macrostoma"
sequences[which(sequences$curedspecies == "Ancistrus_sp."),]$curedspecies= "Ancistrus_sp"
sequences[which(sequences$curedspecies == "Aphyocheirodon_sp."),]$curedspecies= "Aphyocheirodon_sp"
sequences[which(sequences$curedspecies == "Aphyosemion_sp._nov."),]$curedspecies= "Aphyosemion_sp"
sequences[which(sequences$curedspecies == "Aphyosemion_aff._elegans"),]$curedspecies= "Aphyosemion_elegans"
sequences[which(sequences$curedspecies == "Apistogramma_sp"),]$curedspecies= "Apistogramma_sp"
sequences[which(sequences$curedspecies == "Aplochiton_marinus"),]$curedspecies= "Aplochiton_marinus" ## demersal
sequences[which(sequences$curedspecies == "Archamia_lineolata"),]$curedspecies= "Taeniamia_lineolata"
sequences[which(sequences$curedspecies == "Arripis_truttaceus"),]$curedspecies= "Arripis_truttacea"
sequences[which(sequences$curedspecies == "Aspidoparia_morar"),]$curedspecies= "Cabdio_morar"
sequences[which(sequences$curedspecies == "Aspius_aspius"),]$curedspecies= "Leuciscus_aspius"
sequences[which(sequences$curedspecies == "Astyanacinus_sp."),]$curedspecies= "Astyanacinus_sp"
sequences[which(sequences$curedspecies == "Barbus_sp."),]$curedspecies= "Barbus_sp"
sequences[which(sequences$curedspecies == "Bathydraco_sp."),]$curedspecies= "Bathydraco_sp"
sequences[which(sequences$curedspecies == "Bathylagus_sp."),]$curedspecies= "Bathylagus_sp"
sequences[which(sequences$curedspecies == "Betta_cf._apollon_1_CK2014"),]$curedspecies= "Betta_apollon"
sequences[which(sequences$curedspecies == "Betta_cf._apollon_2_CK2014"),]$curedspecies= "Betta_apollon"
sequences[which(sequences$curedspecies == "Betta_cf._ferox_CK2014"),]$curedspecies= "Betta_ferox"
sequences[which(sequences$curedspecies == "Betta_cf._imbellis"),]$curedspecies= "Betta_imbellis"
sequences[which(sequences$curedspecies == "Betta_cf._imbellis"),]$curedspecies= "Betta_imbellis"
sequences[which(sequences$curedspecies == "Betta_cf._kuehnei_CK2014"),]$curedspecies= "Betta_kuehnei"
sequences[which(sequences$curedspecies == "Betta_cf._prima_CK2014"),]$curedspecies= "Betta_prima"
sequences[which(sequences$curedspecies == "Betta_cf._pugnax_CK2014"),]$curedspecies= "Betta_pugnax"
sequences[which(sequences$curedspecies == "Betta_cf._simplex_CK2014"),]$curedspecies= "Betta_simplex"
sequences[which(sequences$curedspecies == "Betta_cf._smaragdina"),]$curedspecies= "Betta_smaragdina"
sequences[which(sequences$curedspecies == "Betta_cf._smaragdina_1_CK2012"),]$curedspecies= "Betta_smaragdina"
sequences[which(sequences$curedspecies == "Betta_cf._smaragdina_2_CK2013"),]$curedspecies= "Betta_smaragdina"
sequences[which(sequences$curedspecies == "Betta_cf._smaragdina_3_CK2012"),]$curedspecies= "Betta_smaragdina"
sequences[which(sequences$curedspecies == "Betta_cf._smaragdina_4_CK2013"),]$curedspecies= "Betta_smaragdina"
sequences[which(sequences$curedspecies == "Blennius_sp."),]$curedspecies= "Blennius_sp"
sequences[which(sequences$curedspecies == "Balitora_sp."),]$curedspecies= "Balitora_sp"
sequences[which(sequences$curedspecies == "Bryconamericus_cf._exodon"),]$curedspecies= "Bryconamericus_exodon"
sequences[which(sequences$curedspecies == "Bryconamericus_aff._uporas"),]$curedspecies= "Bryconamericus_uporas"
sequences[which(sequences$curedspecies == "Bryconops_sp."),]$curedspecies= "Bryconops_sp"
sequences[which(sequences$curedspecies == "Brycinus_sp."),]$curedspecies= "Brycinus_sp"
sequences[which(sequences$curedspecies == "Badis_britzi"),]$demerpelag = "benthopelagic"
sequences[which(sequences$curedspecies == "Badis_britzi"),]$curedspecies= "Badis_britzi" ## benthopelagic
sequences[which(sequences$curedspecies == "Bathycongrus_sp."),]$curedspecies= "Bathycongrus_sp"
sequences[which(sequences$curedspecies == "Bathydraco_sp."),]$curedspecies= "Bathydraco_sp"
sequences[which(sequences$curedspecies == "Belonoglanis_cf._brieni"),]$curedspecies= "Belonoglanis_brieni"
sequences[which(sequences$curedspecies == "Brachysynodontis_batensoda"),]$curedspecies= "Synodontis_batensoda"
sequences[which(sequences$curedspecies == "Bregmaceros_sp."),]$curedspecies= "Bregmaceros_sp"
sequences[which(sequences$curedspecies == "Brienomyrus_sp."),]$curedspecies= "Brienomyrus_sp"
sequences[which(sequences$curedspecies == "Bryconamericus_sp"),]$curedspecies= "Bryconamericus_sp"
sequences[which(sequences$curedspecies == "Bunocephalus_sp"),]$curedspecies= "Caesio_sp"
sequences[which(sequences$curedspecies == "Caesio_cf._caerulaurea"),]$curedspecies= "Caesio_caerulaurea"
sequences[which(sequences$curedspecies == "Caristius_groenlandicus"),]$curedspecies= "Caristius_fasciatus"
sequences[which(sequences$curedspecies == "Caristius_sp."),]$curedspecies= "Caristius_sp"
sequences[which(sequences$curedspecies == "Centroberyx_sp."),]$curedspecies= "Centroberyx_sp"
sequences[which(sequences$curedspecies == "Callionymus_cf._tethys"),]$curedspecies= "Callionymus_tethys"
sequences[which(sequences$curedspecies == "Callionymus_sp._Moorea"),]$curedspecies= "Callionymus_moorea"
sequences[which(sequences$curedspecies == "Capoeta_erhani_X_angorae"),]$curedspecies= "Capoeta_erhani"
sequences[which(sequences$curedspecies == "Capoeta_sp."),]$curedspecies= "Capoeta_sp"
sequences[which(sequences$curedspecies == "Carangoides_ruber"),]$curedspecies= "Caranx ruber"
sequences[which(sequences$curedspecies == "Carangoides_sp."),]$curedspecies= "Carangoides_sp"
sequences[which(sequences$curedspecies == "Carassius_sp."),]$curedspecies= "Carassius_sp"
sequences[which(sequences$curedspecies == "Careproctus_sp."),]$curedspecies= "Careproctus_sp"
sequences[which(sequences$curedspecies == "Centropyge_loricula"),]$curedspecies= "Centropyge_loriculus"
sequences[which(sequences$curedspecies == "Cetopsorhamdia_sp."),]$curedspecies= "Cetopsorhamdia_sp"
sequences[which(sequences$curedspecies == "Characidium_aff._zebra"),]$curedspecies= "Characidium_zebra"
sequences[which(sequences$curedspecies == "Characidium_cf._alipioi"),]$curedspecies= "Characidium_alipioi"
sequences[which(sequences$curedspecies == "Characidium_sp."),]$curedspecies= "Characidium_sp"
sequences[which(sequences$curedspecies == "Characidium_sp._PS1"),]$curedspecies= "Characidium_sp2"
sequences[which(sequences$curedspecies == "Chilatherina_sp."),]$curedspecies= "Chilatherina_sp"
sequences[which(sequences$curedspecies == "Chondrostoma_sp."),]$curedspecies= "Chondrostoma_sp"
sequences[which(sequences$curedspecies == "Cirrhilabrus_sp."),]$curedspecies= "Cirrhilabrus_sp"
sequences[which(sequences$curedspecies == "Cirripectes_sp._JTW-2010"),]$curedspecies= "Cirrhilabrus_sp2"
sequences[which(sequences$curedspecies == "Citharichthys_sp._b"),]$curedspecies= "Citharichthys_sp"
sequences[which(sequences$curedspecies == "Clarias_cf._batrachus"),]$curedspecies= "Clarias_batrachus"
sequences[which(sequences$curedspecies == "Cobitis_sp."),]$curedspecies= "Cobitis_sp"
sequences[which(sequences$curedspecies == "Cobitis_sp._B"),]$curedspecies= "Cobitis_sp2"
sequences[which(sequences$curedspecies == "Cociella_crocodila"),]$curedspecies= "Cociella_crocodilus"
sequences[which(sequences$curedspecies == "Coelorinchus_sp."),]$curedspecies= "Coelorinchus_sp"
sequences[which(sequences$curedspecies == "Cololabis_sp."),]$curedspecies= "Cololabis_sp"
sequences[which(sequences$curedspecies == "Cololabis_sp._JZ-2011"),]$curedspecies= "Cololabis_sp2"
sequences[which(sequences$curedspecies == "Coregonus_sp."),]$curedspecies= "Coregonus_sp"
sequences[which(sequences$curedspecies == "Corymbophanes_cf._bahianus"),]$curedspecies= "Corymbophanes_bahianus"
sequences[which(sequences$curedspecies == "Cottus_cf._bairdii"),]$curedspecies= "Cottus_bairdii"
sequences[which(sequences$curedspecies == "Cottus_cf._beldingii"),]$curedspecies= "Cottus_beldingii"
sequences[which(sequences$curedspecies == "Cottus_cf._carolinae"),]$curedspecies= "Cottus_carolinae"
sequences[which(sequences$curedspecies == "Cottus_cf._cognatus"),]$curedspecies= "Cottus_cognatus"
sequences[which(sequences$curedspecies == "Cottus_cf._cognatus_C1"),]$curedspecies= "Cottus_cognatus"
sequences[which(sequences$curedspecies == "Cottus_cf._confusus"),]$curedspecies= "Cottus_confusus"
sequences[which(sequences$curedspecies == "Cottus_cf._rhotheus"),]$curedspecies= "Cottus_rhotheus"
sequences[which(sequences$curedspecies == "Cottus_cf._rhotheus"),]$curedspecies= "Cottus_rhotheus"
sequences[which(sequences$curedspecies == "Cottus_cf._rhotheus_F1"),]$curedspecies= "Cottus_rhotheus"
sequences[which(sequences$curedspecies == "Cottus_sp._MKY2013"),]$curedspecies= "Cottus_sp"
sequences[which(sequences$curedspecies == "Craterocephalus_sp."),]$curedspecies= "Craterocephalus_sp"
sequences[which(sequences$curedspecies == "Crenicichla_cf._lepidota"),]$curedspecies= "Crenicichla_lepidota"
sequences[which(sequences$curedspecies == "Cymbacephalus_cf._nematophthalmus"),]$curedspecies= "Cymbacephalus_nematophthalmus"
sequences[which(sequences$curedspecies == "Cynoglossus_sp."),]$curedspecies= "Cynoglossus_sp"
sequences[which(sequences$curedspecies == "Cynoscion_regalis_subsp._gilli"),]$curedspecies= "Cynoscion_regalis"
sequences[which(sequences$curedspecies == "Chaunax_sp."),]$curedspecies= "Chaunax_sp"
sequences[which(sequences$curedspecies == "Cheirodontops_sp."),]$curedspecies= "Cheirodontops_sp"
sequences[which(sequences$curedspecies == "Chrysichthys_congicus"),]$curedspecies= "Cyprinella_monacha"
sequences[which(sequences$curedspecies == "Cociella_crocodila"),]$curedspecies= "Cociella_crocodilus"
sequences[which(sequences$curedspecies == "Colisa_fasciata"),]$curedspecies= "Trichogaster_fasciata"
sequences[which(sequences$curedspecies == "Congopanchax_meyersi"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Congopanchax_meyersi"),]$curedspecies= "Poropanchax_myersi" ## benthopelagic
sequences[which(sequences$curedspecies == "Coptodon_zillii"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Coptodon_zillii"),]$curedspecies= "Coptodon_zillii" ##benthopelagic
sequences[which(sequences$curedspecies == "Corymbophanes_cf._bahianus"),]$curedspecies= "Pareiorhaphis_bahianus"
sequences[which(sequences$curedspecies == "Cultrichthys_erythropterus"),]$curedspecies= "Chanodichthys_erythropterus"
sequences[which(sequences$curedspecies == "Cynoscion_sp._Surubim_66"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Cynoscion_sp._Surubim_66"),]$curedspecies= "Cynoscion_surubim" ## demersal
sequences[which(sequences$curedspecies == "Cyphomyrus_psittacus"),]$curedspecies= "Hippopotamyrus_psittacus"
sequences[which(sequences$curedspecies == "Cyprinodon_variegatus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Cyprinodon_variegatus"),]$curedspecies= "Cyprinodon_variegatus" ##benthopelagic
sequences[which(sequences$curedspecies == "Devario_sp."),]$curedspecies= "Devario_sp"
sequences[which(sequences$curedspecies == "Devario_cf._devario"),]$curedspecies= "Devario_devario"
sequences[which(sequences$curedspecies == "Diagramma_picta"),]$curedspecies= "Diagramma_pictum"
sequences[which(sequences$curedspecies == "Diapoma_guarani"),]$curedspecies= "Diapoma_guarani" ## bathypelagic
sequences[which(sequences$curedspecies == "Diapoma_sp."),]$curedspecies= "Diapoma_sp" ## bathypelagic
sequences[which(sequences$curedspecies == "Diagramma_picta"),]$curedspecies= "Diagramma_pictum"
sequences[which(sequences$curedspecies == "Diagramma_picta"),]$curedspecies= "Diagramma_pictum"
sequences[which(sequences$curedspecies == "Dolopichthys_sp."),]$curedspecies= "Dolopichthys_sp"
sequences[which(sequences$curedspecies == "Doryrhamphus_excisus"),]$curedspecies= "Doryrhamphus_excisus_excisus"
sequences[which(sequences$curedspecies == "Distichodus_cf._teugelsi"),]$curedspecies= "Distichodus_teugelsi"
sequences[which(sequences$curedspecies == "Distichodus_sp."),]$curedspecies= "Distichodus_sp"
sequences[which(sequences$curedspecies == "Distichodus_sp._A"),]$curedspecies= "Distichodus_sp2"
sequences[which(sequences$curedspecies == "Distichodus_sp._B"),]$curedspecies= "Distichodus_sp3"
sequences[which(sequences$curedspecies == "Decapterus_sp."),]$curedspecies= "Decapterus_sp"
sequences[which(sequences$curedspecies == "Emmelichthys_nitidus"),]$curedspecies= "Emmelichthys_nitidus_nitidus"
sequences[which(sequences$curedspecies == "Engraulis_sp."),]$curedspecies= "Engraulis_sp"
sequences[which(sequences$curedspecies == "Enteromius_cf._trinotatus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Enteromius_cf._trinotatus"),]$curedspecies= "Enteromius_trinotatus" ## benthopelagic
sequences[which(sequences$curedspecies == "Esomus_danrica"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Esomus_danrica"),]$curedspecies= "Esomus_danrica" ## benthopelagic
sequences[which(sequences$curedspecies == "Eviota_sp._1_Moorea"),]$curedspecies= "Eviota_moorea" ## reef-associated
sequences[which(sequences$curedspecies == "Eviota_sp._2_Moorea"),]$curedspecies= "Eviota_moorea" ## reef-associated
sequences[which(sequences$curedspecies == "Eviota_Red_Sea_sp1"),]$curedspecies= "Eviota_sp" ## reef-associated
sequences[which(sequences$curedspecies == "Eviota_sp."),]$curedspecies= "Eviota_sp2" ## reef-associated
sequences[which(sequences$curedspecies == "Eviota_sp._2"),]$curedspecies= "Eviota_sp3" ## reef-associated
sequences[which(sequences$curedspecies == "Evynnis_tumifrons"),]$curedspecies= "Dentex_tumifrons"
sequences[which(sequences$curedspecies == "Enteromius_cf._atromaculatus"),]$curedspecies= "Enteromius_atromaculatus"
sequences[which(sequences$curedspecies == "Enteromius_cf._chiumbeensis"),]$curedspecies= "Enteromius_chiumbeensis"
sequences[which(sequences$curedspecies == "Enteromius_cf._martorelli"),]$curedspecies= "Enteromius_martorelli"
sequences[which(sequences$curedspecies == "Enteromius_trinotatus"),]$curedspecies= "Enteromius_trinotatus"
sequences[which(sequences$curedspecies == "Eucinostomus_cf._gula"),]$curedspecies= "Eucinostomus_gula"
sequences[which(sequences$curedspecies == "Eucinostomus_sp._a"),]$curedspecies= "Eucinostomus_sp"
sequences[which(sequences$curedspecies == "Epinephelus_sp."),]$curedspecies= "Epinephelus_sp"
sequences[which(sequences$curedspecies == "Elacatinus_sp."),]$curedspecies= "Elacatinus_sp"
sequences[which(sequences$curedspecies == "Fundulus_cf._grandis"),]$curedspecies= "Fundulus_grandis"
sequences[which(sequences$curedspecies == "Facciolella_sp."),]$curedspecies= "Facciolella_sp"
sequences[which(sequences$curedspecies == "Gasterosteus_sp."),]$curedspecies= "Gasterosteus_sp"
sequences[which(sequences$curedspecies == "Gephyrocharax_sp."),]$curedspecies= "Gephyrocharax_sp"
sequences[which(sequences$curedspecies == "Giuris_margaritaceus"),]$curedspecies= "Giuris_margaritacea"
sequences[which(sequences$curedspecies == "Gogangra_cf._viridescens_DOF95"),]$curedspecies= "Gogangra_viridescens"
sequences[which(sequences$curedspecies == "Gonostoma_elongatum"),]$curedspecies= "Sigmops_elongatus"
sequences[which(sequences$curedspecies == "Gorgasia_sp."),]$curedspecies= "Gorgasia_sp"
sequences[which(sequences$curedspecies == "Gymnocephalus_cernuus"),]$curedspecies= "Gymnocephalus_cernua"
sequences[which(sequences$curedspecies == "Gymnostomus_horai"),]$curedspecies= "Gymnostomus_horai" ## benthopelagic
sequences[which(sequences$curedspecies == "Gymnotus_aff._carapo"),]$curedspecies= "Gymnotus_carapo" ## benthopelagic
sequences[which(sequences$curedspecies == "Gymnotus_sp."),]$curedspecies= "Gymnotus_sp" ## benthopelagic
sequences[which(sequences$curedspecies == "Gymnothorax_sp."),]$curedspecies= "Gymnothorax_sp" ## benthopelagic
sequences[which(sequences$curedspecies == "Gymnelus_cf._viridis"),]$curedspecies= "Gymnelus_viridis"
sequences[which(sequences$curedspecies == "Glossogobius_cf._callidus"),]$curedspecies= "Glossogobius_callidus"
sequences[which(sequences$curedspecies == "Glossogobius_cf._giuris"),]$curedspecies= "Glossogobius_giuris"
sequences[which(sequences$curedspecies == "Gobio_sp."),]$curedspecies= "Gobio_sp"
sequences[which(sequences$curedspecies == "Garra_cf._ghorensis"),]$curedspecies= "Garra_ghorensis"
sequences[which(sequences$curedspecies == "Garra_cf._ornata"),]$curedspecies= "Garra_ornata"
sequences[which(sequences$curedspecies == "Garra_sp."),]$curedspecies= "Garra_sp"
sequences[which(sequences$curedspecies == "Haplochromis_sp."),]$curedspecies= "Haplochromis_sp"
sequences[which(sequences$curedspecies == "Harttia_cf._torrenticola"),]$curedspecies= "Harttia_torrenticola"
sequences[which(sequences$curedspecies == "Harttia_sp."),]$curedspecies= "Harttia_sp"
sequences[which(sequences$curedspecies == "Helcogramma_sp."),]$curedspecies= "Helcogramma_sp"
sequences[which(sequences$curedspecies == "Helicolenus_sp._B"),]$curedspecies= "Helicolenus_sp"
sequences[which(sequences$curedspecies == "Hemibrycon_cf._beni"),]$curedspecies= "Hemibrycon_beni"
sequences[which(sequences$curedspecies == "Hemichromis_sp."),]$curedspecies= "Hemichromis_sp"
sequences[which(sequences$curedspecies == "Hemipsilichthys_sp."),]$curedspecies= "Hemipsilichthys_sp"
sequences[which(sequences$curedspecies == "Heterobranchus_sp."),]$curedspecies= "Heterobranchus_sp"
sequences[which(sequences$curedspecies == "Hirundichthys_sp."),]$curedspecies= "Hirundichthys_sp"
sequences[which(sequences$curedspecies == "Hisonotus_aff._francirochai"),]$curedspecies= "Hisonotus_francirochai"
sequences[which(sequences$curedspecies == "Hisonotus_sp."),]$curedspecies= "Hisonotus_sp"
sequences[which(sequences$curedspecies == "Hemibrycon_cf._beni"),]$curedspecies= "Hemibrycon_beni"
sequences[which(sequences$curedspecies == "Haplochromis_flavijosephii"),]$curedspecies= "Astatotilapia_flaviijosephi"
sequences[which(sequences$curedspecies == "Heptapterus_sp."),]$curedspecies= "Heptapterus_sp"
sequences[which(sequences$curedspecies == "Heterobranchus_sp."),]$curedspecies= "Heterobranchus_sp"
sequences[which(sequences$curedspecies == "Hysterocarpus_traskii"),]$curedspecies= "Hysterocarpus_traskii" ## demersal
sequences[which(sequences$curedspecies == "Homaloptera_sp._ZAM-2010"),]$curedspecies= "Homaloptera_sp"
sequences[which(sequences$curedspecies == "Hoplias_aff._malabaricus"),]$curedspecies= "Hoplias_malabaricus"
sequences[which(sequences$curedspecies == "Hoplias_cf._malabaricus"),]$curedspecies= "Hoplias_malabaricus"
sequences[which(sequences$curedspecies == "Hyphessobrycon_sp1"),]$curedspecies= "Hyphessobrycon_sp"
sequences[which(sequences$curedspecies == "Hypostomus_sp1"),]$curedspecies= "Hypostomus_sp"
sequences[which(sequences$curedspecies == "Ituglanis_sp."),]$curedspecies= "Ituglanis_sp"
sequences[which(sequences$curedspecies == "Icelus_sp."),]$curedspecies= "Icelus_sp"
sequences[which(sequences$curedspecies == "Imparfinis_sp."),]$curedspecies= "Imparfinis_sp"
sequences[which(sequences$curedspecies == "Icelus_cf._spiniger"),]$curedspecies= "Icelus_spiniger"
sequences[which(sequences$curedspecies == "Inegocia_cf._japonica"),]$curedspecies= "Inegocia_japonica"
sequences[which(sequences$curedspecies == "Ictalurus_cf._pricei"),]$curedspecies= "Ictalurus_pricei"
sequences[which(sequences$curedspecies == "Knipowitschia_cf._goerneri"),]$curedspecies= "Knipowitschia_goerneri"
sequences[which(sequences$curedspecies == "Knodus_sp."),]$curedspecies= "Knodus_sp"
sequences[which(sequences$curedspecies == "Loricaria_sp."),]$curedspecies= "Loricaria_sp"
sequences[which(sequences$curedspecies == "Labeo_sp."),]$curedspecies= "Labeo_sp"
sequences[which(sequences$curedspecies == "Labeobarbus_mawambiensis_X_longidorsalis"),]$curedspecies= "Labeobarbus_mawambiensis"
sequences[which(sequences$curedspecies == "Lates_sp."),]$curedspecies= "Lates_sp"
sequences[which(sequences$curedspecies == "Lethrinus_sp."),]$curedspecies= "Lethrinus_sp"
sequences[which(sequences$curedspecies == "Limanda_cf._aspera"),]$curedspecies= "Limanda_aspera"
sequences[which(sequences$curedspecies == "Liopropoma_cf._latifasciatum"),]$curedspecies= "Liopropoma_latifasciatum"
sequences[which(sequences$curedspecies == "Liparis_sp."),]$curedspecies= "Liparis_sp"
sequences[which(sequences$curedspecies == "Liza_sp."),]$curedspecies= "Liza_sp"
sequences[which(sequences$curedspecies == "Loricaria_sp."),]$curedspecies= "Loricaria_sp"
sequences[which(sequences$curedspecies == "Luciobarbus_sp."),]$curedspecies= "Luciobarbus_sp"
sequences[which(sequences$curedspecies == "Lutjanus_cf._bengalensis"),]$curedspecies= "Lutjanus_bengalensis"
sequences[which(sequences$curedspecies == "Lycodes_cf._polaris"),]$curedspecies= "Lycodes_polaris"
sequences[which(sequences$curedspecies == "Lycodes_cf._reticulatus"),]$curedspecies= "Lycodes_reticulatus"
sequences[which(sequences$curedspecies == "Lycodes_cf._squamiventer"),]$curedspecies= "Lycodes_squamiventer"
sequences[which(sequences$curedspecies == "Lycodes_sp."),]$curedspecies= "Lycodes_sp"
sequences[which(sequences$curedspecies == "Myloplus_sp."),]$curedspecies= "Myloplus_sp"
sequences[which(sequences$curedspecies == "Melanocharacidium_sp."),]$curedspecies= "Melanocharacidium_sp"
sequences[which(sequences$curedspecies == "Microlepidogaster_sp."),]$curedspecies= "Microlepidogaster_sp"
sequences[which(sequences$curedspecies == "Misgurnus_sp._AE1"),]$curedspecies= "Misgurnus_sp"
sequences[which(sequences$curedspecies == "Mullus_barbatus"),]$curedspecies= "Mullus_barbatus_barbatus"
sequences[which(sequences$curedspecies == "Myloplus_sp"),]$curedspecies= "Myloplus_sp"
sequences[which(sequences$curedspecies == "Megaleporinus_sp08"),]$curedspecies= "Megaleporinus_sp"
sequences[which(sequences$curedspecies == "Macrourus_sp._Smith_et_al._2011"),]$curedspecies= "Macrourus_sp"
sequences[which(sequences$curedspecies == "Mastacembelus_cf._marchei"),]$curedspecies= "Mastacembelus_marchei"
sequences[which(sequences$curedspecies == "Melanocharacidium_sp."),]$curedspecies= "Melanocharacidium_sp"
sequences[which(sequences$curedspecies == "Melanotaenia_sp._1"),]$curedspecies= "Melanotaenia_sp1"
sequences[which(sequences$curedspecies == "Melanotaenia_sp._10"),]$curedspecies= "Melanotaenia_sp10"
sequences[which(sequences$curedspecies == "Melanotaenia_sp._12"),]$curedspecies= "Melanotaenia_sp12"
sequences[which(sequences$curedspecies == "Melanotaenia_sp._2"),]$curedspecies= "Melanotaenia_sp2"
sequences[which(sequences$curedspecies == "Melanotaenia_sp._3"),]$curedspecies= "Melanotaenia_sp3"
sequences[which(sequences$curedspecies == "Melanotaenia_sp._4"),]$curedspecies= "Melanotaenia_sp4"
sequences[which(sequences$curedspecies == "Melanotaenia_sp._5"),]$curedspecies= "Melanotaenia_sp5"
sequences[which(sequences$curedspecies == "Melanotaenia_sp._6"),]$curedspecies= "Melanotaenia_sp6"
sequences[which(sequences$curedspecies == "Melanotaenia_sp._7"),]$curedspecies= "Melanotaenia_sp7"
sequences[which(sequences$curedspecies == "Melanotaenia_sp._8"),]$curedspecies= "Melanotaenia_sp8"
sequences[which(sequences$curedspecies == "Melanotaenia_sp._8"),]$curedspecies= "Melanotaenia_sp8"
sequences[which(sequences$curedspecies == "Melanotaenia_sp._9"),]$curedspecies= "Melanotaenia_sp9"
sequences[which(sequences$curedspecies == "Moringua_sp._3_Moorea"),]$curedspecies= "Moringua_moorea"
sequences[which(sequences$curedspecies == "Muraenolepis_sp."),]$curedspecies= "Muraenolepis_sp"
sequences[which(sequences$curedspecies == "Nanochromis_dimidiatus"),]$curedspecies= "Congochromis_dimidiatus"
sequences[which(sequences$curedspecies == "Neobythites_sp."),]$curedspecies= "Neobythites_sp"
sequences[which(sequences$curedspecies == "Neoepinnula_sp."),]$curedspecies= "Neoepinnula_sp"
sequences[which(sequences$curedspecies == "Neoplecostomus_sp2"),]$curedspecies= "Neoplecostomus_sp"
sequences[which(sequences$curedspecies == "Netuma_sp._Surubim_24"),]$curedspecies= "Netuma_surubim" ## demersal
sequences[which(sequences$curedspecies == "Ninnigobius_sp."),]$curedspecies= "Ninnigobius_sp"
sequences[which(sequences$curedspecies == "Notropis_sp._Sawfin"),]$curedspecies= "Notropis_sawfin"
sequences[which(sequences$curedspecies == "Onigocia_sp._B_(Knapp)"),]$curedspecies= "Onigocia_sp"
sequences[which(sequences$curedspecies == "Onigocia_sp._C_(Knapp)"),]$curedspecies= "Onigocia_sp"
sequences[which(sequences$curedspecies == "Ophisternon_sp._1"),]$curedspecies= "Ophisternon_sp"
sequences[which(sequences$curedspecies == "Odontostilbe_sp."),]$curedspecies= "Odontostilbe_sp"
sequences[which(sequences$curedspecies == "Oligosarcus_sp."),]$curedspecies= "Oligosarcus_sp"
sequences[which(sequences$curedspecies == "Oncorhynchus_sp."),]$curedspecies= "Oncorhynchus_sp"
sequences[which(sequences$curedspecies == "Oxycheilinus_cf._bimaculatus"),]$curedspecies= "Oxycheilinus_bimaculatus"
sequences[which(sequences$curedspecies == "Oxynoemacheilus_sp."),]$curedspecies= "Oxynoemacheilus_sp"
sequences[which(sequences$curedspecies == "Oxynoemacheilus_sp._Ilgin_slender"),]$curedspecies= "Oxynoemacheilus_sp2"
sequences[which(sequences$curedspecies == "Oxynoemacheilus_sp._stout"),]$curedspecies= "Oxynoemacheilus_sp3"
sequences[which(sequences$curedspecies == "Pampus_sp._LY-2009"),]$curedspecies= "Pampus_sp"
sequences[which(sequences$curedspecies == "Parodon_sp."),]$curedspecies= "Parodon_sp"
sequences[which(sequences$curedspecies == "Parosphromenus_cf._bintan"),]$curedspecies= "Parosphromenus_bintan"
sequences[which(sequences$curedspecies == "Peckoltia_cf._vittata"),]$curedspecies= "Peckoltia_vittata"
sequences[which(sequences$curedspecies == "Pempheris_sp."),]$curedspecies= "Pempheris_sp"
sequences[which(sequences$curedspecies == "Pempheris_sp._2"),]$curedspecies= "Pempheris_sp2"
sequences[which(sequences$curedspecies == "Pempheris_sp._rf"),]$curedspecies= "Pempheris_sp3"
sequences[which(sequences$curedspecies == "Platybelone_argalus"),]$curedspecies= "Platybelone_argalus_argalus"
sequences[which(sequences$curedspecies == "Platycephalus_cf._endrachtensis"),]$curedspecies= "Platycephalus_endrachtensis"
sequences[which(sequences$curedspecies == "Platycephalus_cf._indicus"),]$curedspecies= "Platycephalus_indicus"
sequences[which(sequences$curedspecies == "Platycephalus_longispinis_(W)"),]$curedspecies= "Platycephalus_longispinis"
sequences[which(sequences$curedspecies == "Platycephalus_indicus_var._1"),]$curedspecies= "Platycephalus_indicus"
sequences[which(sequences$curedspecies == "Platycephalus_sp._1_YQ-2012"),]$curedspecies= "Platycephalus_sp"
sequences[which(sequences$curedspecies == "Pleuronectes_sp."),]$curedspecies= "Pleuronectes_sp"
sequences[which(sequences$curedspecies == "Pogonophryne_sp._2"),]$curedspecies= "Pogonophryne_sp"
sequences[which(sequences$curedspecies == "Pogonophryne_sp."),]$curedspecies= "Pogonophryne_sp2"
sequences[which(sequences$curedspecies == "Pogonophryne_sp._1"),]$curedspecies= "Pogonophryne_sp3"
sequences[which(sequences$curedspecies == "Pollimyrus_cf._nigripinnis"),]$curedspecies= "Pollimyrus_nigripinnis"
sequences[which(sequences$curedspecies == "Prochilodus_sp."),]$curedspecies= "Prochilodus_sp"
sequences[which(sequences$curedspecies == "Pseudambassis_ranga"),]$curedspecies= "Parambassis_ranga"
sequences[which(sequences$curedspecies == "Puntius_cf._sophore"),]$curedspecies= "Puntius_sophore"
sequences[which(sequences$curedspecies == "Pseudoplatystoma_cf._punctifer"),]$curedspecies= "Pseudoplatystoma_punctifer"
sequences[which(sequences$curedspecies == "Pachycara_sp."),]$curedspecies= "Pachycara_sp"
sequences[which(sequences$curedspecies == "Paraliparis_sp."),]$curedspecies= "Paraliparis_sp"
sequences[which(sequences$curedspecies == "Paramormyrops_cf."),]$curedspecies= "Paramormyrops_sp"
sequences[which(sequences$curedspecies == "Parauchenoglanis_cf._monkei"),]$curedspecies= "Parauchenoglanis_monkei"
sequences[which(sequences$curedspecies == "Pareiorhina_sp."),]$curedspecies= "Pareiorhina_sp"
sequences[which(sequences$curedspecies == "Parotocinclus_sp."),]$curedspecies= "Parotocinclus_sp"
sequences[which(sequences$curedspecies == "Parotocinclus_sp._1"),]$curedspecies= "Parotocinclus_sp2"
sequences[which(sequences$curedspecies == "Pelasgus_sp."),]$curedspecies= "Pelasgus_sp"
sequences[which(sequences$curedspecies == "Phoxinus_sp."),]$curedspecies= "Phoxinus_sp"
sequences[which(sequences$curedspecies == "Phoxinus_sp."),]$curedspecies= "Phoxinus_sp"
sequences[which(sequences$curedspecies == "Pimelodella_sp1"),]$curedspecies= "Pimelodella_sp"
sequences[which(sequences$curedspecies == "Pimelodus_sp."),]$curedspecies= "Pimelodus_sp"
sequences[which(sequences$curedspecies == "Poecilia_sp."),]$curedspecies= "Poecilia_sp"
sequences[which(sequences$curedspecies == "Priacanthus_aff._arenatus"),]$curedspecies= "Priacanthus_arenatus"
sequences[which(sequences$curedspecies == "Pseudophoxinus_sp."),]$curedspecies= "Pseudophoxinus_sp"
sequences[which(sequences$curedspecies == "Pseudopimelodus_sp."),]$curedspecies= "Pseudopimelodus_sp"
sequences[which(sequences$curedspecies == "Raiamas_cf._christyi"),]$curedspecies= "Raiamas_christyi"
sequences[which(sequences$curedspecies == "Rhinogobius_sp."),]$curedspecies= "Rhinogobius_sp"
sequences[which(sequences$curedspecies == "Rhinolekos_sp."),]$curedspecies= "Rhinolekos_sp"
sequences[which(sequences$curedspecies == "Rivulus_sp."),]$curedspecies= "Rivulus_sp"
sequences[which(sequences$curedspecies == "Rhinogobius_sp."),]$curedspecies= "Rhinogobius_sp"
sequences[which(sequences$curedspecies == "Rhinogobius_sp."),]$curedspecies= "Rhinogobius_sp"
sequences[which(sequences$curedspecies == "Rutilus_sp."),]$curedspecies= "Rutilus_sp"
sequences[which(sequences$curedspecies == "Rineloricaria_sp."),]$curedspecies= "Rineloricaria_sp"
sequences[which(sequences$curedspecies == "Rineloricaria_af._kronei"),]$curedspecies= "Rineloricaria_kronei"
sequences[which(sequences$curedspecies == "Rineloricaria_af._lima"),]$curedspecies= "Rineloricaria_lima"
sequences[which(sequences$curedspecies == "Rineloricaria_cf._catamarcensis"),]$curedspecies= "Rineloricaria_catamarcensis"
sequences[which(sequences$curedspecies == "Satyrichthys_adeni"),]$curedspecies= "Satyrichthys_laticeps"
sequences[which(sequences$curedspecies == "Saurida_sp."),]$curedspecies= "Saurida_sp"
sequences[which(sequences$curedspecies == "Seminemacheilus_sp."),]$curedspecies= "Seminemacheilus_sp"
sequences[which(sequences$curedspecies == "Serrivomer_sp."),]$curedspecies= "Serrivomer_sp"
sequences[which(sequences$curedspecies == "Stomias_boa"),]$curedspecies= "Stomias_boa_boa"
sequences[which(sequences$curedspecies == "Stomatorhinus_cf._kununguensis"),]$curedspecies= "Stomatorhinus_kununguensis" ##demersal
sequences[which(sequences$curedspecies == "Stichaeus_punctatus"),]$curedspecies= "Stichaeus_punctatus_punctatus"
sequences[which(sequences$curedspecies == "Stomatorhinus_cf._fuliginosus"),]$curedspecies= "Stomatorhinus_fuliginosus" ##demersal
sequences[which(sequences$curedspecies == "Salminus_cf._brasiliensis"),]$curedspecies= "Salminus_brasiliensis"
sequences[which(sequences$curedspecies == "Salminus_sp._1"),]$curedspecies= "Salminus_sp"
sequences[which(sequences$curedspecies == "Salminus_sp._2"),]$curedspecies= "Salminus_sp2"
sequences[which(sequences$curedspecies == "Sillago_sihama_var_3"),]$curedspecies= "Sillago_sihama"
sequences[which(sequences$curedspecies == "Sillago_sihama_var_4"),]$curedspecies= "Sillago_sihama"
sequences[which(sequences$curedspecies == "Sillago_sp."),]$curedspecies= "Sillago_sp"
sequences[which(sequences$curedspecies == "Salmo_sp."),]$curedspecies= "Salmo_sp"
sequences[which(sequences$curedspecies == "Salaria_sp."),]$curedspecies= "Salaria_sp"
sequences[which(sequences$curedspecies == "Salvelinus_sp."),]$curedspecies= "Salvelinus_sp"
sequences[which(sequences$curedspecies == "Schilbe_sp."),]$curedspecies= "Schilbe_sp"
sequences[which(sequences$curedspecies == "Schistura_sp."),]$curedspecies= "Schistura_sp"
sequences[which(sequences$curedspecies == "Scopelosaurus_sp."),]$curedspecies= "Scopelosaurus_sp"
sequences[which(sequences$curedspecies == "Scorpaenodes_sp."),]$curedspecies= "Scorpaenodes_sp"
sequences[which(sequences$curedspecies == "Squalius_cf._aristotelis"),]$curedspecies= "Squalius_aristotelis"
sequences[which(sequences$curedspecies == "Squalius_cf._moreoticus"),]$curedspecies= "Squalius_moreoticus"
sequences[which(sequences$curedspecies == "Squalius_sp."),]$curedspecies= "Squalius_sp"
sequences[which(sequences$curedspecies == "Systomus_cf._rubripinnis"),]$curedspecies= "Systomus_rubripinnis"
sequences[which(sequences$curedspecies == "Sebastes_sp."),]$curedspecies= "Sebastes_sp"
sequences[which(sequences$curedspecies == "Sphyraena_sp._1"),]$curedspecies= "Sphyraena_sp"
sequences[which(sequences$curedspecies == "Starksia_sp."),]$curedspecies= "Starksia_sp"
sequences[which(sequences$curedspecies == "Synaphobranchus_sp."),]$curedspecies= "Synaphobranchus_sp"
sequences[which(sequences$curedspecies == "Trichonotus_sp."),]$curedspecies= "Trichonotus_sp"
sequences[which(sequences$curedspecies == "Taenioides_sp."),]$curedspecies= "Taenioides_sp"
sequences[which(sequences$curedspecies == "Trachinocephalus_myops"),]$curedspecies= "Trachinocephalus_myops" ##reef-associated
sequences[which(sequences$curedspecies == "Thunnus_sp."),]$curedspecies= "Thunnus_sp"
sequences[which(sequences$curedspecies == "Trematomus_sp."),]$curedspecies= "Trematomus_sp"
sequences[which(sequences$curedspecies == "Tribolodon_sp."),]$curedspecies= "Tribolodon_sp"
sequences[which(sequences$curedspecies == "Trichiurus_cf._lepturus_var_2"),]$curedspecies= "Trichiurus_lepturus"
sequences[which(sequences$curedspecies == "Trichiurus_sp."),]$curedspecies= "Trichiurus_sp"
sequences[which(sequences$curedspecies == "Trichomycterus_cf._pradensis"),]$curedspecies= "Trichomycterus_pradensis"
sequences[which(sequences$curedspecies == "Trichopsis_cf._schalleri"),]$curedspecies= "Trichopsis_schalleri"
sequences[which(sequences$curedspecies == "Trichopsis_cf._vittata"),]$curedspecies= "Trichopsis_vittata"
sequences[which(sequences$curedspecies == "Trimma_RW_sp._24"),]$curedspecies= "Trimma_sp"
sequences[which(sequences$curedspecies == "Trimma_RW_sp._32"),]$curedspecies= "Trimma_sp2"
sequences[which(sequences$curedspecies == "Trimma_RW_sp.97"),]$curedspecies= "Trimma_sp3"
sequences[which(sequences$curedspecies == "Trimmatom_sp."),]$curedspecies= "Trimmatom_sp"
sequences[which(sequences$curedspecies == "Vinciguerria_sp."),]$curedspecies= "Vinciguerria_sp"
sequences[which(sequences$curedspecies == "Xyrichtys_nov_sp._D"),]$curedspecies= "Xyrichtys_sp"
sequences[which(sequences$curedspecies == "Pseudolithoxus_sp."),]$curedspecies= "Pseudolithoxus_sp"
##########################################################################
## using rfishbase, assign habitat based on CURED species name
wrongSpec=sequences[which(is.na(sequences$demerpelag)),]$curedspecies
test=species(as.character(gsub('_', ' ', wrongSpec)),fields = species_fields$habitat)
sequences[which(is.na(sequences$demerpelag)),]$demerpelag=test$DemersPelag
#species("Trachinocephalus myops",fields = species_fields$habitat)
##########################################################################
## curation of habitat column
## in some cases, automated assignation failed on R
## so we manualy assign habitat using request on https://www.fishbase.de/
sequences[which(sequences$curedspecies == "Alburnoides_strymonicus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Alburnoides_thessalicus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Alburnus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Alepocephalus_sp"),]$demerpelag= "bathydemersal"
sequences[which(sequences$curedspecies == "Alestes_bimaculatus"),]$demerpelag= "pelagic"
sequences[which(sequences$curedspecies == "Alestes_sp"),]$demerpelag= "pelagic"
sequences[which(sequences$curedspecies == "Alosa_sp"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Ambassis_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Ammodytes_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Anaspidoglanis_macrostomus"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Ancistrus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Anguilla_australis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Aphanius_alexandri"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Aphanius_dispar"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Aphanius_fontinalis"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Aphanius_iconii"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Aphanius_maeandricus"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Aphanius_mentoides"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Aphanius_meridionalis"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Aphanius_orontis"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Aphanius_richardsoni"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Aphanius_saldae"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Aphanius_similis"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Aphanius_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Aplochiton_marinus"),]$demerpelag = "demersal"
sequences[which(sequences$curedspecies == "Apogon_hyalosoma"),]$demerpelag = "demersal"
sequences[which(sequences$curedspecies == "Apogon_hyalosoma"),]$demerpelag = "demersal"
sequences[which(sequences$curedspecies == "Apogon_semilineatus"),]$demerpelag = "demersal"
sequences[which(sequences$curedspecies == "Apogon_smithi"),]$demerpelag = "demersal"
sequences[which(sequences$curedspecies == "Archamia_lineolata"),]$demerpelag = "reef-associated"
sequences[which(sequences$curedspecies == "Arrhamphus_sclerolepis"),]$demerpelag = "pelagic-neritic"
sequences[which(sequences$curedspecies == "Astyanax_metae"),]$demerpelag = "benthopelagic"
sequences[which(sequences$curedspecies == "Astyanax_sp"),]$demerpelag = "benthopelagic"
sequences[which(sequences$curedspecies == "Atherina_sp"),]$demerpelag = "reef-associated"
sequences[which(sequences$curedspecies == "Acanthurus_tractus"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Aioliops_sp"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Ancistrus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Aphyocheirodon_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Apistogramma_sp."),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Apistogramma_sp."),]$curedspecies= "Apistogramma_sp"
sequences[which(sequences$curedspecies == "Saurida_sp."),]$curedspecies= "Saurida_sp"
sequences[which(sequences$curedspecies == "Aphyosemion_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Astyanacinus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Balitora_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Barbatula_vardarensis"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Barbus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Bathydraco_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Bathylagus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Blennius_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Bothrocara_zestum"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Bryconops_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Brycinus_sp"),]$demerpelag= "pelagic"
sequences[which(sequences$curedspecies == "Bathycongrus_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Bathydraco_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Bregmaceros_sp"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Brienomyrus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Bryconamericus_sp."),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Bryconamericus_sp."),]$curedspecies= "Bryconamericus_sp"
sequences[which(sequences$curedspecies == "Bunocephalus_sp."),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Bunocephalus_sp."),]$curedspecies= "Bunocephalus_sp"
sequences[which(sequences$curedspecies == "Caesio_sp."),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Caesio_sp."),]$curedspecies= "Caesio_sp"
sequences[which(sequences$curedspecies == "Caristius_sp"),]$demerpelag= "bathypelagic"
sequences[which(sequences$curedspecies == "Centroberyx_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Callionymus_moorea"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Capoeta_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Carangoides_sp"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Caranx_otrynter"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Carasobarbus_fritschii"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Carasobarbus_harterti"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Carassius_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Careproctus_sp"),]$demerpelag= "bathydemersal"
sequences[which(sequences$curedspecies == "Cetopsorhamdia_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Characidium_zebra"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Characidium_alipioi"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Characidium_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Characidium_sp2"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Chelon_abu"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Chelon_aurata"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Chelon_ramada"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Chelon_saliens"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Chelon_abu"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Chilatherina_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Chondrostoma_ohridanus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Chondrostoma_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Chrysiptera_caesifrons"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Chrysiptera_leucopoma"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Cirrhilabrus_africanus"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Cirrhilabrus_marinda"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Cirrhilabrus_rubeus"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Cirrhilabrus_sp"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Cirrhilabrus_sp2"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Citharichthys_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Chaunax_sp"),]$demerpelag= "bathydemersal"
sequences[which(sequences$curedspecies == "Cheirodontops_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Clupea_pallasii"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Clypeobarbus_matthesi"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Cobitis_battalgili"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Cobitis_fahireae"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Cobitis_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Cobitis_sp2"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Coelorinchus_sp"),]$demerpelag= "bathydemersal"
sequences[which(sequences$curedspecies == "Colisa_fasciata"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Colisa_lalia"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Cololabis_sp"),]$demerpelag= "pelagic-oceanic"
sequences[which(sequences$curedspecies == "Cololabis_sp2"),]$demerpelag= "pelagic-oceanic"
sequences[which(sequences$curedspecies == "Congopanchax_meyersi"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Coptodon_rendalli"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Coptodon_zillii"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Coregonus_holsatus"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Coregonus_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Corymbophanes_bahianus"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Cottunculus_subspinosus"),]$demerpelag= "bathydemersal"
sequences[which(sequences$curedspecies == "Cottus_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Craterocephalus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Culter_mongolicus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Cultrichthys_erythropterus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Cynoglossus_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Cyphocharax_naegelii"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Cyphomyrus_psittacus"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Cyprinodon_variegatus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Devario_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Dolopichthys_sp"),]$demerpelag= "bathypelagic"
sequences[which(sequences$curedspecies == "Diapoma_guarani"),]$demerpelag= "bathypelagic"
sequences[which(sequences$curedspecies == "Diapoma_sp"),]$demerpelag= "bathypelagic"
sequences[which(sequences$curedspecies == "Diapoma_lepiclastus"),]$demerpelag= "bathypelagic"
sequences[which(sequences$curedspecies == "Diplodus_sargus"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Distichodus_sp"),]$demerpelag= "pelagic"
sequences[which(sequences$curedspecies == "Distichodus_sp2"),]$demerpelag= "pelagic"
sequences[which(sequences$curedspecies == "Distichodus_sp3"),]$demerpelag= "pelagic"
sequences[which(sequences$curedspecies == "Decapterus_sp."),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Doryrhamphus_melanopleura"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Eviota_moorea"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Eviota_sp"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Eviota_sp2"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Eviota_sp3"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Engraulis_sp"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Enteromius_atromaculatus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Enteromius_brazzai"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Enteromius_callipterus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Enteromius_atromaculatus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Enteromius_camptacanthus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Enteromius_miolepis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Enteromius_jae"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Enteromius_atromaculatus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Enteromius_chiumbeensis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Enteromius_martorelli"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Enteromius_trinotatus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Enteromius_vanderysti"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Enneanectes_matador"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Enneanectes_deloachorum"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Enneanectes_wilki"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Etheostoma_aquali"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Etheostoma_aquali"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Etheostoma_distleri"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Etheostoma_hatcheri"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Etheostoma_mamequit"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Etheostoma_meadiae"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Etheostoma_microlepidum"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Etheostoma_sanguifluum"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Etheostoma_sheltowee"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Eucinostomus_lefroyi"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Eucinostomus_gula"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Eucinostomus_sp"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Epinephelus_fario"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Epinephelus_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Elacatinus_sp"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Epalzeorhynchos_frenatum"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Esomus_danrica"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Esox_americanus"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Etrumeus_teres"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Evynnis_tumifrons"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Facciolella_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Gymnostomus_horai"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Gymnotus_carapo"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Gymnotus_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Gymnothorax_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Gasterosteus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Gephyrocharax_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Gorgasia_sp"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Gonostoma_elongatum"),]$demerpelag= "bathypelagic"
sequences[which(sequences$curedspecies == "Giuris_aporos"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Gadus_chalcogrammus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Garra_caudomaculata"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Garra_caudomaculata"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Garra_ghorensis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Garra_ornata"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Garra_culiciphaga"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Garra_festai"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Garra_gotyla"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Garra_klatti"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Garra_nana"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Garra_sauvagei"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Garra_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Halichoeres_lamarii"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Haplochromis_desfontainii"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Haplochromis_flavijosephii"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Haplochromis_sp"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Harttia_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Helcogramma_sp"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Helicolenus_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Hemichromis_saharae"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Hemichromis_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Hemipsilichthys_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Herichthys_bartoni"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Herichthys_labridens"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Herichthys_pame"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Herichthys_pantostictus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Herichthys_steindachneri"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Heterobranchus_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Hisonotus_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Hirundichthys_sp"),]$demerpelag="pelagic-neritic"
sequences[which(sequences$curedspecies == "Hysterocarpus_traskii"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Homaloptera_sp"),]$demerpelag="demersal"
sequences[which(sequences$curedspecies == "Hyphessobrycon_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Hypostomus_sp"),]$demerpelag="demersal"
sequences[which(sequences$curedspecies == "Heptapterus_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Iberocypris_alburnoides"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Ituglanis_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Inlecypris_auropurpureus"),]$demerpelag= "pelagic"
sequences[which(sequences$curedspecies == "Icelus_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Imparfinis_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Knodus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Loricaria_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Luciobarbus_setivimensis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Labeo_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Labeobarbus_gananensis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Labeobarbus_mawambiensis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Ladigesocypris_ghigii"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Ladigesocypris_irideus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Laemolyta_petiti"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Laemolyta_taeniata_1"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Laemolyta_taeniata_2"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Ladigesocypris_irideus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Lateolabrax_maculatus"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Lates_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Leiognathus_daura"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Lethrinus_sp"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Liparis_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Liza_macrolepis"),]$demerpelag= "pelagic"
sequences[which(sequences$curedspecies == "Liza_subviridis"),]$demerpelag= "pelagic"
sequences[which(sequences$curedspecies == "Liza_tade"),]$demerpelag= "pelagic"
sequences[which(sequences$curedspecies == "Liza_sp"),]$demerpelag= "pelagic"
sequences[which(sequences$curedspecies == "Loricaria_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Luciobarbus_albanicus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Luciobarbus_biscarensis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Luciobarbus_callensis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Luciobarbus_figuigensis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Luciobarbus_issenensis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Luciobarbus_ksibi"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Luciobarbus_labiosa"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Luciobarbus_lepineyi"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Luciobarbus_longiceps"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Luciobarbus_leptopogon"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Luciobarbus_magniatlantis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Luciobarbus_massaensis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Luciobarbus_moulouyensis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Luciobarbus_nasus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Luciobarbus_pallaryi"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Luciobarbus_setivimensis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Luciobarbus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Lycodes_sp"),]$demerpelag= "bathydemersal"
sequences[which(sequences$curedspecies == "Melanocharacidium_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Microlepidogaster_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Misgurnus_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Myloplus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Mayaheros_urophthalmus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Megaleporinus_reinhardti"),]$demerpelag= "bathypelagic"
sequences[which(sequences$curedspecies == "Megaleporinus_sp"),]$demerpelag= "bathypelagic"
sequences[which(sequences$curedspecies == "Mirogrex_terraesanctae"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Macrourus_sp"),]$demerpelag= "bathydemersal"
sequences[which(sequences$curedspecies == "Melanocharacidium_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Melanotaenia_sp1"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Melanotaenia_sp2"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Melanotaenia_sp12"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Melanotaenia_sp10"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Melanotaenia_sp3"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Melanotaenia_sp4"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Melanotaenia_sp5"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Melanotaenia_sp6"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Melanotaenia_sp7"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Melanotaenia_sp8"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Melanotaenia_sp9"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Melanotaenia_splendida"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Merluccius_gayi"),]$demerpelag= "bathydemersal"
sequences[which(sequences$curedspecies == "Monopterus_javanensis"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Monotaxis_heterodon"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Morone_hybrid"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Moringua_moorea"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Muraenolepis_sp"),]$demerpelag= "bathypelagic"
sequences[which(sequences$curedspecies == "Neobythites_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Neoepinnula_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Neoplecostomus_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Netuma_surubim"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Nicholsina_usta"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Ninnigobius_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Ninnigobius_canestrinii"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Ninnigobius_montenegrensis"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Notropis_sawfin"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Nanochromis_dimidiatus"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Nemateleotris_exquisita"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Neogobius_nigricans"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Neoplecostomus_sp1"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Neoplecostomus_sp2"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Neoplecostomus_sp3"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Neoplecostomus_sp4"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Neoplecostomus_sp5"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Neoplecostomus_sp6"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Neoplecostomus_sp7"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Neoplecostomus_sp8"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Onigocia_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Ophisternon_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Orsinigobius_croaticus"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Opsopoeodus_emiliae"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Opsaridium_christyi"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Opsarius_bakeri"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Odontostilbe_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Oligosarcus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Oncorhynchus_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Oxynoemacheilus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Oxynoemacheilus_sp2"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Oxynoemacheilus_sp3"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Pempheris_rhomboidea"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Pempheris_eatoni"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Pempheris_ibo"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Pempheris_rhomboidea"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Pempheris_sp"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Pempheris_sp2"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Pempheris_sp3"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Pampus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Parodon_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Platycephalus_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Pleuronectes_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Pogonophryne_sp"),]$demerpelag= "bathydemersal"
sequences[which(sequences$curedspecies == "Pogonophryne_sp2"),]$demerpelag= "bathydemersal"
sequences[which(sequences$curedspecies == "Pogonophryne_sp3"),]$demerpelag= "bathydemersal"
sequences[which(sequences$curedspecies == "Petruichthys_brevis"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Pseudeutropius_atherinoides"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Prochilodus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Pseudolithoxus_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Piabarchus_stramineus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Plecoglossus_altivelis"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Platycephalus_longispinis"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Puntius_conchonius"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Puntius_manipurensis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Puntius_tetrazona"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Puntius_sarana"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Pseudotrematomus_bernacchii"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Pseudotrematomus_eulepidotus"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Pseudotrematomus_hansoni"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Pseudotrematomus_lepidorhinus"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Pseudotrematomus_loennbergii"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Pseudotrematomus_nicolai"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Pseudotrematomus_pennellii"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Pseudotrematomus_scotti"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Pseudotrematomus_tokarevi"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Pseudosimochromis_babaulti"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Pterocapoeta_maroccana"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Pseudoplatystoma_punctifer"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Pseudopentaceros_richardsoni"),]$demerpelag= "pelagic-oceanic"
sequences[which(sequences$curedspecies == "Pseudambassis_baculis"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Pseudoicichthys_australis"),]$demerpelag= "pelagic-oceanic"
sequences[which(sequences$curedspecies == "Pseudojuloides_polackorum"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Plectorhinchus_orientalis"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Percalates_novemaculeata"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Paradiplogrammus_bairdi"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Paragobiodon_xanthosomus"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Paralichthys_oblongus"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Paraliparis_copei"),]$demerpelag= "bathydemersal"
sequences[which(sequences$curedspecies == "Pachycara_sp"),]$demerpelag= "bathydemersal"
sequences[which(sequences$curedspecies == "Paraliparis_sp"),]$demerpelag= "bathydemersal"
sequences[which(sequences$curedspecies == "Paramormyrops_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Pareiorhina_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Parotocinclus_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Parotocinclus_sp2"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Pelasgus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Phoxinus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Pimelodella_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Pimelodus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Poecilia_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Pseudophoxinus_sp"),]$demerpelag= "pelagic"
sequences[which(sequences$curedspecies == "Pseudopimelodus_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Rhinogobius_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Rhinogobius_fluviatilis"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Rhinogobius_nagoyae"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Rogadius_tuberculatus"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Romanogobio_banarescui"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Rutilus_aula"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Rutilus_rubilio"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Rhamdia_guatemalensis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Rutilus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Rhinolekos_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Rineloricaria_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Rivulus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Seminemacheilus_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Serrivomer_sp"),]$demerpelag= "bathypelagic"
sequences[which(sequences$curedspecies == "Saurida_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Stomatorhinus_kununguensis"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Stomatorhinus_fuliginosus"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Salminus_brasiliensis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Salminus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Salminus_sp2"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Sillago_chondropus"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Sillago_sihama"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Sillago_sp"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Salmo_pellegrini"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Salmo_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Salaria_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Salvelinus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Schilbe_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Sardinops_melanosticta"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Schistura_corica"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Schistura_montana"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Schistura_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Scopelosaurus_sp"),]$demerpelag= "bathypelagic"
sequences[which(sequences$curedspecies == "Scorpaenodes_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Serranus_knysnaensis"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Sinilabeo_dero"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Squalius_aristotelis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Squalius__moreoticus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Squalius_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Synchiropus_agassizii"),]$demerpelag= "bathydemersal"
sequences[which(sequences$curedspecies == "Synchiropus_ocellatus"),]$demerpelag= "bathydemersal"
sequences[which(sequences$curedspecies == "Symphurus_atricauda"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Symphurus_leucochilus"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Strongylura_notata"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Synodus_bondi"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Systomus_rubripinnis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Sebastes_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Sphyraena_sp"),]$demerpelag= "pelagic-neritic"
sequences[which(sequences$curedspecies == "Starksia_sp"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Synaphobranchus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Taenioides_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Trichonotus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Tampichthys_dichroma"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Thymallus_aeliani"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Tigrigobius_panamensis"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Tigrigobius_rubrigenis"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Tristramella_simonis"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Trichogaster_trichopterus"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Trachinocephalus_myops"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Thunnus_sp"),]$demerpelag= "pelagic-oceanic"
sequences[which(sequences$curedspecies == "Trematomus_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Tribolodon_sp"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Trichiurus_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Trichomycterus_sp1"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Trichomycterus_sp2"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Trichomycterus_sp3"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Trichomycterus_sp4"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Trichomycterus_sp5"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Trichomycterus_sp6"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Trimma_caudomaculatum"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Trimma_macrophthalmus"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Trimma_necopinum"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Trimma_rubromaculata"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Trimma_sp"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Trimma_sp2"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Trimma_sp3"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Tropidophoxinellus_callensis"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Trimmatom_sp"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Umbrina_robinsoni"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Valencia_robertae"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Xenocypris_argentea"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Vinciguerria_sp"),]$demerpelag= "bathypelagic"
sequences[which(sequences$curedspecies == "Xyrichtys_sp"),]$demerpelag= "reef-associated"
sequences[which(sequences$curedspecies == "Gobio_sp"),]$demerpelag= "benthopelagic"
sequences[which(sequences$curedspecies == "Capoeta_erhani"),]$demerpelag= "demersal"
sequences[which(sequences$curedspecies == "Decapterus_sp"),]$demerpelag= "reef-associated"
##########################################################################
## write file table of sequences with CURED habitat column
write.table(sequences,seqCuredf,row.names=F,sep=",",col.names=T)