Variant calling
Help 5 / 9
Data analysis

View the variants

Now that we’re done with variant calling, let’s see what these variants look like:

bcftools view variants.bcf

The lines that start with # are header lines that contain metadata about the VCF file. To remove those lines:

bcftools view --no-header variants.bcf

There’s a lot of information in VCF files but for our purposes we don’t need most of it, so let’s use bcftools query to subset our output. For example, let’s only show the genomic position, the reference allele and the allele that was called at that position:

bcftools query --format "%POS\t%REF\t%ALT\n" variants.bcf

The last column (%ALT) contains the SNPs we called, and correspond to the secret message that is encoded into DNA.

Loading...