methods.scores
Class ComplexScoreCalculator

java.lang.Object
  extended by methods.scores.ComplexScoreCalculator

public class ComplexScoreCalculator
extends Object

Contains static methods to calculate scores of complexes using a given scores network. The score of a single complex is calculated by averaging the weight of all protein-protein edges within a complex. For a complex containing n proteins this means n*(n-1)/2 edges are read from the network and averaged. Missing edges in the network are generally treated as having a weight of zero.

This class is not instantiatable.

Author:
Jan Krumsiek

Method Summary
static float averageComplexScore(ProteinNetwork scoreNetwork, Complex complex)
          Calculates the score of a complex using a given scores network.
static float averageComplexScore(ProteinNetwork scoreNetwork, Complex complex, boolean ignoreMissingScores)
          Calculates the score of a complex using a given scores network.
static float averageComplexScore(ScoresCalculator scoreCalc, Complex complex)
          Calculates the score of a complex using a given scores calculator.
static float averageComplexScore(ScoresCalculator scoreCalc, Complex complex, boolean ignoreMissingScores)
          Calculates the score of a complex using a given scores calculator.
static float averageComplexSetScore(ProteinNetwork scoreNetwork, ComplexSet complexSet, boolean weighted)
          Calculates the average complex score of a given complex set.
static float averageComplexSetScore(ProteinNetwork scoreNetwork, ComplexSet complexSet, boolean weighted, boolean ignoreMissingScores)
          Calculates the average complex score of a given complex set.
static float averageComplexSetScore(ScoresCalculator scoreCalc, ComplexSet complexSet, boolean weighted)
          Calculates the average complex score of a given complex set.
static float averageComplexSetScore(ScoresCalculator scoreCalc, ComplexSet complexSet, boolean weighted, boolean ignoreMissingScores)
          Calculates the average complex score of a given complex set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

averageComplexScore

public static float averageComplexScore(ProteinNetwork scoreNetwork,
                                        Complex complex)
Calculates the score of a complex using a given scores network. The score is calculated by averaging the weight of all inner-complex edges (n*(n-1)/2 edges for a complex of n proteins). Missing scores in the network implicitly get a weight of zero.

Parameters:
scoreNetwork - scores network to be used
complex - complex for which the score will be calculated
Returns:
score of that complex with respect to the given network

averageComplexScore

public static float averageComplexScore(ScoresCalculator scoreCalc,
                                        Complex complex)
Calculates the score of a complex using a given scores calculator. The score is calculated by averaging the weight of all inner-complex edges (n*(n-1)/2 edges for a complex of n proteins). Missing scores in the network implicitly get a weight of zero.

Parameters:
scoreCalc - scores calculator to be used
complex - complex for which the score will be calculated
Returns:
score of that complex with respect to the given network

averageComplexScore

public static float averageComplexScore(ProteinNetwork scoreNetwork,
                                        Complex complex,
                                        boolean ignoreMissingScores)
Calculates the score of a complex using a given scores network. The score is calculated by averaging the weight of all inner-complex edges (n*(n-1)/2 edges for a complex of n proteins).

Parameters:
scoreNetwork - scores network to be used
complex - complex for which the score will be calculated
ignoreMissingScores - If true then missing scores in the network will not get an implicit weight of zero, but will be completely ignored in the calculation. Note: When missing scores are ignored the method will return NaN if none of the edges in the complex has a weight in the network.
Returns:
score of that complex with respect to the given network

averageComplexScore

public static float averageComplexScore(ScoresCalculator scoreCalc,
                                        Complex complex,
                                        boolean ignoreMissingScores)
Calculates the score of a complex using a given scores calculator. The score is calculated by averaging the weight of all inner-complex edges (n*(n-1)/2 edges for a complex of n proteins).

Parameters:
scoreCalc - scores calculator to be used
complex - complex for which the score will be calculated
ignoreMissingScores - If true then missing scores in the network will not get an implicit weight of zero, but will be completely ignored in the calculation. Note: When missing scores are ignored the method will return NaN if none of the edges in the complex has a weight in the network.
Returns:
score of that complex with respect to the given network

averageComplexSetScore

public static float averageComplexSetScore(ProteinNetwork scoreNetwork,
                                           ComplexSet complexSet,
                                           boolean weighted)
Calculates the average complex score of a given complex set.

Parameters:
scoreNetwork - scores network to be used
complexSet - complex set for which the average is calculated
weighted - weight scores by complex size?
Returns:
average complex score for the given complex set

averageComplexSetScore

public static float averageComplexSetScore(ScoresCalculator scoreCalc,
                                           ComplexSet complexSet,
                                           boolean weighted)
Calculates the average complex score of a given complex set.

Parameters:
scoreCalcs - scores calculator to be used
complexSet - complex set for which the average is calculated
weighted - weight scores by complex size?
Returns:
average complex score for the given complex set

averageComplexSetScore

public static float averageComplexSetScore(ProteinNetwork scoreNetwork,
                                           ComplexSet complexSet,
                                           boolean weighted,
                                           boolean ignoreMissingScores)
Calculates the average complex score of a given complex set.

Parameters:
scoreNetwork - scores calculator to be used
complexSet - complex set for which the average is calculated
weighted - weight scores by complex size?
ignoreMissingScores - Ignore missing scores in the complex score calculation? NaNs will be treated as zero. (see also: averageComplexScore(ProteinNetwork, Complex, boolean))
Returns:
average complex score for the given complex set

averageComplexSetScore

public static float averageComplexSetScore(ScoresCalculator scoreCalc,
                                           ComplexSet complexSet,
                                           boolean weighted,
                                           boolean ignoreMissingScores)
Calculates the average complex score of a given complex set.

Parameters:
scoreCalc - scores calculator to be used
complexSet - complex set for which the average is calculated
weighted - weight scores by complex size?
ignoreMissingScorescalculator - Ignore missing scores in the complex score calculation? NaNs will be treated as zero. (see also: averageComplexScore(ProteinNetwork, Complex, boolean))
Returns:
average complex score for the given complex set