Package ru.autosome.ape.calculation.findPvalue

Examples of ru.autosome.ape.calculation.findPvalue.FindPvalueAPE


  public List<SimilarityInfo> similarityInfos() throws HashOverflowException {
    List<SimilarityInfo> result;
    result = new ArrayList<SimilarityInfo>(thresholdEvaluators.size());

    FindPvalueAPE roughQueryPvalueEvaluator = new FindPvalueAPE<ModelType, BackgroundType>(queryPWM, queryBackground, roughDiscretizer, maxHashSize);
    FindPvalueAPE preciseQueryPvalueEvaluator = new FindPvalueAPE<ModelType, BackgroundType>(queryPWM, queryBackground, preciseDiscretizer, maxHashSize);

    double roughQueryThreshold = queryThreshold(roughDiscretizer);
    double preciseQueryThreshold = queryThreshold(preciseDiscretizer);

View Full Code Here


    Discretizer discretizer = new Discretizer(10000.0);
    Integer max_hash_size = null;
    double threshold = 3;
    double[] thresholds = {3,5,7};

    FindPvalueAPE calculator = new FindPvalueAPE<PWM, BackgroundModel>(pwm, background, discretizer, max_hash_size);

      // Single threshold
    {
      CanFindPvalue.PvalueInfo info = null;
      try {
        info = calculator.pvalueByThreshold(threshold);
      } catch (HashOverflowException e) {
        e.printStackTrace();
      }
      print_result(info, background, pwm.length());
    }

      // Multiple thresholds
    {
      CanFindPvalue.PvalueInfo[] infos = new CanFindPvalue.PvalueInfo[0];
      try {
        infos = calculator.pvaluesByThresholds(thresholds);
      } catch (HashOverflowException e) {
        e.printStackTrace();
      }
      for (CanFindPvalue.PvalueInfo info : infos) {
        print_result(info, background, pwm.length());
View Full Code Here

  static void run_mono_and_di(PWM mono_pwm, BackgroundModel mono_background, Discretizer discretizer, Integer max_hash_size, double threshold) {
    DiPWM di_pwm = DiPWM.fromPWM(mono_pwm);
    DiBackgroundModel di_background = DiBackground.fromMonoBackground(mono_background);

    FindPvalueAPE calculator = new FindPvalueAPE<PWM, BackgroundModel>(mono_pwm,
                                                                       mono_background,
                                                                       discretizer, max_hash_size);
    FindPvalueAPE dicalculator = new FindPvalueAPE<DiPWM, DiBackgroundModel>(di_pwm,
                                                                             di_background,
                                                                             discretizer, max_hash_size);

    // Single threshold
    try {
      System.out.println( "================");
      CanFindPvalue.PvalueInfo info = calculator.pvalueByThreshold(threshold);
      print_result(info, mono_background, mono_pwm.length());

      CanFindPvalue.PvalueInfo di_info = dicalculator.pvalueByThreshold(threshold);
      print_result(di_info, di_background, di_pwm.length());
      System.out.println( "================");
    } catch (HashOverflowException e) {
      e.printStackTrace();
    }
View Full Code Here

TOP

Related Classes of ru.autosome.ape.calculation.findPvalue.FindPvalueAPE

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.