Partitioning only 2nd and 1st+2nd codon positions

21 views
Skip to first unread message

Ezra Bailey

unread,
Apr 7, 2025, 11:43:02 PMApr 7
to raxml
Hi Alexis and others,

Thank you for such an excellent program, manual, and community for questions. I have searched through all the existing conversations pertaining to this issue but was unable to find an answer.

I completed an all position nucleotide tree and am trying to run only 2nd as well as 1st+2nd codon position trees. Our pipeline through a supercomputing node produces these partition files, which appear to be correctly formatted according to the manual, and we have used them before with no issues. Now I am running RAxML on Galaxy (toolshed.g2.bx.psu.edu/repos/iuc/raxml/raxml/8.2.12+galaxy1) under default parameters, due to the very large number of taxa/size of my alignments.

I received this error and am unable to figure out what the issue with my input is:

ERROR trying to assign model 5651 to position 2 while already model 0 has been assigned to this position

Here is what the only 2nd position partition file used for "Assignment of models to alignment partitions for multiple models of substitution" looks like:

DNA, sco_13911at7203_2 = 2-1422\3
DNA, sco_26588at7203_2 = 1424-2259\3
DNA, sco_38052at7203_2 = 2261-3108\3
DNA, sco_11012at7203_2 = 3110-5976\3
DNA, sco_753at7203_2 = 5978-9756\3
DNA, sco_19516at7203_2 = 9758-11001\3

as well as the last few lines:

DNA, sco_14184at7203_2 = 7629554-7630890\3
DNA, sco_9622at7203_2 = 7630892-7632198\3
DNA, sco_23292at7203_2 = 7632200-7633188\3
DNA, sco_13537at7203_2 = 7633190-7635003\3
DNA, sco_44201at7203_2 = 7635005-7635294\3
DNA, sco_2713at7203_2 = 7635296-7638657\3

My alignment/.phylip file includes 7638657 nucleotides, which appears to be no problem in this partition, or the 1st+2nd position partition:

DNA, sco_13911at7203_1 = 1-1422\3
DNA, sco_13911at7203_2 = 2-1422\3
DNA, sco_26588at7203_1 = 1423-2259\3
DNA, sco_26588at7203_2 = 1424-2259\3
DNA, sco_38052at7203_1 = 2260-3108\3
DNA, sco_38052at7203_2 = 2261-3108\3

as well as the last few lines:

DNA, sco_13537at7203_1 = 7633189-7635003\3
DNA, sco_13537at7203_2 = 7633190-7635003\3
DNA, sco_44201at7203_1 = 7635004-7635294\3
DNA, sco_44201at7203_2 = 7635005-7635294\3
DNA, sco_2713at7203_1 = 7635295-7638657\3
DNA, sco_2713at7203_2 = 7635296-7638657\3

I don't see any obvious issues such as overlapping positions or there being positions they don't exist in the .phy file. I was concerned that the formatting of each locus in the 1st+2nd position may have been an issue, but I still got the same error with my 2nd position only partition.

I am sure there is an easy solution I am missing here so I am very grateful for your help. Thank you so much.

Grimm

unread,
Apr 8, 2025, 2:59:33 AMApr 8
to raxml
Hi Ezra,

the partitions need to cover all basepairs in your alignment to work properly. Since the \3 assigns only every third base to the partition, you have to have three consecutive rows. 1-xxx\3 2-xxx\3 3-xxx\3, you cannot leave one (or two) as in your first case (2nd position only) unassigned.

If you want to run without the (1st and) 3rd codon position, you have to delete those before inference. You can use classic, stand-alone RAxML for this, with the following command-line:

raxmlHPC -s alignment_file -m GTRCAT -n xx -E exclusion_file -q partition_file 

In the partition file you just add a, two rows
DNA, all1stCodons = 1-7638657 \3
DNA, all3rdCodons = 3-7638657 \3

File "ex" would define the (1st and) 3rd codon positions: 
1- 7638657 \3 3-7638657 \3

which then generates an alignment without the (1st and) 3rd codon pos. (alignment_file.ex) as well as a modified partition_file.ex.

/G

Alexandros Stamatakis

unread,
Apr 8, 2025, 3:00:52 AMApr 8
to ra...@googlegroups.com
Dear Ezra,

As far as I understand you want to run an analysis on a subset of MSA
sites only, is that correct?

In that case you will have to exclude those sites (e.g. via an
appropriate script) prior to running an analysis, that is, only
assigning a partition to a subset of sites won't work.

Aslo, please consider switching to RAxML-NG

https://github.com/amkozlov/raxml-ng

as standard RAxML is not supported any more.

Hope this helps,

Alexis

On 08.04.25 03:44, 'Ezra Bailey' via raxml wrote:
> Hi Alexis and others,
>
> Thank you for such an excellent program, manual, and community for
> questions. I have searched through all the existing conversations
> pertaining to this issue but was unable to find an answer.
>
> I completed an all position nucleotide tree and am trying to run only
> 2nd as well as 1st+2nd codon position trees. Our pipeline through a
> supercomputing node produces these partition files, which appear to be
> correctly formatted according to the manual, and we have used them
> before with no issues. Now I am running RAxML on Galaxy
> (toolshed.g2.bx.psu.edu/repos/iuc/raxml/raxml/8.2.12+galaxy1) under
> default parameters, due to the very large number of taxa/size of my
> alignments.
>
> I received this error and am unable to figure out what the issue with my
> input is:
>
> *ERROR trying to assign model 5651 to position 2 while already model 0
> has been assigned to this position*
> --
> You received this message because you are subscribed to the Google
> Groups "raxml" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to raxml+un...@googlegroups.com
> <mailto:raxml+un...@googlegroups.com>.
> To view this discussion visit
> https://groups.google.com/d/msgid/raxml/bdc08abb-ae89-46b5-a857-b0ae76fd10den%40googlegroups.com <https://groups.google.com/d/msgid/raxml/bdc08abb-ae89-46b5-a857-b0ae76fd10den%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Alexandros (Alexis) Stamatakis

ERA Chair, Institute of Computer Science, Foundation for Research and
Technology - Hellas
Research Group Leader, Heidelberg Institute for Theoretical Studies
Full Professor, Dept. of Informatics, Karlsruhe Institute of Technology

www.biocomp.gr (Crete lab)
www.exelixis-lab.org (Heidelberg lab)

Ezra Bailey

unread,
Apr 9, 2025, 2:17:08 AMApr 9
to ra...@googlegroups.com
Thank you both for your prompt and helpful responses!

I see, this makes sense. I will test these suggestions and then reply here again if there are further issues.

Correct, I am trying to run an analysis on a subset of the MSA sites only. I would like to build trees based on only 1st+2nd codon positions as well as only 2nd codon position. I had also tried making exclusion scripts by modifying the portion of the pipeline that produces these partition files (so that I had only 3rd codon position as well as only 1st+3rd codon position parts files), but it did not work in RAxML on Galaxy. I will test these files with RAxML-NG instead and see if that solves the problem.

Thank you again for your quick assistance and hopefully that is all that was needed.

Sincerely,
Ezra

Ezra M. Bailey
PhD Candidate, Wiegmann Lab
Department of Entomology and Plant Pathology
North Carolina State University


To unsubscribe from this group and stop receiving emails from it, send an email to raxml+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/raxml/b80f5b02-bd5a-4b67-8996-0a9d0804681a%40gmail.com.

Oleksiy Kozlov

unread,
Apr 9, 2025, 4:17:01 AMApr 9
to ra...@googlegroups.com
Dear Ezra,

> Correct, I am trying to run an analysis on a subset of the MSA sites only. I would like to build
> trees based on only 1st+2nd codon positions as well as only 2nd codon position. I had also tried
> making exclusion scripts by modifying the portion of the pipeline that produces these partition
> files (so that I had only 3rd codon position as well as only 1st+3rd codon position parts files),
> but it did not work in RAxML on Galaxy.

Under "RAxML options to use" you need to choose "Full option list", and then you can specify the
exclusion file.

Or have you tried this already and it did not work?

>I will test these files with RAxML-NG instead and see if
> that solves the problem.

It seems that RAxML-NG is not available in Galaxy yet, we will look into it.

Best,
Oleksiy

