Skip to Main Content Skip to Search
Product Documentation

joinseq - Join two sequences to produce shortest supersequence

Syntax

SeqNT3 = joinseq(SeqNT1, SeqNT2)

Arguments

SeqNT1, SeqNT2Nucleotide sequences.

Description

SeqNT3 = joinseq(SeqNT1, SeqNT2) creates a new sequence that is the shortest supersequence of SeqNT1 and SeqNT2. 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

Join two sequences that contain an overlap.

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

joined =
    ACGTAAATGCA

See Also

cat | strcat | strfind

  


Free Computational Biology Interactive Kit

See how to analyze, visualize, and model biological data and systems using MathWorks products.

Get free kit

Trials Available

Try the latest computational biology products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS