intersecting bed and vcf files for polyploid samples
2
0
Entering edit mode
9.3 years ago
hpapoli ▴ 140

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.

vcftools intersectBed • 3.6k views
ADD COMMENT
0
Entering edit mode
9.3 years ago

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 COMMENT
0
Entering edit mode

Oh sure, it worked, thanks a lot!

ADD REPLY
0
Entering edit mode
9.3 years ago

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 COMMENT

Login before adding your answer.

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