com.compomics.util.preferences
Class AnnotationPreferences

java.lang.Object
  extended by com.compomics.util.preferences.AnnotationPreferences
All Implemented Interfaces:
Serializable

public class AnnotationPreferences
extends Object
implements Serializable

This class contains the spectrum annotation preferences.

Author:
Marc Vaudel
See Also:
Serialized Form

Constructor Summary
AnnotationPreferences()
          Constructor.
 
Method Summary
 void addIonType(Ion.IonType ionType)
          Adds a new ion type to annotate.
 void addIonType(Ion.IonType ionType, int subType)
          Adds a new ion type and subtype to annotate.
 void addNeutralLoss(NeutralLoss neutralLoss)
          Adds a neutral loss.
 void addSelectedCharge(int selectedCharge)
          Add a charge to take into account when annotating the spectrum.
 boolean areNeutralLossesSequenceDependant()
          Returns whether neutral losses are considered only for amino acids of interest or not.
 void clearCharges()
          Clears the selected charges.
 void clearIonTypes()
          Clears the ion types annotated.
 void clearNeutralLosses()
          Clears the considered neutral losses.
 double getAnnotationIntensityLimit()
          Returns the intensity limit.
 int getCurrentPrecursorCharge()
          Returns the current precursor charge.
 int getDeNovoCharge()
          Returns the charge to use for the fragment ions in the de novo sequencing.
 double getFragmentIonAccuracy()
          Returns the fragment ion accuracy.
 ArrayList<Integer> getFragmentIonTypes()
          Returns the type of peptide fragment ions annotated.
 HashMap<Ion.IonType,ArrayList<Integer>> getIonTypes()
          Returns the type of ions annotated.
 NeutralLossesMap getNeutralLosses()
          Returns the considered neutral losses.
 ArrayList<Integer> getValidatedCharges()
          Returns the fragment ion charges considered for the desired precursor charge.
 void resetAutomaticAnnotation()
          Updates the neutral losses and charge annotation settings.
 void setAnnotationLevel(double intensityLimit)
          Sets the annotation level.
 void setCurrentSettings(Peptide currentPeptide, int currentPrecursorCharge, boolean newSpectrum)
          Sets the annotation settings for the current peptide and precursor charge.
 void setDeNovoCharge(int deNovoCharge)
          Set the charge to use for the fragment ions in the de novo sequencing
 void setFragmentIonAccuracy(double fragmentIonAccuracy)
          Sets the fragment ion accuracy.
 void setIntensityIonTable(boolean intensityIonTable)
          Set if the intensity or m/z ion table should be shown.
 void setNeutralLossesSequenceDependant(boolean neutralLossesSequenceDependant)
          Set whether neutral losses are considered only for amino acids of interest or not.
 void setPreferencesFromSearchParamaers(SearchParameters searchParameters)
          Updates the annotation parameters based on the search parameters
 void setShowAllPeaks(boolean showAllPeaks)
          Set if all peaks or just the annotated ones are to be shown.
 void setShowBars(boolean showBars)
          Set if the bars in the bubble plot are to be shown or not.
 void setShowForwardIonDeNovoTags(boolean showForwardIonDeNovoTags)
          Set if the automatic forward ion de novo tags are to be shown.
 void setShowRewindIonDeNovoTags(boolean showRewindIonDeNovoTags)
          Set if the automatic rewind ion de novo tags are to be shown.
 void setYAxisZoomExcludesBackgroundPeaks(boolean yAxisZoomExcludesBackgroundPeaks)
          Set if the automatic y-axis zoom only considers the anotated peaks.
 boolean showAllPeaks()
          If true, all peaks are shown, false displays the annotated peaks, and the non-annotated in the background.
 boolean showBars()
          If true, bars are shown in the bubble plot highlighting the ions.
 boolean showForwardIonDeNovoTags()
          Returns true if the automatic forward ion de novo tags are to be shown.
 boolean showRewindIonDeNovoTags()
          Returns true if the automatic rewind ion de novo tags are to be shown.
 boolean useAutomaticAnnotation()
          Returns whether PeptideShaker should automatically set the annotations.
 void useAutomaticAnnotation(boolean automaticAnnotation)
          Sets whether the default PeptideShaker annotation should be used.
 boolean useIntensityIonTable()
          If true, the ion table is shown as an intensity versionm, false displays the standard Mascot version.
 boolean yAxisZoomExcludesBackgroundPeaks()
          Returns true if the automatic y-axis zoom excludes background peaks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationPreferences

public AnnotationPreferences()
Constructor.

Method Detail

setPreferencesFromSearchParamaers

public void setPreferencesFromSearchParamaers(SearchParameters searchParameters)
Updates the annotation parameters based on the search parameters

Parameters:
searchParameters - the search parameters where to take the information from

setCurrentSettings

public void setCurrentSettings(Peptide currentPeptide,
                               int currentPrecursorCharge,
                               boolean newSpectrum)
                        throws IOException,
                               IllegalArgumentException,
                               InterruptedException,
                               FileNotFoundException,
                               ClassNotFoundException
Sets the annotation settings for the current peptide and precursor charge.

Parameters:
currentPeptide -
currentPrecursorCharge -
newSpectrum -
Throws:
IOException - exception thrown whenever an error occurred while reading a protein sequence
IllegalArgumentException - exception thrown whenever an error occurred while reading a protein sequence
InterruptedException - exception thrown whenever an error occurred while reading a protein sequence
FileNotFoundException
ClassNotFoundException

resetAutomaticAnnotation

public void resetAutomaticAnnotation()
                              throws IOException,
                                     IllegalArgumentException,
                                     InterruptedException,
                                     FileNotFoundException,
                                     ClassNotFoundException
Updates the neutral losses and charge annotation settings.

Throws:
IOException - exception thrown whenever an error occurred while reading a protein sequence
IllegalArgumentException - exception thrown whenever an error occurred while reading a protein sequence
InterruptedException - exception thrown whenever an error occurred while reading a protein sequence
FileNotFoundException
ClassNotFoundException

areNeutralLossesSequenceDependant

public boolean areNeutralLossesSequenceDependant()
Returns whether neutral losses are considered only for amino acids of interest or not.

Returns:
a boolean indicating whether neutral losses are considered only for amino acids of interest or not.

setNeutralLossesSequenceDependant

public void setNeutralLossesSequenceDependant(boolean neutralLossesSequenceDependant)
Set whether neutral losses are considered only for amino acids of interest or not.

Parameters:
neutralLossesSequenceDependant -

getValidatedCharges

public ArrayList<Integer> getValidatedCharges()
Returns the fragment ion charges considered for the desired precursor charge.

Returns:
the fragment ion charges considered

clearCharges

public void clearCharges()
Clears the selected charges.


addSelectedCharge

public void addSelectedCharge(int selectedCharge)
Add a charge to take into account when annotating the spectrum.

Parameters:
selectedCharge - a charge to take into account when annotating the spectrum

clearNeutralLosses

public void clearNeutralLosses()
Clears the considered neutral losses.


getNeutralLosses

public NeutralLossesMap getNeutralLosses()
Returns the considered neutral losses.

Returns:
the considered neutral losses

addNeutralLoss

public void addNeutralLoss(NeutralLoss neutralLoss)
Adds a neutral loss.

Parameters:
neutralLoss - a new neutral loss

getIonTypes

public HashMap<Ion.IonType,ArrayList<Integer>> getIonTypes()
Returns the type of ions annotated.

Returns:
the type of ions annotated

getFragmentIonTypes

public ArrayList<Integer> getFragmentIonTypes()
Returns the type of peptide fragment ions annotated.

Returns:
the type of peptide fragment ions annotated

clearIonTypes

public void clearIonTypes()
Clears the ion types annotated.


addIonType

public void addIonType(Ion.IonType ionType,
                       int subType)
Adds a new ion type and subtype to annotate.

Parameters:
ionType - a new ion type to annotate
subType - the ion sub type

addIonType

public void addIonType(Ion.IonType ionType)
Adds a new ion type to annotate. All subtypes will be annotated.

Parameters:
ionType - a new ion type to annotate

useAutomaticAnnotation

public void useAutomaticAnnotation(boolean automaticAnnotation)
Sets whether the default PeptideShaker annotation should be used.

Parameters:
automaticAnnotation - a boolean indicating whether the default PeptideShaker annotation should be used

useAutomaticAnnotation

public boolean useAutomaticAnnotation()
Returns whether PeptideShaker should automatically set the annotations.

Returns:
a boolean indicating whether PeptideShaker should automatically set the annotations

getFragmentIonAccuracy

public double getFragmentIonAccuracy()
Returns the fragment ion accuracy.

Returns:
the fragment ion accuracy

setFragmentIonAccuracy

public void setFragmentIonAccuracy(double fragmentIonAccuracy)
Sets the fragment ion accuracy.

Parameters:
fragmentIonAccuracy - the fragment ion accuracy

getCurrentPrecursorCharge

public int getCurrentPrecursorCharge()
Returns the current precursor charge.

Returns:
the current precursor charge

getAnnotationIntensityLimit

public double getAnnotationIntensityLimit()
Returns the intensity limit. [0.0 - 1.0], where 1.0 means that all peaks are considered for annotations, while 0.3 means that only the 30% most intense peaks are considered for annotations.

Returns:
the intensityLimit

setAnnotationLevel

public void setAnnotationLevel(double intensityLimit)
Sets the annotation level. [0.0 - 1.0], where 1.0 means that all peaks are considered for annotations, while 0.3 means that only the 30% most intense peaks are considered for annotations.

Parameters:
intensityLimit - the intensityLimit to set

showAllPeaks

public boolean showAllPeaks()
If true, all peaks are shown, false displays the annotated peaks, and the non-annotated in the background.

Returns:
true if all peaks are to be shown

setShowAllPeaks

public void setShowAllPeaks(boolean showAllPeaks)
Set if all peaks or just the annotated ones are to be shown.

Parameters:
showAllPeaks -

showBars

public boolean showBars()
If true, bars are shown in the bubble plot highlighting the ions.

Returns:
true if bars are to be shown in the bubble plot

setShowBars

public void setShowBars(boolean showBars)
Set if the bars in the bubble plot are to be shown or not.

Parameters:
showBars -

useIntensityIonTable

public boolean useIntensityIonTable()
If true, the ion table is shown as an intensity versionm, false displays the standard Mascot version.

Returns:
if true, the ion table is shown as an intensity versionm, false displays the standard Mascot version

setIntensityIonTable

public void setIntensityIonTable(boolean intensityIonTable)
Set if the intensity or m/z ion table should be shown.

Parameters:
intensityIonTable -

yAxisZoomExcludesBackgroundPeaks

public boolean yAxisZoomExcludesBackgroundPeaks()
Returns true if the automatic y-axis zoom excludes background peaks. False if includes all peaks.

Returns:
true if the automatic y-axis zoom excludes background peaks

setYAxisZoomExcludesBackgroundPeaks

public void setYAxisZoomExcludesBackgroundPeaks(boolean yAxisZoomExcludesBackgroundPeaks)
Set if the automatic y-axis zoom only considers the anotated peaks.

Parameters:
yAxisZoomExcludesBackgroundPeaks -

showForwardIonDeNovoTags

public boolean showForwardIonDeNovoTags()
Returns true if the automatic forward ion de novo tags are to be shown.

Returns:
the showForwardIonDeNovoTags

setShowForwardIonDeNovoTags

public void setShowForwardIonDeNovoTags(boolean showForwardIonDeNovoTags)
Set if the automatic forward ion de novo tags are to be shown.

Parameters:
showForwardIonDeNovoTags - the showForwardIonDeNovoTags to set

showRewindIonDeNovoTags

public boolean showRewindIonDeNovoTags()
Returns true if the automatic rewind ion de novo tags are to be shown.

Returns:
the showRewindIonDeNovoTags

setShowRewindIonDeNovoTags

public void setShowRewindIonDeNovoTags(boolean showRewindIonDeNovoTags)
Set if the automatic rewind ion de novo tags are to be shown.

Parameters:
showRewindIonDeNovoTags - the showRewindIonDeNovoTags to set

getDeNovoCharge

public int getDeNovoCharge()
Returns the charge to use for the fragment ions in the de novo sequencing.

Returns:
the charge to use for the fragment ions in the de novo sequencing

setDeNovoCharge

public void setDeNovoCharge(int deNovoCharge)
Set the charge to use for the fragment ions in the de novo sequencing

Parameters:
deNovoCharge - the charge to use for the fragment ions in the de novo sequencing


Copyright © 2013. All Rights Reserved.