ca.cas.painting
Class Painter

java.lang.Object
  extended by ca.cas.painting.Painter

public class Painter
extends java.lang.Object

This class stores a Paint and uses the methods of the Paint interface to determine Final Patterns from aberration multigraphs. If the Paint includes a counterstain, then Painter includes methods for removing chromosomes that are entirely counterstained. Also, Painter may remove cryptic breaks from the Final Pattern and chromosomes that appear complete.


Constructor Summary
Painter(Paint pnt)
          Constructs a Painter object with pnt as the underlying Paint
 
Method Summary
 boolean counterstained(FPChrom fpchrom)
          determines whether an fpchromosome is entirely counterstained.
 FinalPattern crypticFinalPattern(AbGraph abgraph)
          Given an AbGraph, converts the final configuration subgraph into a final pattern.
 FinalPattern finalPattern(AbGraph abgraph)
          Returns the final pattern for the aberration multigraph with no cryptic breaks, counterstained chromosomes, or apparently unaffected chromosomes.
 FinalPattern finalPattern(AbGraph abgraph, boolean removeCrypticBreaks, boolean removeCounterstained, boolean removeWholeChromosomes)
          Returns the final pattern with flags for removing cryptic breaks, counterstained chromosomes, and apparently unaffected chromosomes.
 FPChrom paintComponent(AbGraph component)
          returns a final pattern chromosome from a connected AbGraph component.
 boolean removeCounterstained(FinalPattern fp)
          removes all fpchromosomes that are entirely counterstained.
 boolean removeCrypticBreaks(FinalPattern fp)
          removes the cryptic breaks in the final pattern by testing neighboring fragments under the Paint agglomeration.
 boolean removeCrypticBreaks(FPChrom fpc)
          removes the cryptic breaks in the final pattern chromosome by testing neighboring fragments under the Paint agglomeration.
 boolean removeWholeChromosomes(FinalPattern fp)
          removes all fpchromosomes that are apparently whole.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Painter

public Painter(Paint pnt)
Constructs a Painter object with pnt as the underlying Paint

Parameters:
pnt - associated paint
Method Detail

crypticFinalPattern

public FinalPattern crypticFinalPattern(AbGraph abgraph)
Given an AbGraph, converts the final configuration subgraph into a final pattern. Each connected component is handed to paintComponent which returns an FPChrom. These taken together form the FinalPattern. Since paintComponent simply translates the shape of the graph (cycle or linear) and converts each final edge to its painted Fragment, the cryptic final pattern contains all breaks.

Parameters:
abgraph - aberration multigraph
Returns:
final pattern obtained by applying paint, with all breaks and final chromosomes present.

finalPattern

public FinalPattern finalPattern(AbGraph abgraph,
                                 boolean removeCrypticBreaks,
                                 boolean removeCounterstained,
                                 boolean removeWholeChromosomes)
Returns the final pattern with flags for removing cryptic breaks, counterstained chromosomes, and apparently unaffected chromosomes.

Parameters:
abgraph - aberration multigraph
removeCrypticBreaks - if true, removes all cryptic breaks from the final pattern.
removeCounterstained - if true, removes any final chromosome that is entirely counterstained.
removeWholeChromosomes - if true, removes any chromosomes that appear unaffected (note, if removeCrypticBreaks = false and the chromosome contains a cryptic break, then even if it appears whole, it may not be removed).
Returns:
final pattern

finalPattern

public FinalPattern finalPattern(AbGraph abgraph)
Returns the final pattern for the aberration multigraph with no cryptic breaks, counterstained chromosomes, or apparently unaffected chromosomes.

Parameters:
aberration - multigraph
Returns:
observed final pattern

paintComponent

public FPChrom paintComponent(AbGraph component)
returns a final pattern chromosome from a connected AbGraph component. The final pattern chromosome will contain all breaks.

Parameters:
component -
Returns:
final pattern chromosome

removeCrypticBreaks

public boolean removeCrypticBreaks(FinalPattern fp)
removes the cryptic breaks in the final pattern by testing neighboring fragments under the Paint agglomeration. if the agglomeration is not null, the two fragments are replaced by the agglomeration. method returns true if the final pattern was changed.

Parameters:
fp - final pattern
Returns:
true if final pattern was changed.

removeCrypticBreaks

public boolean removeCrypticBreaks(FPChrom fpc)
removes the cryptic breaks in the final pattern chromosome by testing neighboring fragments under the Paint agglomeration. if the agglomeration is not null, the two fragments are replaced by the agglomeration. method returns true if the final pattern was changed.

Parameters:
fpc - final pattern chromsome
Returns:
true if final pattern chromosome was changed.

removeCounterstained

public boolean removeCounterstained(FinalPattern fp)
removes all fpchromosomes that are entirely counterstained. returns true if the final pattern was changed.

Parameters:
fp - final pattern
Returns:
true if fp was changed.

removeWholeChromosomes

public boolean removeWholeChromosomes(FinalPattern fp)
removes all fpchromosomes that are apparently whole. returns true if the final pattern was changed.

Parameters:
fp - final pattern
Returns:
true if fp was changed.

counterstained

public boolean counterstained(FPChrom fpchrom)
determines whether an fpchromosome is entirely counterstained.

Parameters:
fpchrom - final pattern chromosome
Returns:
true if chromosome entirely counterstained, else false.