MrBayes on the SCS Condor cluster (Standard universe)
Prepare a MrBayes batch file
Before we start pratice MrBayes on condor, it is usful to set up a directory to work in it. You need to konw three simple terminal commands: mkdir, cd ,and cp. If you have program with them, use
man mkdir ,
man cd ,
man cp to study it fist.
Now creat a directory called
condor_dir in your home directory. Go to that directory and creat another directory called
mb. (omit this step if they already exsit.)
Download the MrBayes example data file and save it as "primates.nex" to your
mb directory. Go to
mb directory and create a new directoy call
mb_1_standard. Copy the example data file to
mb_1_standard directoy. To see the contents of the file, use
cat primates.nex ". This is the structure you will see:
#NEXUS
begin data;
dimensions ntax=12 nchar=898;
format datatype=dna interleave=no gap=-;
matrix
Tarsius_syrichta AAGTTTCATTGGAGCCACCACTCTTATAATTG......
Lemur_catta AAGCTTCATAGGAGCAACCATTCTAATAATCG......
Homo_sapiens AAGCTTCACCGGCGCAGTCATTCTCATAATCG......
Pan AAGCTTCACCGGCGCAATTATCCTCATAATCG......
Gorilla AAGCTTCACCGGCGCAGTTGTTCTTATAATTG......
Pongo AAGCTTCACCGGCGCAACCACCCTCATGATTG......
Hylobates AAGCTTTACAGGTGCAACCGTCCTCATAATCG......
Macaca_fuscata AAGCTTTTCCGGCGCAACCATCCTTATGATCG......
M_mulatta AAGCTTTTCTGGCGCAACCATCCTCATGATTG......
M_fascicularis AAGCTTCTCCGGCGCAACCACCCTTATAATCG......
M_sylvanus AAGCTTCTCCGGTGCAACTATCCTTATAGTTG......
Saimiri_sciureus AAGCTTCACCGGCGCAATGATCCTAATAATCG......
;
end;
Download a copy of the sample data file
here.
The commands used to run a specific analysis are kept in a separate NEXUS file, which will reference the data set given above.
begin mrbayes;
execute [name of data-file];
[remaining commands.....];
end;
Let's pratice to add MrBayes batch after data block. Open the example data file with your favorite editor(vi, pico or notepad). Add the fellowings to the data file after the 'data' block.
%BLUE%
begin mrbayes;
[to ensure that !MrBayes does not stop during an analysis to wait for confirmation from the user]
set autoclose=yes nowarn = yes ;
[ set the evolutionary model to the GTR model with gamma-distributed rate variation across sites]
lset nst = 6 rates = gamma;
[ ensure you get at least 1,000 samples from the posterior probability distribution]
mcmcp ngen =10000 samplefreq = 10;
[begin to ran MrBayes]
mcmc;
[summarize the parameter values]
sump burnin = 250;
[summarize the trees]
sumt burnin = 250;
[quit automatically when the analysis is done]
quit;
end;
%ENDCOLOR%
download the data file with MrBayes block added primates_mbbatch.nex
Or you can edit MrBayes block in a separate file ;
#nexus;
begin mrbayes;
[to ensure that !MrBayes does not stop during an analysis to wait for confirmation from the user]
set autoclose=yes nowarn = yes ;
[tell !MrBayes the data file name]
execute primates.nex;
[ set the evolutionary model to the GTR model with gamma-distributed rate variation across sites]
lset nst = 6 rates = gamma;
[ ensure you get at least 1,000 samples from the posterior probability distribution]
mcmcp ngen =10000 samplefreq = 10;
[begin to ran MrBayes]
mcmc;
[summarize the parameter values]
sump burnin = 250;
[summarize the trees]
sumt burnin = 250;
[quit automatically when the analysis is done]
quit;
end;
download batch block file only_mbblock.nex

Tips
There is good manual and other resources on how to use MrBayes at
MrBayes websits .
The most often used commands are listed below.
help - used to a list of the commands availbel.
- help is used to see the help information for that command as well as a
description of the listed command.
lset - used to define the structure of the model.
prset - used to define probability distributions on the parameters of the model.
showmodel - used to check the current model.
mcmcp - used to set up the analysis.
mcmc - used to start the analysis.
sump - used to summarize samples of substitution model parameters.
sumt - used to summarize samples of trees and branch lengths

