public class FixedBaseWidthScaler extends Object implements ChromatogramNonlinearScaler
ChromatogramNonlinearScaler
that scales all the
base calls in a chromatogram to the same width in pixels,
optionally biasing the peak of the call to the center.ChromatogramNonlinearScaler.Identity
Constructor and Description |
---|
FixedBaseWidthScaler(float width)
Creates a new scaler that will scale bases to the specified width
without attempting to center their peaks.
|
FixedBaseWidthScaler(float width,
boolean centerPeaks)
Creates a new scaler that will scale bases to the specified width
and may or may not bias the peaks to the center.
|
Modifier and Type | Method and Description |
---|---|
float |
scale(Chromatogram c,
int traceSampleIndex)
Returns the remapped coordinate for the provided trace sample index of the
given chromatogram.
|
public FixedBaseWidthScaler(float width)
width
- the desired call width in pixelspublic FixedBaseWidthScaler(float width, boolean centerPeaks)
width
- the desired call width in pixelscenterPeaks
- if true, the scaler will try to put the peak of
in the center of the scaled call. Otherwise, the whole call
will be scaled using the same factor.public float scale(Chromatogram c, int traceSampleIndex) throws IndexOutOfBoundsException
ChromatogramNonlinearScaler
scale
in interface ChromatogramNonlinearScaler
c
- the ChromatogramtraceSampleIndex
- the sample indexIndexOutOfBoundsException
Copyright © 2014 BioJava. All rights reserved.