MorphyLib
Phylogenetic data reconstruction library accommodating inapplicable data
statedata.h
1 //
2 // statedata.h
3 // MorPhy2
4 //
5 // Created by mbrazeau on 26/04/2017.
6 // Copyright © 2017 brazeaulab. All rights reserved.
7 //
8 
9 #ifndef statedata_h
10 #define statedata_h
11 
12 #include <limits.h>
13 #include <string.h>
14 #include <stdbool.h>
15 #include <ctype.h>
16 
17 
18 #define VALID_NEXMAT_PUNC "{}();"
19 #define VALID_XREAD_MATPUNC "[];"
20 #define VALID_WILDCAR "-?"
21 #define VALID_STATESYMB "+0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
22 #define VALID_WS "\n\t "
23 #define VALIDSYMB VALID_NEXMAT_PUNC VALID_XREAD_MATPUNC VALID_WILDCAR \
24  VALID_STATESYMB VALID_WS
25 
26 
27 /* Function prototypes */
28 int mpl_init_symbolset(Morphyp m);
29 int mpl_set_numsymbols(int numsymb, Morphyp handl);
30 int mpl_get_numsymbols(Morphyp handl);
31 void mpl_destroy_symbolset(Morphyp m);
32 char* mpl_skip_closure(const char *closure, const char openc, const char closec);
33 int mpl_compare_symbol_lists(const char* sym1, const char* sym2);
34 int mpl_assign_symbol_list_from_matrix(const char *symbs, MPLsymbols* symlist);
35 char* mpl_query_symbols_from_matrix(Morphyp m);
36 int mpl_get_states_from_rawdata(Morphyp handl);
37 int mpl_copy_raw_matrix(const char* rawmatrix, Morphyp handl);
38 int mpl_check_nexus_matrix_dimensions(char *input_matrix, int input_num_taxa, int input_num_chars);
39 char* mpl_get_preprocessed_matrix(Morphyp handl);
40 int mpl_write_input_rawchars_to_cells(Morphyp handl);
41 int mpl_create_state_dictionary(Morphyp handl);
42 int mpl_convert_cells(Morphyp handl);
43 int mpl_convert_rawdata(Morphyp handl);
44 MPLmatrix* mpl_new_mpl_matrix(const int ntaxa, const int nchar, const int nstates);
45 int mpl_delete_mpl_matrix(MPLmatrix* m);
46 MPLmatrix* mpl_get_mpl_matrix(Morphyp m);
47 char* mpl_translate_state2char(MPLstate cstates, Morphyp handl);
48 int mpl_init_charac_info(Morphyp handl);
49 void mpl_delete_charac_info(Morphyp handl);
50 
51 #endif /* statedata_h */
Definition: morphydefs.h:143
Definition: morphydefs.h:154
Definition: morphydefs.h:165