Skip to content

Commit

Permalink
updating lifestage codes to newest set
Browse files Browse the repository at this point in the history
  • Loading branch information
aylapear committed Mar 25, 2024
1 parent d6ce281 commit 23cef5c
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 66 deletions.
134 changes: 69 additions & 65 deletions inst/extdata/lifestage-codes.csv
Original file line number Diff line number Diff line change
@@ -1,65 +1,69 @@
code,description_lifestage,simple_lifestage
--,Unspecified,adult
AD,Adult,adult
AL,Alevin,els
BL,Blastula,els
CS,Cleavage stage,els
EG,Egg,els
EL,Elver,juvenile
EM,Embryo,els
EX,Exponential growth phase (log),adult
EY,"Eyed egg or stage, eyed embryo",els
F0,F0 generation,adult
F1,F1 generation,adult
FI,Fingerling,juvenile
FY,Fry,juvenile
GA,Gastrula,els
GE,Gestation,els
GM,Gamete,els
IM,Immature,juvenile
JV,Juvenile,juvenile
LC,Lactational,adult
LR,Prolarva,els
LV,Larva,els
MA,Mature,adult
ML,Morula,els
MX,Multiple,adult
NB,Newborn,els
NC,Not coded,adult
NE,Neonate,els
NH,"New, newly or recent hatch",els
NL,Neurala,els
NOINT,Not intact,adult
NR,Not reported,adult
OO,"Oocyte, ova",els
PA,Parr,juvenile
PC,Pre-hatch,els
PG,Post-spawning,adult
PHT,Post-hatch,els
PI,Post-molt,adult
PJ,"Pre-, sub-, semi-, near adult, or peripubertal",juvenile
PK,Post-smolt,juvenile
PQ,Pre-larva,els
PS,Pre-smolt,juvenile
PT,Protolarvae,els
PV,Post-larva,juvenile
PW,Pre-spawning,adult
RP,Mature reproductive,adult
SA,Subadult,juvenile
SC,"Yolk sac larvae, sac larvae",els
SF,"Sac fry, yolk sac fry",els
SI,Sexually immature,juvenile
SM,Sexually mature,adult
SMT,Smolt,juvenile
SO,Sporeling,adult
SP,Sperm,els
SU,Swim-up,els
SW,Spawning,adult
TA,Tadpole,els
UY,Underyearling,juvenile
VI,Virgin,adult
YA,Young adult,adult
YE,Yearling,juvenile
YO,Young,juvenile
YY,Young of year,juvenile
ZY,Zygote,els
code,description_lifestage,simple_lifestage
--,Unspecified,adult
AD,Adult,adult
AL,Alevin,els
BL,Blastula,els
CS,Cleavage stage,els
EG,Egg,els
EL,Elver,juvenile
EM,Embryo,els
EX,Exponential growth phase (log),adult
EY,"Eyed egg or stage, eyed embryo",els
F0,F0 generation,adult
F1,F1 generation,adult
F2,F2 generation,adult
FI,Fingerling,juvenile
FY,Fry,juvenile
GA,Gastrula,els
GE,Gestation,els
GM,Gamete,els
IM,Immature,juvenile
JV,Juvenile,juvenile
LC,Lactational,adult
LR,Prolarva,els
LV,Larva,els
MA,Mature,adult
ML,Morula,els
MN,Mid-neurula,els
MX,Multiple,adult
NB,Newborn,els
NC,Not coded,adult
NE,Neonate,els
NH,"New, newly or recent hatch",els
NL,Neurala,els
NOINT,Not intact,adult
NR,Not reported,adult
NU,Nauplii,els
NY,Nymph,els
OO,"Oocyte, ova",els
PA,Parr,juvenile
PC,Pre-hatch,els
PG,Post-spawning,adult
PHT,Post-hatch,els
PI,Post-molt,adult
PJ,"Pre-, sub-, semi-, near adult, or peripubertal",juvenile
PK,Post-smolt,juvenile
PQ,Pre-larva,els
PS,Pre-smolt,juvenile
PT,Protolarvae,els
PV,Post-larva,juvenile
PW,Pre-spawning,adult
RP,Mature reproductive,adult
SA,Subadult,juvenile
SC,"Yolk sac larvae, sac larvae",els
SF,"Sac fry, yolk sac fry",els
SI,Sexually immature,juvenile
SM,Sexually mature,adult
SMT,Smolt,juvenile
SO,Sporeling,adult
SP,Sperm,els
SU,Swim-up,els
SW,Spawning,adult
TA,Tadpole,els
UY,Underyearling,juvenile
VI,Virgin,adult
YA,Young adult,adult
YE,Yearling,juvenile
YO,Young,juvenile
YY,Young of year,juvenile
ZY,Zygote,els
3 changes: 2 additions & 1 deletion scripts/update-reference-datasets-02.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ reviewed_lifestage_code <-
mutate(
simple_lifestage = str_to_lower(simple_lifestage)
) |>
rename(description_lifestage = description)
rename(description_lifestage = description) |>
filter(fish_amphibian_flag)

if (!vld_equal(sum(is.na(reviewed_lifestage_code$simple_lifestage[reviewed_lifestage_code$fish_amphibian_flag & !is.na(reviewed_lifestage_code$fish_amphibian_flag)])), 0)) {
abort_chk("There should be no missing simple lifestage value, correct before proceeding")
Expand Down

0 comments on commit 23cef5c

Please sign in to comment.