rstoolbox.components.SequenceFrame

class rstoolbox.components.SequenceFrame(*args, **kwargs)

Per position frequency occurrence for a set of decoys.

The SequenceFrame extends pandas.DataFrame. Ideally, in this pandas.DataFrame, each column represents a ResidueType (or NucleotideType) and each row a sequence position.

A reference_sequence can be provided, but it has to be the exact same length as the sequence expressed in the pandas.DataFrame.

As it represents sequence, unless the SequenceFrame is generated by slicing another, one should expect the index to start in 1.

Methods

add_reference(seqID[, sequence, structure, …]) Single access to add_reference_sequence(), add_reference_structure() and add_reference_shift().
add_reference_sequence(seqID, sequence) Add a reference_sequence attached to chain seqID.
add_reference_shift(seqID, shift[, shift_labels]) Add a reference_shift attached to a chain seqID.
add_reference_structure(seqID, structure) Add a reference_structure attached to chain seqID.
delete_empty([pick]) Setter/Getter for the delete empty configuration.
delete_extra([pick]) Setter/Getter for the delete extra configuration.
delete_reference(seqID[, shift_labels]) Remove all reference data regarding a particular seqID.
get_available_references() List which decoy chain identifiers have some kind of reference data.
get_key_residues([key_residues]) Get positions of interest.
get_reference_sequence(seqID[, key_residues]) Get the reference_sequence attached to chain seqID.
get_reference_shift(seqID) Get a reference_shift attached to a particular seqID.
get_reference_structure(seqID[, key_residues]) Get the reference_structure attached to chain seqID.
has_reference_sequence(seqID) Checks if there is a reference_sequence for sequID.
has_reference_structure(seqID) Checks if there is a reference_structure for seqID.
is_transposed() Assert if the SequenceFrame is found as expected (ResidueType as column) or transposed.
to_bits() Change the sequenceFrame from frequency to bits.
transfer_reference(df) Transfer reference data from one container to another.