Package ru.autosome.perfectosape.model

Examples of ru.autosome.perfectosape.model.Sequence


  // TODO: reverse-complement matrix, not the sequence
  Map<Position, Double> scores_by_position() {
    if (cache_score_by_position == null) {
      cache_score_by_position = new HashMap<Position,Double>();
      for (Position position: positions_to_check) {
        Sequence subsequence = sequence.substring(position, pwm.length());
        cache_score_by_position.put(position, pwm.score(subsequence));
      }
    }
    return cache_score_by_position;
  }
View Full Code Here


  ArrayList<Position> positionsToCheck() {
    return sequenceWithSNP.positions_subsequence_overlaps_snp(pwm.length());
  }

  public RegionAffinityVariantInfo affinityVariantInfo(int allele_number) throws HashOverflowException {
      Sequence sequence = sequenceWithSNP.sequence_variants()[allele_number];
      Character allele = sequenceWithSNP.mid[allele_number];
      EstimateAffinityMinPvalue affinity_calculator =  new EstimateAffinityMinPvalue(pwm,
                                                                                     sequence,
                                                                                     pvalueCalculator,
                                                                                     positionsToCheck());
      Position pos = affinity_calculator.bestPosition();
      double pvalue = affinity_calculator.affinity();
      Sequence word = sequence.substring(pos, pwm.length());

      Position pos_centered = new Position(pos.position - sequenceWithSNP.left.length(), pos.directStrand);
      return new RegionAffinityVariantInfo(pos_centered, allele, pvalue, word);
  }
View Full Code Here

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

    Sequence word = new Sequence("ACAGTGACAA");
    DiPWM dipwm = DiPWM.fromPWM(pwm); // A way to transform mono-nucleotide to di matrix

    System.out.println(pwm.score(word));
    System.out.println(dipwm.score(word));
View Full Code Here

TOP

Related Classes of ru.autosome.perfectosape.model.Sequence

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.