Pack Ann: Stoics packs updates with bio_db and stoics_lib highlights

A number of packs have been updated.

The changes are in small eccentric packs, but there might a couple of things of interest.

bio_db serves high quality biological databases as prolog fact databases (also with db back-ends). v.4 introduces complete overhaul on the naming convention of data predicates. For example
map_hgnc_hgnc_symb/2 → hgnc_hmos_hgnc_symb/2
edge_strg_mouse_ensp/3 → strg_musm_edge_ensp/3

So, all data preds are formed of 4 tokens, <Prod1/edge>_, each of 4 letters long. There is a new bio database imported: Reactome (token: reac) and a new organism/species: chicken (token: galg). Tokens for the two other supported organisms have been changed to homs, for human and musm for mouse.

There are 91 predicates serving 55 444 729 records.

The data predicates are in pack(bio_db_repo)-v.22.12.29, which can be downloaded in one go or bio_db will suggest downloading a specific table only, the first time the relevant database predicate is queried.
pack bio_db: https:/


lexi/2 expands shape casting polymorphism ideas first used in pack(real) and further advanced in pack(os_lib).
Predicate lexi/2 is intended to be used within other predicates to make polymorhism over lexicographical objects uniform.
An example of how lexi/2 can be used within predicate definitions is lexi_n/4.

?- lexi(‘Bone Marrow’,Codes).
Codes = [66, 111, 110, 101, 32, 77, 97, 114, 114|…].

?- lexi( Peripheral Blood, &String ).
String = “Peripheral Blood”.

?- lexi( Peripheral Blood, &String ).
String = “Peripheral Blood”.

?- lexi( Peripheral Blood, +String ).
String = ‘Peripheral Blood’.

?- lexi( Peripheral Blood, -String ).
String = [80, 101, 114, 105, 112, 104, 101, 114, 97|…].

?- lexi_n( 2, 3, 0’0, Codes ), atom_codes( Atom, Codes ).
Codes = [48, 48, 50],
Atom = ‘002’.

?- lexi_n( 2, 3, 0’0, + Atom ).
Atom = ‘002’.

?- lexi_n( 123, 8, PadC, + Atom ).
PadC = 48,
Atom = ‘00000123’.

Some other new or improved pack(stoics_lib) predicates are
arg_add/4 add arg(s) to a term
known/2 meta call for predicates with atomic 1st argument (info errors if token not known)
latex_colour/4 and colour_hex/2 tables names to colour values
list_frequency/2 now has option for returning binned results

pack stoics_lib: https:/

Nicos Angelopoulos