Impossible to do test command

383 views
Skip to first unread message

Moreau Camille

unread,
Mar 26, 2020, 7:10:41 PM3/26/20
to plink2-users
Hello,

I am using mac OS Catalina 10.15.2 and I recently downloaded Plink from here: https://www.cog-genomics.org/plink2 (chose macOS (64-bit) . I downloaded it and unzipped it to a location of my choosing. Then I went to run a test to see if the program was working by following the instructions on this page: https://www.cog-genomics.org/plink/1.9/general_usage but it's wrong: 

camillemoreau@MacBook-Air-de-Camille ~ % /Users/camillemoreau/Downloads/plink_mac_20200219/plink --file toy --freq --out toy_analysis

PLINK v1.90b6.16 64-bit (19 Feb 2020)          www.cog-genomics.org/plink/1.9/

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

Logging to toy_analysis.log.

Options in effect:

  --file toy

  --freq

  --out toy_analysis


4096 MB RAM detected; reserving 2048 MB for main workspace.

Error: Failed to open toy.map.


I haven't been able to find anythng close to this on the Google Groups page.

Does anyone have any insight? Was it possibly a bad install or a bad command?

Thank your for your help,

Camille Moreau

Christopher Chang

unread,
Mar 27, 2020, 10:47:20 AM3/27/20
to plink2-users
You unzipped the toy.map and toy.ped files to the same place as the plink binary, instead of the directory you ran your test command from.

Frances Conti-ramsden

unread,
Jul 22, 2020, 10:19:48 AM7/22/20
to plink2-users
Hi Camille I am having the same problem, 

I am using mac OS Mojave 10.14.6, I downloaded Plink from https://www.cog-genomics.org/plink2 (also chose macOS (64-bit), unzipped and placed in my working directory and also uploaded to my University HPC. I also ran a test as per the cog-genomics website: 
plink2 --bfile toy_data --freq --out test2

But found that it does not seem that plink2 has been installed - rather a version of Plink1.9.: 

PLINK v1.90p 64-bit (25 Mar 2016)          https://www.cog-genomics.org/plink2

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

Logging to test2.log.

Options in effect:

  --bfile toy_data

  --freq

  --out test2


I also did not seem to have any toy files when I unzipped the download from cog-genomics...


I need the functionality of Plink v2, specifically to convert Plink 2 format files to Plink 1.9: 


plink2 --pfile $refdir/all_phase3 vzs --max-alleles 2 --make-bed --out $refdir/all_phase3



At the moment this keeps giving me errors, I think because it is not Plink v2 and so --pfile flag is not recognised:


-bash-4.2$ plink2 --pfile all_phase3 vzs\ --max-alleles 2 --make-bed --out all_phase3.1

PLINK v1.90p 64-bit (25 Mar 2016)          https://www.cog-genomics.org/plink2

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

Logging to all_phase3.1.log.

Options in effect:

  --make-bed

  --out all_phase3.1

  --pfile all_phase3 vzs --max-alleles 2


Error: Unrecognized flag ('--pfile').

For more information, try 'plink --help [flag name]' or 'plink --help | more'.


I wondered if you ever got to the bottom of what was happening for you or if anyone else could advise ?


Thank you - I am new to Plink so advice really appreciated!

Best wishes, 

Fran

Christopher Chang

unread,
Jul 22, 2020, 8:11:21 PM7/22/20
to plink2-users
This looks like an issue with your system PATH environment variable (https://en.wikipedia.org/wiki/PATH_(variable) ).

Frances Conti-ramsden

unread,
Jul 23, 2020, 5:01:27 AM7/23/20
to plink2-users
Hi Christopher, 

You were right - this has solved my problem! I had forgotten I originally tried to install plink2 directly onto my HPC using conda: 
conda install -c bioconda plink2

This must have installed the wrong version of plink2. I found the first directory of my PATH on the HPC (using $PATH - in case this is helpful for anyone else), navigated there, deleted the plink2 executable file that was there, and copied in a new download of the Linux-64bit plink2 direct from cog-genomics (as realised HPC is Linux), and now it is working:

PLINK v2.00a2.3LM 64-bit Intel (24 Jan 2020)   www.cog-genomics.org/plink/2.0/

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

Logging to all_phase3.1.log.

Options in effect:

  --make-bed

  --max-alleles 2

  --out all_phase3.1

  --pfile all_phase3 vzs



Thank you so much for your help, 

Best wishes, 

Fran

Sergio MUÑIZ CASTRILLO

unread,
Apr 28, 2023, 3:13:22 PM4/28/23
to plink2-users
Hi, 
I have a similar problem. I cannot run the test command. The toy files are in the same directory as the plink binary one.
Anyone has some suggestion?
Thanks!
Sergio

 sergiomunizcastrillo@DN0a237b5f ~ % /Users/sergiomunizcastrillo/Desktop/plink_mac_20230116/plink --file toy --freq --out toy_analysis

PLINK v1.90b7 64-bit (16 Jan 2023)             www.cog-genomics.org/plink/1.9/

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

Logging to toy_analysis.log.

Options in effect:

  --file toy

  --freq

  --out toy_analysis


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

Error: Failed to open toy.map.


Christopher Chang

unread,
May 2, 2023, 12:43:58 PM5/2/23
to plink2-users
Your command made plink look for toy.map and toy.ped in your *current* directory.  So you need to either move/copy those files to your current directory, or run the command from the plink directory.
Reply all
Reply to author
Forward
0 new messages