iPE::Model::DurationDistribution(3)

NAME
iPE::Model::DurationDistribution - Base class for duration distribution models.

DESCRIPTION
This class should be derived in order to create any distribution type.

CONSTANTS

FIXED (), ESTIMATED ()
    One of these values is stored in the type member of the duration distribution object. If it is fixed, it gathers the data from the template.

FUNCTIONS

getClassname(modelName)
    This function gets the classname for a model type after checking if it exists. If the class does not exist, it dies. This is not an object method.

new(tag, att)
    This creates a new duration distribution and initializes the member hash keys type, min, and max. If your derived class needs further initialization, you may override the init method.

init ()
    Called after the duration distribution is comepletely instantiated.

region (), model (), type (), priorCounts (), min (), max (), lengthUnit (), fixedData ()
    These are the characteristics of the distribution as inputted on instantiation. The region is the name of the region, the model is the type (which is duplicately defined by the class it is), the type is one of FIXED or ESTIMATED, defining whether we are concerned with counting this distribution, the min is the lowest value of a length that is of concern to this particular distribution, and the max is one of a number or "L" (referring to infinity), the length that is of concern to this distribution.

    The priorCounts is the number of counts to bias the entire distribution by (not the buckets in the distribution, as is done with pseudocounts). This is added in on instantiation into the samples member.

    The lengthUnit function returns the resolution of the length to be counted. For example, all exons are generally counted in number of codons. This makes smoothing the distribution make more sense, since the evolutionary model is dependent on the number of codons, and not the number of bases.

    The fixedData function will return the fixed data of inputted on instantiation. This is only relevant if the type is FIXED.

samples (), density (), cumDensity ()
    The containing submodel of this distribution keeps track of the total number of samples that each distribution gets. This is equal to the number of observations that occur within the length range of [min, max]. The density refers to the frequency of observations that occur in this length range, and thus the total density that this part of the probability density function should occupy. This should be considered when normalizing your distribution, since the total density over all the distributions should add up to 1. The cumDensity () is the cumulative density up to the beginning point of the distribution (excluding the distribution.

normalizer ()
    This is the function which has been requested to be used (on instantiation) as the normalizing method. Generally, there is a standard normalizer (i.e. "normalize") for cases with only one distribution, and another method for cases where more than one are used and this is the second part of the total distribution (e.g. "match_with_density").

initialProb (), finalProb ()
    These functions define the probability of min-1 (from the previous distribution) and max (from the current distribution). These should be used if you are matching a previous distribution to the current distribution. initialProb () is set for you before the call to normalize occurs, and finalProb () should be set by you at the end of normalization.

    Note that initialProb () may be -1, and in that case you should disregard it in normalization.

logScore (pos)
    This function will return the log score of a ratio of frequencies. This is intended as a utility function for all duration models.

countFeature (feature)
    Here is where the specific model should count a feature for its size and add it to the mdoel.

smooth ()
    Smooth the distribution.

normalize ()
    Normalize the smoothed counts to probabilities.

score ()
    Convert the normalized counts to scores.

SEE ALSO
iPE::Model::Duration, iPE::Model::DurationSubmodel, iPE::Model

AUTHOR
Bob Zimmermann (rpz@cse.wustl.edu)