IMP Reference Guide
2.12.0
The Integrative Modeling Platform
|
this class handles a cross-link dataset and do filtering operations, adding cross-links, merge datasets... More...
Inherits _CrossLinkDataBaseStandardKeys.
this class handles a cross-link dataset and do filtering operations, adding cross-links, merge datasets...
Definition at line 528 of file io/crosslink.py.
Public Member Functions | |
def | __init__ |
Constructor. More... | |
def | append_database |
This function append one cross-link dataset to another. More... | |
def | check_cross_link_consistency |
This function checks the consistency of the dataset with the amino acid sequence. More... | |
def | classify_crosslinks_by_score |
This function creates as many classes as in the input (number_of_classes: integer) and partition crosslinks according to their identification scores. More... | |
def | create_new_keyword |
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. More... | |
def | create_set_from_file |
if FixedFormatParser is not specified, the file is comma-separated-values More... | |
def | filter_out_same_residues |
This function remove cross-links applied to the same residue (ie, same chain name and residue number) More... | |
def | filter_score |
Get all crosslinks with score greater than an input value. More... | |
def | get_number_of_unique_crosslinked_sites |
Returns the number of non redundant crosslink sites. More... | |
def | get_values |
this function returns the list of values for a given key in the database alphanumerically sorted More... | |
def | jackknife |
this method returns a CrossLinkDataBase class containing a random subsample of the original cross-link database. More... | |
def | merge |
This function merges two cross-link datasets so that if two conflicting crosslinks have the same cross-link UniqueIDS, the cross-links will be appended under the same UniqueID slots with different SubIDs. More... | |
def | offset_residue_index |
This function offset the residue indexes of a given protein by a specified value. More... | |
def | rename_proteins |
This function renames all proteins contained in the input dictionary from the old names (keys) to the new name (values) More... | |
def | set_value |
This function changes the value for a given key in the database For instance one can change the name of a protein. More... | |
def 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 crosslink consistency. If not given consistency will not be checked |
linkable_aa | a tuple containing one-letter amino acids which are linkable by the crosslinker; 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 537 of file io/crosslink.py.
def IMP.pmi.io.crosslink.CrossLinkDataBase.append_database | ( | self, | |
CrossLinkDataBase2 | |||
) |
This function append one cross-link dataset to another.
Unique ids will be renamed to avoid conflicts.
Definition at line 905 of file io/crosslink.py.
def 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 764 of file io/crosslink.py.
def 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 crosslinks according to their identification scores.
Classes are defined in the psi key.
Definition at line 1002 of file io/crosslink.py.
def 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 971 of file io/crosslink.py.
def IMP.pmi.io.crosslink.CrossLinkDataBase.create_set_from_file | ( | self, | |
file_name, | |||
converter = None , |
|||
FixedFormatParser = 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 |
Definition at line 610 of file io/crosslink.py.
def 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 1052 of file io/crosslink.py.
def IMP.pmi.io.crosslink.CrossLinkDataBase.filter_score | ( | self, | |
score | |||
) |
Get all crosslinks with score greater than an input value.
Definition at line 892 of file io/crosslink.py.
def IMP.pmi.io.crosslink.CrossLinkDataBase.get_number_of_unique_crosslinked_sites | ( | self | ) |
Returns the number of non redundant crosslink sites.
Definition at line 1250 of file io/crosslink.py.
def 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 947 of file io/crosslink.py.
def 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 1069 of file io/crosslink.py.
def IMP.pmi.io.crosslink.CrossLinkDataBase.merge | ( | self, | |
CrossLinkDataBase1, | |||
CrossLinkDataBase2 | |||
) |
This function merges two cross-link datasets so that if two conflicting crosslinks have the same cross-link UniqueIDS, the cross-links will be appended under the same UniqueID slots with different SubIDs.
Definition at line 897 of file io/crosslink.py.
def 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 957 of file io/crosslink.py.
def 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 985 of file io/crosslink.py.
def IMP.pmi.io.crosslink.CrossLinkDataBase.set_value | ( | self, | |
key, | |||
new_value, | |||
FilterOperator = 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 |
FilterOperator | 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 927 of file io/crosslink.py.