Thanks, how do I accept your answer?
• 0 views
•
link
I need to get rid of one sample in each of 3 vcfs then merge. I am not an expert on Linux, but cobbled together this:
bcftools merge <(bcftools view -s ^'sample1' vcf1.vcf) <(bcftools view -s ^'sample2' vcf2.vcf) <(bcftools view -s ^'sample3' vcf3.vcf) -Ob > merged.bcf
Is using process substitution like this "safe" or is this asking for trouble. The other thought is just to do the view command first making intermediate files.
It should be fine. The line added to the VCF file will replace the process substitution parameters with /dev/fd/ file descriptors.
Log in to answer this question.