    001    package calhoun.analysis.crf.features.interval13;
    002
    003    import calhoun.analysis.crf.CacheStrategySpec;
    004    import calhoun.analysis.crf.FeatureManagerNodeBoundaries;
    005    import calhoun.analysis.crf.CacheStrategySpec.CacheStrategy;
    006
    007
    008    public class ReferenceBasePredictorInterval13 extends ReferenceBasePredictorInterval13Base implements FeatureManagerNodeBoundaries<Character> {
    009
    010            private static final long serialVersionUID = -8460452348450096338L;
    011
    012            public ReferenceBasePredictorInterval13() {
    013            }
    014
    015            @Override
    016            public CacheStrategySpec getCacheStrategy() {
    017
    018                    CacheStrategySpec css = new CacheStrategySpec(CacheStrategy.DENSE_NODE_BOUNDARY);
    019                    CacheStrategySpec.DenseBoundaryCachingDetails details = new CacheStrategySpec.DenseBoundaryCachingDetails(9); // we will use 9 tables
    020
    021
    022                    // If you want to predict for real and mesh with a PWM, then set pads, for example, as below:
    023                    //      donor[j]    = new PWMLookup(3,6,pseudoCounts);   // donor signal           xxx|GTxxxx
    024                    //      acceptor[j] = new PWMLookup(9,6,pseudoCounts);   // acceptor signal  xxxxxxxAG|xxxxxx
    025                    //  start = new PWMLookup(9,6,pseudoCounts);             // start signal xxxxxxxxx|ATGxxx
    026                    //  stop  = new PWMLookup(3,9,pseudoCounts);             // stop signal        xxx|TAGxxxxxx
    027
    028                    // IDEALLY HAVE SOME ASSERTIONS TYING THESE PADS TO THE PWM SIZES
    029                    details.add(0,0,startIx + (multipleFeatures ? 0 : 0),Interval13Model.getPadIntergenic(),Interval13Model.getPadIntergenic());  // minlength 18
    030                    details.add(1,1,startIx + (multipleFeatures ? 1 : 0),Interval13Model.getPadExon3prime(),Interval13Model.getPadExon5prime());  // minlength 9
    031                    details.add(2,2,startIx + (multipleFeatures ? 1 : 0),Interval13Model.getPadExon3prime(),Interval13Model.getPadExon5prime());
    032                    details.add(3,3,startIx + (multipleFeatures ? 1 : 0),Interval13Model.getPadExon3prime(),Interval13Model.getPadExon5prime());
    033                    details.add(4,4,startIx + (multipleFeatures ? 2 : 0),Interval13Model.getPadIntron3prime(),Interval13Model.getPadIntron5prime());  // minlength 15
    034                    details.add(5,4,startIx + (multipleFeatures ? 2 : 0),Interval13Model.getPadIntron3prime(),Interval13Model.getPadIntron5prime());
    035                    details.add(6,4,startIx + (multipleFeatures ? 2 : 0),Interval13Model.getPadIntron3prime(),Interval13Model.getPadIntron5prime());
    036                    details.add(7,5,startIx + (multipleFeatures ? 3 : 0),Interval13Model.getPadExon5prime(),Interval13Model.getPadExon3prime());  // minlength 9
    037                    details.add(8,6,startIx + (multipleFeatures ? 3 : 0),Interval13Model.getPadExon5prime(),Interval13Model.getPadExon3prime());
    038                    details.add(9,7,startIx + (multipleFeatures ? 3 : 0),Interval13Model.getPadExon5prime(),Interval13Model.getPadExon3prime());
    039                    details.add(10,8,startIx + (multipleFeatures ? 4 : 0),Interval13Model.getPadIntron5prime(),Interval13Model.getPadIntron3prime());  // minlength 15
    040                    details.add(11,8,startIx + (multipleFeatures ? 4 : 0),Interval13Model.getPadIntron5prime(),Interval13Model.getPadIntron3prime());
    041                    details.add(12,8,startIx + (multipleFeatures ? 4 : 0),Interval13Model.getPadIntron5prime(),Interval13Model.getPadIntron3prime());
    042
    043                    // NOTE: The minimum lengths of the Semi-Markov training and inference for each state must be AT least as big as the sum of the two pads at either end.
    044
    045                    details.check();
    046
    047                    css.details = details;
    048
    049                    return css;
    050            }
    051    }