Edit erroneous line using bcftools
1
0
Entering edit mode
6 weeks ago
Claire1203 • 0

When handling a vcf file using bcftools, I get the following error:

[W::vcf_parse_format_fill5] Extreme FORMAT/AD value encountered and set to missing at 2:134461416
[E::vcf_parse_format_check7] Number of columns at 2:134461416 does not match the number of samples (343 vs 1842)
Error: VCF parse error

It seems like the line in vcf file for chr2, pos134461416 is malformed. How do I skip that row and ask bcftools to continue to parse the rest of the file? I tried reading up until pos 134461416, and that work just fine. But I want to be able to read information beyond pos 134461417. Or would it be possible to use other tools like grep or awk to clip out the erroneous line? Thank you so much in advance for the help!

awk vcf grep bcftools • 231 views
ADD COMMENT
0
Entering edit mode
6 weeks ago
Mensur Dlakic ★ 27k

This might work:

sed -e '134461416d' < old_file.vcf > new_file.vcf
ADD COMMENT

Login before adding your answer.

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