Hello!
I am trying to rerun (update) my analyses after reviewer responses. It has been a few years since I had to touch these files/code and I am running into problems that I did not have back in 2018 with the bgen files from ALSPAC. Specifically, that the temporary.psam file is created PLINK2 throughs an error. I have pasted log information below of a successful test run (exclude the --missing-code flag) and one of the unsuccessful test runs (include --missing-code). Multiple test runs helped me narrow down the problem to the --missing-code flag. I did get to --freq to run with both flags 1x when I used a sample file where all the phenotype data was missing.
I do need to include the --missing-code flag and the --keep unrelated_children.txt flag. Thanks!
#SUCCESSFUL TEST RUN
plink2 --bgen data_chr22.bgen ref-first --sample dataFac4.sample --keep unrelated_children.txt --freq --out testb
PLINK v2.00a3 SSE4.2 (18 Feb 2022)
www.cog-genomics.org/plink/2.0/(C) 2005-2022 Shaun Purcell, Christopher Chang GNU General Public License v3
Logging to testb.log.
Options in effect:
--bgen data_chr22.bgen ref-first
--freq
--keep unrelated_children.txt
--out testb
--sample dataFac4.sample
Start time: Fri Jun 30 15:12:27 2023
32018 MiB RAM detected; reserving 16009 MiB for main workspace.
Using up to 4 compute threads.
--bgen: 365644 variants detected, format v1.2.
8941 samples imported from .sample file to testb-temporary.psam .
--bgen: testb-temporary.pgen + testb-temporary.pvar written.
8941 samples (4361 females, 4580 males; 2642 founders) loaded from
testb-temporary.psam.
365644 variants loaded from testb-temporary.pvar.
1 quantitative phenotype loaded (4003 values).
--keep: 7977 samples remaining.
7977 samples (3885 females, 4092 males; 2366 founders) remaining after main
filters.
3647 quantitative phenotype values remaining after main filters.
Calculating allele frequencies... done.
--freq: Allele frequencies (founders only) written to testb.afreq .
End time: Fri Jun 30 15:12:39 2023
#UNSUCCESSFUL TEST RUN(S)
#1 ADD MISSING-CODE -9 WITH KEEP UNRELATED_CHILDREN
plink2 --bgen data_chr22.bgen ref-first --sample dataFac4.sample --missing-code -9 --keep unrelated_children.txt --freq --out testc
PLINK v2.00a3 SSE4.2 (18 Feb 2022)
www.cog-genomics.org/plink/2.0/(C) 2005-2022 Shaun Purcell, Christopher Chang GNU General Public License v3
Logging to testc.log.
Options in effect:
--bgen data_chr22.bgen ref-first
--freq
--keep unrelated_children.txt
--missing-code -9
--out testc
--sample dataFac4.sample
Start time: Fri Jun 30 15:13:30 2023
32018 MiB RAM detected; reserving 16009 MiB for main workspace.
Using up to 4 compute threads.
--bgen: 365644 variants detected, format v1.2.
8941 samples imported from .sample file to testc-temporary.psam .
--bgen: testc-temporary.pgen + testc-temporary.pvar written.
Error: Line 4 of testc-temporary.psam has fewer tokens than expected.End time: Fri Jun 30 15:13:42 2023