Last active
August 21, 2023 21:47
-
-
Save obenshaindw/99440ac43de07548e453 to your computer and use it in GitHub Desktop.
Add dbSNP IDs to a VCF file that doesn't have them.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#GATK Method <- Slower and keeps original ID plut dbSNP rsID | |
# R=Reference FASTA | |
# V=VCF file to add IDs to | |
# --dbsnp = dbsnp VCF -- download from NCBI FTP | |
java -jar GenomeAnalysisTK.jar -R /reference/Homo_sapiens_assembly19.fasta -T VariantAnnotator -V vcf_to_add_id_to.vcf --dbsnp /reference/dbsnp_137.b37.vcf.gz --out /data/Broad.chr1.annotated.vcf | |
#bcftools Method <- Faster, replaces existing ID with dbSNP rsID | |
/usr/bin/htslib/bcftools/bcftools annotate -a /reference/dbsnp_137.b37.vcf.gz -c ID vcf_to_add_id_to.vcf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment