Distinct mutation models

110 views
Skip to first unread message

Eric Crandall

unread,
Jan 27, 2022, 5:57:00 PM1/27/22
to migrate-support
I've just started using migrate-n v4 and noticed that more models of molecular evolution are now implemented besides F84. The initial output suggests that each locus could potentially have a distinct model, but I can't figure out how to specify a model for multiple loci 

(writing model names separated by spaces or commas doesn't seem to work)
e.g. datamodel = K2P F84 F81

Peter Beerli

unread,
Jan 27, 2022, 8:06:18 PM1/27/22
to migrate...@googlegroups.com
Eric,
sorry that is the intention but the testing of that got put on ice because there were more urgent things to do, eventually I will recheck, in principle it should work but I would need to do a more involved code review which I have not time this week, I can give you a better answer in about 14 days.

Peter



--
You received this message because you are subscribed to the Google Groups "migrate-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to migrate-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/migrate-support/6ea5cb3f-20ea-4e00-92a1-8d94eed56cf1n%40googlegroups.com.

Eric Crandall

unread,
Jan 27, 2022, 8:31:33 PM1/27/22
to migrate-support
Thanks!

Peter Beerli

unread,
Feb 5, 2022, 4:46:00 PM2/5/22
to migrate...@googlegroups.com
Eric,
while checking something else I remembered your question on multiple different mutation models, and yes there is a way, but not through the datamodel option in the parmfile, you will need to add that to the infile itself, here is a snippet (it is the example file twoswisstowns in the distribution).
the red marked lines read like this
locus 1 is sequence and should be analyzed using the Tamura-Nei model with two parameters k1 and k2
locus 2 is sequence and is F84 with K=2 etc
in case you do not recognize the line just above, that means that
there are 4 loci (see first line) and that the first 2 are linked (e.g. have the same coalescent tree) and the the “,” means that the second set
of loci is on a different line, so having (s10), (s10) means that two loci are coded using the old style in migrate whereas (s10 (s10) means that each individual has all it sequences on a single line. 
[I also hope that soon we will have a manuscript that describes the assignment mentioned in the comment of the infile]

   2 4 two (fake) Swiss towns
############################################################################
# Part of a tutorial on the use of migrate 5.0   (http://popgen.sc.fsu.edu)#
# and how how to compare alternative hypotheses using Bayes factors.       #
# Date: June 14, 2010, modified February 29, 2020, November 5, 2021        #
# (c) Peter Beerli, 2021, Tallahassee, http://people.sc.fsu.edu/%7Ebeerli  #
############################################################################
# the first two loci are completely linked and use Tamura-Nei and F84 model
# the second and third locus are on a second block (old style locus coding)
# the locus 3 and 4 are unlinked using Tamura-Nei and JC, respectively
# 5 individuals in the second populations are not assigned to a population
# we calculate the probability whether they come from Bern or Aadorf see ? 
# in first character of the name.
#  
(s200 s800), (s500) (s500)
#$ 1 s TN 1.3 0.8
#$ 2 s F84 2.0 
#$ 3 s TN 1.3 2.0
#$ 4 s JC
10   Aadorf
0BAA      GTACACTCTTAAACGAAGGTGTTTGAACACCCGTAAGCTATGCCCTGGCCTACTACAGGCGCTTAACACATAAAGTCCGCGCTCAAGTCA 
…..


Peter


On Jan 27, 2022, at 5:56 PM, Eric Crandall <eric.d....@gmail.com> wrote:

Eric Crandall

unread,
Feb 6, 2022, 2:12:59 PM2/6/22
to migrate-support
Thanks! Cool. It makes sense to keep this information with the locus. What about the different discrete gamma rates though?

I've tried to set this up like this: (they are "normal" loci that include invariant sites)

9        109
411        388        472        468        499    ...etc.    
#$ 1 s F81  
#$ 2 s JC  
#$ 3 s JC  
#$ 4 s F81  
#$ 5 s JC 
.
.
.
etc. 


But it gives me a segmentation fault:

Reading (1) s_F81 ...

ERROR: BAD BASE: P AT POSITION     0 OF INDIVIDUUM   1 in POPULATION 1

SEVERE ERROR: Segmentation fault

              this results in an non recoverable crash.

              But check the datatype and your infile for errors, too.



Changing the sequence length specification so (sr11) (s388) (s472) etc. doesn't help.

Peter Beerli

unread,
Feb 6, 2022, 3:01:04 PM2/6/22
to migrate...@googlegroups.com
Eric,

so far gamma is either all or none with the same parameters [I know that is not what you want]
I believe that you need the new notation for the loci to make this work, it seems that the first locus mutation model instruction was read as the 
population title (Reading (1) s_F81) this will crash because #$ is not a number.
perhaps try

9 109
(s411), (s388), (s472), …

I assume you give the loci as blocks (old style ) and not on one line per individual (new style), the ‘,’ marks the blocks per locus
Let me know if this fails too, then I would need to have a deeper look 

Peter


Eric Crandall

unread,
Feb 6, 2022, 5:44:17 PM2/6/22
to migrate-support
Thanks! It looks like I was just lacking the commas. No worries about gamma!
Message has been deleted

Eric

unread,
Apr 4, 2023, 6:05:56 PM4/4/23
to migrate-support
Hey Peter - How can I learn which molecular evolution models Migrate supports? I have an mtDNA dataset that is selecting TIM1, but not sure if Migrate supports more than 2 rates. How would I specify more than two rates if it does support TIM1?

Peter Beerli

unread,
Apr 5, 2023, 1:14:40 PM4/5/23
to migrate...@googlegroups.com
Migrate 5.0 most complicated model is 
Tamura-Nei + Gamma

peter



Eric Crandall

unread,
May 9, 2023, 2:57:09 PM5/9/23
to migrate...@googlegroups.com
Is it specified with TN93?

And in what order are the three rates specified? Ti:Tv, Purine:Purine, Pyrimidine:Pyrimidine?

Thanks!

Eric



You received this message because you are subscribed to a topic in the Google Groups "migrate-support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/migrate-support/XjV_4jZW4RI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to migrate-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/migrate-support/C534F35C-31B7-418F-B6F5-DB2821DDFC9A%40gmail.com.

Eric Crandall

unread,
May 18, 2023, 10:34:22 AM5/18/23
to migrate-support
I see from above that it is specified as TN. Then is the order of the two following numbers: A:G/G:A and C:T/T:C. And then the Transition:Transversion rate is stored in the parmfile?

Eric Crandall

unread,
May 18, 2023, 1:46:57 PM5/18/23
to migrate...@googlegroups.com
Never mind 😜 the two transition rates are scaled to the transversion rate

Reply all
Reply to author
Forward
0 new messages