What about if I have a sample.txt file that has 10 000 samples and a vcf.gz that I know has less samples that txt file. How could I see with of the txt file samples I have in my vcf and how many of them. In the vcf might be also samples that are not in the txt file.
samples.txt:
11111
22222
33333
44444
55555
66666
77777
Samples from vcf.gz:
11111
22222
34567
66666
56789
Outputffile that I want is:
11111
22222
66666
And then of course I can get the amount easily with wc -l.
This bcftools view -S sample.txt vcf.gz --force-samples > outfile gives a file where is also some samples from the sample file that was not in the vcf.gz at first.
Output that I had:
11111
22222
33333
44444
55555
66666
77777