Two questions on getting started with fastStructure

490 views
Skip to first unread message

Scott Brainard

unread,
Dec 26, 2022, 4:11:42 PM12/26/22
to structure-software
Hi all,

I am interested in using fastStructure, but installing it is somewhat challenging.  It requires now-deprecated Python2, which is hard to downgrade to, since pip no longer supports Python2.  After hacking this together, however, I get the same error as people mention here:  https://github.com/rajanil/fastStructure/issues/56.  I'd be happy to build a Docker container (or as people in that thread suggest, a virtualenv) with the exact versions of the dependencies required installed, but they aren't specified in any requirements file -- can anyone who has gotten fastStructure to run tell me what versions of numpy, scipy, cython they are using, and the operating system?

In addition, I'd like to view the testdata.bed file to see how the input file is supposed to be structured.  It seems poorly constructed, or out of data with current plink specifications:

 ➜  test git:(master) ✗ plink --bfile testdata --recode tab --out ~/Desktop/ped.ped

PLINK v1.90b6.27 64-bit (10 Dec 2022)          www.cog-genomics.org/plink/1.9/

(C) 2005-2022 Shaun Purcell, Christopher Chang   GNU General Public License v3

Logging to /Users/boat/Desktop/ped.ped.log.

Options in effect:

  --bfile testdata

  --out /Users/boat/Desktop/ped.ped

  --recode tab

 

16384 MB RAM detected; reserving 8192 MB for main workspace.

500 variants loaded from .bim file.

Error: Invalid IID '0' on line 1 of .fam file.

 

Can anyone point me to a well-formated .str or .bed input file?


Thanks a ton,

Scott

Francisco Pina Martins

unread,
Dec 27, 2022, 3:49:55 PM12/27/22
to structure-software
Hi Scott,

I too have recently been having issues compiling fastStructure due to how hard it is to get a fully working python2 environment nowadays.
I do have a solution if you are on a GNU/Linux based or macOS platform. I am the developer of Structure_threader,  which contains a pre-compiled fastStructure binary for both mentioned platforms. You can either install Structure_threader using pip (python3 -m pip install structure_threader --user), or you can get the binary file directly here for GNU/Linux, or here for macOS X (not tested on the latest ARM based macs, though).
Of course the only real "solution" is porting fastStructure to python3...

As for properly formatted str and bed files, you can also find one example each on Structure_threader's repository. They should contain the same data, only converted in both formats used by fastStructure. I use these files for CI testing, and thus far, haven't had any issues with either.

Best,

Francisco
Reply all
Reply to author
Forward
0 new messages