Skip to content

Instantly share code, notes, and snippets.

@purohit
Last active June 10, 2016 02:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save purohit/9357274 to your computer and use it in GitHub Desktop.
Save purohit/9357274 to your computer and use it in GitHub Desktop.
awk script to parse i-prefixed SNPs from https://api.23andme.com/res/txt/snps.data to a BED file
awk 'BEGIN{OFS="\t"}; NR>=5 { chrName=$3; if ($3 ~ "MT") chrName ="M"; if ($4 && $2 ~ "^i") print "chr" chrName, $4, $4, $2}' snps.data > BEDfile
@purohit
Copy link
Author

purohit commented Mar 4, 2014

Remember, snps.data should come from https://api.23andme.com/res/txt/snps.data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment