MATLAB: Retrieve number of identities after alignment of two amino acid sequences

alignmentbioinformaticsBioinformatics ToolboxidentitiesMATLAB

Hi,
I have used the built in function: showalignment() to align two amino acid sequences and visualize the alignment. The number of identities after alignment is displayed in the pop-up window as well but I cannot retrieve this information.
Is there any way of retrieving the identity and positives information as variables instead of just having it displayed in the pop-up window? Alternative functions I have missed?
Best,
Marc

Best Answer

If I understand correctly, showalignment doesn't actually do the alignment. Instead, you pass the alignment information in as the first argument to the function. I think the easiest thing would be to extract this information directly from the input you passed to showalignment. For example, if the alignment is the result of calling nwalign or swalign, then you can just count the number of : and | characters. If you use a different type of alignment result, you can always look at how showalignment.m does these counts and do the same thing.