|Interface||Command line interface|
|Restrictions to use||None|
|Programming languages||C++, Perl|
|License||GNU Lesser General Public License version 3.0|
Add your version
- person_outline Richard Durbin <>
Comparison of two VCF files, chr order issues
#1 opened on 2017-02-10 by cmonat • 3 answers
Hi, I'm using the vcftools for the first time. I'm trying to compare two VCF files with the following command line: ------ vcftools --vcf Sample_All.vcf --diff Sample_indA.vcf --diff-site --out Multiple_vs_indA ----- and I get the following error message: ----- Error: Both files must be sorted in the same chromosomal order. chr1 in file 2 appears to be out of order. ----- But I know that in both VCF file I have the chr1 included, so, why do I have this message? Plus I have tried to had the "--not-chr chr1" parameter to my command line, as I understand it was advised to do in this case, but then I have the same error message but on chr2 ... Is it normal? What should I do to resolve this issue? Or maybe it is just a warning message? Thank you C.
It seems you have an ordering issue between your two files. You should check that both files are sorted in the same way. You can use "SortVcf" from Picard tools (https://omictools.com/picard-tool) or vcf-sort from VCFtools ("vcf-sort file.vcf.gz") command to sort your files. If they are both sorted equally, you should check if you have the same number of chromosomes present in both files.
Thank you! It seems also that bcftools (https://omictools.com/bcftools-tool) have replaced vcftools... C.
I don't think one has replaced the other. They are just two different toolkits. Both have been published in 2011.
Publication for VCFtools
VCFtools in pipelines(120)
[…] psti-ecot22i based on the max barcode size. the minmaf for the discoverysnpcallerpluginv2 was set to 0.01. all other default parameters were used. non-biallelic sites and indels were removed using vcftools v.0.1.14 (danecek et al., ). variant call format (vcf) files for both enzymes were then merged using a custom perl script, preferentially keeping snps called by psti-ecot22i at overlapping […]
[…] et al., ) by bwa (li and durbin, ). then snp/indel variants were called using gatk (mckenna et al., ; depristo et al., ). finally, snp/indel density was calculated from the variation data by vcftools (danecek et al., )., to verify the indel variants derived from resequencing analysis, we designed specific pcr primers for randomly selected indel variants with 3bp or more difference, […]
[…] the genome-wide genetic differentiation between broiler and layer lines. chromosomes w/z, unplaced, random, and mitochondrial were not considered in this study. this method was performed using vcftools v. 0.1.12 software  with snp (n = 12,806,643) and indel (n = 1,273,210) datasets considered separately and using overlapping windows of 20 kb and a step size of 10 kb. weighted fst values […]
[…] the californian samples. the first snps were a previously generated set of snps identified in native range african and european bees () and was used for all ancestry analyses. we used samtools/vcftools to generate snp calls for each individual, requiring a quality score of 30 for reads to be included. a minimum coverage of 7× was required to make genotype calls for an individual […]
[…] (eas)., to find the populations wise genetic differentiation with respect to cardiovascular diseases, pair-wise weir and cockerham fst  values were calculated for the 1000 genomes data, using the vcftools. for this purpose, two approaches were employed, i.e fst calculation for all the genes which harbored the predicted deleterious snvs in this analysis, and for deleterious snvs […]
VCFtools in publications(584)
[…] ()., we used filtered variants (vcf) to visualize relationships between isolates using principal-component analysis (pca) implemented in snprelate v.1.10.2 (). summary statistics were computed using vcftools (). neutrality tests were performed using angsd (). genetic clustering was performed using ngsadmix () and faststructure ()., the linkage disequilibrium was calculated as r2, which indicates […]
[…] in the supplementary information of a previous paper. the resulting vcf files were then combined with the vcf files downloaded from the pf3k project and filtered to remove non-variant sites using vcftools., to determine whether any previously implicated drug resistance snps were associated with ppqr, we analyzed the snps in the genes listed in the supplementary data . samples were divided […]
[…] to build the database for snpeff., to analyze the effects of single snps, the vcf files containing the lists of annotated snps for each sample were merged using the following command available from vcftools:, vcf-merge sample1.vcf.gz [...] samplex.vcf.gz | \, bgzip –c > merged.all.emit.confident.sites.vcf.gz, variant annotations of upstream and downstream snps located further than 100 bases […]
[…] with a step of 250 kb along all chromosomes, using the 19,615,087 high-quality snvs randomly distributed on chromosomes. genomic regions under selective sweeps were measured by the fst using vcftools v0.1.13 () with parameters of “–fst-window-size 1000000–fst-window-step 250000.” genomic regions with fst values >0.3 were considered under strong selective sweeps. genetic diversity (π) […]
[…] version 1.6 . the resulting sequences where aligned using clustal omega , the alignment was checked and trimmed in phyde version 0.9971 . calculations were done using dnasp version 6.10.03 , vcftools version 0.1.15  and microsoft excel 2016., additional file 1: additional file 2: additional file 3: additional file 4: additional file 5: additional file 6: additional file 7: additional […]
Be the first to review VCFtools