fastStructure error

499 views
Skip to first unread message

lj

unread,
Mar 26, 2014, 11:00:26 AM3/26/14
to structure...@googlegroups.com
Hi,

I'm trying to use fastStructure, and when I run it with either the basic parameters (--input, --output, -K) or with specified priors, I get this error (not always - if I run the same thing twice, I may get it, or not):

structure.py:171: RuntimeWarning: invalid value encountered in double_scalars
params['prior'], params['cv'])

And I don't know python. Also comes up if I use either the plink or str formats (for the same data).

Also, my initial results from fastStructure are very different from my Structure results - with the former I don't get any population structure, whereas with the latter, I get the expected clustering.

Thanks
Ljerka

Jon Puritz

unread,
Apr 1, 2014, 6:40:56 PM4/1/14
to structure...@googlegroups.com
I am getting the same error

Jon Puritz

unread,
Apr 2, 2014, 4:32:12 PM4/2/14
to structure...@googlegroups.com
Only with K=1

Vikram Chhatre

unread,
Apr 2, 2014, 4:39:51 PM4/2/14
to structure-software, Anil Raj
I have also seen this same error with only K=1.  I am copying Anil here if he has some advice for us.

V


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

lj

unread,
Apr 3, 2014, 4:18:28 AM4/3/14
to structure...@googlegroups.com, Anil Raj
I get it with other values of K as well. If I repeat a run for the same K, I may get it the first time, but then the second time I don't.
The internet says that it may have something to do with null values in data that will generate this error with Numpy.

lj



On Wednesday, April 2, 2014 10:39:51 PM UTC+2, Vikram Chhatre wrote:
I have also seen this same error with only K=1.  I am copying Anil here if he has some advice for us.

V
On Wed, Apr 2, 2014 at 4:32 PM, Jon Puritz <jpu...@gmail.com> wrote:
Only with K=1


On Tuesday, April 1, 2014 5:40:56 PM UTC-5, Jon Puritz wrote:
I am getting the same error

On Wednesday, March 26, 2014 10:00:26 AM UTC-5, lj wrote:
Hi,

I'm trying to use fastStructure, and when I run it with either the basic parameters (--input, --output, -K) or with specified priors, I get this error (not always - if I run the same thing twice, I may get it, or not):

structure.py:171: RuntimeWarning: invalid value encountered in double_scalars
  params['prior'], params['cv'])

And I don't know python. Also comes up if I use either the plink or str formats (for the same data).

Also, my initial results from fastStructure are very different from my Structure results - with the former I don't get any population structure, whereas with the latter, I get the expected clustering.

Thanks
Ljerka

--
You received this message because you are subscribed to the Google Groups "structure-software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to structure-software+unsub...@googlegroups.com.

Vikram Chhatre

unread,
Apr 3, 2014, 9:32:44 AM4/3/14
to structure-software
Here is a message from Anil about fastSTRUCTURE warning messages.

V

---------- Forwarded message ----------
From: Anil Raj <raj...@stanford.edu>
Date: Thu, Apr 3, 2014 at 2:30 AM
Subject: Re: [structure-group] Re: fastStructure error
To: Vikram Chhatre <cryptic...@gmail.com>
Cc: structure-software <structure...@googlegroups.com>


Hi Vikram:

 A few others have asked about this confusing message too; apologies for not having explained it better.

 In Python, ``Warnings'' are different from ``Errors'' and simply notify that a strange operation was attempted; these operations are typically handled properly by the code and should not affect the results. So, when an Error is raised, the code simply terminates, but when a Warning is raised, the code handles it in some way and continues execution. I think it would be better to keep these warnings to allow the user to double-check that the results don't look odd (e.g., parameter estimates don't contain nans or infs). For the most part, these warnings can simply be ignored; however, if the final output of the code does look odd, please do let me know.

 I'll modify the code to return more informative warning messages and explain this better in the README files. Thanks for bringing this to my attention!

cheers
Anil

Jon Puritz

unread,
Apr 3, 2014, 11:35:56 AM4/3/14
to structure...@googlegroups.com
Well, for my K1 runs, it only goes for 10 iterations.  Is this normal for a 200 individual 3000 SNP data set?
V

To unsubscribe from this group and stop receiving emails from it, send an email to structure-software+unsub...@googlegroups.com.

vebo

unread,
Apr 3, 2014, 11:44:57 AM4/3/14
to structure...@googlegroups.com

Same with my K1 run and Total number of iterations for each K is random and for my K6 the Total iterations were 30. I don’t understand this. I have 441 SNPs and 181 lines.

Marginal likelihood with initialization (1) = -1.0374938964

Marginal likelihood with initialization (2) = -1.0374938964

Marginal likelihood with initialization (3) = -1.0374938964

Marginal likelihood with initialization (4) = -1.0374938964

Marginal likelihood with initialization (5) = -1.0374938964

Iteration Marginal_Likelihood delta_Marginal_Likelihood Iteration_Time (secs)

0 -1.0374938964 -- 21.998

10 -1.0374938964 0.0000000000 10.613

Marginal Likelihood = -1.0374938964

Total time = 32.6498 seconds

Total iterations = 10

vebo 
 

vebo

unread,
Apr 3, 2014, 11:49:49 AM4/3/14
to structure...@googlegroups.com
Hi all,
In fastSTRUCTURE the total iterations for each K is random, please see below.
 
K1= Total iterations = 10
K2= Total iterations = 20
K3= Total iterations = 50
K4= Total iterations = 50
K5= Total iterations = 40
K6= Total iterations = 30
 
what does this mean?
 
one more thing, is there a way to set up number of iterations in fastSTRUCTURE.
Thanks!!
vebo
Reply all
Reply to author
Forward
0 new messages