Hello,
I want to intersect two vcf files :
File 1 :
CHROM POS ID REF ALT QUAL FILTER INFO FORMAT 7.bam
Scaffold_1 223 . G T 10.8428 . DP=7;DPR=5,2;VDB=0.18;SGB=-0.453602;RPB=0.8;MQB=1;MQSB=1;BQB=0.9;MQ0F=0;ICB=1;HOB=0.5;AC=1;AN=2;DP4=5,0,0,2;MQ=60 GT:PL:DP:DV:SP:DP4:DPR 0/1:44,0,110:7:2:13:5,0,0,2:5,2
Scaffold_1 435 . T C 20.145 . DP=3;DPR=1,2;VDB=0.1;SGB=-0.453602;RPB=1;MQB=1;MQSB=1;BQB=1;MQ0F=0;ICB=1;HOB=0.5;AC=1;AN=2;DP4=0,1,2,0;MQ=60 GT:PL:DP:DV:SP:DP4:DPR 0/1:53,0,30:3:2:0:0,1,2,0:1,2
File 2 :
CHROM POS ID REF ALT QUAL FILTER INFO FORMAT S07
scaffold_11 651457 929888 G T . PASS Ty=SNP;Rk=1;UL=.;UR=.;CL=.;CR=.;Genome=C;Sd=1 GT:DP:PL:AD:HQ 0/0:4:4,16,84:4,0:70,0
scaffold_1188 2186 894758 T G . PASS Ty=SNP;Rk=1;UL=.;UR=.;CL=.;CR=.;Genome=T;Sd=1 GT:DP:PL:AD:HQ 1/1:4:84,16,4:0,4:0,70
This is the error :
bedtools intersect -a 7.variant_snp.vcf -b 7.variant_snp2.vcf | head
ERROR: file 7.variant_snp.vcf has non positional records, which are only valid for the groupBy tool.
I don't know how to deal with this issue. Does anyone have experience of this kind of error?
Thanks in advance
might be worth simply parsing the "VCF" files into a BED format? Should be able to just include the POS field twice to stand in for the Start & Stop positions.