bcftools view code example

Example 1: bcftools extract information

# Example usage:
bcftools query --format '%CHROM\t%POS\t%INFO/END\t[%GT]\n' input_file.vcf
# Where:
#	- Fixed columns like CHROM and POS are referred to as %COLUMN
#	- Info fields need to be specified as %INFO/TAG
#	- Format fields need to be enclosed in brackets
#	- The tab \t and new line \n characters are used to format the output

Example 2: bcftools view sample info

# Basic syntax:
bcftools view --samples 'samples_1,sample2,...' input_file.vcf