next up previous contents
Next: The SearchDb Function Up: Accessing a Darwin Sequence Previous: The Sequence Structure

The String Function

The String function allows one to extract sequences of an entry to be extracted easily.






Calling Sequence:
String( $x_{1}, x_{2}, \ldots x_{k}$)
String(Sequence( $y_{1}, y_{2}, \ldots, y_{k'}$))
String( $x_{1}, x_{2}, \ldots x_{k}$, Sequence( $y_{1}, y_{2}, \ldots, y_{k'}$))
Parameters:
xi : { posint, 0}
yi : { posint, 0}

Returns: This function returns a list of sequences. For each xi, DB[string][xi..DB[TotChars] is returned. For each element yi of a Sequence structure, the contents of the <SEQ>, </SEQ> tags for the entry found at Sequence(yi) are returned as a string.



> String(1, 100, 1000, 20000, 70000);       # first form of String

[DBNAME>SH2 Database</DBNAME><DBRELEASE>1.0</DBRELE ..(76824)
.. G</SEQ></E>, ROSINE-PROTEIN KINASE ABL-1 (EC 2.7.1.112) (F
RAGME ..(76725).. G</SEQ></E>, E ABL2 (EC 2.7.1.112) (TYROSIN
E KINASE ARG).</DE>< ..(75825).. G</SEQ></E>, VSTSQLLQFALHVAE
GMEYLESKKLVHRDLAARNILVSEDLVAKVSDFGL ..(56825).. G</SEQ></E>, 
MAN</ID><AC>P07947;</AC><DE>PROTO-ONCOGENE TYROSIN ..(6825)..
 G</SEQ></E>]

> seq_offsets := Sequence(Entry(1, 2, 78)); # get the sequence offsets
seq_offsets := Sequences(367,1338,76197)

> the_seqs := String(seq_offsets);          # get the sequences

the_seqs := [NNEWCEARLYSTRKNDASNQRRLGEIGWVPSNFIAPYNSLDKYTWYHG
KI ..(557).. DVVPLAEKNVR, MGQQVGRVGEAPGLQQPQPRGIRGSSAARPSGRRR
DPAGRTTETGFNIFT ..(1182).. CVQEISDVVQR, MPDPAAHLPFFYGSISRAEAE
EHLKLAGMADGLFLLRQCLRSLGGYVLSL ..(618).. QCEQVAEAACG]

> mixed := String(60000, 70000, Sequence(2533));

mixed := [YVAEYKSLDAEEWFFGQVKRVDAEKQLMMPFNNLGSFLIRDSDTTPGDFS.
.(16825).. G</SEQ></E>, MAN</ID><AC>P07947;</AC><DE>PROTO-ONC
OGENE TYROSIN ..(6825).. G</SEQ></E>, MLEICLKLVGCKSKKGLSSSSSC
YLEEALQRPVASDFEPQGLSEAARWNS ..(1130).. SVKEISDIVQR]



Gaston Gonnet
1998-09-15