genomicSimulationC 0.3
|
Sometimes, function signatures may need to be changed at a version update. The changes needed for a script to be updated to run in a newer version of genomicSimulation can be found in this guide. Angled brackets represent function inputs.
This guide belongs to the C version of genomicSimulation. Function signature changes in the R version of genomicSimulation will be managed with .Deprecated
warnings.
Function signatures for file output functions were simplified. So were function signatures of breeding value and allele count matrix calculation functions. One extra parameter was added to load_data_files
.
0.2.5 | 0.2.6 |
---|---|
load_data_files(<d>, <data_file>, <map_file>, <effect_file>) | load_data_files(<d>, <data_file>, <map_file>, <effect_file>, DETECT_FILE_FORMAT) |
save_markerblocks(<f>, <d>, <b>) | save_markerblocks(<!fname>, <d>, <b>, NO_MAP) followed by running the command sed 's/^/0\t0\tb0\tb\t/' <!fname> | sed '1i\Chrom\tPos\tName\tClass\tMarkers' (where <!fname> is the file name that would, in the old version, have been opened as file pointer <f> )(It is suggested you use one of the simpler new output formats without meaningless columns instead.) |
save_group_genotypes(<f>, <d>, <group>) | save_genotypes(<!fname>, <d>, <group>, GSC_FALSE) (where <!fname> is the file name that would, in the old version, have been opened as file pointer <f> ) |
save_transposed_group_genotypes(<f>, <d>, <group>) | save_genotypes(<!fname>, <d>, <group>, GSC_TRUE) (where <!fname> is the file name that would, in the old version, have been opened as file pointer <f> ) |
save_count_matrix(<f>, <d>, <allele>) | save_allele_counts(<!fname>, <d>, NO_GROUP, <allele>, GSC_FALSE) (where <!fname> is the file name that would, in the old version, have been opened as file pointer <f> ) |
save_group_count_matrix(<f>, <d>, <allele>, <group>) | save_allele_counts(<!fname>, <d>, <group>, <allele>, GSC_FALSE) (where <!fname> is the file name that would, in the old version, have been opened as file pointer <f> ) |
save_one_step_pedigree(<f>, <d>) | save_pedigrees(<!fname>, <d>, NO_GROUP, GSC_FALSE) (where <!fname> is the file name that would, in the old version, have been opened as file pointer <f> ) |
save_group_one_step_pedigree(<f>, <d>, <group>) | save_pedigrees(<!fname>, <d>, <group>, GSC_FALSE) (where <!fname> is the file name that would, in the old version, have been opened as file pointer <f> ) |
save_full_pedigree(<f>, <d>, <group>) | save_pedigrees(<!fname>, <d>, NO_GROUP, GSC_TRUE) (where <!fname> is the file name that would, in the old version, have been opened as file pointer <f> ) |
save_group_full_pedigree(<f>, <d>, <group>) |
|
save_bvs(<f>, <d>, <effID>) | save_bvs(<!fname>, <d>, NO_GROUP, <effID>) (where <!fname> is the file name that would, in the old version, have been opened as file pointer <f> ) |
save_group_bvs(<f>, <d>, <group>, <effID>) | save_bvs(<!fname>, <d>, <group>, <effID>) (where <!fname> is the file name that would, in the old version, have been opened as file pointer <f> ) |
calculate_bvs(<d>->m, <eff>) where <d> is a SimData object | calculate_bvs(<d>, NO_GROUP, <eff>) |
calculate_bvs(<m>, <eff>) if <m> does not belong to a SimData object | BidirectionalIterator it = gsc_create_bidirectional_iter_fromAM(<m>, NO_GROUP); gsc_calculate_utility_bvs(&it, <eff>); gsc_delete_bidirectional_iter(&it); |
calculate_group_bvs(<d>, <group>, <eff>) | calculate_bvs(<d>, <group>, <eff>) |
calculate_count_matrix(<d>->m, <allele>, <counts>) where <d> is a SimData object | gsc_delete_dmatrix(&<counts>); (if needed)<counts> = calculate_allele_counts(<d>, NO_GROUP, <allele>); |
calculate_group_count_matrix(<d>->m, <group>, <allele>, &<counts>) where <d> is a SimData object | gsc_delete_dmatrix(&<counts>); (if needed)<counts> = calculate_allele_counts(<d>, <group>, <allele>); |
calculate_full_count_matrix(<d>->m, <allele>) where <d> is a SimData object | calculate_allele_counts(<d>, NO_GROUP, <allele>) |
calculate_full_count_matrix(<m>, <allele>) if <m> does not belong to a SimData object | DecimalMatrix counts = gsc_generate_zero_dmatrix(<m>->n_genotypes, <m>->n_markers); gsc_calculate_utility_allele_counts(<m>->n_markers, <m>->n_genotypes, <m>->alleles, <allele>, &counts); The result is in counts |
gsc_save_names_header(<f>, <n>, <names>) | gsc_save_utility_genotypes(<f>, NULL, <n>, <names>, GSC_FALSE) |
gsc_save_allele_matrix(<f>, <m>) | BidirectionalIterator it = gsc_create_bidirectional_iter_fromAM(<m>, NO_GROUP); gsc_save_utility_genotypes(<f>, &it, 0, NULL, GSC_FALSE); gsc_delete_bidirectional_iter(&it); |
gsc_save_transposed_allele_matrix(<f>, <m>, <names>) | BidirectionalIterator it = gsc_create_bidirectional_iter_fromAM(<m>, NO_GROUP); gsc_save_utility_genotypes(<f>, &it, <m>->n_markers, <names>, GSC_TRUE); gsc_delete_bidirectional_iter(&it); |
gsc_save_allelematrix_full_pedigree(<f>, <m>, <parents>) | BidirectionalIterator it = gsc_create_bidirectional_iter_fromAM(<m>, NO_GROUP); gsc_save_utility_pedigrees(<f>, &it, GSC_TRUE, <parents>->m); gsc_delete_bidirectional_iter(&it); |
gsc_DecimalMatrix bvs = gsc_calculate_bvs(<m>, <eff>); gsc_save_manual_bvs(<f>, &bvs, <m>->ids, (const char**) <m>->names); gsc_delete_dmatrix(&bvs); | gsc_BidirectionalIterator it = gsc_create_bidirectional_iter_fromAM(<m>, NO_GROUP); gsc_save_utility_bvs(<f>, &it, <eff>); gsc_delete_bidirectional_iter(&it); |
The signedness and size of integer parameters may have changed as part of an effort to increase consistency in integer types. The changes will depend on the definitions given to type aliases GSC_ID_T
, GSC_GLOBALX_T
, GSC_LOCALX_T
, GSC_GENOLEN_T
, so a list exact type casts you need to add to upgrade a script from v0.2.5 to v0.2.6 cannot be made. You will need to add your own type casts as requested by the compiler.
See the file names_stopgap.h
in the v0.2.5 release.