data mining

I have a scientific sequence in the following format: - (just an example)

SQSEQUENCE5255 AA; 598254 MW; 906E8DD68450F85B CRC64;

MVAKHSLENG VFHKMTENEK ELILHFNNTK TDYPKNKTLH ELFEEQAMKT PDHTALVFGA QRMTYRELNE KANQTARLLR EKGIGRGSIA AIIADRSFEM IIGIIGILKA GGAYLPIDPE TPKDRIAFML SDTKAAVLLT QGKAADGIDC EADIVQLDRE ASDGFSKEPL SSVNDSGDTA YIIYTSGSTG TPKGVITPHY SVIRVVQNTN YIDITEDNVI LQLSNYSFDG SVFDIFGALL NGASLVMIEK EALLNINRLG SAINEEKVSV MFITTALFNM IADIHVDCLS NLRKILFGGE RASIPHVRKV LNHVGRDKLI HVYGPTESTV YATYYFINEI DDEAETIPIG SPLANTSVLI

The sequence is broken up into blocks of 10 letters with space in between. There are 6 blocks of 10 per line in the .txt file. If I wanted to extract lets say the letters starting at position 1 - 34, how would I go about it?

[773 byte] By [candybar1a] at [2007-11-26 15:01:29]
# 1

If you just want letters 1-34 of a String, use String.substring:

String part = theString.substring(1,35);

Note that usually positions in java are zero-indexed, so position 1 is in fact the second character.

Anyway, it looks to me like this code is more structured than that; you'll want to parse the file in a more sophisticated way than just taking substrings at predetermined positions. The details of that will depend on the details of this format.

paulcwa at 2007-7-8 8:50:26 > top of Java-index,Java Essentials,Java Programming...
# 2
By the way, that's not really "data mining". "Parsing" is probably a better term to use. Or just "reading".
paulcwa at 2007-7-8 8:50:26 > top of Java-index,Java Essentials,Java Programming...