ms to msprime conversion error (using demes.from_ms) #2069
-
I have some ms scripts that I'm trying to convert to msprime using the from_ms() function in the demes package. I tried testing it on a simple example of toy code and keep getting the same error, even though I essentially followed the same format as in the example given here: I have:
which gives me the error message:
There's evidently something subtly wrong with my syntax, though as far as I can tell my input argument format matches the example given in its format. I have an additional question about from_ms() - rather than returning a graph, is there some way to get actual msprime code as output? Thanks, Max |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @mshpak76. The error is because you need to specify the second parameter (and third) by name. So it needs to be |
Beta Was this translation helpful? Give feedback.
-
Thanks, it seems to work now (at least it doesn't throw an error).
As a follow-up, is there some way to see the msprime code that is generated
from ms in the conversion process rather than just getting the graph object
as output?
…On Mon, Jun 13, 2022 at 9:38 AM Graham Gower ***@***.***> wrote:
Hi @mshpak76 <https://github.com/mshpak76>. The error is because you need
to specify the second parameter (and third) by name. So it needs to be from_ms(cmd,
N0=10000) rather than from_ms(cmd, 10000). Your edited code example works
for me!
—
Reply to this email directly, view it on GitHub
<#2069 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUZMZCOGFFPAH6Q3B2OEH6LVO5BURANCNFSM5YUM5LMA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
=======================
Max Shpak, Ph.D.
Department of Genetics
University of Wisconsin
Madison, WI 53706
|
Beta Was this translation helpful? Give feedback.
Hi @mshpak76. The error is because you need to specify the second parameter (and third) by name. So it needs to be
from_ms(cmd, N0=10000)
rather thanfrom_ms(cmd, 10000)
. Your edited code example works for me!