I am writing code to retrieve specific characters in a text file by position. For example, I want the sequence of characters between positions of 1043-1049 out of a text, like:
.........acddex.............
...and so on. I want that "acddex" sequence out of that text. I know its order and position. So far I can only open the file and input the position I want, but i have no idea how to numerate the order of whole text, harder yet, the whole file is combination of samples, so I also have to set a repeat/refresh of character count between specific characters of ">", it is like:
agoejngodgfjnsodjnfvsojdnvodfjnodjnfbodjngodjgndojgndlkfnvldfkngldjnfgdfjgnldjfngldjfngldfjngldjfngldjnfg dkjdnfgkjdnfgkjndfkgjndfjgnojfgnlfjngdljfngldjfng kdfjngkdfjngkjdndksjngskfjgndkfjgn
So I need the sequences out of these samples, which are in same file, when I know where the needed sequences start. So how can I do this?
Note: It is not a short sequence, at around 200,000 chars, and I want it to report me the chars between 1046th-1052th positions, for example.