Tips
This example is simple. But I still have a suggestion for you. You would better to run it locally(not on Condor) first before you submit your job to Condor. If it crashes, then check the problem first. Don't wait Condor to terminate your job abnormally to check your problem.
In petal cluster, MrBayes (which hasn't been relinked against condor) is also installed. You can use the command "mb primates_mbbatch.nex" and "mb only_mbbatch.nex" to test whether it can run correctly or not. Then you can use "ctrl+c" to terminate it and delete all the files MrBayes just creates. If there is no crash or other problems, then run it on condor.
Create a submit file
Now you can create a condor submit description file. If you have general questions about how to create a condor submit description file, please refer to the
UsingCondor Tutorial.
########################################
#
# a simple MrBayes job on condor standard universe
#
#########################################
Universe = standard
# standard universe is default one. You can omit it
Executable = /usr/common/i686-linux/bin/condor_mb
# Use command "which condor_mb" to find out the path of "condor_mb"
Arguments = primates_mbbatch.nex
output = primates_mbbatch.output
error = primates_mbbatch.error
log = primates_mbbatch.log
Queue
# If you edit MrBayes block in a separate file, the submit description file is like below
# Universe = standard
# Executable = /usr/common/i686-linux/bin/condor_mb
# Arguments = only_mbbatch.nex
# output = only_mbbatch.output
# error = only_mbbatch.error
# log = only_mbbatch.log
# Queue
download submit description file mb_1_standard.submit
5) submit your job and manage it
Use condor_submit command to submit your job and use condor_q, condor_rm etc to manage your job.
| [yanfeng@petal017 mb_1_standard]$ condor_submit mb_1_standard.submit |
Submitting job(s).
Logging submit event(s).
1 job(s) submitted to cluster 56888.
| [yanfeng@petal017 mb_1_standard]$ condor_q yanfeng |
-- Submitter: petal017.csit.fsu.edu : <144.174.160.147:10076> : petal017.csit.fsu.edu
ID OWNER SUBMITTED RUN_TIME ST PRI SIZE CMD
56888.0 yanfeng 5/25 21:14 0+00:00:00 I 0 4.3 condor_mb primates
1 jobs; 1 idle, 0 running, 0 held
| [yanfeng@petal017 mb_1_standard]$ ls -l |
total 237
-rw-rw-r-- 1 yanfeng student 776 May 25 21:13 mb_1_standard.submit [submit description file]
-rw-rw-r-- 1 yanfeng student 615 May 25 21:12 only_mbbatch.nex [MrBayes batch block]
-rw-rw-r-- 1 yanfeng student 0 May 25 22:35 primates_mbbatch.error [condor error file]
-rw-rw-r-- 1 yanfeng student 638 May 25 22:44 primates_mbbatch.log [condor log file]
-rw-r--r-- 1 yanfeng student 11711 May 25 22:33 primates_mbbatch.nex [data file with batch block]
-rw-r--r-- 1 yanfeng student 434 May 25 22:44 primates_mbbatch.nex.con [contain two consenses trees]
-rw-r--r-- 1 yanfeng student 121311 May 25 22:44 primates_mbbatch.nex.p [samples of subtitution model parameters]
-rw-r--r-- 1 yanfeng student 958 May 25 22:44 primates_mbbatch.nex.parts [contain list of taxon bipartitions,
their posterior probability and the branch lengths]
-rw-r--r-- 1 yanfeng student 67270 May 25 22:44 primates_mbbatch.nex.t [samples of trees and branch lengths]
-rw-r--r-- 1 yanfeng student 903 May 25 22:44 primates_mbbatch.nex.trprobs [contain the trees found during the MCMC search]
-rw-rw-r-- 1 yanfeng student 22911 May 25 22:44 primates_mbbatch.output [condor output file]
-rw-r--r-- 1 yanfeng student 11052 May 25 20:39 primates.nex [the original data file]
You can open log file to check the status of your job.
cat primates_mbbatch.log
000 (56891.000.000) 05/25 22:35:15 Job submitted from host: <144.174.160.147:10076>
...
001 (56891.000.000) 05/25 22:43:06 Job executing on host: <144.174.160.207:32772>
...
005 (56891.000.000) 05/25 22:44:19 Job terminated.
(1) Normal termination (return value 1)
Usr 0 00:01:12, Sys 0 00:00:00 - Run Remote Usage
Usr 0 00:00:00, Sys 0 00:00:00 - Run Local Usage
Usr 0 00:01:12, Sys 0 00:00:00 - Total Remote Usage
Usr 0 00:00:00, Sys 0 00:00:00 - Total Local Usage
218475 - Run Bytes Sent By Job
4997905 - Run Bytes Received By Job
218475 - Total Bytes Sent By Job
4997905 - Total Bytes Received By Job
...
It means that condor finished your job.
more simple examples
example, run two MrBayes jobs
Suppose you want to run MrBayes twice (or more) with the same or different parameters to compare the rersults. You can write them in a submit description file and arrange your jobs run at different cluster nodes.
Go to
mb directory and creat another directory called
mb_2_standard. Copy the example data file "primates_mbbatch.nex" to the new directory. Let us use the same parameters and run it twice. You can put the MrBayes block in a seperate file. Here we only show the way to add MrBayes block in the data file.
1) get two copies of the data file with MrBayes batch block.
| [yanfeng@petal017 mb_2_standard]$ cp primates_mbbatch.nex primates_mbbatch_1.nex |
| [yanfeng@petal017 mb_2_standard]$ cp primates_mbbatch.nex primates_mbbatch_2.nex |
2) Your submitdescription file should like this (file name mb_2_standard.submit)
####################################################
#
# example, run two MrBayes jobs on condor standard universe
#
#####################################################
Universe = standard
# standard universe is default one. You can omit it
Executable = /usr/common/i686-linux/bin/condor_mb
Arguments = primates_mbbatch_1.nex
output = primates_mbbatch_1.output
error = primates_mbbatch_1.error
log = primates_mbbatch_1.log
Queue
Arguments = primates_mbbatch_2.nex
output = primates_mbbatch_2.output
error = primates_mbbatch_2.error
log = primates_mbbatch_2.log
Queue
download here mb_2_standard.submit
3) You can use
condor_q yourusername to check the stauts of your job.
| [yanfeng@petal017 mb_2_standard]$ condor_q yanfeng |
-- Submitter: petal017.csit.fsu.edu : <144.174.160.147:10076> : petal017.csit.fsu.edu
ID OWNER SUBMITTED RUN_TIME ST PRI SIZE CMD
56892.0 yanfeng 5/25 22:47 0+00:00:00 I 0 4.3 condor_mb primates
56892.1 yanfeng 5/25 22:47 0+00:00:00 I 0 4.3 condor_mb primates
2 jobs; 2 idle, 0 running, 0 held
After it is finished, use
ls -l to check your files in your directory.
| [yanfeng@petal017 mb_2_standard]$ ls -l |
total 460
-rw-rw-r-- 1 yanfeng student 614 May 25 22:21 mb_2_standard.submit
-rw-rw-r-- 1 yanfeng student 0 May 26 10:32 primates_mbbatch_1.error
-rw-rw-r-- 1 yanfeng student 637 May 26 10:42 primates_mbbatch_1.log
-rw-r--r-- 1 yanfeng student 11706 May 26 10:31 primates_mbbatch_1.nex
-rw-r--r-- 1 yanfeng student 434 May 26 10:42 primates_mbbatch_1.nex.con
-rw-r--r-- 1 yanfeng student 121691 May 26 10:42 primates_mbbatch_1.nex.p
-rw-r--r-- 1 yanfeng student 958 May 26 10:42 primates_mbbatch_1.nex.parts
-rw-r--r-- 1 yanfeng student 67270 May 26 10:42 primates_mbbatch_1.nex.t
-rw-r--r-- 1 yanfeng student 903 May 26 10:42 primates_mbbatch_1.nex.trprobs
-rw-rw-r-- 1 yanfeng student 22923 May 26 10:42 primates_mbbatch_1.output
-rw-rw-r-- 1 yanfeng student 0 May 26 10:32 primates_mbbatch_2.error
-rw-rw-r-- 1 yanfeng student 638 May 26 10:42 primates_mbbatch_2.log
-rw-r--r-- 1 yanfeng student 11703 May 26 10:32 primates_mbbatch_2.nex
-rw-r--r-- 1 yanfeng student 434 May 26 10:42 primates_mbbatch_2.nex.con
-rw-r--r-- 1 yanfeng student 121451 May 26 10:42 primates_mbbatch_2.nex.p
-rw-r--r-- 1 yanfeng student 896 May 26 10:42 primates_mbbatch_2.nex.parts
-rw-r--r-- 1 yanfeng student 67270 May 26 10:42 primates_mbbatch_2.nex.t
-rw-r--r-- 1 yanfeng student 699 May 26 10:42 primates_mbbatch_2.nex.trprobs
-rw-rw-r-- 1 yanfeng student 22923 May 26 10:42 primates_mbbatch_2.output
-rw-r--r-- 1 yanfeng student 11052 May 25 22:10 primates.nex

