--within/--split-cat-pheno

141 views
Skip to first unread message

Matthew Maher

unread,
May 5, 2021, 1:48:18 PM5/5/21
to plink2-users
First, thanks again for PLINK(2) - great tool!  

Has there been a change to PLINK2's usage of --within or --split-cat-pheno recently?   I looked in the notes but didn't see anything.   I have a script that's previously worked okay with PLINK2 version from last Oct (below is a run of that).  But changing to PLINK2 from 28 Mar 2021, it now errors out saying all categories are null (see further below).    Not sure if I'm doing something silly. 

And I just checked again with the current (20 April) version but say the same error.  

Thanks for any info/assistance.  

PLINK v2.00a3LM 64-bit Intel (28 Oct 2020)     www.cog-genomics.org/plink/2.0/
(C) 2005-2020 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to QC_data/batch_effects.log.
Options in effect:
  --bfile QC_data/input_DUPfilt_IMfilt_SMfilt_HWE
  --glm allow-no-covars
  --out QC_data/batch_effects
  --split-cat-pheno BATCH
  --within QC_data/batch.covar BATCH

Start time: Wed May  5 17:26:43 2021
128714 MiB RAM detected; reserving 64357 MiB for main workspace.
Using up to 16 threads (change this with --threads).
4236 samples (4236 females, 0 males; 4236 founders) loaded from QC_data/input_DUPfilt_IMfilt_SMfilt_HWE.fam.
878455 variants loaded from QC_data/input_DUPfilt_IMfilt_SMfilt_HWE.bim.
--within: 61 non-null categories present.
2 phenotypes loaded (1 binary, 1 categorical).
--split-cat-pheno: 1 categorical phenotype converted to 61 phenotypes.
Calculating allele frequencies... done.
--glm logistic-Firth hybrid regression on phenotype 'PHENO1': 0%

and the analysis happily  proceeds.....

changing nothing but the PLINK2 version:

PLINK v2.00a3LM 64-bit Intel (28 Mar 2021)     www.cog-genomics.org/plink/2.0/
(C) 2005-2021 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to QC_data/batch_effects.log.
Options in effect:
  --bfile QC_data/input_DUPfilt_IMfilt_SMfilt_HWE
  --glm allow-no-covars
  --out QC_data/batch_effects
  --split-cat-pheno BATCH
  --within QC_data/batch.covar BATCH

Start time: Wed May  5 17:32:01 2021
128714 MiB RAM detected; reserving 64357 MiB for main workspace.
Using up to 16 threads (change this with --threads).
4236 samples (4236 females, 0 males; 4236 founders) loaded from QC_data/input_DUPfilt_IMfilt_SMfilt_HWE.fam.
878455 variants loaded from QC_data/input_DUPfilt_IMfilt_SMfilt_HWE.bim.
Error: All --within categories are null.

and that batch.covar file looks like: 

(base) -bash:uger-c005:~/MattM 1242 $ head QC_data/batch.covar  
0 101266_A02-CCC2_PA714834 PLATE101266
0 101266_A03-CCC2_PA714883 PLATE101266
0 101266_A05-CCC2_PA714840 PLATE101266
0 101266_A06-CCC2_PA714878 PLATE101266
0 101266_B02-CCC2_PA714858 PLATE101266
. . .

Christopher Chang

unread,
May 5, 2021, 2:27:14 PM5/5/21
to plink2-users
Thanks for reporting this.  Looks like I broke --within in mid-January; will post a fix soon.

Christopher Chang

unread,
May 5, 2021, 3:25:31 PM5/5/21
to plink2-users
Bugfix is now posted.

On Wednesday, May 5, 2021 at 10:48:18 AM UTC-7 mma...@broadinstitute.org wrote:

Matthew Maher

unread,
May 5, 2021, 3:39:56 PM5/5/21
to plink2-users
thanks for the rapid fix
Reply all
Reply to author
Forward
0 new messages