rstoolbox.io.write_fragment_sequence_profiles

rstoolbox.io.write_fragment_sequence_profiles(df, filename=None, consensus=None)

Write a sequence profile from FragmentFrame to load into Rosetta’s SeqprofConsensus.

Format mimicks as much as possible BLAST PSSM.

Parameters:
  • df (Union[FragmentFrame, DataFrame]) – Fragments from which to create the matrix or the matrix itself.
  • filename (str) – Output file name.
  • consensus (str) – Consensus sequence to show.
Returns:

str - the expected file content if filename is None.

Raises:
IOError:if filename exists and system.overwrite is False.
ValueError:if consensus lenth differs from the expected by the given fragments.