Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MrBayer error #208

Closed
tsm-tsm opened this issue Jan 18, 2024 · 3 comments
Closed

MrBayer error #208

tsm-tsm opened this issue Jan 18, 2024 · 3 comments

Comments

@tsm-tsm
Copy link

tsm-tsm commented Jan 18, 2024

Hello! thank you for creating this platform.
I have encountered some issues and hope to receive your assistance.

nohup perl /home/ug1297/mrbayes/data_results/scripts/mb.pl nexus.tar.gz -m mbblock.txt -o mb-output >&mrbayer.log&

cat mbblock.txt
begin mrbayes;
set nowarnings=yes;
set autoclose=yes;
lset nst=6 rates=invgamma;
mcmcp ngen=100000 burninfrac=.25 samplefreq=50 printfreq=10000 [increase these for real]
diagnfreq=10000 nruns=3 nchains=3 temp=0.40 swapfreq=10; [increase for real analysis]mcmc;
sumt;
end;

#####################
nohup: ignoring input

Script was called as follows:
perl mb.pl nexus.tar.gz -m mbblock.txt -o mb-output

Appending MrBayes block to each gene... done.

Job server successfully created.
Argument "^B\0M-^S^?\0\0^A\0\0\0\0\0\0\0\0" isn't numeric in numeric eq (==) at /home/ug1297/mrbayes/data_results/scripts/mb.pl line 341.
readline() on unopened filehandle at /home/ug1297/mrbayes/data_results/scripts/mb.pl line 348.

Analyses complete: 0/22185.^MArgument "^B\0M-^S^?\0\0^A\0\0\0\0\0\0\0\0" isn't numeric in numeric eq (==) at /home/ug1297/mrbayes/data_results/scripts/mb.pl line 341, line 1.
readline() on unopened filehandle at /home/ug1297/mrbayes/data_results/scripts/mb.pl line 348.
Argument "^B\0M-^S^?\0\0^A\0\0\0\0\0\0\0\0" isn't numeric in numeric eq (==) at /home/ug1297/mrbayes/data_results/scripts/mb.pl line 341, line 1.
readline() on unopened filehandle at /home/ug1297/mrbayes/data_results/scripts/mb.pl line 348.
Argument "^B\0M-^S^?\0\0^A\0\0\0\0\0\0\0\0" isn't numeric in numeric eq (==) at /home/ug1297/mrbayes/data_results/scripts/mb.pl line 341, line 1.
readline() on unopened filehandle at /home/ug1297/mrbayes/data_results/scripts/mb.pl line 348.
Argument "^B\0M-^T^F^?\0\0^A\0\0\0\0\0\0\0\0" isn't numeric in numeric eq (==) at /home/ug1297/mrbayes/data_results/scripts/mb.pl line 341, line 1.
readline() on unopened filehandle at /home/ug1297/mrbayes/data_results/scripts/mb.pl line 348.
Analyses complete: 1/22185.^MArgument "^B\0M-^T\n^?\0\0^A\0\0\0\0\0\0\0\0" isn't numeric in numeric eq (==) at /home/ug1297/mrbayes/data_results/scripts/mb.pl line 341, line 1.
readline() on unopened filehandle at /home/ug1297/mrbayes/data_results/scripts/mb.pl line 348.

@cecileane
Copy link
Member

No idea!

But you should look into the files that were created, because the messages say that some of the steps ran successfully. For example, the script was able to create the input MrBayes: Appending MrBayes block to each gene... done. Also, the script seems to have detected the number of loci: Analyses complete: 0/22185.

The problem seems to occur when the script wants to run MrBayes on each locus: none of them (0) were successful. So the remainder of the script has issues of course, because there's no output MrBayes to use for the downstream analyses.

You should dig into your files, to find out how far exactly the script went, and where the error occurred. That's the first step to diagnose the error.

@tsm-tsm
Copy link
Author

tsm-tsm commented Jan 19, 2024

