source: trunk/GDEHELP/MENUS/mrbayes.menu

Last change on this file was 18823, checked in by westram, 3 years ago
  • split menufile for treepuzzle, mrbayes and fasttree.
  • add separators for readability.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.9 KB
Line 
1
2#define PREPARE_MRBAYES_INFILE(INFILE) \
3        ( \
4                arb_sed -i '/LABELPOS/d' INFILE     `#MrBayes does not understand the LABELPOS command, therefore it is removed.` && \
5                arb_sed -i '/EQUATE/d' INFILE       `#MrBayes does not support EQUATE macros, remove them.` && \
6                arb_sed -i '/OPTIONS/,/;/d' INFILE  `#MrBayes does not support the OPTIONS block, remove it. (delete everything between OPTIONS and ';')` \
7        )
8
9#define NEXUS2NEWICK(FROM,APPENDTO) ($ARBHOME/bin/arb_nexus2newick.awk FROM >> APPENDTO || STOP_ON_FAILURE(arb_nexus2newick))
10
11item:MrBayes
12itemmeta:B
13seqtype:*
14itemmethod:(GOTO_LOCAL_DIR; \
15            GEN_NEXUS(mrbayes_in) && \
16            PREPARE_MRBAYES_INFILE(mrbayes_in) && \
17            ( \
18                `# append the mrbayes command block to the nexus file`; \
19                COMMAND="begin mrbayes; \
20                         set autoclose=yes nowarn=yes; \
21                         lset nst=$NST rates=$RATES ngammacat=$NGAMMACAT; \
22                         mcmc ngen=$NGEN nchains=$NCHAINS temp=$TEMP samplefreq=$SAMPLEFREQ burninfrac=$BURNINFRAC; \
23                         sump; \
24                         sumt Outputname=mrbayes_out Conformat=simple; \
25                     end;" \
26                && echo $COMMAND >> mrbayes_in; \
27            ) && \
28            RUN_IN_WINDOW(( ($ARBHOME/bin/mb mrbayes_in || STOP_ON_FAILURE(MrBayes)) && \
29                            NEXUS2NEWICK(mrbayes_out.con.tre,mr_bayes_out.newick) && \
30                            $DISPLAY_FUNC));)&
31
32itemhelp:MrBayes.help
33
34arg:DISPLAY_FUNC
35argtype:choice_menu
36arglabel:What to do with the tree?
37argchoice:Load into ARB ('tree_mrBayes_//'):$ARBHOME/bin/arb_read_tree tree_mrbayes_$$ mr_bayes_out.newick "PRG=MrBayes FILTER=$FILTER RATE=$RATES"
38argchoice:Treetool:treetool mr_bayes_out.newick
39
40arg:NST
41argtype:choice_menu
42arglabel:Number of substitution types
43argchoice:6:6
44argchoice:mixed:mixed
45argchoice:1:1
46argchoice:2:2
47
48arg:RATES
49argtype:choice_menu
50arglabel:Model for among-site rate variation
51argchoice:A proportion of the sites are invariable:propinv
52argchoice:No rate variation across sites:equal
53argchoice:Gamma-distributed rates across sites:gamma
54argchoice:Autocorrelated rates across sites:adgamma
55argchoice:Mixed invariable/gamma:invgamma
56
57
58arg:NGAMMACAT
59argtype:text
60arglabel:Number of rate categories for the gamma distribution\n(Range [0 .. n])
61argtext:4
62
63arg:NGEN
64argtype:text
65arglabel:Number of cycles for the MCMC algorithm
66argtext:100000
67
68arg:NCHAINS
69argtype:text
70arglabel:Number of chains
71argtext:4
72
73arg:TEMP
74argtype:text
75arglabel:Temperature parameter for heating the chains
76argtext:0.5
77
78arg:SAMPLEFREQ
79argtype:text
80arglabel:Markov chain sample frequency
81argtext:500
82
83arg:BURNINFRAC
84argtype:text
85arglabel:Fraction of samples that will be discarded\nwhen convergence diagnostics are calculated [0..1]
86argtext:0.25
87
88
89in:TmpInputFile
90informat:genbank
91insave:
92
93//------------------------------------------------------------------------------------------
94
95
96item:MrBayes (custom)
97itemmeta:c
98seqtype:*
99itemmethod:(GOTO_LOCAL_DIR; \
100            GEN_NEXUS(mrbayes_in) && \
101            PREPARE_MRBAYES_INFILE(mrbayes_in) && \
102            ( \
103                `# append the mrbayes command block to the nexus file`; \
104                cat $COMMAND_FILE >> mrbayes_in; \
105            ) && \
106            RUN_IN_WINDOW(( ($ARBHOME/bin/mb mrbayes_in || STOP_ON_FAILURE(MrBayes)) && \
107                            NEXUS2NEWICK(mrbayes_out.con.tre,mr_bayes_out.newick) && \
108                            $DISPLAY_FUNC)))&
109
110itemhelp:MrBayesCustom.help
111
112arg:DISPLAY_FUNC
113argtype:choice_menu
114arglabel:What to do with the tree?
115argchoice:Load into ARB ('tree_mrBayes_//'):$ARBHOME/bin/arb_read_tree tree_mrbayes_$$ mr_bayes_out.newick "PRG=MrBayes(custom) FILTER=$FILTER RATE=$RATES"
116argchoice:Treetool:treetool mr_bayes_out.newick
117
118arg:COMMAND_FILE
119argtype:filename
120arglabel:MrBayes command file
121
122in:TmpInputFile
123informat:genbank
124insave:
125
Note: See TracBrowser for help on using the repository browser.