IMP logo
IMP Reference Guide  2.13.0
The Integrative Modeling Platform
IMP.pmi.io.crosslink.CrossLinkDataBase Class Reference

this class handles a cross-link dataset and do filtering operations, adding cross-links, merge datasets... More...

Inherits _CrossLinkDataBaseStandardKeys.

Detailed Description

this class handles a cross-link dataset and do filtering operations, adding cross-links, merge datasets...

Note
This class is only available in Python.

Definition at line 529 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 cross-links 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 cross-links with score greater than an input value. More...
 
def get_number_of_unique_crosslinked_sites
 Returns the number of non redundant cross-link 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 cross-links 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...
 

Constructor & Destructor Documentation

def IMP.pmi.io.crosslink.CrossLinkDataBase.__init__ (   self,
  converter = None,
  data_base = None,
  fasta_seq = None,
  linkable_aa = ('K') 
)

Constructor.

Parameters
converteran instance of CrossLinkDataBaseKeywordsConverter
data_basean instance of CrossLinkDataBase to build the new database on
fasta_seqan instance of IMP.pmi.topology.Sequences containing protein fasta sequences to check cross-link consistency. If not given consistency will not be checked
linkable_aaa 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 538 of file io/crosslink.py.

Member Function Documentation

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 908 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 766 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 cross-links according to their identification scores.

Classes are defined in the psi key.

Definition at line 1005 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.

Parameters
keywordthe new keyword name:
values_from_keywordthe keyword from which we are copying the values:

Definition at line 974 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

Parameters
file_namea txt file to be parsed
converteran instance of CrossLinkDataBaseKeywordsConverter
FixedFormatParsera parser for a fixed format

Definition at line 612 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 1055 of file io/crosslink.py.

def IMP.pmi.io.crosslink.CrossLinkDataBase.filter_score (   self,
  score 
)

Get all cross-links with score greater than an input value.

Definition at line 895 of file io/crosslink.py.

def IMP.pmi.io.crosslink.CrossLinkDataBase.get_number_of_unique_crosslinked_sites (   self)

Returns the number of non redundant cross-link sites.

Definition at line 1253 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 950 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.

Parameters
percentagefloat between 0 and 1, is the percentage of of spectra taken from the original list

Definition at line 1072 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 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 900 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.

Parameters
protein_namethe protein name that need to be changed
offsetthe offset value

Definition at line 960 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)

Parameters
old_to_new_names_dictionarydictionary for converting old to new names
protein_to_renamespecify whether to rename both or protein1 or protein2 only

Definition at line 988 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.

Parameters
keythe key in the database that must be changed
new_valuethe new value of the key
FilterOperatoroptional 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 930 of file io/crosslink.py.


The documentation for this class was generated from the following file: