This is a test version of Biostars. For the public version, visit https://www.biostars.org.
VCF to BCF file conversion

Hi Everyone,

I am sorry this might be stupid, but can anyone help me, is there any way:

  1. To convert VCF file to BCF file. I think we can use BCFTOOLS but I am not getting the right command.
  2. My VCF file has soe duplicated records, how to filter the duplicate records of variants?

Thanks in advance!

ngs genomics

I think we can use BCFTOOLS but I am not getting the right command.

What did you try?

I tried bcftools

bcftools view file.vcf.gz -o file.bcf

1 answer

in the manual: https://samtools.github.io/bcftools/bcftools.html#view

-O, --output-type b|u|z|v Output compressed BCF (b), uncompressed BCF (u), compressed VCF (z), uncompressed VCF (v). Use the -Ou option when piping between bcftools subcommands to speed up performance by removing unecessary compression/decompression and VCF←→BCF conversion.

Thank you very much for your comment Pierre, can you please guide me how I can generate .BCI file for BCF (*..bcf.bci), I am trying to call de novo mutations by de novo gear software and I need this input file.

But by BCFtools, we can only generate CSI index file (https://samtools.github.io/bcftools/bcftools.html#index)

and can you please comment on how to remove duplicate records fro VCF file?

Thanks!

Log in to answer this question.