polyploidy found and not supported by vcftools
2
1
Entering edit mode
6.7 years ago

Hi, I apologise in advance for the naive question, I have never used vcftools before. I am trying to complete what seems to be a fairly standard operation, where I filter a vcf file based on the presence/absence of snps:

  vcftools --vcf main.vcf --out test --snps filter.xlsx --recode

The above command returns the error:

Error: Polyploidy found, and not supported by vcftools: 1:50591

The above is based on a previous post: Variant calling results in polyploidy data I tried the following:

 grep -v "^#" main.vcf | cut -f 10- | cut -d ':' -f 1 | sort | uniq

which returns:

./././././././././././././././././././.
0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/1
0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/1/1
0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/1/2
0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/1/1/1
0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/1/2/2
0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/1/1/1/1
0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/1/1/1/1/1.....

The previous post did not seem to solve the problem can anyone tell me how to solve this???

software error • 4.2k views
ADD COMMENT
0
Entering edit mode

Hi, Thank you again for your answers. There was an error in the file. Do you know how to change xlsx to vcf directly?

ADD REPLY
0
Entering edit mode
6.7 years ago

--snps filter.xlsx

use GATK SelectVariants with option --keepIDs

If a file containing a list of IDs is provided to this argument, the tool will only select variants whose ID field is present in this list of IDs. The matching is done by exact string matching. The expected file format is simply plain text with one ID per line.

ADD COMMENT
0
Entering edit mode

PS: filter.xlsx tell me it's not really an excel spreadsheet.

ADD REPLY
0
Entering edit mode

Hi, Thank you very much for your answer. It seems my data is a little unconventional. I have a list of snps (in excel format) which I have to source from vcf file and filter into an output vcf file. But an ID is not supplied for each line, so I have to search for them using the numbers of chromosomes and positions. Do you know how can I extract them to vcf format? I am a beginner and would prefer to become familiar with vcf before trying another software like 'GATK' Also, yes the filter file is actually in excel format.... do you recommend a txt/vcf rather than xlsx format for the filter file instead?

ADD REPLY
0
Entering edit mode

Also, yes the filter file is actually in excel format.

there is no magic. Most tools won't be able to use this file.

and excel is bad. https://twitter.com/search?q=%23dontuseexcel&src=typd

and :

enter image description here

ADD REPLY
0
Entering edit mode
6.7 years ago

, so I have to search for them using the numbers of chromosomes and positions.

convert your table to bed. (chrom / 0-based-start/ 0-based-end) and use https://samtools.github.io/bcftools/bcftools.html

bcftools view  --targets-file the.bed input.vcf
ADD COMMENT

Login before adding your answer.

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