Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Invalid record in file #1098

Open
r-poloni opened this issue Jul 23, 2024 · 0 comments
Open

Error: Invalid record in file #1098

r-poloni opened this issue Jul 23, 2024 · 0 comments

Comments

@r-poloni
Copy link

Hi, I am trying to produce a bedfile containing all uncalled regions of the vcf, using bedtools version 2.27.1. However, the same error pops out with the newest 2.31.1. The command is:

bedtools complement -i vcf_file-vcf.gz -g genome_index.fai > uncalled.bed

And I am getting always the same error:
Error: Invalid record in file vcf_file.vcf.gz. Record is

I tried to reformat the vcf with plink using

plink --vcf vcf_file.vcf.gz --double-id --allow-extra-chr --keep-allele-order --recode vcf-iid --out vcf_file_recoded

And I get exactly the same error. With plink output it is saying that the offending line is:
ptg000001l 78925 . T <NON_REF> . . PR GT 0/00/0 0/0 0/0 0/0 0/0 0/0 0/0 0/0 0/0 0/0 0/0 0/00/0 0/0 0/0 ./. 0/0 0/0 0/0 0/0 0/0 ./. 0/0 ./../. ./. 0/0 0/0 0/0 0/0 ./. 0/0 ./. ./. ./. 0/00/0 0/0 0/0 0/0 0/0 0/0 0/0 0/0 0/0 0/0 0/0 0/00/0 ./. ./. 0/0 0/0 0/0 0/0 0/0 0/0 0/0 0/0 0/00/0 0/0 0/0 0/0 0/0 0/0 0/0 0/0 0/0 0/0 0/0 0/00/0 ./. 0/0 0/0 0/0 0/0

As a last resource, I tried to remove the "<NON_REF>" tag in the ALT field which was the only weird thing I could spot and replace it with a "T" for tyrosine, and the error disappeared.

Since this error is popping out with vcf files produced by probably two of the most widely used variant callers, like bcftools and GATK, I think that it would be a huge benefit to fix this issue, if it is a problem with bedtools.
If it is an error on my side, I would be very happy to know any solution.

Thank you in advance,
Riccardo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant