Hello, thanks ahead of time for any help anyone may have. I am in a strange situation where I am working with old data generated by someone else and only have access to a VCF they generated. They ran a SNP caller with each sample in the study, creating something like below (condensed).
#CHROM POS ... Green1 Green2 Green3 Blue1 Blue2 Blue3
I have found tools that would let me merge vcf tools such that I could add to this Yellow1 Yellow2 Yellow3, but I haven't seen something that would let me convert Green1 Green2 Green3 into just Green.
In other words, I haven't been able to find resources on condensing vcfs by a factor. I am new to this type of work, but, in seeing this gap I am wondering if I am simply not finding a tool for this, or if this tool doesn't exist for good reason. I know that if I had access to the sequencing data I could combine the samples before variant calling, but I do not have access to the sequencing data it seems. tl;dr: Is there a way to condense/combine replicates/samples of the same condition in a VCF file easily, or is this something that shouldn't be done from a VCF at all? Thanks for any help!
1 answer
See also Is it Possible to "Merge" data from Replicates within a VCF SNP File
I wrote a tool jvarkit/bcftoolsmergebest which aims to find the 'best' genotype after bcftools merge was invoked with the same sample(s) with the option --force-samples see : https://jvarkit.readthedocs.io/en/latest/BCFToolsMergeBest/
Log in to answer this question.