[zhupy@gra797 zhupy]$ head -10 sample_ids_NA_reduced.tsv
1000018
1000020
1000037
1000043
1000051
1000066
1000079
1000092
1000107
1000110
[zhupy@gra797 zhupy]$ wc -l sample_ids_NA_reduced.tsv
463521 sample_ids_NA_reduced.tsv
[zhupy@gra797 zhupy]$ ./plink2 --bgen ukb_imp_chr1_v3_pruned.bgen ref-first --sample ukb_imp_chr1_v3_pruned.sample --keep sample_ids_NA_reduced.tsv --export bgen-1.2 bits=8 --out ukb_imp_chr1_v3_pruned_NA_reduced
PLINK v2.00a3 32-bit (23 Sep 2020) www.cog-genomics.org/plink/2.0/
(C) 2005-2020 Shaun Purcell, Christopher Chang GNU General Public License v3
Logging to ukb_imp_chr1_v3_pruned_NA_reduced.log.
Options in effect:
--bgen ukb_imp_chr1_v3_pruned.bgen ref-first
--export bgen-1.2 bits=8
--keep sample_ids_NA_reduced.tsv
--out ukb_imp_chr1_v3_pruned_NA_reduced
--sample ukb_imp_chr1_v3_pruned.sample
Start time: Tue Feb 9 19:35:45 2021
128539 MiB RAM detected; reserving 2047 MiB for main workspace.
Using up to 32 threads (change this with --threads).
--bgen: 571622 variants detected, format v1.2.
487409 samples imported from .sample file to
ukb_imp_chr1_v3_pruned_NA_reduced-temporary.psam .
--bgen: ukb_imp_chr1_v3_pruned_NA_reduced-temporary.pgen +
ukb_imp_chr1_v3_pruned_NA_reduced-temporary.pvar written.
487409 samples (264296 females, 222987 males, 126 ambiguous; 487409 founders)
loaded from ukb_imp_chr1_v3_pruned_NA_reduced-temporary.psam.
571622 variants loaded from ukb_imp_chr1_v3_pruned_NA_reduced-temporary.pvar.
Note: No phenotype data present.
--keep: 0 samples remaining.
Error: No samples remaining after main filters.
End time: Tue Feb 9 19:40:16 2021
Here're the first 5 lines of the resulting .psam file.
[zhupy@cedar1 zhupy]$ head -5 ukb_imp_chr1_v3_pruned_NA_reduced.psam
#FID IID SEX
1389117 1389117 1
2912943 2912943 2
3094358 3094358 2
5502557 5502557 2
--keep-autoconv
I also tried adding
--double-id
but still, keep getting the same error message.
please help,
>head -5 chunk.psam
#IID SEX
NWD100343 NA
NWD100368 NA
NWD100720 NA
NWD100793 NA
I made a keep sample file with only 1 and first entry from psam file
>cat m.sample
IID SEX
NWD100343 0
>plink2 --pfile chunk --keep m.sample --make-bed --out test
PLINK v2.00a2LM 64-bit Intel (22 Oct 2019) www.cog-genomics.org/plink/2.0/
(C) 2005-2019 Shaun Purcell, Christopher Chang GNU General Public License v3
Logging to test.log.
Options in effect:
--keep m.sample
--make-bed
--out test
--pfile chunk
Start time: Thu Dec 30 19:55:22 2021
515455 MiB RAM detected; reserving 257727 MiB for main workspace.
Using up to 56 threads (change this with --threads).
5382 samples (0 females, 0 males, 5382 ambiguous; 5382 founders) loaded from
chunk.psam.
6589 variants loaded from chunk.pvar.
Note: No phenotype data present.
--keep: 0 samples remaining.
Error: No samples remaining after main filters.
End time: Thu Dec 30 19:55:22 2021