Package org.moltools.lib.alignment

Examples of org.moltools.lib.alignment.Alignment


  /**Return the strongest intramolecular structure (as reported by lac) for
   * the specified sequence.
   * Throws exception if allowPolys is true.*/
  public NASecStructure calculateStructure(NucleotideSequence seq, boolean doTemp) {
    Alignment la = doStrongestIntramolecularLocalAlignment(seq.seqString(), seq.getType());
    if (la == null) return null;
    NASecStructure s = new DefaultNASecStructure(la,seq.length());
    return s;
  }
View Full Code Here


    return s;
  }

  public NAHybridStructure calculateStructure(String seq1, String seq2, byte type1, byte type2) {
    lac.doAlignment(seq1, SequenceHandler.getRev(seq2));
    Alignment la = lac.getNextAlignment();
    if (la == null) return null;
    NAHybridStructure s = new DefaultNAHybridStructure(la, seq2.length());
    return s;
  }
View Full Code Here

  protected Alignment doStrongestIntramolecularLocalAlignment(String seq, byte type) {

    minLoopLength = MIN_LOOP_LENGTHS[type];

    lac.doAlignment(seq,reverse(seq));
    Alignment la = lac.getNextAlignment();
    int length = seq.length();
    if (la == null) {
      return null;
    }

    //Adjust the alignment values if seq2 upstream of seq1
    if (la.getFirstStart() > la.getSecondStart()) {
      la = new SimpleAlignment(la.getSecondStart(),la.getSecondEnd(),la.getSecondString(),la.getFirstStart(),la.getFirstEnd(),la.getFirstString());
    }

    boolean overlap = isOverlap(la,seq.length());
    while (overlap) {
      la = getNextIntramolecularAlignment(length);
View Full Code Here

    }
    return la;
  }

  protected Alignment getNextIntramolecularAlignment(int length) {
    Alignment la = null;
    boolean overlap = true;
    while (overlap) {
      la = lac.getNextAlignment();
      if (la == null) {
        return null;
      }

      //Adjust the alignment values if seq2 upstream of seq1
      if (la.getFirstStart() > la.getSecondStart()) {
        la = new SimpleAlignment(la.getSecondStart(),la.getSecondEnd(),la.getSecondString(),la.getFirstStart(),la.getFirstEnd(),la.getFirstString());
      }

      //Now check for overlap
      overlap = isOverlap(la, length);
    }
View Full Code Here

  @Override
  protected Alignment doStrongestIntramolecularLocalAlignment(String seq, byte type) {
    minLoopLength = MIN_LOOP_LENGTHS[type];

    lac.doAlignment(seq,reverse(seq));
    Alignment la = lac.getNextAlignment();
    int length = seq.length();
    if (la == null) {
      return null;
    }
    la = new SimpleAlignment(la.getFirstStart(),la.getFirstEnd(),la.getFirstString(),length-la.getSecondEnd()+1,length-la.getSecondStart()+1,la.getSecondString());
    //Adjust the alignment values if seq2 upstream of seq1
    if (la.getFirstStart() > la.getSecondStart()) {
      la = new SimpleAlignment(la.getSecondStart(),la.getSecondEnd(),la.getSecondString(),la.getFirstStart(),la.getFirstEnd(),la.getFirstString());
    }

    boolean overlap = isOverlap(la,seq.length());
    while (overlap) {
      la = getNextIntramolecularAlignment(length);
View Full Code Here

    return la;
  }

  @Override
  protected Alignment getNextIntramolecularAlignment(int length) {
    Alignment la = null;
    boolean overlap = true;
    while (overlap) {
      la = lac.getNextAlignment();
      if (la == null) {
        return null;
      }
      //la = new SimpleLocalAlignment(la.getFirstStart(),la.getFirstEnd(),la.getFirstString(),length-la.getSecondEnd()+1,length-la.getSecondStart()+1,la.getSecondString());
      //Adjust the alignment values if seq2 upstream of seq1
      if (la.getFirstStart() > la.getSecondStart()) {
        la = new SimpleAlignment(la.getSecondStart(),la.getSecondEnd(),la.getSecondString(),la.getFirstStart(),la.getFirstEnd(),la.getFirstString());
      }

      //Now check for overlap
      overlap = isOverlap(la, length);
    }
View Full Code Here

    return la;
  }

  @Override
  public NASecStructure calculateStructure(NucleotideSequence seq, boolean doStability) {
    Alignment la = doStrongestIntramolecularLocalAlignment(seq.seqString(), seq.getType());
    NASecStructure s = null;
    double maxScore = 0;
    for (int i = 0;i<25;i++) {
      if (la == null) return s;
      NASecStructure temp = new DefaultNASecStructure(la, seq.length());
View Full Code Here

    indices.clear();

    hc.doAlignment(probeSequence, tag);
    int score = hc.getHighestCell(pos);
    Alignment la = hc.getNextAlignment();
    //Get all alignments that have scores above the specified limit
    while (score > limit) {

      String[] alignseqs = new String[] {
          la.getFirstString(), la.getSecondString()};
      int apos = la.getFirstStart();
      Integer i = new Integer(apos-1);


      //Alignments that are in the extension part are not relevant, nor are
      //alignments where either sequence begins or ends with a gap
View Full Code Here

TOP

Related Classes of org.moltools.lib.alignment.Alignment

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.