Question: polyploidy found and not supported by vcftools
1
gravatar for swierk.katarzyna
2.7 years ago by
swierk.katarzyna10 wrote:

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 • 2.2k views
ADD COMMENTlink modified 2.7 years ago • written 2.7 years ago by swierk.katarzyna10

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 REPLYlink written 2.7 years ago by swierk.katarzyna10
0
gravatar for Pierre Lindenbaum
2.7 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum127k wrote:

--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 COMMENTlink written 2.7 years ago by Pierre Lindenbaum127k

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

ADD REPLYlink written 2.7 years ago by Pierre Lindenbaum127k

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 REPLYlink written 2.7 years ago by swierk.katarzyna10

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 REPLYlink written 2.7 years ago by Pierre Lindenbaum127k
0
gravatar for Pierre Lindenbaum
2.7 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum127k wrote:

, 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 COMMENTlink written 2.7 years ago by Pierre Lindenbaum127k
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: 1786 users visited in the last hour