New in Wolfram Mathematica 7: Sequence Alignment & Analysis  previous | next 
Instantly Visualize Protein Sequence Alignments
Display the matrix dot plot for two closely related protein sequences.
In[1]:=

Click for copyable input
ArrayPlot[

 Outer[Boole[SameQ[#1, #2]] &, 

  Characters[

   "GKLPRDLFEDELIPLCEKIGKIYEMRMMMDFNGNNRGYAFVTFSNKVEAKNAIKQLNNYEIRNGRL\

LGVCASVDNCRLFVGGIPKTKKREEILSEMKKVTEGVVDVIVYPSAADKTKNRGFAFVEYESHRAAAMAR\

RKLLPGRIQLWGHGIAVDWAEPEVEVDEDTMSSVKILYVRNLMLSTSEEMIEKEFNNIKPGAVERVKKIR\

DYAFVHFSNREDAVEAMKALNGKVLDGSPIEVTLAKPVDKDSYVRYTRGTGGRGTMLQGEYTYSLGQVYD\

PTTTYLGAPVFYAPQTYAAIPSLHFPATKGHLSNRAIIRAPSVRGAAGVRGLGGRGYLAYTGLGRGYQVK\

GDKREDKLYDILPGMELTPMNPVTLKPQGIKLAPQILEEICQKNNWGQPVYQLHSAIGQDQRQLFLYKIT\

IPALASQNPAIHPFTPPKLSAFVDEAKTYAAEYTLQTLGIPTDGGDGTMATAAAAATAFPGYAVPNATAP\

VSAAQLKQAVTLGQDLAAYTTYEVYPTFAVTARGDGYGTF"], 

  Characters[

   "GKLPRDLFEDELIPLCEKIGKIYEMRMMMDFNGNNRGYAFVTFSNKVEAKNAIKQLNNYEIRNGRL\

LGVCASVDNCRLFVGGIPKTKKREEILSEMKKVTEGVVDVIVYPSAADKTKNRGFAFVEYESHRAAAMAR\

RKLLPGRIQLWGHGIAVDWAEPEVEVDEDTMSSVKILYVRNLMLSTSEEMIEKEFNNIKPGAVERVKKIR\

DYAFVHFSNREDAVEAMKALNGKVLDGSPIEVTLAKPVDKDSYVRYTRGTGGRGTMLQGEYTYSLGQVYD\

PTTTYLGAPVFYAPQTYAAIPSLHFPATKGHLSNRAIIRAPSVREIYMNVPVGAAGVRGLGGRGYLAYTG\

LGRGYQVKGDKREDKLY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