Help needed for file operations with string and ints!


I have outfile generated in txt format.
as follows..

1 2-22 4 ATTTCTTATGGCATTTGTTC
.
.
.
.
.
...

XXX

Now I wanted to read this file line by line. use characters in each line as a string

and depending on the value on left of string, perform some deletion on string length for eg here in line 1, 4 so i want to delete from position 10 till 10+4 characters.

then I want to give every character in string, some predesigned value for eg. if 1st char is A then value to be 10 etc etc..


so that depending on value i want to sort them later.

can any one guide me in this !

Thanks in advance

Last edited on
Topic archived. No new replies allowed.