OpenSWATH - GUI Models¶
The main models used by the GUI are the PeptideTree and the DataModel models
TreeModels Module¶
Contains classes that provide access to the peptide / protein data
TreeNode¶
TreeModel¶
PeptideTreeNode¶
PeptideTree¶
SWATH MS Run Module¶
SingleChromatogramFile¶
-
class
openswathgui.models.SingleChromatogramFile.SingleChromatogramFile(run, filename, load_in_memory=False, precursor_mapping=None, sequences_mapping=None, protein_mapping={})¶ Data Model for a single file from one run.
One run may contain multiple mzML files
- Attributes:
- runid: Current run id
- Private Attributes:
- _run: A pymzml.run.Reader object
- _filename: Original filename
- _basename: Original filename basename
- _precursor_mapping: Dictionary { FullPrecursorName : [transition_id, transition_id] }
- _sequences_mapping: Dictionary { StrippedSequence : [FullPrecursorName, FullPrecursorName]}
-
getTransitionCount()¶ Get total number of transitions
-
get_all_peptide_sequences()¶ Get all (stripped) sequences
-
get_all_precursor_ids()¶ Get all precursor ids (full sequence + charge)
-
get_data_for_precursor(precursor)¶ Retrieve raw data for a specific precursor - data will be as list of pairs (timearray, intensityarray)
-
get_data_for_transition(transition_id)¶ Retrieve raw data for a specific transition
-
get_id()¶
-
get_precursors_for_sequence(sequence)¶ Get all precursors mapping to one stripped sequence
-
get_sequence_for_protein(protein)¶
-
get_transitions_for_precursor(precursor)¶ Return the transition names for a specific precursor
-
get_transitions_with_mass_for_precursor(precursor)¶ Return the transition names prepended with the mass for a specific precursor
SwathRun¶
SwathRunCollection¶
ChromatogramTransition Module¶
ChromatogramTransition¶
-
class
openswathgui.models.ChromatogramTransition.ChromatogramTransition(name, charge, subelements, peptideSequence=None, fullName=None, datatype='Precursor')¶ Bases:
objectInternal tree structure object representing one row in the in the left side tree.
This is the bridge between the view and the data model
Pointers to objects of
ChromatogramTransitionare passed to callback functions when the selection of the left side tree changes. The object needs to have store information about all the column present in the rows (PeptideSequence, Charge, Name) which are requested by thePeptideTreemodel.Also it needs to know how to access the raw data as well as meta-data for a certain transition. This is done through getData, getLabel etc.
-
getCharge()¶ Get charge of precursor
- int:
- Charge
-
getData(run)¶ Get raw data for a certain object
If we have a single precursors or a peptide with only one precursor, we show the same data as for the precursor itself. For a peptide with multiple precursors, we show all precursors as individual curves. For a single transition, we simply plot that transition.
- run :
SwathRun - SwathRun object which will be used to retrieve data
- list of pairs (timearray, intensityarray):
- Returns the raw data of the chromatograms for a given run. The dataformat is a list of transitions and each transition is a pair of (timearray,intensityarray)
- run :
-
getIntensity(run)¶ Get the intensity for a specific run and current precursor
- run :
SwathRun - SwathRun object which will be used to retrieve data
- float:
- The intensity for a specific run and current precursor
- run :
-
getLabel(run)¶ Get the labels for a curve (corresponding to the raw data from getData call) for a certain object.
If we have a single precursors or a peptide with only one precursor, we show the same data as for the precursor itself. For a peptide with multiple precusors, we show all precursors as individual curves. For a single transition, we simply plot that transition.
- run :
SwathRun - SwathRun object which will be used to retrieve data
- list of str:
- The labels to display for each line in the graph
- run :
-
getName()¶ Get name of precursor
- str:
- Name of precursor
-
getPeptideSequence()¶
-
getProbScore(run)¶ Get the probabilistic score for a specific run and current precursor
- run :
SwathRun - SwathRun object which will be used to retrieve data
- float:
- The probabilistic score for a specific run and current precursor
- run :
-
getRange(run)¶ Get the data range (leftWidth/rightWidh) for a specific run
- run :
SwathRun - SwathRun object which will be used to retrieve data
- list of float:
- A pair of floats representing the data range (leftWidth/rightWidh) for a specific run
- run :
-
getSubelements()¶
-
getType()¶
-