AttributeError: 'list' object has no attribute 'copy'

782 views
Skip to first unread message

ANUBHAB KHAN

unread,
Apr 7, 2017, 8:36:52 AM4/7/17
to dadi-user
Hi,

I am trying to run the following model: 

>>> import numpy

>>> from numpy import array

>>> import dadi

>>> data = dadi.Spectrum.from_file('CONTINENTAL.fs')

>>> ns = data.sample_sizes

>>> pts_l = [40,50,60]

>>> func = dadi.Integration.three_pops

>>> func_ex = dadi.Numerics.make_extrap_log_func(func)

>>> params = ([1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.5, 0.5, 0.5, 1, 0])

>>> model = func_ex(params, ns, pts_l)


However I get the following error

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "build/bdist.linux-x86_64/egg/dadi/Numerics.py", line 294, in extrap_func

  File "build/bdist.linux-x86_64/egg/dadi/Integration.py", line 330, in three_pops

AttributeError: 'list' object has no attribute 'copy'


I don't understand this error. Can someone please help?

Thanks

Gutenkunst, Ryan N - (rgutenk)

unread,
Apr 7, 2017, 12:55:35 PM4/7/17
to dadi...@googlegroups.com
Integration.three_pops is not a demographic model. You’ll need to write a custom model if you’re working with more than two populations. Please see the dadi manual for more details.

Best,
Ryan

--
You received this message because you are subscribed to the Google Groups "dadi-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dadi-user+...@googlegroups.com.
To post to this group, send email to dadi...@googlegroups.com.
Visit this group at https://groups.google.com/group/dadi-user.
For more options, visit https://groups.google.com/d/optout.

--
Ryan Gutenkunst
Assistant Professor of Molecular and Cellular Biology, University of Arizona
phone: (520) 626-0569, office: LSS 325, web: http://gutengroup.mcb.arizona.edu

Latest papers: 
“Selection on network dynamics drives differential rates of protein domain evolution”
PLoS Genetics; http://dx.doi.org/10.1371/journal.pgen.1006132
"Triallelic population genomics for inferring correlated fitness effects of same site nonsynonymous mutations"
Genetics; http://dx.doi.org/10.1534/genetics.115.184812

Reply all
Reply to author
Forward
0 new messages