Some observations about thread-O/Ps problem description:
1) The FASTA format (at least the original Pearson format) uses series of lines up to 120 characters each. Normally they are considerably shorter (80 characters and less). The discussion about line length should be moot therefore and i suppose thread-O/P just has neglected to describe his problem properly insofar as he is talking about sequence offsets, not line offsets. "500" probably means "character 20 on the seventh line" (of 80 characters each).
Still, if this is the case is everybodies guess and he should perhaps explain what he really wants.
2) Speaking of offsets: the FASTA format allows for the following nucleic acid codes only in the sequence representation:
A A Adenine
C C Cytosine
G G Guanine
T T Thymine
U U Uracil
R A or G puRine
Y C, T or U pYrimidines
K G, T or U bases which are Ketones
M A or C bases with aMino groups
S C or G Strong interaction
W A, T or U Weak interaction
B not A (i.e. C, G, T or U) B comes after A
D not C (i.e. A, G, T or U) D comes after C
H not G (i.e., A, C, T or U) H comes after G
V neither T nor U (i.e. A, C or G) V comes after U
N A C G T U Nucleic acid
X masked
- gap of indeterminate length
plus the following codes for amino acids:
* translation stop
- gap of indeterminate length
A Alanine
B Aspartic acid (D) or Asparagine (N)
C Cysteine
D Aspartic acid
E Glutamic acid
F Phenylalanine
G Glycine
H Histidine
I Isoleucine
J Leucine (L) or Isoleucine (I)
K Lysine
L Leucine
M Methionine
N Asparagine
O Pyrrolysine
P Proline
Q Glutamine
R Arginine
S Serine
T Threonine
U Selenocysteine
V Valine
W Tryptophan
X any
Y Tyrosine
Z Glutamic acid (E) or Glutamine (Q)
Characters other than the mentioned are ignored. Is there a rule in place if ignored character (if there are any) should be removed from the character count too (will "10" mean "tenth non-ignored character" or "tenth character overall"?
2a) What about sequence alignment?
3) Is your FASTA format the original Pearson format or the (somewhat different) NCBI format? i.e. are multi-line comments introduced with the semicolon character at the beginning of the line to be expected or not?
(for reference see : The NCBI Handbook - Chapter 16The BLAST Sequence Analysis Tool)
bakunin