// special conventions: // // * each external command ('itemmethod') runs in its separate directory under ~/.arb_tmp // * if sequences are exported ARB writes them in GenBank format into a tmpfile (e.g. sth like '/tmp/gde3170_0') // In 'itemmethod' every occurrence of 'TmpInputFile' (as specified at entry 'in:') is replaced by the name of that tempfile. // Some macros defined below expect that placeholder, i.e. always use 'TmpInputFile' for 'in:'! // * if sequences are (re-)imported, ARB prepares a temporary output-file. itemmethod shall use the placeholder 'TmpOutputFile' // to generate its content. Always use 'TmpOutputFile' for 'out:'. // Do not remove TmpOutputFile using RM_LOCAL_FILES. It is expected and will be removed by ARB_GDE (after command termination). // * 'arg:DISPLAY_FUNC' shall be a single command (to be chainable with && in itemmethod) // GOTO_LOCAL_DIR and RM_LOCAL_FILES need to be used on top-script level // (opening sub-shells might change value of $$) #define GOTO_LOCAL_DIR mkdir -p ~/.arb_tmp/$$; cd ~/.arb_tmp/$$ #define RM_LOCAL_FILES(FILES) GOTO_LOCAL_DIR ; cd .. ; rm -rf $$ #define GENERATE(OUTFILE,FORMAT) arb_convert_aln --arb-notify -GenBank TmpInputFile -FORMAT OUTFILE #define GEN_PHYLIP(OUTFILE) GENERATE(OUTFILE,phylip) #define GEN_FASTDNAML(OUTFILE) GENERATE(OUTFILE,fastdnaml) #define GEN_NEXUS(OUTFILE) GENERATE(OUTFILE,NEXUS) #define TEE_TO(cmd,log) ( cmd 2>&1 ) | tee log #define RUN_IN_WINDOW_TO_LOG(cmd,log) ${ARB_XCMD} bash -x -c @@LD_LIBRARY_PATH="${ARB_LIBRARY_PATH:-/usr/arb/lib}";export LD_LIBRARY_PATH; TEE_TO(cmd,log); arb_wait@@ #define RUN_IN_WINDOW(cmd) RUN_IN_WINDOW_TO_LOG(cmd,win_$AGDE_JOBID.log); arb_catlog win_$AGDE_JOBID.log // Note: @@ will result in a single quote. see ../ARB_GDE/GDE_ParseMenu.cxx@WHY_USE_DOUBLE_AT // $AGDE_JOBID differs between calls and gets derived from item-entry #define STOP_ON_FAILURE(WHAT_FAILED) (arb_message "Error running WHAT_FAILED (inspect console for details)";false) // intended use '( command || STOP_ON_FAILURE(command-description)) && ( dependent-command || STOP_ON_FAILURE(dependent-command-description) && ...)' #include // ---------------------------------------- menu:Export menumeta: E #include // ---------------------------------------- menu:Print menumeta: r #include #include // ---------------------------------------- menu:Import menumeta:I #include // ---------------------------------------- menu:Align menumeta:A #include // ---------------------------------------- menu:SAI menumeta:S #include // ---------------------------------------- menu:Incremental phylogeny menumeta:c #include // ---------------------------------------- menu:Phylogeny Distance Matrix menumeta:D #include #include // ---------------------------------------- menu:Phylogeny max. parsimony menumeta:p #include // ---------------------------------------- menu:Phylogeny max. Likelihood EXP menumeta:X #include // ---------------------------------------- menu:Phylogeny max. Likelihood menumeta:L #define RAXML_NUC #include #undef RAXML_NUC #include #define PHYML_NUC #include #undef PHYML_NUC #include #include #include #include // ---------------------------------------- menu:Phylogeny (Other) menumeta:O #define FASTTREE_NUC #include #undef FASTTREE_NUC #include #include #include #include // ---------------------------------------- // custom menu 'User' is loaded into 'Tools'-menu // (has no members by default; meant to be used from custom .menu definitions) menu:User menumeta:U