⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fastdnaml_funcs.h

📁 fastDNAml is an attempt to solve the same problem as DNAML, but to do so faster and using less memo
💻 H
字号:
#ifndef  FASTDNAML_FUNCS_H#define  FASTDNAML_FUNCS_H#ifndef  FASTDNAML_TYPES_H#include fastDNAml_types.h#endif/* * -------------------------  Function Declarations  --------------------------- */void  exit();/*#if  ANSI || MALLOC_VOID   void *malloc();#else   char *malloc();#endif*/#define  Malloc(x)  malloc((unsigned) (x))       /* BSD *//* #define  Malloc(x)  malloc((size_t) (x)) */   /* System V */#define    Free(x)  (void) free((char *) (x))    /* BSD *//* #define Free(x)  free((void *) (x))      */   /* System V *//*  master.c  */boolean  sendTree(tree *treestr);boolean  getReturnedTrees (tree *tr, bestlist *bt, int num_to_get);void     end_it_all(int errcode);/* comm_xxx.c */void     process_init(int argc, char **argv, proc_data *pp);int      spawn(char *task, int ntask, char *where);void     bail(char *source, int err_code);void     probe_msg(int *from, int *type); void     iprobe_msg(int *from, int *type); void     send_msg(void *buf, int size, int dest, int type);void     recv_msg(void *buf, int size, int from, int type);/* best_tree.c */void     *tipValPtr (nodeptr p);int      cmpTipVal (void *v1, void *v2);topol    *setupTopol (int maxtips, int nsites);void     freeTopol (topol *tpl);int      saveSubtree (nodeptr p, topol *tpl);nodeptr  minSubtreeTip (nodeptr  p0);nodeptr  minTreeTip (nodeptr  p);void     saveTree (tree *tr, topol *tpl);void     copyTopol (topol *tpl1, topol *tpl2);boolean  restoreTree (topol *tpl, tree *tr);int      initBestTree (bestlist *bt, int newkeep, int numsp, int sites);int      resetBestTree (bestlist *bt);boolean  freeBestTree(bestlist *bt);int      cmpSubtopol (connptr p10, connptr p1, connptr p20, connptr p2);int      cmpTopol (void *tpl1, void *tpl2);int      cmpTplScore (void *tpl1, void *tpl2);int      findInList (void *item, void *list[], int n, int (*cmpFunc)());int      findTreeInList (bestlist *bt, tree *tr);int      saveBestTree (bestlist *bt, tree *tr);int      startOpt (bestlist *bt, tree *tr);int      setOptLevel (bestlist *bt, int opt_level);int      recallBestTree (bestlist *bt, int rank, tree *tr);/* fastDNAml.c */boolean  whitechar (int ch);boolean  linkdata2tree (rawdata *rdta, cruncheddata *cdta, tree *tr);xarray   *setupxarray (int npat);boolean  linkxarray (int req, int min, int npat,xarray **freexptr,                     xarray **usedxptr);boolean  setupnodex (tree *tr);xarray   *getxtip (nodeptr p);xarray   *getxnode (nodeptr p);boolean  newview (tree *tr, nodeptr p);double   evaluate (tree *tr, nodeptr p);double   makenewz (tree *tr, nodeptr p, nodeptr q, double z0, int maxiter);boolean  update (tree *tr, nodeptr p);boolean  smooth (tree *tr, nodeptr p);boolean  smoothTree (tree *tr, int maxtimes);boolean  localSmooth (tree *tr, nodeptr p, int maxtimes);void     hookup (nodeptr p, nodeptr q, double z);boolean  insert (tree *tr, nodeptr p, nodeptr q, boolean glob);nodeptr  removeNode (tree *tr, nodeptr p);boolean  initrav (tree *tr, nodeptr p);nodeptr  buildNewTip (tree *tr, nodeptr p);boolean  buildSimpleTree (tree *tr, int ip, int iq, int ir);void     cacheZ (tree *tr);void     restoreZ (tree *tr);boolean  testInsert (tree *tr, nodeptr p, nodeptr q, bestlist *bt, boolean  fast);int      addTraverse (tree *tr, nodeptr p, nodeptr q, int mintrav, int maxtrav,                      bestlist *bt, boolean fast);int      rearrange (tree *tr, nodeptr p, int mintrav, int maxtrav, bestlist *bt);node     *findAnyTip(nodeptr p);boolean  optimize (tree *tr, int maxtrav, bestlist *bt);nodeptr  uprootTree (tree *tr, nodeptr p);boolean  treeEvaluate (tree *tr, bestlist *bt);boolean  showBestTrees (bestlist *bt, tree *tr, analdef *adef, FILE *treefile);boolean  cmpBestTrees (bestlist *bt, tree *tr);boolean  makeUserTree (FILE *seqfp, tree *tr, bestlist *bt, analdef *adef);boolean  makeDenovoTree (FILE *seqfp, tree *tr, bestlist *bt, analdef *adef);/*  input_seq_data.c  */void     hang(char *msg);boolean  getnums (FILE *infile, rawdata *rdta);boolean  inputboot(FILE *infile, analdef *adef);boolean  inputcategories (FILE *infile, rawdata *rdta);boolean  inputextra (FILE *infile, analdef *adef);boolean  inputfreqs (FILE *infile, rawdata *rdta);boolean  inputglobal (FILE *infile, tree *tr);boolean  inputjumble (FILE *infile, analdef *adef);boolean  inputkeep (FILE *infile, analdef *adef);boolean  inputoutgroup (FILE *infile, analdef *adef, tree *tr);boolean  inputratio (FILE *infile, rawdata *rdta);boolean  inputtreeopt (FILE *infile, analdef *adef);boolean  inputweights (FILE *infile, analdef *adef, rawdata *rdta,                       cruncheddata *cdta);boolean  getoptions (FILE *infile, analdef *adef, rawdata *rdta,                     cruncheddata *cdta, tree *tr);boolean  getbasefreqs (FILE *infile, rawdata *rdta);boolean  getyspace (rawdata *rdta);boolean  setupTree (tree *tr, int nsites);void     freeTreeNode (nodeptr p);void     freeTree (tree *tr);boolean  getdata (FILE *infile, analdef *adef, rawdata *rdta, tree *tr);boolean  getntrees (FILE *infile, analdef *adef);boolean  getinput (FILE *seqfp, analdef *adef, rawdata *rdta, cruncheddata *cdta,                   tree *tr);/*  print_tree.c  */void     drawline (tree *tr, int i, double scale);void     printTree (tree *tr, analdef *adef);double   sigma (tree *tr, nodeptr p, double *sumlrptr);void     describe (tree *tr, nodeptr p);void     summarize (tree *tr);/*  file_util.c  */int      treeFinishCom (FILE *fp, char **strp);int      treeGetCh (FILE *fp);boolean  treeGetLabel (FILE *fp, char *lblPtr, int maxlen);boolean  treeFlushLabel (FILE *fp);int      treeFindTipName (FILE *fp, tree *tr);void     treeEchoContext (FILE *fp1, FILE *fp2, int n);boolean  treeProcessLength (FILE *fp, double *dptr);boolean  treeFlushLen (FILE  *fp);boolean  treeNeedCh (FILE *fp, int c1, char *where);boolean  addElementLen (FILE *fp, tree *tr, nodeptr p);int      saveTreeCom (FILE *fp, char  **comstrp);boolean  processTreeCom (FILE *fp, tree *tr);boolean  treeReadLen (FILE *fp, tree *tr);/*  str_util.c  */int      str_treeFinishCom (char **treestrp, char **strp);int      str_treeGetCh (char **treestrp);boolean  readKeyValue (char *string, char *key, char *format, void *value);boolean  treeLabelEnd (int ch);boolean  str_treeGetLabel (char **treestrp, char *lblPtr, int maxlen);boolean  str_treeFlushLabel (char **treestrp);int      treeFindTipByLabel (char  *str, tree *tr);int      str_treeFindTipName (char **treestrp, tree *tr);/*int      str_treeFindTipName (char **treestrp, tree *tr, int ch);*/boolean  str_treeProcessLength (char **treestrp, double *dptr);boolean  str_treeFlushLen (char **treestrp);boolean  str_treeNeedCh (char **treestrp, int c1, char *where);boolean  str_addElementLen (char **treestrp, tree *tr, nodeptr p);double   str_readTreeLikelihood (char *treestr);boolean  str_processTreeCom(tree *tr, char **treestrp);boolean  str_treeReadLen (char *treestr, tree *tr);/*  wgts_categs.c  */void     makeboot (analdef *adef, rawdata *rdta, cruncheddata *cdta);void     sitesort (rawdata *rdta, cruncheddata *cdta);void     sitecombcrunch (rawdata *rdta, cruncheddata *cdta);boolean  makeweights (analdef *adef, rawdata *rdta, cruncheddata *cdta);boolean  makevalues (rawdata *rdta, cruncheddata *cdta);boolean  empiricalfreqs (rawdata *rdta, cruncheddata *cdta);void     reportfreqs (analdef *adef, rawdata *rdta);/*  write_tree_string.c  */char     *treeString (char *treestr, tree *tr, nodeptr p, int form);void     treeOut (FILE *treefile, tree *tr, int form);/*  utilities.c  */int      get_args(int argc, char *argv[], boolean print_usage);boolean  digitchar(int ch);boolean  white(int ch);void     uppercase(int *chptr);int      base36(int ch);int      itobase36(int i);int      findch(FILE *infile, int c);double   randum (long  *seed);void     make_filename(char *fn, char *dir, char *run_id, char *ext, int id);double   dwalltime00(void);void     record_times(stat_data*);#endif  /* FASTDNAML_FUNCS_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -