[Bioperl-l] alignment of 2 sequences/ FASTA

KERR, ALASTAIR [AG/2165] alastair.kerr@cereon.com
Tue, 26 Feb 2002 16:22:48 -0600


Hi Simon, 
If the sequences are as you describe the simplest way may be to use the
inbuilt 'index' function. 

i.e.
$seq1= "abab";
$seq2 = "nnnnababnnnnn";

$start = index($seq2, $seq1) + 1; #index count starts at 0

#(in this case $start == 5)


- Alastair 

 
-----Original Message-----
From: Simon Chan [mailto:schan@xenongenetics.com]
Sent: Tuesday, February 26, 2002 11:38 AM
To: bioperl-l@bioperl.org
Subject: [Bioperl-l] alignment of 2 sequences/ FASTA


Hi,

I would like to align 2 sequences.  Kind of hard to explain what I need
so I'll use an example:


seq 1: abab
seq 2: nnnnababnnnnn

How can I get the script to output that the match between
seq 1 and seq2 starts at position 5 and and ends at position 8?

I was told to run the FASTA program on the seq1 and seq2 and that
should get what I want, however, there doesn't seem to be a module
that will perform FASTA comparisons...?

Thanks, Everybody.

simon

###################################