|
IMP Reference Guide
develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
|
this class handles a cross-link dataset and do filtering operations, adding cross-links, merge datasets... More...
this class handles a cross-link dataset and do filtering operations, adding cross-links, merge datasets...
Definition at line 523 of file crosslink.py.
Public Member Functions | |
| __init__ (self, converter=None, data_base=None, fasta_seq=None, linkable_aa=('K')) | |
| Constructor. | |
| align_sequence (self, alignfile) | |
| This function parses an alignment file obtained previously, to map crosslink residues onto the sequence of a homolog proteins. | |
| append_database (self, db) | |
| Append cross-link dataset to this one. | |
| check_cross_link_consistency (self) | |
| This function checks the consistency of the dataset with the amino acid sequence. | |
| classify_crosslinks_by_score (self, number_of_classes) | |
| This function creates as many classes as in the input (number_of_classes: integer) and partition cross-links according to their identification scores. | |
| create_new_keyword (self, keyword, values_from_keyword=None) | |
| This function creates a new keyword for the whole database and set the values from and existing keyword (optional), otherwise the values are set to None. | |
| create_set_from_file (self, file_name, converter=None, FixedFormatParser=None, encoding=None) | |
| if FixedFormatParser is not specified, the file is comma-separated-values | |
| filter_out_same_residues (self) | |
| This function remove cross-links applied to the same residue (ie, same chain name and residue number). | |
| filter_score (self, score) | |
| Get all cross-links with score greater than an input value. | |
| get_number_of_unique_crosslinked_sites (self) | |
| Returns the number of non redundant cross-link sites. | |
| get_values (self, key) | |
| this function returns the list of values for a given key in the database alphanumerically sorted | |
| jackknife (self, percentage) | |
| this method returns a CrossLinkDataBase class containing a random subsample of the original cross-link database. | |
| merge (self, CrossLinkDataBase1, CrossLinkDataBase2) | |
| This function merges two cross-link datasets so that if two conflicting cross-links have the same cross-link UniqueIDS, the cross-links will be appended under the same UniqueID slots with different SubIDs. | |
| offset_residue_index (self, protein_name, offset) | |
| This function offset the residue indexes of a given protein by a specified value. | |
| rename_proteins (self, old_to_new_names_dictionary, protein_to_rename='both') | |
| This function renames all proteins contained in the input dictionary from the old names (keys) to the new name (values). | |
| set_value (self, key, new_value, filter_operator=None) | |
| This function changes the value for a given key in the database For instance one can change the name of a protein. | |
| IMP.pmi.io.crosslink.CrossLinkDataBase.__init__ | ( | self, | |
| converter = None, | |||
| data_base = None, | |||
| fasta_seq = None, | |||
| linkable_aa = ('K') ) |
Constructor.
| converter | an instance of CrossLinkDataBaseKeywordsConverter |
| data_base | an instance of CrossLinkDataBase to build the new database on |
| fasta_seq | an instance of IMP.pmi.topology.Sequences containing protein fasta sequences to check cross-link consistency. If not given consistency will not be checked |
| linkable_aa | a tuple containing one-letter amino acids which are linkable by the cross-linker; only used if the database DOES NOT provide a value for a certain residueX_amino_acid_key and if a fasta_seq is given |
Definition at line 535 of file crosslink.py.
| IMP.pmi.io.crosslink.CrossLinkDataBase.align_sequence | ( | self, | |
| alignfile ) |
This function parses an alignment file obtained previously, to map crosslink residues onto the sequence of a homolog proteins.
It is useful if you want to map the crosslinks onto a known, homolog structure without building a comparative model. The txt file of the alignment should be structured with repeating blocks, as follows:
>NAME_CROSSLINKED_PROTEIN >NAME_HOMOLOG_PROTEIN_WITH_KNOWN_STRUCTURE one-letter code sequence for cross-linked protein (one line) one-letter code sequence for homolog protein with known structure (one line)
Definition at line 1036 of file crosslink.py.
| IMP.pmi.io.crosslink.CrossLinkDataBase.append_database | ( | self, | |
| db ) |
Append cross-link dataset to this one.
Definition at line 940 of file crosslink.py.
| IMP.pmi.io.crosslink.CrossLinkDataBase.check_cross_link_consistency | ( | self | ) |
This function checks the consistency of the dataset with the amino acid sequence.
Definition at line 782 of file crosslink.py.
| IMP.pmi.io.crosslink.CrossLinkDataBase.classify_crosslinks_by_score | ( | self, | |
| number_of_classes ) |
This function creates as many classes as in the input (number_of_classes: integer) and partition cross-links according to their identification scores.
Classes are defined in the psi key.
Definition at line 1157 of file crosslink.py.
| IMP.pmi.io.crosslink.CrossLinkDataBase.create_new_keyword | ( | self, | |
| keyword, | |||
| values_from_keyword = None ) |
This function creates a new keyword for the whole database and set the values from and existing keyword (optional), otherwise the values are set to None.
| keyword | the new keyword name: |
| values_from_keyword | the keyword from which we are copying the values: |
Definition at line 1000 of file crosslink.py.
| IMP.pmi.io.crosslink.CrossLinkDataBase.create_set_from_file | ( | self, | |
| file_name, | |||
| converter = None, | |||
| FixedFormatParser = None, | |||
| encoding = None ) |
if FixedFormatParser is not specified, the file is comma-separated-values
| file_name | a txt file to be parsed |
| converter | an instance of CrossLinkDataBaseKeywordsConverter |
| FixedFormatParser | a parser for a fixed format |
| encoding | the encoding of the file, if not the locale default (usually UTF-8) |
Definition at line 608 of file crosslink.py.
| IMP.pmi.io.crosslink.CrossLinkDataBase.filter_out_same_residues | ( | self | ) |
This function remove cross-links applied to the same residue (ie, same chain name and residue number).
Definition at line 1211 of file crosslink.py.
| IMP.pmi.io.crosslink.CrossLinkDataBase.filter_score | ( | self, | |
| score ) |
Get all cross-links with score greater than an input value.
Definition at line 925 of file crosslink.py.
| IMP.pmi.io.crosslink.CrossLinkDataBase.get_number_of_unique_crosslinked_sites | ( | self | ) |
Returns the number of non redundant cross-link sites.
Definition at line 1391 of file crosslink.py.
| IMP.pmi.io.crosslink.CrossLinkDataBase.get_values | ( | self, | |
| key ) |
this function returns the list of values for a given key in the database alphanumerically sorted
Definition at line 975 of file crosslink.py.
| IMP.pmi.io.crosslink.CrossLinkDataBase.jackknife | ( | self, | |
| percentage ) |
this method returns a CrossLinkDataBase class containing a random subsample of the original cross-link database.
| percentage | float between 0 and 1, is the percentage of of spectra taken from the original list |
Definition at line 1227 of file crosslink.py.
| IMP.pmi.io.crosslink.CrossLinkDataBase.merge | ( | self, | |
| CrossLinkDataBase1, | |||
| CrossLinkDataBase2 ) |
This function merges two cross-link datasets so that if two conflicting cross-links have the same cross-link UniqueIDS, the cross-links will be appended under the same UniqueID slots with different SubIDs.
Definition at line 931 of file crosslink.py.
| IMP.pmi.io.crosslink.CrossLinkDataBase.offset_residue_index | ( | self, | |
| protein_name, | |||
| offset ) |
This function offset the residue indexes of a given protein by a specified value.
| protein_name | the protein name that need to be changed |
| offset | the offset value |
Definition at line 985 of file crosslink.py.
| IMP.pmi.io.crosslink.CrossLinkDataBase.rename_proteins | ( | self, | |
| old_to_new_names_dictionary, | |||
| protein_to_rename = 'both' ) |
This function renames all proteins contained in the input dictionary from the old names (keys) to the new name (values).
| old_to_new_names_dictionary | dictionary for converting old to new names |
| protein_to_rename | specify whether to rename both or protein1 or protein2 only |
Definition at line 1016 of file crosslink.py.
| IMP.pmi.io.crosslink.CrossLinkDataBase.set_value | ( | self, | |
| key, | |||
| new_value, | |||
| filter_operator = None ) |
This function changes the value for a given key in the database For instance one can change the name of a protein.
| key | the key in the database that must be changed |
| new_value | the new value of the key |
| filter_operator | optional FilterOperator to change the value to a subset of the database |
example: cldb1.set_value(cldb1.protein1_key, 'FFF', FO(cldb.protein1_key, operator.eq, "AAA"))
Definition at line 954 of file crosslink.py.