joinseq

Join two sequences to produce the shortest supersequence

Syntax

SeqNT3 = joinseq(SeqNT1, SeqNT2)

Arguments

SeqNT1, SeqNT2Nucleotide sequences.

Description

joinseq(SeqNT1, SeqNT2) creates a new sequence that is the shortest supersequence of Seq1 and Seq2. If there is no overlap between the sequences, then SeqNT2 is concatenated to the end of SeqNT1. If the length of the overlap is the same at both ends of the sequence, then the overlap at the end of SeqNT1 and the start of SeqNT2 is used to join the sequences.

If SeqNT1 is a subsequence of SeqNT2, then SeqNT2 is returned as the shortest supersequence and vice versa.

Examples

seq1 = 'ACGTAAA';  
seq2 = 'AAATGCA';
joined = joinseq(seq1,seq2)

joined =
    ACGTAAATGCA

See Also

MATLAB functions cat, paren, strcat, strfind


© 1994-2005 The MathWorks, Inc.