Skip to content

Instantly share code, notes, and snippets.

@slavailn
Last active March 27, 2024 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slavailn/771100d60f43fa321fe19fc52a544003 to your computer and use it in GitHub Desktop.
Save slavailn/771100d60f43fa321fe19fc52a544003 to your computer and use it in GitHub Desktop.
Retrive SNP sites from VCF files based on rs ids
# Get SNP records based on rs ids from VCF file
# Kevin Blighe recipe from https://www.biostars.org/p/373852/
# Create a file with snp ids of interest, one id per line
# We can give the newly created file any name, for example snp.txt
bcftools view --include ID==@snp.txt target.bcf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment