org.fhcrc.cpl.viewer.align
Class SplineAligner

java.lang.Object
  extended by org.fhcrc.cpl.viewer.align.Aligner
      extended by org.fhcrc.cpl.viewer.align.SplineAligner

public class SplineAligner
extends Aligner

Spline-based alignment algorithm


Nested Class Summary
 
Nested classes/interfaces inherited from class org.fhcrc.cpl.viewer.align.Aligner
Aligner.FeaturePairSelector, Aligner.HybridFeaturePairSelector, Aligner.MassFeaturePairSelector, Aligner.MassOrMzFeaturePairSelector, Aligner.MzFeaturePairSelector, Aligner.PeptideFeaturePairSelector
 
Field Summary
protected  boolean copiedRCode
           
static int DEFAULT_DEGREES_OF_FREEDOM
           
protected  int degreesOfFreedom
           
 
Fields inherited from class org.fhcrc.cpl.viewer.align.Aligner
alignmentChart, buildCharts, DEFAULT_FEATURE_PAIR_SELECTOR, featurePairSelector, maxLeverageNumerator, maxStudRes, warpingMaps
 
Constructor Summary
SplineAligner()
           
 
Method Summary
 double[] alignPairs(Pair<java.lang.Integer,java.lang.Double>[] pairs, int maxValueToWarp)
          Cover method.
 double[] alignPairs(Pair<java.lang.Integer,java.lang.Double>[] pairs, int maxValueToWarp, java.lang.String tempFileNameStart)
          Generic method for creating a warping based on pairs of values.
protected  void copyRCode()
          copy warp_scans.R to the temp directory
 int getDegreesOfFreedom()
           
 double[] parseWarpingMap(java.io.File mapFile, int maxValueToWarp)
          Generic code for parsing a map of integers to doubles
 void setDegreesOfFreedom(int degreesOfFreedom)
           
protected  java.io.File writePairsFile(Pair<java.lang.Integer,java.lang.Double>[] pairs, java.lang.String fileName)
          Write a file containing pairs
 
Methods inherited from class org.fhcrc.cpl.viewer.align.Aligner
alignFeatureSets, createChart, getAlignedFileName, getAlignmentChart, getFeaturePairSelector, getMaxLeverageNumerator, getMaxScan, getMaxStudRes, getMaxTime, getWarpingMaps, isBuildCharts, plotWarping, plotWarpings, plotWarpings, restrictPairsForRegression, setAlignmentChart, setBuildCharts, setFeaturePairSelector, setMaxLeverageNumerator, setMaxStudRes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DEGREES_OF_FREEDOM

public static final int DEFAULT_DEGREES_OF_FREEDOM
See Also:
Constant Field Values

degreesOfFreedom

protected int degreesOfFreedom

copiedRCode

protected boolean copiedRCode
Constructor Detail

SplineAligner

public SplineAligner()
Method Detail

alignPairs

public double[] alignPairs(Pair<java.lang.Integer,java.lang.Double>[] pairs,
                           int maxValueToWarp)
Cover method. In the absence of filename information, use a filename that's likely to be unique

Overrides:
alignPairs in class Aligner
Parameters:
pairs -
maxValueToWarp -
Returns:

alignPairs

public double[] alignPairs(Pair<java.lang.Integer,java.lang.Double>[] pairs,
                           int maxValueToWarp,
                           java.lang.String tempFileNameStart)
Generic method for creating a warping based on pairs of values. Create temp files with names based on tempFileNameStart, in case the user wants to peruse them

Specified by:
alignPairs in class Aligner
Parameters:
pairs -
maxValueToWarp -
Returns:

copyRCode

protected void copyRCode()
                  throws java.io.IOException,
                         java.io.FileNotFoundException
copy warp_scans.R to the temp directory

Throws:
java.io.IOException
java.io.FileNotFoundException

parseWarpingMap

public double[] parseWarpingMap(java.io.File mapFile,
                                int maxValueToWarp)
                         throws java.io.IOException,
                                java.io.FileNotFoundException
Generic code for parsing a map of integers to doubles

Parameters:
mapFile -
Returns:
Throws:
java.io.IOException
java.io.FileNotFoundException

writePairsFile

protected java.io.File writePairsFile(Pair<java.lang.Integer,java.lang.Double>[] pairs,
                                      java.lang.String fileName)
                               throws java.io.FileNotFoundException
Write a file containing pairs

Overrides:
writePairsFile in class Aligner
Parameters:
fileName -
Throws:
java.io.FileNotFoundException

getDegreesOfFreedom

public int getDegreesOfFreedom()

setDegreesOfFreedom

public void setDegreesOfFreedom(int degreesOfFreedom)


Fred Hutchinson Cancer Research Center