Question: intersecting bed and vcf files for polyploid samples
0
gravatar for hpapoli
4.4 years ago by
hpapoli70
Sweden
hpapoli70 wrote:

Hello,

I want to intersect a vcf file with a bed file, that is to get the list of SNPs falling in a specific interval.

For my diploid samples, I could successfully use this command:

vcftools --vcf Sample.1.vcf --bed coordinates.bed --out VCFNEW --recode

But using this for my pooled samples which have a higher ploidy, I get the following error:

Error: Polypolidy found, and not supported by vcftools

I was wondering how I could overcome this problem.

Thanks.

intersectbed vcftools • 2.0k views
ADD COMMENTlink modified 4.4 years ago by Alex Reynolds28k • written 4.4 years ago by hpapoli70
0
gravatar for Devon Ryan
4.4 years ago by
Devon Ryan90k
Freiburg, Germany
Devon Ryan90k wrote:

Have you tried just using bedtools intersect? I've never tried that with a polyploid VCF file, but since it's not trying to recode anything it might work.

ADD COMMENTlink written 4.4 years ago by Devon Ryan90k

Oh sure, it worked, thanks a lot!

ADD REPLYlink written 4.4 years ago by hpapoli70
0
gravatar for Alex Reynolds
4.4 years ago by
Alex Reynolds28k
Seattle, WA USA
Alex Reynolds28k wrote:

Mapping with BEDOPS bedmap provides the intervals, along with any SNPs overlapping each interval:

$ bedmap --echo --echo-map coordinates.bed <(vcf2bed < Sample.1.vcf) > answer.bed
ADD COMMENTlink written 4.4 years ago by Alex Reynolds28k
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: 2013 users visited in the last hour