IdTransferer¶
Class Definition¶
-
class
spectra_cluster.analyser.id_transferer.IdTransferer(add_to_identified=False, add_to_unidentified=True, include_all_identified=False)¶ The IdTransferer analyser transfers identifications to spectra part of a cluster.
The analysis is run by calling ‘process_cluster’ repeatedly. The transferred identifications are stored in the ‘identification_references’ member variable.
Variables: identification_references – A list of IdentificationReferences -
__init__(add_to_identified=False, add_to_unidentified=True, include_all_identified=False)¶ Creates a default IdTransferer object.
Parameters: - add_to_identified – If set identifications are added to identified spectra.
- add_to_unidentified – If set identifications are added to unidentified spectra.
- include_all_identified – If set identified spectra that are not part of reliable clusters are returned as well. Additionally, if add_to_identified is set to false and include_all_identified is set to true, the original identifications are returned unchanged.
-
static
extract_main_cluster_psms(cluster)¶ Extracts the most common identification(s) from a cluster and returns it as a PSM object.
Parameters: cluster – Cluster to extract the most common PSM from. Returns: Most common PSMs as a list
-
process_cluster(cluster)¶ Transfers ids to spectra based on the cluster’s properties
Parameters: cluster – The cluster to process
-
IdentificationReference¶
-
class
spectra_cluster.analyser.id_transferer.IdentificationReference(filename, spec_id, psms, changed_through_clustering, spectrum)¶ Contains the main identification data.
Variables: - filename – The original peak list filename
- spec_id – The spectrum’s id within the source file
- psms – A list of PSM objects
- changed_through_clustering – Logical indicating whether the identification details were changed through the clustering.
- spectrum – The complete spectrum object
-
__init__(filename, spec_id, psms, changed_through_clustering, spectrum)¶ Creates a new instance of the identification reference.
Parameters: - filename – Original peak list filename.
- spec_id – The spectrum’s id within this file.
- psms – A list of PSM objects
- changed_through_clustering – Logical indicating whether the identification details were changed through the