Skip to content

Instantly share code, notes, and snippets.

@s4553711
Created August 29, 2016 07:29
Show Gist options
  • Save s4553711/98eb61b0e5d829af4763d682d1de00bc to your computer and use it in GitHub Desktop.
Save s4553711/98eb61b0e5d829af4763d682d1de00bc to your computer and use it in GitHub Desktop.
Note about 23andme script to translate array to VCF
rs123 chr1 300 AB
-> no rsid -> rsid = "."
-> AA =~ /-*/ -> next
-> [D,I]B -> next
-> if not find chr1:300 in ref -> log error
-> if find chr1:300 in ref -> stre $ref
-> if $ref == PASS -> next
-> processAltAndGenotype (AB, $ref)
-> if only "A" and A == $ref -> $alt = '.'
-> else
-> if A != B
-> if ref == A or B
-> alt=A or B, GT=0/1
else
-> alt=A,B, GT= 1/2
else
-> if a == ref
-> alt=., GT=0/0
else
-> alt=A, GT=1/1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment