Hello everyone,
I am trying to filter a bgzipped vcf file with a bgzipped bed file. I have worked a script for that using bcftools-1.9
The script is:
bcftools call -c -T bedfile.bed.gz chromosomefile.vcf.gz > filteredfile.vcf
I get an error message which says:
Wrong number of PL fields? nals=1 npl=-1
Afterwards i tried to even the script giving a .vcf.gz extention to the output file, but it retreived the same error message.
I haven't manipulated the chromosome file, nor the bed file, since i have downloaded them from a repository where they are supposed to be ready to use. I would appreciate any one of you helping to sort this problem, or suggesting any other script/tools to filter this chromosome with the bed file.
I have to say the chromosome file is a complete human chromosome, and the bed file is a list of sites which should be filtered/masked from the whole chromosome, if that info is of any use to solve the problem
Cheers everyone and thanks in advance
Thanks a lot for the answer, I used the command call, since reading the manual it says that view is a former command, which on newer versions of bcftools (say 1-8 towards 1-9 versions) was changed to "call" , anyways, I will try, see what happens!
R.
bcftools call
used to bebcftools view
, true, but the command descriptions make it clear what they do.They should really drop that statement out of the manual. It's dumb that they reused a sub-command to perform a completely unrelated functionality.
That being said, you should always go by the manual for the current version.
Hello Ram,
Well, I tried, it is a large file so it'll last, but it is generating the vcf file with the command you suggested.
Thank yow for that awesomely fast answer.
Best Regards
R.
Glad it helped. I've moved my comment to an answer - you can accept it once you confirm it worked.