| 1 | /* global variables */ |
|---|
| 2 | extern int abortMove; /* flag determining whether to abort move */ |
|---|
| 3 | extern int *activeParams[NUM_LINKED]; /* a table holding the parameter status */ |
|---|
| 4 | extern int *activeParts; /* partitions changes should apply to */ |
|---|
| 5 | extern int autoClose; /* autoclose */ |
|---|
| 6 | extern int autoOverwrite; /* Overwrite or append outputfiles when nowarnings=yes */ |
|---|
| 7 | extern int chainHasAdgamma; /* indicates if chain has adgamma HMMs */ |
|---|
| 8 | extern Chain chainParams; /* holds parameters for Markov chain */ |
|---|
| 9 | extern CharInformation *charInfo; /* holds critical information about characters */ |
|---|
| 10 | extern char **charSetNames; /* holds names of character sets */ |
|---|
| 11 | extern int *compCharPos; /* char position in compressed matrix */ |
|---|
| 12 | extern int *compColPos; /* column position in compressed matrix */ |
|---|
| 13 | extern SafeLong *compMatrix; /* compressed character matrix */ |
|---|
| 14 | extern int compMatrixRowSize; /* row size of compressed matrix */ |
|---|
| 15 | extern Comptree comptreeParams; /* holds parameters for comparetree command */ |
|---|
| 16 | extern char **constraintNames; /* holds names of constraints */ |
|---|
| 17 | extern SafeLong **definedConstraint; /* holds information about defined constraints */ |
|---|
| 18 | extern SafeLong **definedConstraintTwo; /* bitfields representing second taxa sets of defined constraints (used for PARTIAL constraints) */ |
|---|
| 19 | extern SafeLong **definedConstraintPruned; /* bitfields representing taxa sets of defined constraints after delited taxa are removed */ |
|---|
| 20 | extern SafeLong **definedConstraintTwoPruned; /* bitfields representing second taxa sets of defined constraints after delited taxa are removed(used for PARTIAL constraints) */ |
|---|
| 21 | extern int dataType; /* type of data */ |
|---|
| 22 | extern Calibration defaultCalibration; /* default model settings */ |
|---|
| 23 | extern ModelParams defaultModel; /* default model settings */ |
|---|
| 24 | extern int defChars; /* flag for whether number of characters is known*/ |
|---|
| 25 | extern int defMatrix; /* flag for whether matrix is successfull read */ |
|---|
| 26 | extern int defPairs; /* flag for whether constraints on tree are read */ |
|---|
| 27 | extern int defPartition; /* flag for whether character partition is read */ |
|---|
| 28 | extern int defTaxa; /* are taxon labels defined ? */ |
|---|
| 29 | extern Doublet doublet[16]; /* holds information on states for doublets */ |
|---|
| 30 | extern int echoMB; /* flag used by Manual to prevent echoing */ |
|---|
| 31 | extern SafeLong expecting; /* variable denoting expected token type */ |
|---|
| 32 | extern int fileNameChanged; /* has file name been changed? */ |
|---|
| 33 | extern int foundNewLine; /* whether a new line has been found */ |
|---|
| 34 | extern char gapId; /* gap character Id */ |
|---|
| 35 | extern SafeLong globalSeed; /* seed that is initialized at start up */ |
|---|
| 36 | extern char **headerNames; /* string to hold headers in sump and plot */ |
|---|
| 37 | extern int inComment; /* flag for whether input stream is commented */ |
|---|
| 38 | extern int inferAncStates; /* should ancestral states be inferred (y/n) */ |
|---|
| 39 | extern int inferSiteOmegas; /* should site omega values be inferred (y/n) */ |
|---|
| 40 | extern int inferSiteRates; /* should site rates be inferred (y/n) */ |
|---|
| 41 | extern int inferPosSel; /* should positive selection be inferred (y/n) */ |
|---|
| 42 | extern char inputFileName[100]; /* input (NEXUS) file name */ |
|---|
| 43 | extern int inTreesBlock; /* are we in the sumt block */ |
|---|
| 44 | extern int inValidCommand; /* a useful flag set whenever you enter a cmd */ |
|---|
| 45 | extern int isInAmbig, isInPoly; /* flags whether we are within () or {} */ |
|---|
| 46 | extern int isMixed; /* flags whether dataset is mixed */ |
|---|
| 47 | extern int inMrbayesBlock; /* flag for whether we are in a mrbayes block */ |
|---|
| 48 | extern int *intValues; /* integer values of parameters */ |
|---|
| 49 | extern int isTaxsetDef; /* is a taxon set defined */ |
|---|
| 50 | extern int isTranslateDef; /* is a translation block defined */ |
|---|
| 51 | extern int isTranslateDiff; /* is translate different from current taxaset? */ |
|---|
| 52 | extern int *linkTable[NUM_LINKED]; /* how parameters are linked across parts */ |
|---|
| 53 | extern int localOutGroup; /* outgroup for non-excluded taxa */ |
|---|
| 54 | extern char **localTaxonNames; /* points to names of non-excluded taxa */ |
|---|
| 55 | extern FILE *logFileFp; /* file pointer to log file */ |
|---|
| 56 | extern char logFileName[100]; /* name of the log file */ |
|---|
| 57 | extern int logToFile; /* should screen output be logged to a file */ |
|---|
| 58 | extern char manFileName[100]; /* name of man file */ |
|---|
| 59 | extern char matchId; /* mach character Id */ |
|---|
| 60 | extern int *matrix; /* matrix containing original data */ |
|---|
| 61 | extern int matrixHasPoly; /* flag for whether matrix has polymorphisms */ |
|---|
| 62 | extern int memAllocs[NUM_ALLOCS]; /* allocated memory flags */ |
|---|
| 63 | extern int mode; /* mode of program (interactive/noninteractive) */ |
|---|
| 64 | extern char **modelIndicatorParams; /* model indicator params */ |
|---|
| 65 | extern char ***modelElementNames; /* names for component models */ |
|---|
| 66 | extern MCMCMove **moves; /* vector of applicable moves */ |
|---|
| 67 | extern MoveType moveTypes[NUM_MOVE_TYPES]; /* holds information on the move types */ |
|---|
| 68 | extern char missingId; /* missing character Id */ |
|---|
| 69 | extern Tree **mcmcTree; /* pointers to mcmc trees */ |
|---|
| 70 | extern Model *modelParams; /* holds model params for partitions */ |
|---|
| 71 | extern ModelInfo *modelSettings; /* stores important info on model params */ |
|---|
| 72 | extern int nBitsInALong; /* number of bits in a SafeLong */ |
|---|
| 73 | extern Calibration *nodeCalibration; /* holds information about node calibrations */ |
|---|
| 74 | extern int noWarn; /* no warnings on overwriting files */ |
|---|
| 75 | extern int nPThreads; /* number of pthreads to use */ |
|---|
| 76 | extern int numActiveLocks; /* number of active, locked nodes */ |
|---|
| 77 | extern int numApplicableMoves; /* number of moves applicable to parameters */ |
|---|
| 78 | extern int numChar; /* number of characters in character matrix */ |
|---|
| 79 | extern int numCharSets; /* holds number of character sets */ |
|---|
| 80 | extern int numComments; /* number of nested comments */ |
|---|
| 81 | extern int numCompressedChars; /* number of compressed characters */ |
|---|
| 82 | extern int numCurrentDivisions; /* number of partitions of data */ |
|---|
| 83 | extern int numDefinedConstraints; /* number of constraints defined */ |
|---|
| 84 | extern enum ConstraintType *definedConstraintsType; /* Store type of constraint */ |
|---|
| 85 | extern int numDefinedPartitions; /* number of partitions defined */ |
|---|
| 86 | extern int numDefinedSpeciespartitions; /* number of species partitions defined */ |
|---|
| 87 | extern int numGlobalChains; /* number of global chains */ |
|---|
| 88 | extern int numLocalTaxa; /* number of non-excluded taxa */ |
|---|
| 89 | extern int numLocalChar; /* number of non-excluded characters */ |
|---|
| 90 | extern int numMoveTypes; /* the number of move types */ |
|---|
| 91 | extern int numOpenExeFiles; /* number of execute files open */ |
|---|
| 92 | extern int numParams; /* number of parameters in model */ |
|---|
| 93 | extern int numDivisions; /* number of current divisions */ |
|---|
| 94 | extern int numPrintParams; /* number of substitution model parameters to print */ |
|---|
| 95 | extern int numPrintTreeParams; /* number of tree model parameters to print */ |
|---|
| 96 | extern CLFlt *numSitesOfPat; /* no. sites of each pattern */ |
|---|
| 97 | extern int numSpecies; /* number of species in current speciespartition */ |
|---|
| 98 | extern int numTaxa; /* number of taxa in character matrix */ |
|---|
| 99 | extern int numTaxaSets; /* holds number of taxa sets */ |
|---|
| 100 | extern int numTopologies; /* number of topologies for one chain and state */ |
|---|
| 101 | extern int numTranslates; /* number of taxa in active translate block */ |
|---|
| 102 | extern int numTrees; /* number of trees for one chain and state */ |
|---|
| 103 | extern int numUserTrees; /* number of defined user trees */ |
|---|
| 104 | extern int *numVars; /* number of variables in setting arrays */ |
|---|
| 105 | extern int *origChar; /* index from compressed char to original char */ |
|---|
| 106 | extern int outGroupNum; /* number of outgroup taxon */ |
|---|
| 107 | extern ParmInfo paramTable[]; /* information on parameters */ |
|---|
| 108 | extern MrBFlt *paramValues; /* values of parameters */ |
|---|
| 109 | extern int **partitionId; /* holds information about defined partitions */ |
|---|
| 110 | extern char **partitionNames; /* hold names of partitions (first is "default") */ |
|---|
| 111 | extern MrBFlt *parameterValues; /* vector holding sump or plot parameters */ |
|---|
| 112 | extern Param *params; /* vector of parameters in model */ |
|---|
| 113 | extern int partitionNum; /* index of current partition */ |
|---|
| 114 | extern Plot plotParams; /* holds parameters for plot command */ |
|---|
| 115 | extern int precision; /* precision of samples and summary stats */ |
|---|
| 116 | extern int *printAncStates; /* divisions to print anc states for */ |
|---|
| 117 | extern int quitOnError; /* quit on error? */ |
|---|
| 118 | extern int readComment; /* should we read comment (looking for &)? */ |
|---|
| 119 | extern int readWord; /* should we read a word next? */ |
|---|
| 120 | extern ReassembleInfo reassembleParams; /* holds parameters for reassemble command */ |
|---|
| 121 | extern int replaceLogFile; /* should logfile be replace/appended to */ |
|---|
| 122 | extern SafeLong runIDSeed; /* seed used only for generating run ID [stamp] */ |
|---|
| 123 | extern SafeLong safeLongWithAllBitsSet; /* a SafeLong with all bits set, for bit ops */ |
|---|
| 124 | extern int setUpAnalysisSuccess; /* Set to YES if analysis is set without error */ |
|---|
| 125 | extern int scientific; /* use scientific format for samples ? */ |
|---|
| 126 | extern ShowmovesParams showmovesParams; /* holds parameters for Showmoves command */ |
|---|
| 127 | extern char spacer[10]; /* holds blanks for printing indentations */ |
|---|
| 128 | extern NameSet *speciesNameSets; /* hold species name sets, one for each speciespartition */ |
|---|
| 129 | extern int **speciespartitionId; /* holds info about defined speciespartitions */ |
|---|
| 130 | extern char **speciespartitionNames; /* hold names of speciespartitions (first is "default") */ |
|---|
| 131 | extern int speciespartitionNum; /* index of current species partition */ |
|---|
| 132 | extern char stamp[11]; /* holds a unique identifier for each analysis */ |
|---|
| 133 | extern SafeLong swapSeed; /* seed used only for determining which to swap */ |
|---|
| 134 | extern int state[MAX_CHAINS]; /* state of chain */ |
|---|
| 135 | extern MrBFlt *stdStateFreqs; /* std char state frequencies */ |
|---|
| 136 | extern int *stdType; /* compressed std char type: ord, unord, irrev */ |
|---|
| 137 | extern Sump sumpParams; /* holds parameters for sump command */ |
|---|
| 138 | extern char sumpToken[]; /* string holding a .p file token */ |
|---|
| 139 | extern char *sumpTokenP; /* pointer to a .p file token */ |
|---|
| 140 | extern Sumt sumtParams; /* holds parameters for sumt command */ |
|---|
| 141 | extern Sumss sumssParams; /* holds parameters for sumss command */ |
|---|
| 142 | extern char stamp[11]; /* holds a unique identifier for each analysis */ |
|---|
| 143 | extern int stdStateFreqsRowSize; /* row size for stdStateFreqs */ |
|---|
| 144 | extern int *sympiIndex; /* sympi state freq index for multistate chars */ |
|---|
| 145 | extern TaxaInformation *taxaInfo; /* holds critical information about taxa */ |
|---|
| 146 | extern char **taxaNames; /* holds name of taxa */ |
|---|
| 147 | extern char **taxaSetNames; /* holds names of taxa sets */ |
|---|
| 148 | extern SafeLong **taxaSet; /* holds information about defined taxasets */ |
|---|
| 149 | extern int *tempActiveConstraints; /* info on the active constraints in prset */ |
|---|
| 150 | extern int *tempLinkUnlink[NUM_LINKED]; /* for changing parameter linkage */ |
|---|
| 151 | extern int *tempLinkUnlinkVec; /* for changing parameter linkage */ |
|---|
| 152 | extern MrBFlt *tempNum; /* vector of numbers used for setting arrays */ |
|---|
| 153 | extern int *tempSet; /* temporarily holds defined character set */ |
|---|
| 154 | extern int theAmbigChar; /* int containing ambiguous character */ |
|---|
| 155 | extern int *tiIndex; /* compressed std char ti index */ |
|---|
| 156 | extern Calibration *tipCalibration; /* holds tip calibrations */ |
|---|
| 157 | extern char **transFrom; /* translation block information */ |
|---|
| 158 | extern char **transTo; /* translation block information */ |
|---|
| 159 | extern int userBrlensDef; /* are the branch lengths on user tree defined */ |
|---|
| 160 | extern int userLevel; /* the level of the user */ |
|---|
| 161 | extern PolyTree *userTree[]; /* array of user trees */ |
|---|
| 162 | extern char workingDir[100]; /* working directory */ |
|---|
| 163 | #if defined (BEAGLE_ENABLED) |
|---|
| 164 | extern int tryToUseBEAGLE; /* try to use the BEAGLE library */ |
|---|
| 165 | extern long beagleFlags; /* BEAGLE requirement flags */ |
|---|
| 166 | extern int* beagleResource; /* BEAGLE resource list */ |
|---|
| 167 | extern int beagleResourceCount; /* BEAGLE resource list length */ |
|---|
| 168 | extern int beagleInstanceCount; /* total number of BEAGLE instances */ |
|---|
| 169 | extern int beagleScalingScheme; /* BEAGLE dynamic scaling */ |
|---|
| 170 | extern int beagleScalingFrequency; /* BEAGLE rescaling frequency */ |
|---|
| 171 | extern int recalcScalers; /* shoud we recalculate scalers for one of divisions for current state YES/NO */ |
|---|
| 172 | #endif |
|---|
| 173 | #if defined (THREADS_ENABLED) |
|---|
| 174 | extern int tryToUseThreads; /* try to use pthreads with BEAGLE library */ |
|---|
| 175 | #endif |
|---|
| 176 | |
|---|
| 177 | /* Aamodel parameters */ |
|---|
| 178 | extern MrBFlt aaJones[20][20]; /* rates for Jones model */ |
|---|
| 179 | extern MrBFlt aaDayhoff[20][20]; /* rates for Dayhoff model */ |
|---|
| 180 | extern MrBFlt aaMtrev24[20][20]; /* rates for mtrev24 model */ |
|---|
| 181 | extern MrBFlt aaMtmam[20][20]; /* rates for mtmam model */ |
|---|
| 182 | extern MrBFlt aartREV[20][20]; /* rates for rtREV model */ |
|---|
| 183 | extern MrBFlt aaWAG[20][20]; /* rates for WAG model */ |
|---|
| 184 | extern MrBFlt aacpREV[20][20]; /* rates for aacpREV model */ |
|---|
| 185 | extern MrBFlt aaVt[20][20]; /* rates for VT model */ |
|---|
| 186 | extern MrBFlt aaBlosum[20][20]; /* rates for Blosum62 model */ |
|---|
| 187 | extern MrBFlt jonesPi[20]; /* stationary frequencies for Jones model */ |
|---|
| 188 | extern MrBFlt dayhoffPi[20]; /* stationary frequencies for Dayhoff model */ |
|---|
| 189 | extern MrBFlt mtrev24Pi[20]; /* stationary frequencies for mtrev24 model */ |
|---|
| 190 | extern MrBFlt mtmamPi[20]; /* stationary frequencies for mtmam model */ |
|---|
| 191 | extern MrBFlt rtrevPi[20]; /* stationary frequencies for rtREV model */ |
|---|
| 192 | extern MrBFlt wagPi[20]; /* stationary frequencies for WAG model */ |
|---|
| 193 | extern MrBFlt cprevPi[20]; /* stationary frequencies for aacpREV model */ |
|---|
| 194 | extern MrBFlt vtPi[20]; /* stationary frequencies for VT model */ |
|---|
| 195 | extern MrBFlt blosPi[20]; /* stationary frequencies for Blosum62 model */ |
|---|
| 196 | |
|---|
| 197 | #if defined (PRINT_RATEMULTIPLIERS_CPP) |
|---|
| 198 | extern FILE *rateMultfp; |
|---|
| 199 | #endif |
|---|
| 200 | |
|---|
| 201 | #if defined (MPI_ENABLED) |
|---|
| 202 | extern int proc_id; /* process ID (0, 1, ..., num_procs-1) */ |
|---|
| 203 | extern int num_procs; /* number of active processors */ |
|---|
| 204 | extern MrBFlt myStateInfo[7]; /* likelihood/prior/heat/ran/moveInfo vals of me */ |
|---|
| 205 | extern MrBFlt partnerStateInfo[7]; /* likelihood/prior/heat/ran/moveInfo vals of partner */ |
|---|
| 206 | #endif |
|---|
| 207 | |
|---|
| 208 | #if defined (FAST_LOG) |
|---|
| 209 | extern CLFlt scalerValue[]; |
|---|
| 210 | extern CLFlt logValue[]; |
|---|
| 211 | #endif |
|---|