Thank you for your enthusiastic and prompt replies. When I attempted to run the data, I also encountered failure, and I feel quite distressed about it. I have not identified the reason.
ug1297@gs73:~/mrbayes/data_results$ which mb
/pub/anaconda3/bin/mb
mrbayes 3.2.7 hefd459d_1 bioconda
ug1297@gs73:~/mrbayes$ perl /home/ug1297/mrbayes/data_results/scripts/mb.pl ./data_results/baseline.gamma0.3_n30/input/1_seqgen.tar.gz -m mbblock.txt -o mb-output-data
Script was called as follows:
perl mb.pl ./data_results/baseline.gamma0.3_n30/input/1_seqgen.tar.gz -m mbblock.txt -o mb-output-data
Appending MrBayes block to each gene... done.
Job server successfully created.
Analyses complete: 30/30.
All connections closed.
Total execution time: 8 seconds.
ug1297@gs73:~/mrbayes/mb-output-data$ tar -tf 1_seqgen.mb.tar
1_seqgen10.nex.tar.gz
...
1_seqgen5.nex.tar.gz
ug1297@gs73:~/mrbayes/mb-output-data/1_seqgen.mb$ tar -xzvf 1_seqgen1.nex.tar.gz -C 1_seqgen1.nex
1_seqgen1.nex.log
The file 1_seqgen1.nex.log is empty.

