How to choose vcf-compare options
3
1
Entering edit mode
7.2 years ago
Chenglin ▴ 220

Thanks to the help from experts from this forum, I have already compressed and indexed the vcf files to provide inputs for using vcf-compare. I  want to know the variants between two accessions. I tried -p option to generate Venn diagrams but it didn't work. To compare genotypes (not only positions), I  tried -g option, it seemed not working either.  Any suggestions? 

SNP • 7.6k views
ADD COMMENT
5
Entering edit mode
7.2 years ago

vcf files must be bgzip compressed and tabix indexed. having said that:

vcf-compare *.vcf.gz will output some summary stats

vcf-compare -g *.vcf.gz will output the previous summary stats plus genotype stats (summary, proper comparison, allele frequency and depth)

vcf-compare -p prefix *.vcf.gz will plot these stats, generating prefix*.gp and prefix*png files

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

ADD COMMENT
0
Entering edit mode

Thank you very much for your detailed explain. I will try.

ADD REPLY
0
Entering edit mode
6.8 years ago

-m is not work in vcf-compare option

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 COMMENT
0
Entering edit mode

Anop, please ask a separate question?

ADD REPLY
0
Entering edit mode
6.8 years ago

vcf-compare -g *.vcf.gz > g_out.out

Error: There is no overlap between any of the samples, yet haplotype comparison was requested.
 at /usr/local/bin/vcf-compare line 32.
    main::error('Error: There is no overlap between any of the samples, yet ha...') called at /usr/local/bin/vcf-compare line 261
    main::compare_vcfs('HASH(0x1bccb50)') called at /usr/local/bin/vcf-compare line 22

 

ADD COMMENT

Login before adding your answer.

Traffic: 3170 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