Darwin Help

Back to Index

GetOffset

Function GetOffset - Gets an offset in the database for a string

Calling Sequence  GetOffset(seq)
Parameters
NameTypeDescription

seq stringa string in or outside the database
Return Type  integer
Synopsis The GetOffset function finds the offset of a string whether it is in the database or outside. It is necessary when we want to pretend that a string is a sequence in the database to make it an argument of Match. The GetOffset requires that the system variable DB must be assigned a sequence database.
Examples
> DB := ReadDb('/home/darwin/DB/SwissProt.Z'):;
Peptide file(/home/darwin/DB/SP45.0/SwissProt45.0(169638448), 163235
 entries, 59631787 aminoacids)
> CreateDayMatrices();

> s1 := 'MSRYEKMFARLNERNQGAFVPFVTVCDPNAEQSYKIMETLVESGADALELGIPFSDP':

> s2 := 'MLLLSVNPPLFIPFIVAGDPSPEVTVDLALALEEAGADLLELGVPYSDP':

> m3 := Match( GetOffset(s1), GetOffset(s2) );
m3 := Match(464724424,464724356)


See also MAlign,   NucPepMatch,   ReadDb,   TotalAlign