The nexus file was generated by using a fasta file and FASTA2NEX.py(https://github.com/Rendrick27/FASTA2NEX/blob/main/FASTA2NEX.py). There shouldn't be any issues, right?
ug1297@gs73:~/mrbayes/nexus$ less -S loci1.nexus
#NEXUS

BEGIN DATA;
DIMENSIONS NTAX=16 NCHAR=144;
FORMAT DATATYPE=DNA GAP=- MISSING=N;
MATRIX
C.Wenchangensis_LFT01 TTTAAGGCTGACTTGGAGAATCCACATTGAAAGAGAGGCTCATTGGGTCCAAGCCTTGGAGATGAAATGCTGCAGCCATAGAAGAAGAACTGCTTCAAATGCAAATAAGCTTCCCTACTCGCCTATATGGGCAGCAATGAAGAG
C.carlesii_FJS02 TTTAAAGCTGACTTGGAGAATCCACATTGAAAGAGAGGCTCCTTGGGTCCAAGTCTTGGAGATGAAATGCTGCAGCCATNNNAGAAGAACTGCTTCAAATGCAAATAAGCTTCCCTACTCACCTATATGGGTAGCAATGAAGAG
C.chinensis_DH03 TTTAAAGCTGACTTGGAGAATCCACATTGAAAGAGAGGCTCCTTGGGTCCAAGTCTTGGAGATGAAATGCTGCANNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
C.delavayi_GL04 TTTAAGGCTGACTTGGAGAATCCACATTGAAAGAGAGGCTCCTTAGGTCCAAGCCTTGGAGATGAAATGCTGCANNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
C.fleuryi_PDLZ05 TTTAAAGCTGACTTGGAGAATCCACATTGAAAGAGAGGCTCCTTGGGTCCAAGTCTTGGAGATGAAATGCTGCAGCCATAGAAGAAGAACTGCTTCAAATGCAAATAAGCTTCCCTACTCACCTATATGGGCAGCAATGAAGAG
C.fordii_HSD06 TTTAAAGCTGACTTGGAGAATCCACATTGAAAGAGAGGCTCCTTGGGTCCAAGTCTTGGAGATGAAATGCTGCAGCCATAGAAGAAGAACTGCTTCAAATGMAAATAAGCTTCCCTACTCACCTATATGGGCAGCAATGAAGAG
C.hainanensis_JFL07 TTTAARGCTGACTTGGAGAATCCACATTGAAAGAGAGGCTCCTTGGGTCCAAGYCTTGGAGATGAAATGCTGCAGCCATAGAAGAAGAACTGCTTCAAGTGCAAATAAGCTTCCCTACTCGCCTATATGGGCAGCAATGAAGAG
C.indica_JFL08 TTTAAGGCTGACTTGGAGAATCCACATTGAAAGAGAGGCTCMTTGGGTCCAAGCCTTGGAGATGAAATGCTGCAGCCATAGAAGAAGAACTGCTTCAARTGCAAATAAGCTTCCCTACTCGCCTATATGGGCAGCAATGAAGAG
C.jianfenglingensis_JFL_309 TTTAAAGCTGACTTGGAGAATCCACGTTGAAAGAGAGGCTCCTTGGGTCCAAGTCTTGGAGATGAAATGCTGCANNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
C.kawakamii_SCBG10 TTTAAAGCTGACTTGGAGAATCCACATTGAAAGAGAGGCTCTTTGGGTCCAAGTCTTGGAGATGAAATGCTGCAGCCATAGAAGAAGAACTGCTTCAAATGCAAATAAGCTTCCCTACTCAMCTATATGGGCAGCAATGAAGAG
C.megaphylla_DW11 TTTAAAGCTGACTTGGAGAATCCACGTTGAAAGAGAGGCTCCTTGGGTCCAAGTCTTGGAGATGAAATGCTGCAGCCATAGAAGAAGAACTGCTTCAAATGCAAATAAGCTTCCCTACTCACCTATATGGGCAGCAATGAAGAG
C.orthacantha_QZ12 TTTAAAGCTGACTTGGAGAATCCACATTGAAAGAGAGGCTCCTTGGGTCCAAGTCTTGGAGATGAAATGCTGCAGCCATAGAAGAAGAACTGCTTCAAATGCAAATAAGCTTCCCTACTCACCTATATGGGCAGCAATGAAGAG
C.sclerophylla_NC13 TTTAAAGCTGACTTGGAGAATCCACATTGAAAGAGAGGCTCCTTGGGTCCAAGTCTTGGAGATGAAATGCTGCAGCCATAGAAGAAGAACTGCTTCAAATGCAAATAAGCTTCCCTACTCACCTATATGGGCAGCAATGAAGAG
C.tibetana_FJS14 TTTAAAGCTGACTTGGAGAATCCACATTGAAAGAGAGGCTCTTTGGGTCCAAGTCTTGGAGATGAAATGCTGCAGCCATAGAAGAAGAACTGCTTCAAATGCAAATAAGCTTCCCTACTCACCTATATGGGCAGCAATGAAGAG
C.tonkinensis_JFL15 TTTAAAGCTRACTTGGAGAATCCACGTTGAAAGAGAGGCTCCTTGGGTCCAAGTCTTGGAGATGAAATGCTGCAGCCATAGAAGAARAACTGCTTCAAATGCAAATAAGCTTCCCTACTCACCTATATGGGCAGCAATGAAGAG
C.xichouensis_MLP_316 TTTAAAGCTGACTTGGAGAATCCACATTGAAAGAGAGGCTCCTTGGGTCCAAGTCTTGGAGATGAAATGCTGCAGCCATAGAAGAAGAACTGCTTCAAATGCAAATAAGCTTCCCTACTCACCTATATGGGCAGCAATGAAGAG
;
END;

begin mrbayes;
set autoclose=yes nowarn=yes;
lset nst=6 rates=gamma;
mcmc ngen=5000 samplefreq=100 diagnfreq=1000 burninfrac=0.25 starttree=random;
end;

@cecileane
Copy link
Member

cecileane commented Jan 19, 2024

I do not quite understand what you are doing.

  1. Most of the commands and output that you showed seem to be from replicating an analysis from this tutorial, on the data from folder data_results/baseline.gamma0.3_n30/.
  2. The analysis seems to have been successful, based on the screen message Analyses complete: 30/30. Indeed, that data had only 30 loci.
  3. However, you then mention a different data set, named loci1.nexus. I don't see any error on that other data set, so I cannot help.

So: the error you had earlier may be due to a problem with your data, because you managed to run analysis of the tutorial data successfully.

Perhaps having file names ending with .nexus might be an issue. The standard extension is .nex, not .nexus. But that's just a very uncertain guess.

@tsm-tsm tsm-tsm closed this as completed Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants