for f in *.vcf.gz; do chr=$(basename $f .vcf.gz); echo "$chr"; ./plink2 --make-bpgen --vcf "$chr".vcf.gz --vcf-min-dp 5 --vcf-max-dp 500 --allow-extra-chr --max-alleles 2 --set-all-var-ids @_# --out "$chr" --maf 0.01 --geno 0.90; done
PLINK v2.00a3LM AVX2 Intel (29 Jan 2022)
www.cog-genomics.org/plink/2.0/(C) 2005-2022 Shaun Purcell, Christopher Chang GNU General Public License v3
Logging to A01.log.
Options in effect:
--allow-extra-chr
--geno 0.90
--maf 0.01
--make-bpgen
--max-alleles 2
--out A01
--set-all-var-ids @_#
--vcf A01.vcf.gz
--vcf-max-dp 500
--vcf-min-dp 5
Start time: Thu Feb 17 13:04:39 2022
32110 MiB RAM detected; reserving 16055 MiB for main workspace.
Using up to 10 threads (change this with --threads).
--vcf: 1569297 variants scanned.
--vcf: A01-temporary.pgen + A01-temporary.pvar.zst + A01-temporary.psam
written.
173 samples (0 females, 0 males, 173 ambiguous; 173 founders) loaded from
A01-temporary.psam.
1536155 out of 1569297 variants loaded from A01-temporary.pvar.zst.
Note: No phenotype data present.
Calculating allele frequencies... done.
--geno: 31920 variants removed due to missing genotype data.
764964 variants removed due to allele frequency threshold(s)
(--maf/--max-maf/--mac/--max-mac).
739271 variants remaining after main filters.
Writing A01.fam ... done.
Writing A01.bim ... done.
Writing A01.pgen ... done.
End time: Thu Feb 17 13:05:03 2022
Then made my mergelist and tried to import into new fileset:
for i in *.pgen; do echo $(basename "$i" .pgen) >> mergelist.txt; done
cat mergelist.txt
A01
A02
A03
A04
A05
A06
A07
A08
A09
A10
A11
A12
A13
D01
D02
D03
D04
D05
D06
D07
D08
D09
D10
D11
D12
D13
./plink2 --allow-extra-chr --make-bpgen --pmerge-list mergelist.txt bpfile --out AllChr
PLINK v2.00a3LM AVX2 Intel (29 Jan 2022)
www.cog-genomics.org/plink/2.0/(C) 2005-2022 Shaun Purcell, Christopher Chang GNU General Public License v3
Logging to AllChr.log.
Options in effect:
--allow-extra-chr
--make-bpgen
--out AllChr
--pmerge-list mergelist.txt bpfile
Start time: Thu Feb 17 13:05:46 2022
32110 MiB RAM detected; reserving 16055 MiB for main workspace.
Using up to 10 threads (change this with --threads).
--pmerge-list: 26 filesets specified.
--pmerge-list: 173 samples and 1 phenotype present.
--pmerge-list: Merged .psam written to AllChr-merge.psam .
Segmentation fault
Any ideas? Happy to share input data if it would help. Not sure why it's saying I have a phenotype present (I didn't have any to begin with). Each of the original input VCF files has the same individuals (173).
Grant