Skip to content

Commit

Permalink
added stats on the vcf file
Browse files Browse the repository at this point in the history
  • Loading branch information
joannmudge committed Feb 7, 2025
1 parent 23112ff commit c0b6636
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions module_notebooks/05-variant-calling-with-vg.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,34 @@
"!vg call SK1xyprp.chrVIII.pggb.aug.xg -k SK1xyprp.chrVIII.pggb.mapped.aug.pack -t 4 > SK1xyprp.chrVIII.pggb.aug_calls.vcf"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Generate stats on this VCF file. We will use `grep` to pull out the rows that start with SN."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!bcftools stats SK1xyprp.chrVIII.pggb.aug_calls.vcf | grep \"^SN\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"SNPs = single nucleotide polymorphisms (a single nucleotide change; reference and alternate alleles are all of length 1) \n",
"MNPs = multi-nucleotide polymorphisms (reference and alternate alleles are all of the same length and that length is >1) \n",
"indels = insertion/deletion (reference and alternate alleles are of different lengths)\n",
"others = more complex variants\n",
"multiallelic sites = more than one alternate allele\n",
"multiallelic SNP sites = more than one alternate allele at a SNP site"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -238,6 +266,7 @@
" <li>+ Create an index (xg).</li>\n",
" <li>+ Compute read support.</li>\n",
" <li>+ Generate a VCF.</li>\n",
" <li>+ Generate statistics.</li>\n",
" </ul>"
]
},
Expand All @@ -259,6 +288,7 @@
"\n",
"!vg call SK1xyprp.fullgenome.pggb.aug.xg -k SK1xyprp.fullgenome.pggb.mapped.aug.pack -t 4 > SK2xyprp.fullgenome.pggb.aug_calls.vcf\n",
"\n",
"!bcftools stats SK1xyprp.fullgenome.pggb.aug_calls.vcf | grep \"^SN\"\n",
"\n",
"</details>"
]
Expand All @@ -282,6 +312,12 @@
}
],
"metadata": {
"environment": {
"kernel": "conda-env-nigms-pangenomics-nigms-pangenomics",
"name": "workbench-notebooks.m127",
"type": "gcloud",
"uri": "us-docker.pkg.dev/deeplearning-platform-release/gcr.io/workbench-notebooks:m127"
},
"kernelspec": {
"display_name": "nigms-pangenomics",
"language": "python",
Expand Down

0 comments on commit c0b6636

Please sign in to comment.