bcftools
bcftools copied to clipboard
Empty Output File When Converting VCF to Haps
Hi!
I am trying to convert my vcf files to hap, but I kept getting an empty output file.
-
My original vcf file looks like this, bcftools convert works fine on this but the output file is not what I want for my study. concat_ABCD_release_2.0.1_r1_filtered.vcf.gz
-
I then use bcftools isec to output the common variants with another vcf file, and got a vcf file like this
bcftools isec ALL.autosomes.phase3.vcf.gz concat_ABCD_release_2.0.1_r1_filtered.vcf.gz -c none -n=5 -p isec_ABCD_ref
0001.vcf.gz -
Then when I try to convert 0001.vcf.gz into LAMP using this
bcftools convert --hapsample --vcf-ids 0001.vcf.gz -o chr1-22_admixed.haps
, the results are
-
Hap file: chr1-22_admixed.haps.hap.gz Sample file: chr1-22_admixed.haps.sample 0 records written, 0 skipped: 0/0/0 no-ALT/non-biallelic/filtered
- A chr1-22_admixed.haps.sample file with the list of variant IDs
- An empty chr1-22_admixed.haps.hap.gz
May I know why do I keep getting an empty haps.gz file after using bcftools isec, when this vcf-> haps conversion works fine on the original vcf file?
Thank you.
Hi, this requires a small test case to reproduce the problem, the screenshots do not provide enough information to understand and debug the problem.