org.strbio.raf
Class GapRAF

java.lang.Object
  extended by org.strbio.mol.lib.GapModelAdapter
      extended by org.strbio.raf.GapRAF
All Implemented Interfaces:
Description, GapModel

public class GapRAF
extends GapModelAdapter
implements Description

Gap penalties for RAF. Constant (1.0) for sequence (seqres), Constant (1.0) for fold, unless difference in monomer n matches gap length; i.e. A101 . B103 would have no gap penalty. There is a small, constant penalty (0.1) where adjacent residues have monomer n differences other than 0 or 1.

  Version 1.0, 10/4/01 - original version
  

Version:
1.0, 10/4/01
Author:
JMC

Field Summary
 boolean endGapFoldOK
          Gaps at the end of the fold - ok?
 boolean endGapSeqOK
          Gaps at the end of the sequence - ok?
 
Constructor Summary
GapRAF()
          Set the penalties.
 
Method Summary
 void describe(Printf outfile)
          the default function describes only ends.
 void describeBriefly(Printf outfile)
           
 double gapCostDeletion(Polymer seq, Polymer fold, int seqi, int seqj, int foldi, int foldj)
          This function should return the gap cost for aligning residues seqi and foldi, then seqj and foldj.
 double gapCostInsertion(Polymer seq, Polymer fold, int seqi, int seqj, int foldi, int foldj)
          This function should return the gap cost for aligning residues seqi and foldi, then seqj and foldj.
 boolean isEndGapFoldOK()
          See if aligning the end of the fold vs a gap is OK (not penalized)
 boolean isEndGapSeqOK()
          See if aligning the end of the sequence vs a gap is OK (not penalized)
 void processGlobalMatrix(float[][] mat, int[][] nextX, int[][] nextY, Polymer seq, Polymer fold)
          This function is optimized for gap penalties which are affine in only 1 direction, and have to be fully looked at in the other direction.
 
Methods inherited from class org.strbio.mol.lib.GapModelAdapter
calculateFirstPosition, dealWithEndPenalties, describeEnds, finished, getOptimizableParameters, printParameters, setOptimizableParameters, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

endGapSeqOK

public boolean endGapSeqOK
Gaps at the end of the sequence - ok?


endGapFoldOK

public boolean endGapFoldOK
Gaps at the end of the fold - ok?

Constructor Detail

GapRAF

public GapRAF()
Set the penalties. Ends treated like standard n-w.

Method Detail

isEndGapSeqOK

public boolean isEndGapSeqOK()
Description copied from interface: GapModel
See if aligning the end of the sequence vs a gap is OK (not penalized)

Specified by:
isEndGapSeqOK in interface GapModel

isEndGapFoldOK

public boolean isEndGapFoldOK()
Description copied from interface: GapModel
See if aligning the end of the fold vs a gap is OK (not penalized)

Specified by:
isEndGapFoldOK in interface GapModel

gapCostDeletion

public double gapCostDeletion(Polymer seq,
                              Polymer fold,
                              int seqi,
                              int seqj,
                              int foldi,
                              int foldj)
Description copied from interface: GapModel
This function should return the gap cost for aligning residues seqi and foldi, then seqj and foldj. foldi and foldj should not be consecutive; seqi and seqj should if you're doing needleman-wunsch alignments. i and j are 0-based integers, with no relation to n in Monomer. -1 means off the end. Otherwise, j should always be higher than i.
      seq:   i.....j
      fold:  ixxxxxj
      

Specified by:
gapCostDeletion in interface GapModel

gapCostInsertion

public double gapCostInsertion(Polymer seq,
                               Polymer fold,
                               int seqi,
                               int seqj,
                               int foldi,
                               int foldj)
Description copied from interface: GapModel
This function should return the gap cost for aligning residues seqi and foldi, then seqj and foldj. seqi and seqj should not be consecutive; foldi and foldj should if you're doing needleman-wunsch alignments. i and j are 0-based integers, with no relation to n in Monomer. -1 means off the end. Otherwise, j should always be higher than i.
      seq:   ixxxxxj
      fold:  i.....j
      

Specified by:
gapCostInsertion in interface GapModel

processGlobalMatrix

public void processGlobalMatrix(float[][] mat,
                                int[][] nextX,
                                int[][] nextY,
                                Polymer seq,
                                Polymer fold)
This function is optimized for gap penalties which are affine in only 1 direction, and have to be fully looked at in the other direction.

Specified by:
processGlobalMatrix in interface GapModel
Overrides:
processGlobalMatrix in class GapModelAdapter

describe

public void describe(Printf outfile)
Description copied from class: GapModelAdapter
the default function describes only ends.

Specified by:
describe in interface Description
Overrides:
describe in class GapModelAdapter

describeBriefly

public void describeBriefly(Printf outfile)