Skip to content

Instantly share code, notes, and snippets.

@mcnemesis
Created February 25, 2026 15:47
Show Gist options
  • Select an option

  • Save mcnemesis/41ab5c18e62a7994ebba762574f56071 to your computer and use it in GitHub Desktop.

Select an option

Save mcnemesis/41ab5c18e62a7994ebba762574f56071 to your computer and use it in GitHub Desktop.
GENETICS: GENETIC to DECIMAL CODE v1 : a basic TEA program to convert from DNA or RNA sequences into corresponding decimal sequences
#----[ DNA to DECIMAL DECODER v1 ]
#################################
# The program maps any legitimate
# genetic code sequence of
# symbols spanning the Base-na (A,C,G,T,U)
# to their corresponding digit
# equivalents in base-10
#################################
v:vINPUT
z!: # pre-process: capitalize
d!:[ACGTU, <>] # constrain to just na and delimiters
r!:A:0 | r!:C:1 | r!:G:2 | r!:T:3 | r!:U:4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment