Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.jstacs.motifDiscovery
Class MotifDiscoveryAssessment

    java.lang.Object
      de.jstacs.motifDiscovery.MotifDiscoveryAssessment

    public class MotifDiscoveryAssessment

extends Object

This class enables the user to assess the prediction of motif occurrences

Author:
  Jan Grau, Jens Keilwagen

Constructor Summary
`MotifDiscoveryAssessment()`

Method Summary
`static ListResult` | `assess(Sample truth, Sample prediction, int maxDiff)` This method computes the nucleotide and site measures.
`static double[][]` | `getSortedScoresForMotifAndFlanking(Sample data, Sample pred, String identifier)` Returns the scores read from the prediction `pred` for the motif with identifier `identifier` and flanking sequences as annotated in the `Sample` data.
`static double[][]` | `getSortedValuesForMotifAndFlanking(Sample data, double[][] values, double offset, double factor, String identifier)` This method provides some score arrays that can be used in `ScoreBasedPerformanceMeasureDefinitions` to determine some curves or area under curves based on the `p`-values of the predictions.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MotifDiscoveryAssessment

    public MotifDiscoveryAssessment()

Method Detail

### assess

    public static ListResult assess(Sample truth,
                                    Sample prediction,
                                    int maxDiff)
                             throws Exception

  This method computes the nucleotide and site measures.

  Parameters:
    `truth` - the `Sample` annotated with the true annotation
    `prediction` - annotated with the predicted annotation
    `maxDiff` - the maximal difference between predicted and true start position; this value is used to determine the site measures
  Returns:
    a `ListResult` containing all `NumericalResultSet`s
  Throws:
    `Exception` - if something went wrong

### getSortedValuesForMotifAndFlanking

    public static double[][] getSortedValuesForMotifAndFlanking(Sample data,
                                                                double[][] values,
                                                                double offset,
                                                                double factor,
                                                                String identifier)

  This method provides some score arrays that can be used in `ScoreBasedPerformanceMeasureDefinitions` to determine some curves or area under curves based on the `p`-values of the predictions. The scores are generated by `offset+factor*values[i][j]`.

  Parameters:
    `data` - the data
    `values` - the array of values
    `offset` - the offset that is added to the current values
    `factor` - the factor that is multiplied to the current values
    `identifier` - the identifier of the annotation of the positive class
  Returns:
    two arrays containing values; the first contains the values for the positive class, the second contains the values for the negative class
  See Also:
    `SequenceAnnotation.getIdentifier()`

### getSortedScoresForMotifAndFlanking

    public static double[][] getSortedScoresForMotifAndFlanking(Sample data,
                                                                Sample pred,
                                                                String identifier)

  Returns the scores read from the prediction `pred` for the motif with identifier `identifier` and flanking sequences as annotated in the `Sample` data. The `identifier` may be `null` to obtain the scores for all motifs, irrespective of present identifiers. The first dimension of the returned array contains the scores for the motif annotations, while the second dimension contains the scores of the flanking sequences. Both dimensions are sorted and can be directly used in the methods of `ScoreBasedPerformanceMeasureDefinitions`. The scores for the predictions must be added to the `LocatedSequenceAnnotationWithLength` representing the motifs as additional annotation using `LocatedSequenceAnnotationWithLength.LocatedSequenceAnnotationWithLength(String, String, LocatedSequenceAnnotation[], Result...)` with the name of the annotation, i.e. the name of the corresponding `Result` equal to "score".

  Parameters:
    `data` - the `Sample` annotated with the truth
    `pred` - the `Sample` annotated with the prediction and associated scores
    `identifier` - the identifier of the motif
  Returns:
    the scores of motifs and flanking sequences

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD