I am trying to analyze my data using sklearn and see if there is some correlation between elements. My data set is a short protein motif which is quite diverse in sequence. My input looks like this:
1p 2p 3p 4p 5p genus
0 T V H F K Enterobacteriaceae
1 T V M F M Escherichia
2 E I H V K Enterobacteriaceae
3 K L M F K Enterobacteriaceae
There are 20 different letter possibilities at positions 1-5.
I wanted to use similar approach as it was shown in the sklearn Iris set to check dependencies between amino acids in different positions and bacterial genus. In the other words, I want to see if sequence of letters is genus specific and if letter at single position is somehow related to letters in other positions.
Problem is, as far as I know, only numbers can be used as an input for sklearn. I tried to subsitute letters with numbers: from 1e-10 to 1e10 for each individual letter, but I had problems with data visualization later. I hope there is other, way more efficient way of using this kind of input data. I would be very grateful for some hints. Thanks!