Skip to content

Instantly share code, notes, and snippets.

@iiSeymour
Created March 8, 2023 14:29
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 iiSeymour/8fd15893e9c3dd573f37c0aae3329bc2 to your computer and use it in GitHub Desktop.
Save iiSeymour/8fd15893e9c3dd573f37c0aae3329bc2 to your computer and use it in GitHub Desktop.
>>> import numpy as np
>>> read = np.array([
[0., 97., 0., 0.,],
[0., 4., 4., 87.,],
[71., 10., 2., 6.,],
[8., 5., 65., 9.,],
[7., 62., 11., 6.,],
[4., 19., 7., 55.,],
[51., 9., 6., 17.,],
[15., 4., 49., 12.,],
[2., 42., 27., 7.,],
[6., 16., 22., 32.,],
[2., 13., 39., 18.,],
[12., 16., 36., 8.,],
[12., 24., 21., 15.,],
[21., 25., 13., 12.,],
[15., 16., 17., 21.,],
[15., 23., 11., 20.,],
[12., 20., 16., 19.,],
[14., 27., 13., 13.,],
[11., 27., 8., 19.,],
[4., 32., 14., 14.,],
[4., 34., 15., 9.,],
[3., 28., 19., 12.,],
[12., 21., 13., 16.,],
[11., 18., 17., 15.,],
[12., 20., 14., 15.,],
[8., 22., 15., 15.,],
[4., 25., 20., 10.,],
[5., 25., 16., 13.,],
[8., 26., 11., 9.,],
[11., 17., 14., 12.,],
[6., 23., 9., 16.,],
[13., 8., 12., 21.,],
[7., 12., 14., 19.,],
[11., 5., 13., 23.,],
[13., 3., 10., 25.,],
[4., 5., 19., 22.,],
[9., 8., 16., 16.,],
[12., 9., 15., 12.,],
[8., 13., 8., 18.,],
[13., 7., 15., 11.,]
])
>>> print(''.join("ACGT"[idx] for idx in np.argmax(read, axis=1)))
CTAGCTAGCTGGCCTCCCCCCCCCCCCCCCCTTTTTGGTG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment