private static IList<uint> GetEncodedCIGAR(string cigar)
{
List<uint> encodedValues = new List<uint>();
if (cigar.Equals("*"))
{
return encodedValues;
}
uint value;
cigar = cigar.ToUpperInvariant();
string intvalue = string.Empty;
foreach (char ch in cigar)
{
if (Char.IsDigit(ch))
{
intvalue += ch;
}
else
{
value = uint.Parse(intvalue, CultureInfo.InvariantCulture);
value = value << 4;
value = value | GetEncodedCIGAROperation(ch);
intvalue = string.Empty;
encodedValues.Add(value);
}
}
return encodedValues;
}