bcftools
bcftools copied to clipboard
"split chromosome" after sorting
I'm running bcftools 1.15.1 on Linux 4.18.0-372.16.1.el8_6.x86_64 on Red Hat 8.6 (Ootpa) with gcc version 8.5.0 I am running bcftools in a series of commands
first I run bcftools sort
and then
plink --bcf tmp.sort.bcf --allow-extra-chr --make-bed --out merged.eigenstrat.34string.length.vcf.gz
which works, and then
plink --bcf tmp.sort.bcf --allow-extra-chr --recode --out merged.eigenstrat.34string.length.vcf.gz
but then I get an error:
Error: .bim file has a split chromosome. Use --make-bed by itself to remedy this
this last error should have been remedied by bcftools sort
but wasn't.
If I try to run the recode
step based on the bed
file, I get the error:
Options in effect:
--allow-extra-chr
--bed merged.eigenstrat.34string.length.vcf.gz
--out merged.eigenstrat.34string.length.vcf.gz
--recode
Error: A full .bed + .bim + .fam fileset is required for this.
For more information, try "plink --help <flag name>" or "plink --help | more".
How can I fix this error? sort didn't fix it, even though it should have.
or is this a problem with plink instead? I'm running PLINK v1.90b6.26 64-bit (2 Apr 2022)
You can check if the chromosomes are in single blocks with something like
bcftools query -f'%CHROM\n' file.bcf | uniq -c
Most likely not a problem with bcftools.
Since this is not a bcftools problem, I am closing the issue