I would like to extract specific strings from a set of aligned strings. That is, I would like to extract only the aligned single string that is exactly matched to one another from several sets of aligned multiple strings avoiding gaps (i.e. hyphens). Please see below for a better picture:
Input:
Code: Select all
IGRNRKGDGARGRGRGRGRHRIKLRGIG
||||||||||||||||||||||||||||
------GDGARGRGRGRGRHRIKLRGIG
IGKKRHIG
||||||||
IG------
GDGARGRGRGRGRHRIKMRGIG
||||||||||||||||||||||
GDGARGRGRGRGRHRIKMRGIG
LIGRGRIIGKK
|||||||||||
LIGR------K
GDGARGRGRGRGRHRLRLRGIGKLKIIGRHR
|||||||||||||||||||||||||||||||
GDGARGRGRGRGRHRLRLRGIGK------HR
IGRHRK------GDGARGRGRGRGRHRLRPRGIGR
|||||||||||||||||||||||||||||||||||
IGRHRKIGRKRLGDGARGRGRGRGRHRLRPRGIGR
and so on
.
.
.
Output:
Code: Select all
GDGARGRGRGRGRHRIKLRGIG
IG
GDGARGRGRGRGRHRIKMRGIG
LIGR
K
GDGARGRGRGRGRHRLRLRGIGK
HR
IGRHRK
GDGARGRGRGRGRHRLRPRGIGR
and so on
.
.
.
Thanks.
Plasma33