Hi
i have a sequence of characters that I need to perform analysis on. I want to be able to generate a table with unique substrings of length n and their positions. A hash table was used in perl, not sure of the python equivelent .
sequence = 'gtccaaagtt'
trying to get the output into a table with substring in one column and position(s). for the above sequence this could be something like;
aa 4,5
i have the following code:
but it doesnt store locations or take into consideration repeats.
been searching google for two days now Sad please help
thanks
i have a sequence of characters that I need to perform analysis on. I want to be able to generate a table with unique substrings of length n and their positions. A hash table was used in perl, not sure of the python equivelent .
sequence = 'gtccaaagtt'
trying to get the output into a table with substring in one column and position(s). for the above sequence this could be something like;
aa 4,5
i have the following code:
Code:
def split_len(seq, length):
return [seq[i:i+length] for i in range(0, len(seq), length)]
been searching google for two days now Sad please help
thanks
Comment