rstoolbox.components.DesignFrame.get_reference_sequence

DesignFrame.get_reference_sequence(seqID, key_residues=None)

Get the reference_sequence attached to chain seqID.

Parameters:
  • seqID (str) – Identifier of the sequence of interest.
  • key_residues (Union[int, list() of int, str, Selection]) – Residues of interest.
Raises:
TypeError:if the data container is not DataFrame or Series.
KeyError:if there is no reference_sequence for chain seqID of the decoys.

Example

In [1]: from rstoolbox.io import parse_rosetta_file
   ...: import pandas as pd
   ...: pd.set_option('display.width', 1000)
   ...: pd.set_option('display.max_columns', 500)
   ...: df = parse_rosetta_file("../rstoolbox/tests/data/input_2seq.minisilent.gz",
   ...:                         {'sequence': 'AB'})
   ...: df.add_reference_sequence('A', df.iloc[0].get_sequence('A'))
   ...: df.get_reference_sequence('A')
   ...: 
Out[1]: 'AYSTREILLALCIRDSRVHGNGTLHPVLELAARETPLRLSPEDTVVLRYHVLLEEIIERNSETFTETWNRFITHTEHVDLDFNSVFLEIFHRGDPSLGRALAWMAWCMHACRTLCCNQSTPYYVVDLSVRGMLEASEGLDGWIHQQGGWSTLIEDNI'