conkit.io.pcons module¶
Parser module specific to Pcons predictions
This module can be used to parse all versions of the Pcons programs, i.e. PconsC, PconsC2, and PconsC3.
-
class
PconsParser
[source]¶ Bases:
conkit.io._parser.ContactFileParser
Class to parse a Pcons output
This module can be used to parse all versions of the Pcons programs, i.e. PconsC, PconsC2, and PconsC3.
-
read
(f_handle, f_id='pcons')[source]¶ Read a contact file
Parameters: - f_handle – Open file handle [read permissions]
- f_id (str, optional) – Unique contact file identifier
Returns: Return type:
-
write
(f_handle, hierarchy, write_header_footer=True)[source]¶ Write a contact file instance to to file
Default format is
PconsC3
style, including comments and sequence information (if provided).Parameters: - f_handle – Open file handle [write permissions]
- hierarchy (
ContactFile
,ContactMap
) – orContact
- write_header_footer (bool) – Write a PconsC3-typical header
Raises: RuntimeError
– More than one contact map in the hierarchy
-