Question: How To Create A Venn Diagram Of Sample1.Vcf, Sample2.Vcf And Sample1&2(Union).Vcf Files
5
gravatar for Deniz
7.6 years ago by
Deniz50
Deniz50 wrote:

How to create a Venn diagram to compare 3 vcf files?

I know that vcftools vcf-compare can give the overlap of variants between 2 vcf files

vcf-compare sample1.flt.vcf.gz sample2.flt.vcf.gz > venn.out

Is there any possibility to compare vcf files ( 1, 2 and their union vcf files) from mpileup?

I really appreciate any help

mpileup vcftools • 11k views
ADD COMMENTlink modified 9 months ago by zx87548.0k • written 7.6 years ago by Deniz50

-m is not work in vcf-compare option, see below:

vcf-compare -m *.vcf.gz

Missing argument in sprintf at /usr/local/bin/vcf-compare line 142.
Invalid conversion in sprintf: "%\232" at /usr/local/bin/vcf-compare line 142.
Missing argument in sprintf at /usr/local/bin/vcf-compare line 142.
Invalid conversion in sprintf: "%\362" at /usr/local/bin/vcf-compare line 142.
Missing argument in sprintf at /usr/local/bin/vcf-compare line 142.
Invalid conversion in sprintf: "%\026" at /usr/local/bin/vcf-compare line 142.
Expected 1 column names, found [�BC�(�}{o�Ȗ�ߙOA�`0    Fq��,V��n@��m��R���-�6o˒V����|�=��EI��$
                                                                                                  �}qc��T<<�:�z��<���q:�'���_�#���CO�EpBm�l�&@����08��gn���5z����G���ç˫����    q)��c0&������#�4{��p�t2������?�E8��ͧ�`�x=��/�d�������Ŭ��/���d� M�/G����i���h2�%��藘�pq��`
<������_������!���V�u�\N�S0o��p���'����.O���Qpd�#k������wvw[����ܚM�����l:_#+�h�:���h����S����5�����0�>��(���|W`�������}N�o%�?���a��B�����3��w���5}���I`E�/�q[���s`~�f8��y`��q���^-�N��Bo��T��
                                            ��Xh    ]�Cl=�H���z�p<�<�2��%nK}����{�^{��DJ;S�MVg<Ɓu;��I۲���r�8�0jY���5hY��MA��a�r��s����:��-�a
                                                                                                                                                          �>�#�jw:].
 at /usr/local/bin/vcf-compare line 32.
    main::error('Expected 1 column names, found [\x{1f}\x{8b}\x{8}\x{4}\x{0}\x{0}\x{0}\x{0}\x{0}\x{ff}\x{6}\x{0}BC\x{2}\x{0}\x{f5}(\x{ed}}{o\x{db}\x{c8}\x{96}\x{e7}\x{df}\x{99}O...') called at /usr/local/bin/vcf-compare line 142
    main::read_mappings_list('clinvar.vcf.gz', 'ARRAY(0xac0ee0)') called at /usr/local/bin/vcf-compare line 163
    main::compare_vcfs('HASH(0xac0b50)') called at /usr/local/bin/vcf-compare line 22
ADD REPLYlink modified 9 months ago by zx87548.0k • written 4.4 years ago by Anop Singh Ranawat0
5
gravatar for jackuser1979
6.9 years ago by
jackuser1979860
US
jackuser1979860 wrote:

If you get the three VCF file, you can get the three files separtely containing the list of chromosome or contigs by simple awk script

awk '{print $1}' sample1(2,3).filt.vcf >output1(2,3).txt

You can paste these variants into this online venn-diagrame generator to get union & intersect of variants: http://bioinfogp.cnb.csic.es/tools/venny/index.html

ADD COMMENTlink modified 9 months ago by zx87548.0k • written 6.9 years ago by jackuser1979860
2
gravatar for Jorge Amigo
4.8 years ago by
Jorge Amigo11k
Santiago de Compostela, Spain
Jorge Amigo11k wrote:

vcf-compare is able to deal with two or more vcf files. the -p option is also able to print out the resulting comparisons.

you can also use the faster htslib implementation of bcftools instead of vcftools, using bcftools stats and plot-vcfstats.

ADD COMMENTlink modified 4.8 years ago • written 4.8 years ago by Jorge Amigo11k

Dear Jorge,

Can you kindly provide an example of that?

The reason I ask is because I have used bcftools stats with 3 vcf files. I wanted to create a venn diagram of their intersections and complements. However, the output was empty. There must have been something with the command but I am not sure what it is.

My command was as follows:

bcftools stats -S  File1.vcf.gz File2.vcf.gz File31.vcf.gz >bcftools_isec.out 1>>bcftools_isec.log 2>>bcftools_isec.stderr

I would really appreciate your input on this one.

ADD REPLYlink modified 9 months ago by zx87548.0k • written 4.2 years ago by modi202040

unless you're comparing 3 multi-sample vcf files, there's no need to use the -S option. the -S option allows you to specify a sample list, and as you're not including any samples at the input then the output should contain nothing. since you're redirecting all the output, you should see these errors in those files. test the raw command

bcftools stats File1.vcf.gz File2.vcf.gz File31.vcf.gz

to see if it simply works (files may not be properly bgzipped,...), and then redirect its output if you need it.

ADD REPLYlink written 4.2 years ago by Jorge Amigo11k

I tried it, but bcftools works only for two vcf files. If I use three files, I will receive list of options for bcftools...

ADD REPLYlink written 3.9 years ago by Korsocius130

Did anyone figured it out for three vcf files???

ADD REPLYlink written 2.7 years ago by Govardhan Anande130
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 781 users visited in the last hour