rstoolbox.components.DesignFrame.get_sequential_data

DesignFrame.get_sequential_data(query, seqID)

Provides data on the requested query.

Basically, this allows str access to the other getters.

Parameters:
  • query (str) – Query type: sequence, structure, structure_prediction.
  • seqID (str) – Identifier of the sequence of interest.
Returns:

str or Series - depending on the input

Raises:
TypeError:if the data container is not DataFrame or Series.
KeyError:If query has a non-accepted value.

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_ssebig.minisilent.gz",
   ...:                         {'sequence': 'C', 'structure': 'C'})
   ...: df.get_sequential_data('sequence', 'C').iloc[:5]
   ...: df.get_sequential_data('structure', 'C').iloc[:5]
   ...: 
Out[1]: 
0    LEEEEEEELLLEEEEEEELLLLHHHHHHHHHHHHLLLLLLLLLLLEEEELLLEEEELL
1    LEEEEEEELLEEEEEEEELLLLHHHHHHHHHHHLLLLLLLLLLLEEEELLLLLEEEEL
2    LEEEEEEELLEEEEEEEELLLLHHHHHHHHHHHHLLLLLLLLLLEEEEELLLEEEEEL
3    LLLEEEEELLEEEEEELLLLLLHHHHHHHHHHHHLLLLLLLLLLEEEEELLLEEEEEL
4    LEEEEEEELLLEEEEEEELLLLHHHHHHHHHHHHLLLLLLLLLLLEEEELLLEEEELL
Name: structure_C, dtype: object