According to the documentation, the behaviour of maskGaps
:
Returns a MultipleAlignment object with a modified column mask based upon gaps in the columns. In particular, this mask is defined by min.block.width or more consecutive columns that have min.fraction or more of their non-masked rows containing gap codes.
Then regions in the multiple alignment are masked, while nucleotides or unique gaps are retained (see sample below)
DNAMultipleAlignment with 8 rows and 2343 columns
aln names
[1] ###ATGGTACAGGG############...######################### Human
[2] ###ATGGTACA---############...######################### Chimp
[3] ###ATGGTACA---###########...######################### Cow
[4] ###AT----CAGGG##########...######################### Mouse
Is there a way to retrieve those gaps that are unique to a sequence (deletions)? In this case, mouse contains 4 gaps that have no correlate in the rest of the multiple sequence alignment, which would be a valid deletion (and biologically relevant). As deletions observed in Chimp and Cow are shared, these are not of our interest. I think this type of search is implicit in the maskGaps behaviour but I am unsure into how I could imitate it myself.
Thanks for any idea!