Entering edit mode
11.1 years ago
Click downvote
▴
720
Couldn't find the answer on google.
Couldn't find the answer on google.
awk '{if ($1 == "#CHROM"){print NF-9; exit}}' input_vcf_file.vcf
Yes, it was trivial.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
exactly, it is just the number of columns, after substracting the first 9. Moreover, when you do any operation with vcftools, the number of individuals is shown in the log messages ("File contains 2737 entries and 1092 individuals.", "After filtering, kept 1092 out of 1092 Individuals")