public char GetResidueBefore(int index, IProteinSet proteinSet) { int pos = proteinOffsets[index] - 1; if (pos < 0) { return(' '); } return(proteinSet.Get(proteinIndices[index]).Sequence[pos]); }
public char GetResidueAfter(int index, IProteinSet proteinSet) { int pos = proteinOffsets[index] + length; string seq = proteinSet.Get(proteinIndices[index]).Sequence; if (pos >= seq.Length) { return(' '); } return(seq[pos]); }
public string GetSequence(IProteinSet proteinSet) { string seq = proteinSet.Get(proteinIndices[0]).Sequence; return(seq.Substring(proteinOffsets[0], length)); }