| 63 | Annotate variants if known SNPs |
| 64 | {{{ |
| 65 | # Index VCF file of SNPs (or other annotations) |
| 66 | bgzip dbSNP.version.vcf |
| 67 | tabix -p vcf dbSNP.version.vcf.gz |
| 68 | # Use annotation file to add info to ID column (if there's overlap between variant and annotation) |
| 69 | vcf-annotate -a dbSNP.version.vcf.gz -c CHROM,POS,ID,-,-,-,-,- -d key=INFO,ID=RS_ID,Number=1,Type=Integer,Description="SNPs from a subset of dbSNP" < My_variants.hg38.vcf > My_variants.hg38.dbSNP.vcf |
| 70 | }}} |
| 71 | See [http://www.htslib.org/doc/tabix.html tabix] for how to index BED or other file types. |
| 72 | See [http://vcftools.sourceforge.net/perl_module.html#vcf-annotate vcf-annotate] for details of last command. |