|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.
[…] 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 […]
[…] et al. 2010). to investigate the effect of inbreeding on this population’s parameters, 82 of the most inbred lines were reanalyzed (data not shown). the coefficient of inbreeding was calculated using vcftools (v0.1.14) (danecek et al. 2011). the quality of variant calls was also compared with the level of heterozygosity for all lines. we examined the effect of masking heterozygous bases and exclud […]
[…] of test statistics. eigenvectors for the gwas data sets were inferred using smartpca (part of eigensoft) by merging cases and controls with phase iii hapmap samples. ld metrics were calculated in vcftools v0.1.12b67, using uk10k merged 1000 genomes project data and plotted using vispig68., the eight snps in the most promising loci (table 1; supplementary table 6 ), were taken forward for de […]
[…] 238,493,056), the pipeline found 476,589 tags, aligned with bowtie2 software. the tag mapping and the polymorphism calling identified 109,201 polymorphic sites. the data were further processed with vcftools . indels and snps that were not biallelic were discarded. data points with a sequencing depth of less than five were set to missing. snps with more than 50% missing data were discarded. […]
[…] increasing physical distance between snps due to meiotic recombination. the squared correlation coefficient r2 between pairs of snps of varying distance across the same chromosome was measured using vcftools; r2 values were binned by distance (50-bp windows) and medians within each window were plotted against physical distance between snps. the level of background ld between unlinked markers […]
Be the first to review VCFtools