>
> Thank you again for your quick assistance and hopefully that is all that was needed.
>
> Sincerely,
> Ezra
>
> Ezra M. Bailey
> PhD Candidate, Wiegmann Lab
> Department of Entomology and Plant Pathology
> North Carolina State University
>
>
> On Tue, Apr 8, 2025 at 3:00 AM Alexandros Stamatakis <alexandros...@gmail.com
> <mailto:alexandros...@gmail.com>> wrote:
>
> Dear Ezra,
>
> As far as I understand you want to run an analysis on a subset of MSA
> sites only, is that correct?
>
> In that case you will have to exclude those sites (e.g. via an
> appropriate script) prior to running an analysis, that is, only
> assigning a partition to a subset of sites won't work.
>
> Aslo, please consider switching to RAxML-NG
>
> https://github.com/amkozlov/raxml-ng <https://github.com/amkozlov/raxml-ng>
>
> as standard RAxML is not supported any more.
>
> Hope this helps,
>
> Alexis
>
> On 08.04.25 03:44, 'Ezra Bailey' via raxml wrote:
> > Hi Alexis and others,
> >
> > Thank you for such an excellent program, manual, and community for
> > questions. I have searched through all the existing conversations
> > pertaining to this issue but was unable to find an answer.
> >
> > I completed an all position nucleotide tree and am trying to run only
> > 2nd as well as 1st+2nd codon position trees. Our pipeline through a
> > supercomputing node produces these partition files, which appear to be
> > correctly formatted according to the manual, and we have used them
> > before with no issues. Now I am running RAxML on Galaxy
> > (toolshed.g2.bx.psu.edu/repos/iuc/raxml/raxml/8.2.12+galaxy1 <http://toolshed.g2.bx.psu.edu/
> repos/iuc/raxml/raxml/8.2.12+galaxy1>) under
> > an email to raxml+un...@googlegroups.com <mailto:raxml%2Bunsu...@googlegroups.com>
> > <mailto:raxml+un...@googlegroups.com <mailto:raxml%2Bunsu...@googlegroups.com>>.
> a857-b0ae76fd10den%40googlegroups.com> <https://groups.google.com/d/msgid/raxml/bdc08abb-
> ae89-46b5-a857-b0ae76fd10den%40googlegroups.com?utm_medium=email&utm_source=footer <https://
> groups.google.com/d/msgid/raxml/bdc08abb-ae89-46b5-a857-b0ae76fd10den%40googlegroups.com?
> utm_medium=email&utm_source=footer>>.
>
> --
> Alexandros (Alexis) Stamatakis
>
> ERA Chair, Institute of Computer Science, Foundation for Research and
> Technology - Hellas
> Research Group Leader, Heidelberg Institute for Theoretical Studies
> Full Professor, Dept. of Informatics, Karlsruhe Institute of Technology
>
> www.biocomp.gr <http://www.biocomp.gr>       (Crete lab)
> www.exelixis-lab.org <http://www.exelixis-lab.org> (Heidelberg lab)
>
> --
> You received this message because you are subscribed to the Google Groups "raxml" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> raxml+un...@googlegroups.com <mailto:raxml%2Bunsu...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/raxml/b80f5b02-
> bd5a-4b67-8996-0a9d0804681a%40gmail.com <https://groups.google.com/d/msgid/raxml/b80f5b02-
> bd5a-4b67-8996-0a9d0804681a%40gmail.com>.
>
> --
> You received this message because you are subscribed to the Google Groups "raxml" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> raxml+un...@googlegroups.com <mailto:raxml+un...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/raxml/CAE-
> T_SuEdTxKxYSrgr9OkqAidua6G2_Y4OxeyKqjy_v6S7UsAw%40mail.gmail.com <https://groups.google.com/d/msgid/
> raxml/CAE-T_SuEdTxKxYSrgr9OkqAidua6G2_Y4OxeyKqjy_v6S7UsAw%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Ezra Bailey

unread,
Apr 9, 2025, 9:49:52 AMApr 9
to ra...@googlegroups.com
Thank you Oleksiy for your response,

Yes, I tried using these files as exclusion files, but got the same error as indicated above unfortunately. From reading the manual, it seemed to me as though I should actually use them as partitions instead, but this also did not work.

I will test on RAxML-NG on our HPC and see if that fixes it; it would be amazing to have it on Galaxy. Thank you!

Sincerely,
Ezra

Ezra M. Bailey
PhD Candidate, Wiegmann Lab
Department of Entomology and Plant Pathology
North Carolina State University

To unsubscribe from this group and stop receiving emails from it, send an email to raxml+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/raxml/26b4ed3c-e85b-430a-805b-891cbea3bd97%40gmail.com.

