bcftools icon indicating copy to clipboard operation
bcftools copied to clipboard

Empty Output File When Converting VCF to Haps

Open celine-boop opened this issue 3 years ago • 1 comments

Hi!

I am trying to convert my vcf files to hap, but I kept getting an empty output file.

  1. 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 image

  2. 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 image

  3. 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.

celine-boop avatar May 12 '21 00:05 celine-boop

Hi, this requires a small test case to reproduce the problem, the screenshots do not provide enough information to understand and debug the problem.

pd3 avatar May 19 '21 12:05 pd3