Repository navigation
genomicSimulationC v0.2.3
This release added features:
- Add functions calculate_optimal_available_alleles and calculate_optimal_available_bv, to calculate the best combination of alleles and best possible breeding value score given the pool of alleles available in a particular group.
- Added custom integer labels, eg. for tracking age:
- Create a new label: create_new_label (every genotype has a value for every label; multiple labels can exist at a time).
- Change the values of a label for some or all genotypes: set_labels_to_const; increment_labels; set_labels_to_values
- Group manipulation using the values of a label: split_by_label_value; split_by_label_range
- Added two iterators: BidirectionalIterator and RandomAccessIterator. They can iterate through every genotype in the simulation, or through just the members of a specific group. Iterators need to be reset or destroyed and re-created when genotypes are created or destroyed.
- Creating and initialising iterators: create_bidirectional_iter + set_bidirectional_iter_to_start or set_bidirectional_iter_to_end; create_randomaccess_iter
- Iterating: next_forwards; next_backwards; next_get_nth
- Deleting: delete_bidirectional_iter; delete_randomaccess_iter
- Iterators return GenoLocation values. A new family of get_ functions has been added to access the data of the genotype at a particular GenoLocation.
- get_name; get_alleles; get_first_parent; get_second_parent; get_id; get_group; get_label_value
This release included improvements to the package's existing features:
- BREAKING CHANGE: Removed automatic re-seeding in get_chromosome_locations. Users should now set the random number generator seed in their own programs (see the example sim.c). This removes the unexpected behaviour where genomicSimulation overwrites your own random seeds.
- BREAKING CHANGE: Collective data access functions (get_group_* family, get_existing_groups and get_existing_group_counts) now use parameter modification (save their results to an array passed as a parameter) rather than by returning a heap array.
- BREAKING CHANGE: Changed function signature of cross_these_combinations to allow for more flexible usage: instead of one
combinations[2][n_crosses]parameter, there are a pair offirstParents[n_crosses]andsecondParents[n_crosses]parameters. - Added 'const' to all readonly parameters. Reduce compilation warnings.
- Swapped to using Mattias Gustavsson's "rnd" implementation of a Permuted Congruential Generator (https://github.com/mattiasgustavsson/libs) for random number generation, rather than the builtin and subpar "rand()".
This release includes some bug fixes:
- Up NAME_LENGTH (the buffer size for name loading) to 45, as a temporary fix.
- Allow uint ordered search to ignore 0s mid-list, to solve a bug when not all genotypes are allocated IDs.