I have a .vcf file of 10 GB with different columns (pos, ref, alt, quality,ecc..) and I have a column for each patient !!!
I have another file containing only the id of the patients (only one column) that I want to analyze. How can I filter the 1° file deleting the columns that don't appear in the 2° file ??? I try to use bcftools:
bcftools view -S sample_file.txt file.vcf > filtered.vcf, but the result contains only 2 columns and the total number of patients can be 300.
thanks in advance