Note: Specific regions were substituted by <gene>, <chrom> and <pos> to hide sensitive information. Real usage did not contain brackets.
After combining region of interest locations with bedtools to build a new reference FASTA:
bedtools getfasta -fi <genome>.fasta -bed <regions_of_interest>.bed -name+
And then doing variant calling with this new reference, we obtain a chromosome (VCF column #CHROM) name structure like so:
<gene>::<chrom>:<pos>
Upon using bcftools concat to merge VCF files:
bcftools concat -a <file>.snp.vcf.gz <indel>.indel.vcf.gz -O v -o <file>.merged.vcf
This structure throws an error:
Checking the headers and starting positions of 2 files
[E::_regions_init_string] Could not parse the region(s): <gene>::<chrom>:<pos>
However, as of VCFv4.3 and later this structure should be legal. See the official VCFv4.3 changelog:
7.1 Changes to VCFv4.3
(...)
The VCF specification previously disallowed colons (‘:’) in contig names to avoid confusion when parsing
breakends, but this was unnecessary. Even with contig names containing colons, the breakend mate position
notation can be unambiguously parsed because the “:pos” part is always present.
This was tested on bcftools=1.20, installed from source code, and previously bcftools=1.15.1, installed on conda.
I tried to confirm which HTSlib version was being compiled, but I couldn't figure it out. Does the current release of bcftools support VCFv4.3 and later?
Note: Specific regions were substituted by
<gene>,<chrom>and<pos>to hide sensitive information. Real usage did not contain brackets.After combining region of interest locations with
bedtoolsto build a new reference FASTA:And then doing variant calling with this new reference, we obtain a chromosome (VCF column
#CHROM) name structure like so:<gene>::<chrom>:<pos>Upon using
bcftools concatto merge VCF files:This structure throws an error:
However, as of VCFv4.3 and later this structure should be legal. See the official VCFv4.3 changelog:
This was tested on
bcftools=1.20, installed from source code, and previouslybcftools=1.15.1, installed on conda.I tried to confirm which
HTSlibversion was being compiled, but I couldn't figure it out. Does the current release ofbcftoolssupport VCFv4.3 and later?