Using bcftools isec without stripping meta data and outputting as a VCF
1
0
Entering edit mode
4 months ago
kshaffman • 0

Hi, I am trying to use "bcftools isec" for some data analysis. I have two cell lines and I am trying to find the unique mutations in each when compared to the human reference genome. The command I have been using is as follows

bcftools isec  "a.vcf.gz" "b.vcf.gz" -C -p dir

This works well, but it stripped all the mutation annotations I had. Allele frequencies, genes, etc. It also outputs the unique mutations as a text tile.

  1. Is there a way to get use bcftools isec w/o stripping annotations?
  2. Is there a way to get bcftools isec to output the new file as a VCF file? I would still like to be able to use my data with visualization software such as IGV.
  3. If either of these does not work, is there some way I can turn a text file into a VCF file? AND is there any way to add mutaion annotations to a text file instead of a VCF file.

Thanks for the help!

isec VCF bcftools • 263 views
ADD COMMENT
2
Entering edit mode
4 months ago

Well, that's strange. This command should return you the dir folder containing the following files:

  1. README.txt: it simply describes the command executed and the produced files;
  2. sites.txt: A tab-separated file containing all the filtered variants (I guess this is your output);
  3. 0000.vcf: A VCF file containing all the filtered variants, which in your case will be all the variants unique to a.vcf.gz.

I tried the command myself and it seems to work as expected, outputting a VCF file, annotations included. I'm using bcftools 1.12.

With that said, I'd like to know:

  1. Which version of bcftools are you using?
  2. Try to add the option "-O v" to the command, which specifies that the output must be in VCF format (see the documentation) and see if it solves your problem.
ADD COMMENT
0
Entering edit mode

Thank you this solved my problem.

ADD REPLY

Login before adding your answer.

Traffic: 2155 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6