Tips
Here we give one output file, one error file and one log file for every queue with different names. We also can give all queues only one shared output file, one shared error file and one shared log file. In these shared files, they record the process of all queues. Then the submit description file will like below (file name mb_2_standard_share.submit).
########################################
#
# example, run two MrBayes jobs on condor standard universe
#
#########################################
Universe = standard
# standard universe is default one. You can omit it
Executable = /usr/common/i686-linux/bin/condor_mb
output = primates_mbbatch.output.$(Process)
error = primates_mbbatch.error.$(Process)
log = primates_mbbatch.log
Arguments = primates_mbbatch_1.nex
Queue
Arguments = primates_mbbatch_2.nex
Queue
download here mb_2_standard_share.submit
Or you may want the same name for output file name,error file name, and log file name and MrBayes result files.Then you need to creat two directory (let us call it batch_1 and batch_2) with command "
mkdir batch-1 batch_2 " and move your data files there (rename it to the file name) with command "
mv primates_mbbatch_1.nex ./batch_1/primates_mbbatch.nex " and "
mv primates_mbbatch_2.nex ./batch_1/primates_mbbatch.nex ". Change your submit description file something like below.
########################################
#
# example, run two MrBayes jobs on condor standard universe
#
#########################################
Universe = standard
# standard universe is default one. You can omit it
Executable = /usr/common/i686-linux/bin/condor_mb
output = primates_mbbatch.output
error = primates_mbbatch.error
log = primates_mbbatch.log
InitialDir =./batch_1
Arguments = primates_mbbatch.nex
Queue
InitialDir =./batch_2
Arguments = primates_mbbatch.nex
Queue
download here mb_2_std.submit
more realistic examples
analyze the mixed data set
1)data set and mrbayes block
Data from Nylander 2004. Systematic Biology 53:47-67 with a little modification.
In this example, you will see how to set up an analysis of the a combinded data set.
#NEXUS
[This is an example of a mixed data set]
[Data from Nylander, J., F. Ronquist, J. P. Huelsenbeck and J. L. Nieves-Aldrey. 2004. Bayesian phylogenetic analysis of combined data. Systematic Biology 53:47-67.]
You can find it in the package of the MrBayes or download below.
begin data;
dimensions ntax=32 nchar=3246;
[Note the specification of the mixed data type. This is a MrBayes-specific extension to the Nexus standard.]
format datatype=mixed(Standard:1-166,DNA:167-3246) interleave=yes gap=- missing=?;
matrix
....
[four genes (COI,EF1a,LWRh,28S) and morphology for 30 taxa of gall wasps and outgroups.]
;
end;
begin mrbayes;
[This block sets up several different partitions that could be used in the analysis
of this dataset. Note that Ibalia is selected as the outgroup; the default outgroup
is the first taxon in the matrix.]
outgroup Ibalia;
charset morphology = 1-166;
charset molecules = 167-3246;
charset COI = 167-1244;
charset EF1a = 1245-1611;
charset LWRh = 1612-2092;
charset 28S = 2093-3246;
partition Names = 5: morphology, COI, EF1a, LWRh, 28S;
set partition=Names;
[come from MrBayes 3.1 Manual with a litter modification]
log start filename=cynmix_mb.log;
set autoclose=yes nowarn = yes ;
[The following lines set up a model in which all four genes have their unique GTR + gamma
+ proportion of invariable sites model]
lset applyto=(2,3,4,5) nst=6 rates=invgamma;
[Unless the parameters are explicitly unlinked, they will be shared across partitions.
The unlink command is used to unlink the parameters.]
unlink shape=(all) pinvar=(all) statefreq=(all) revmat=(all);
[Gamma-shaped rate variation for the morphological data]
lset applyto=(1) rates=gamma;
[The following line allows rates to vary across partitions]
prset applyto=(all) ratepr=variable;
[Set number of generation to 1000 and sample frequence to 10.Use 1 cold chain and 3 heat chains(4 in total).Save branch length.]
mcmcp ngen=1000 samplefreq=10 nchains=4 savebrlens=yes;
mcmc;
[summarize the smaples of the substitution model parameters]
sump burnin=25;
[summarize the smaples of trees and branch lengths]
sumt burnin=25;
quit;
end;
download here cynmix.nex
2) condor submit description file
#################
#
# MrBayes partition data analysis
#
#################
Universe = standard
Executable = /usr/common/i686-linux/bin/condor_mb
Arguments = cynmix.nex
output = cynmix_condor.output
error = cynmix_condor.error
log = cynmix_condor.log
Queue
download here mb_cynmix.submit
3) use condor_q username , ls_l, and cat command to check your result
| [yanfeng@petal017 mixed]$ condor_q yanfeng |
-- Submitter: petal017.csit.fsu.edu : <144.174.160.147:10076> : petal017.csit.fsu.edu
ID OWNER SUBMITTED RUN_TIME ST PRI SIZE CMD
56973.0 yanfeng 5/30 13:28 0+00:00:00 I 0 4.3 condor_mb cynmix.n
1 jobs; 1 idle, 0 running, 0 held
| [yanfeng@petal017 mixed]$ ls_l |
total 358
-rw-rw-r-- 1 yanfeng student 0 May 30 13:28 cynmix_condor.error
-rw-rw-r-- 1 yanfeng student 637 May 30 13:44 cynmix_condor.log
-rw-rw-r-- 1 yanfeng student 49423 May 30 13:44 cynmix_condor.output
-rw-r--r-- 1 yanfeng student 46484 May 30 13:44 cynmix_mb.log
-rw-rw-r-- 1 yanfeng student 117554 May 30 13:24 cynmix.nex
-rw-r--r-- 1 yanfeng student 2138 May 30 13:44 cynmix.nex.con
-rw-r--r-- 1 yanfeng student 51874 May 30 13:44 cynmix.nex.p
-rw-r--r-- 1 yanfeng student 13288 May 30 13:44 cynmix.nex.parts
-rw-r--r-- 1 yanfeng student 72923 May 30 13:44 cynmix.nex.t
-rw-r--r-- 1 yanfeng student 6921 May 30 13:44 cynmix.nex.trprobs
-rw-rw-r-- 1 yanfeng student 316 May 30 13:27 mb_cynmix.submit
analyze the complex partitioned model
1)data set and mrbayes block
Data from Kim 2003. Insect Syst. Evol. 34:53-64.with a little modification.
In this example, you will see how to set up a complex partitioned model, including a doublet partition and a partition
analyzed using a codon model.
#NEXUS
[This is an example of a model using a complex partitioned model, including a doublet partition and a partition
analyzed using a codon model.]
[Data from Kim, S., K. M. Kjer, and C. N. Duckett. 2003. Comparison between molecular and
morphological-based phylogenies of galerucine/alticine leaf beetles
(Coleoptera: Chrysomelidae). Insect Syst. Evol. 34:53-64.]
begin data;
dimensions ntax=27 nchar=1742;
format datatype=mixed(rna:1-516,dna:517-1398,protein:1399-1692,standard:1693-1742) gap=- missing=? interleave=yes;
matrix
......
[including rna,dna,proein,standard data]
;
end;
begin mrbayes;
log start filename=complex_mb.log;
set autoclose=yes nowarn = yes ;
[Define pairs for the doublet model]
pairs 22:497, 21:498, 20:499, 19:500, 18:501, 17:502, 16:503, 33:172, 34:171, 35:170, 36:169, 37:168,
38:167, 45:160, 46:159, 47:158, 48:157, 49:156, 50:155, 51:154, 53:153, 54:152, 55:151, 59:150,
60:149, 61:148, 62:147, 63:146, 86:126, 87:125, 88:124, 89:123, 187:484, 186:485, 185:486,
184:487, 183:488, 182:489, 191:295, 192:294, 193:293, 194:292, 195:291, 196:290, 197:289,
198:288, 199:287, 200:286, 201:283, 202:282, 203:281, 204:280, 205:279, 206:278, 213:268,
214:267, 215:266, 216:265, 217:264, 226:259, 227:258, 228:257, 229:256, 230:255, 231:254,
232:253, 233:252, 304:477, 305:476, 306:475, 307:474, 308:473, 316:335, 317:334, 318:333,
319:332, 336:440, 337:439, 338:438, 339:437, 340:436, 341:435, 343:422, 344:421, 345:420,
346:419, 347:418, 348:417, 349:416, 351:414, 352:413, 353:412, 354:411, 355:408, 356:407,
357:406, 358:405, 359:404, 360:403, 361:402, 369:400, 370:399, 371:398, 372:397, 373:396,
376:394, 377:393, 379:392, 380:391, 381:390;
[Define character sets]
charset ambiguously_aligned = 92-103 108-122 234-251 320-327 449-468;
charset stems = 22 497 21 498 20 499 19 500 18 501 17 502 16 503 33 172 34 171 35 170
36 169 37 168 38 167 45 160 46 159 47 158 48 157 49 156 50 155 51 154
53 153 54 152 55 151 59 150 60 149 61 148 62 147 63 146 86 126 87 125
88 124 89 123 187 484 186 485 185 486 184 487 183 488 182 489 191 295
192 294 193 293 194 292 195 291 196 290 197 289 198 288 199 287 200 286
201 283 202 282 203 281 204 280 205 279 206 278 213 268 214 267 215 266
216 265 217 264 226 259 227 258 228 257 229 256 230 255 231 254 232 253
233 252 304 477 305 476 306 475 307 474 308 473 316 335 317 334 318 333
319 332 336 440 337 439 338 438 339 437 340 436 341 435 343 422 344 421
345 420 346 419 347 418 348 417 349 416 351 414 352 413 353 412 354 411
355 408 356 407 357 406 358 405 359 404 360 403 361 402 369 400 370 399
371 398 372 397 373 396 376 394 377 393 379 392 380 391 381 390;
charset loops = 1-15 23-32 39-44 52 56-58 64-85 90-122 127-145 161-166 173-181 188-190
207-212 218-225 234-251 260-263 269-277 284 285 296-303 309-315 320-331
342 350 362-368 374 375 378 382-389 395 401 409 410 415 423-434 441-472
478-483 490-496 504-516;
charset rna = 1 - 516 ;
charset dna = 517 - 1398 ;
charset protein = 1399 - 1692 ;
charset morphology = 1693 - 1742 ;
charset D2 = 1 - 516 ;
charset EF1a = 517 - 936 ;
charset EF1a1st = 517 - 936 \ 3;
charset EF1a2nd = 518 - 936 \ 3;
charset EF1a3rd = 519 - 936 \ 3;
charset CO1 = 937 - 1398 ;
charset CO11st = 937 - 1398 \ 3;
charset CO12nd = 938 - 1398 \ 3;
charset CO13rd = 939 - 1398 \ 3;
charset CO1aa = 1399 - 1552 ;
charset EF1aa = 1553 - 1692 ;
charset Morpho = 1693 - 1742 ;
[Define partitions]
partition by_gene_and_pos = 10:rna,EF1a1st,EF1a2nd,EF1a3rd,CO11st,CO12nd,CO13rd,CO1aa,EF1aa,Morpho;[will not used in this practice]
partition by_gene = 6:rna,EF1a,CO1,CO1aa,EF1aa,Morpho; [will not used in this practice]
partition by_gene_and_struct = 7:stems,loops,EF1a,CO1,CO1aa,EF1aa,Morpho;
[Exclude the ambiguously aligned characters]
exclude ambiguously_aligned;
[Select the partition to be used]
set partition = by_gene_and_struct;
[Since we will be using a codon model for partition 4, select the relevant genetic code]
lset applyto=(4) code=metmt;
[Apply the doublet model to the first partition (RNA stem regions)]
lset applyto=(1) nucmodel=doublet;
[Use a standard 4by4 nucleotide model for the second partition (loops)]
lset applyto=(2) nucmodel=4by4;
[Use a codon model for partitions 3 and 4 (Ef1a and CO1)]
lset applyto=(3,4) nucmodel=codon;
[Use a GTR model for all nucleotide partitions]
lset nst=6;
[Allow rates to vary across all partitions]
prset ratepr=variable;
[Used model averaging across fixed rate models for all amino-acid partitions]
prset aamodelpr=mixed;
[Set some mcmc parameters. You will have to run this analysis longer to get
convergence; these settings will only start a short sample run when you type mcmc.]
mcmcp ngen=10000 nchains=1 printfreq=10;
[begin to run]
mcmc;
[summarize the smaples of the substitution model parameters]
sump burnin=25;
[summarize the smaples of trees and branch lengths]
sumt burnin=25;
quit;
end;
download here complex.nex
2) condor submit description file
#################
#
# MrBayes complex model analysis
#
#################
Universe = standard
Executable = /usr/common/i686-linux/bin/condor_mb
Arguments = complex.nex
output = complex_condor.output
error = complex_condor.error
log = complex_condor.log
Queue
download here mb_complex.submit
3) use condor_q username , ls_l, and cat command to check your result
(It can run successfully on local version mb(MrBayes3.1) but it does not work on condor because the version of MrBayes is 3_0b4. The old version doesnot support this analysis). )
identification of sites under positive selection in a protein
This example come from Dr. J. Peter Gogarten the
http://web.uconn.edu/gogarten/bioinf/mrbayes.html
1)data set and mrbayes block
#NEXUS
[Fitch's flu data with 28 seqs]
begin data;
dimensions ntax=28 nchar=987;
format datatype=dna ;
matrix
bri2296 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACG GCA ACG ......
wzh19596 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACG GCA ACG ......
mo6396 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
bz18496 CAA AAA ATT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
joh295 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
gnx42495 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
sant7198894 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
ny42951194 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
wuz1794 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
ru58393 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
dj31091291 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
sh24890 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
umea21192 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
sas36592 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
sha1289 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
be57189 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
eng88 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
Tx39989288 CAA AAA CTT CCC GGA GAT GAC AAC AGC ACA GCA ACG ......
ty51287 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
gz187 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
cz86 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
ln286 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
yh1085 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
Tx25784385 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
sh185 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
Tx17988184 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
caen184 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
oita83 CAA AAA CTT CCC GGA AAT GAC AAC AGC ACA GCA ACG ......
;
end;
begin mrbayes;
log start filename=complex_mb.log;
set autoclose=yes nowarn = yes ;
lset nst=2 rates=gamma nucmodel=codon omegavar=Ny98;
[It takes several days to run on the orginal parameters.We change it a little to save the run time]
mcmcp samplefreq=10 printfreq=100 nchains=1;
mcmc ngen=1000;
sump burnin=10;
sumt burnin=10;
[ the orginal parameters
mcmcp samplefreq=500 printfreq=500;
mcmc ngen=500000;
sump burnin=50;
sumt burnin=50;]
end;
download positive.nex here
2) condor submit description file
#################
#
# MrBayes- Identification of sites under positive selection in a protein
#
#################
Universe = standard
Executable = /usr/common/i686-linux/bin/condor_mb
Arguments = positive.nex
output = positive_condor.output
error = positive_condor.error
log = positive_condor.log
Queue
download condor_positive.submit here
3) use condor_q username , ls_l, and cat command to check your result
| [yanfeng@petal017 positive]$ ls -l |
-rw-rw-r-- 1 yanfeng student 362 May 30 19:05 condor_positive.submit
-rw-rw-r-- 1 yanfeng student 0 May 30 19:55 positive_condor.error
-rw-rw-r-- 1 yanfeng student 173 May 30 20:08 positive_condor.log
-rw-rw-r-- 1 yanfeng student 0 May 30 19:55 positive_condor.output
-rw-r--r-- 1 yanfeng student 0 May 30 20:15 positive_mb.log
-rw-r--r-- 1 yanfeng student 38224 May 30 19:54 positive.nex
-rw-r--r-- 1 yanfeng student 559 May 30 20:15 positive.nex.con
-rw-r--r-- 1 yanfeng student 0 May 30 20:15 positive.nex.p
-rw-r--r-- 1 yanfeng student 4914 May 30 20:15 positive.nex.parts
-rw-r--r-- 1 yanfeng student 0 May 30 20:15 positive.nex.t
-rw-r--r-- 1 yanfeng student 8379 May 30 20:15 positive.nex.trprobs
4) follow the instruction on
J. Peter Gogarten websit to analysis the positive.nex.p to find the sites under positive selection.