I have a vcf file like:
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT T127554 T136801 T78254 T9 T96096 T99633
1 10492 . C T 40.17 . AC=1;AF=0.125;AN=8;BaseQRankSum=-4.310e-01;ClippingRankSum=0.00;DP=10;ExcessHet=3.0103;FS=4.771;MLEAC=2;MLEAF=0.250;MQ=60.00;MQRankSum=0.00;QD=13.39;ReadPosRankSum=-9.670e-01;SOR=2.
225 GT:AD:DP:GQ:PL ./.:0,0:0:.:0,0,0 0/0:3,0:3:6:0,6,90 ./.:0,0:0:.:0,0,0 0/0:3,0:3:0:0,0,9 0/1:1,2:3:31:67,0,31 0/0:1,0:1:3:0,3,34
If I read the file with the code:
vcf = readVcf(vcffile, "hg19", param=ScanVcfParam(fixed=c("CHROM", "POS", "ID", "REF", "ALT")))
I get warning:
1: In .vcf_usertag(map, tag, "fixed", verbose) :
ScanVcfParam ‘fixed’ fields not found in header: ‘CHROM’ ‘POS’ ‘ID’ ‘REF’
It does read in but with wrong format.
After reading in (ignored the warning for a moment), I filtered with filterVCF, and saved as new vcf.
But it has wrong information on the column ID:
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT T127554 T136801 T78254 T9 T96096 T99633
7 132011577 7:132011577_G/T G T 35.16 . AC=1;AF=0.125;AN=8;BaseQRankSum=0.431;ClippingRankSum=0;DP=22;ExcessHet=3.0103;FS=4.771;MLEAC=1;MLEAF=0.125;MQ=60;MQRankSum=0;QD=11.72;ReadPosRankSum=0;SOR=2.225 GT:AD:DP:GQ:PL .:0,0:0:.:0,0,0 0/0:5,0:5:12:0,12,180 .:0,0:0:.:0,0,0 0/1:1,2:3:28:66,0,28 0/0:5,0:5:15:0,15,190 0/0:8,0:8:24:0,24,291
Also, I tend to feel that the filtering is not properly done. I will take closer look tomorrow.