Oleksiy Kozlov

unread,
Apr 9, 2025, 10:28:50 AMApr 9
to ra...@googlegroups.com
Dear Ezra,

> Yes, I tried using these files as exclusion files, but got the same error as indicated above
> unfortunately. From reading the manual, it seemed to me as though I should actually use them as
> partitions instead, but this also did not work.

OK I see...

> I will test on RAxML-NG on our HPC and see if that fixes it; it would be amazing to have it on
> Galaxy. Thank you!

With RAxML-NG 1.x, you would need to explicitly exclude sites from MSA as Alexis suggested above.

With RAxML-NG 2.0 (not officially released yet), it is possible to use a subset of MSA sites and to
comment out individual partitions in the partition file, please see here:

https://github.com/amkozlov/raxml-ng/issues/189#issuecomment-2598275032

Best,
Oleksiy
> > <mailto:alexandros...@gmail.com <mailto:alexandros...@gmail.com>>> wrote:
> >
> >     Dear Ezra,
> >
> >     As far as I understand you want to run an analysis on a subset of MSA
> >     sites only, is that correct?
> >
> >     In that case you will have to exclude those sites (e.g. via an
> >     appropriate script) prior to running an analysis, that is, only
> >     assigning a partition to a subset of sites won't work.
> >
> >     Aslo, please consider switching to RAxML-NG
> >
> > https://github.com/amkozlov/raxml-ng <https://github.com/amkozlov/raxml-ng> <https://
> github.com/amkozlov/raxml-ng <https://github.com/amkozlov/raxml-ng>>
> >
> >     as standard RAxML is not supported any more.
> >
> >     Hope this helps,
> >
> >     Alexis
> >
> >     On 08.04.25 03:44, 'Ezra Bailey' via raxml wrote:
> >      > Hi Alexis and others,
> >      >
> >      > Thank you for such an excellent program, manual, and community for
> >      > questions. I have searched through all the existing conversations
> >      > pertaining to this issue but was unable to find an answer.
> >      >
> >      > I completed an all position nucleotide tree and am trying to run only
> >      > 2nd as well as 1st+2nd codon position trees. Our pipeline through a
> >      > supercomputing node produces these partition files, which appear to be
> >      > correctly formatted according to the manual, and we have used them
> >      > before with no issues. Now I am running RAxML on Galaxy
> >      > (toolshed.g2.bx.psu.edu/repos/iuc/raxml/raxml/8.2.12+galaxy1 <http://
> toolshed.g2.bx.psu.edu/repos/iuc/raxml/raxml/8.2.12+galaxy1> <http://toolshed.g2.bx.psu.edu/
> <mailto:raxml%2Bunsu...@googlegroups.com> <mailto:raxml%2Bunsu...@googlegroups.com
> <mailto:raxml%252Buns...@googlegroups.com>>
> >      > <mailto:raxml+un...@googlegroups.com
> <mailto:raxml%2Bunsu...@googlegroups.com> <mailto:raxml%2Bunsu...@googlegroups.com
> <mailto:raxml%252Buns...@googlegroups.com>>>.
> >      > To view this discussion visit
> >      > https://groups.google.com/d/msgid/raxml/bdc08abb-ae89-46b5-a857- <https://
> groups.google.com/d/msgid/raxml/bdc08abb-ae89-46b5-a857->
> >     b0ae76fd10den%40googlegroups.com <http://40googlegroups.com> <https://groups.google.com/
> d/msgid/raxml/bdc08abb-ae89-46b5- <https://groups.google.com/d/msgid/raxml/bdc08abb-ae89-46b5->
> >     a857-b0ae76fd10den%40googlegroups.com <http://40googlegroups.com>> <https://
> groups.google.com/d/msgid/raxml/bdc08abb- <https://groups.google.com/d/msgid/raxml/bdc08abb->
> >     ae89-46b5-a857-b0ae76fd10den%40googlegroups.com?utm_medium=email&utm_source=footer
> <http://40googlegroups.com?utm_medium=email&utm_source=footer> <https://
> > groups.google.com/d/msgid/raxml/bdc08abb-ae89-46b5-a857-b0ae76fd10den%40googlegroups.com
> <http://groups.google.com/d/msgid/raxml/bdc08abb-ae89-46b5-a857-b0ae76fd10den%40googlegroups.com>?
> >     utm_medium=email&utm_source=footer>>.
> >
> >     --
> >     Alexandros (Alexis) Stamatakis
> >
> >     ERA Chair, Institute of Computer Science, Foundation for Research and
> >     Technology - Hellas
> >     Research Group Leader, Heidelberg Institute for Theoretical Studies
> >     Full Professor, Dept. of Informatics, Karlsruhe Institute of Technology
> >
> > www.biocomp.gr <http://www.biocomp.gr> <http://www.biocomp.gr <http://www.biocomp.gr>>
>  (Crete lab)
> > www.exelixis-lab.org <http://www.exelixis-lab.org> <http://www.exelixis-lab.org <http://
> www.exelixis-lab.org>> (Heidelberg lab)
> >
> >     --
> >     You received this message because you are subscribed to the Google Groups "raxml" group.
> >     To unsubscribe from this group and stop receiving emails from it, send an email to
> > raxml+un...@googlegroups.com <mailto:raxml%2Bunsu...@googlegroups.com>
> <mailto:raxml%2Bunsu...@googlegroups.com <mailto:raxml%252Buns...@googlegroups.com>>.
> >     To view this discussion visit https://groups.google.com/d/msgid/raxml/b80f5b02- <https://
> groups.google.com/d/msgid/raxml/b80f5b02->
> >     bd5a-4b67-8996-0a9d0804681a%40gmail.com <http://40gmail.com> <https://groups.google.com/
> d/msgid/raxml/b80f5b02- <https://groups.google.com/d/msgid/raxml/b80f5b02->
> >     bd5a-4b67-8996-0a9d0804681a%40gmail.com <http://40gmail.com>>.
> >
> > --
> > You received this message because you are subscribed to the Google Groups "raxml" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to
> > To view this discussion visit https://groups.google.com/d/msgid/raxml/CAE- <https://
> groups.google.com/d/msgid/raxml/CAE->
> > T_SuEdTxKxYSrgr9OkqAidua6G2_Y4OxeyKqjy_v6S7UsAw%40mail.gmail.com <http://40mail.gmail.com>
> <https://groups.google.com/d/msgid/ <https://groups.google.com/d/msgid/>
> > raxml/CAE-T_SuEdTxKxYSrgr9OkqAidua6G2_Y4OxeyKqjy_v6S7UsAw%40mail.gmail.com
> <http://40mail.gmail.com>?
> > utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups "raxml" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> raxml+un...@googlegroups.com <mailto:raxml%2Bunsu...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/raxml/26b4ed3c-
> e85b-430a-805b-891cbea3bd97%40gmail.com <https://groups.google.com/d/msgid/raxml/26b4ed3c-
> e85b-430a-805b-891cbea3bd97%40gmail.com>.
>
> --
> You received this message because you are subscribed to the Google Groups "raxml" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> raxml+un...@googlegroups.com <mailto:raxml+un...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/raxml/CAE-
> T_StNYvqDLoD6BeMsCGLCeYP5HshjL1N7EVWKayo6kM2PVg%40mail.gmail.com <https://groups.google.com/d/msgid/
> raxml/CAE-T_StNYvqDLoD6BeMsCGLCeYP5HshjL1N7EVWKayo6kM2PVg%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Ezra Bailey

unread,
Apr 9, 2025, 11:36:20 AMApr 9
to ra...@googlegroups.com
Hi again,

Using RAxML-NG locally and adjusting my partition file to use as the --model worked perfectly. Posting here to thank you all for your help, and hopefully to help someone with the same question in the future.

I reformatted my partition file for 1st+2nd codon position only from this:

DNA, sco_13911at7203_2 = 2-1422\3

to this:

GTR+G+FO, sco_13911at7203_2=2-1422/1
GTR+G+FO, sco_13911at7203_2=2-1422/2

Thank you again for your quick reply and helpful feedback! Have a great day.

Sincerely,
Ezra

Ezra M. Bailey
PhD Candidate, Wiegmann Lab
Department of Entomology and Plant Pathology
North Carolina State University

To unsubscribe from this group and stop receiving emails from it, send an email to raxml+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/raxml/88b638f6-3ea0-4aeb-b49a-d12e4bdfb1af%40gmail.com.
Reply all
Reply to author
Forward
0 new messages