object.common
Class ImageManager

java.lang.Object
  extended by object.common.ImageManager
All Implemented Interfaces:
java.io.Serializable

public class ImageManager
extends java.lang.Object
implements java.io.Serializable

Description
ImageManager Object is used to access data from quantification file and
display it at the screen in the Microarray data managment web interface
Infos : KLB - IPMC - 08/2003

See Also:
Organism, Oligo, Exon, Cytoband, Oligo_externe, Oligo_adhoc, GoLink, Serialized Form

Field Summary
private  java.lang.String appli
          External application reference for download file (directory : 'file')
private  int array_1
          Int concerning the first microarray for graph visualization (directory : 'graph')
private  int array_2
          Int concerning the second microarray for graph visualization (directory : 'graph')
private  double Bvalue
           
private  java.lang.String directory
          Type of datas to display at screen, could be :
- 'select' : selection of microarrays
- 'imag' : visualization of image of microarray quantification
- 'cart' : download of gene datas according to the gene cart
- 'file' : download of pre-formatted files for external applications
- 'chro' : visuallization of genes cart on a chromosome map
- 'graphe' : visualization of graphs concerning microarrays selected
- 'image' : modification of quantification image light and contrast
private  DisplayParams displayParams
          DisplayParams Object contains informations about displaying images (directory : 'file')
private  GeneCart genecart
          GeneCart Object for this ImageManager Object
private  java.util.Hashtable hashCalcul
          Hashtable containing values of calcul asked by user
protected static java.util.Hashtable hashColor
           
private  java.util.Hashtable hashDatas
          Hashtable containing Quantification_file Object
private  java.util.Hashtable hashFile
          Hashtable containing Files path downloadables
private  java.util.Hashtable hashImage
          Hashtable containing Images path displayed on screen
protected static java.util.Hashtable hashLegend
           
private  java.util.Hashtable hashMap
          Hashtable containing Html Maps for Images displayed on screen
private  java.lang.String[] labRefList
          String[] containing distinct labeling references among the Project_order Object concerned
private  double logFC
           
private  int nb_bloc
          Numero of the bloc to display at the screen
private  boolean onlyCart
          True if only genes in cart must be displayed on the visualization graph (directory : 'graph')
protected static java.lang.String pathImages
           
protected static java.lang.String pathMicroarray
           
protected static java.lang.String pathSpotting
           
protected static java.lang.String pathTmp
           
private  Project_order project_order
          Project_order Object concerning this ImageManager Object
private  Rstat rstat
           
private  int size_spot
           
private  java.lang.String title_graph
          Title of graph
private  java.lang.String toptable
           
private  boolean twoarraygraph
           
private  java.lang.String type_graphe
          Type of graph for visualization (directory : 'graph')
private  int user_id
          ID of User owning this ImageManager Object
private  java.util.Vector vectorMicroarrays
          Vector containing Microarray Objects selected for visualization
 
Constructor Summary
ImageManager()
          Default constructor
ImageManager(int user_id, Project_order project_order)
          Constructs an ImageManager object
 
Method Summary
 void addToCart()
           
 void addToCart(int i)
           
 java.lang.String[] bubbleSearch(java.lang.String[] symbol)
          This function proceed to a bubble sort on a String[]
 void createApplicationFile(java.util.Hashtable hashParams)
          This function proceed to the creation of the External Application files.
 void createDatasFile(java.util.Hashtable hashParams)
          This function proceed to the creation of the Datas files.
 void createGeneAnovaFile(java.util.Vector vectorMicroarray)
          This function proceed to the creation of GeneAnova analysis.
 void createGEOFile(java.util.Vector vectorMicroarray)
          This function proceed to the creation of GEO submission file.
 void createGEOMatrix(java.util.Vector vectorMicroarray)
          This function proceed to the creation of GEO matrix submission file.
 void createIngenuityFile(Toptable toptable)
          This function proceed to the creation of Ingenuity file.
 void createLimmaFile(java.util.Vector vectorMicroarray)
          This function proceed to the creation of the Limma Application file.
 void createMageFile(java.util.Vector vectorMicroarray)
          This function proceed to the creation of the ArrayExpress submission files.
 void createMEVFile(java.util.Vector vectorMicroarray)
          This function proceed to the creation of .
 java.lang.String getAppli()
          External application reference for download file (directory : 'file')
 int getArray_1()
          Int concerning the first microarray for graph visualization (directory : 'graph')
 int getArray_2()
          Int concerning the second microarray for graph visualization (directory : 'graph')
 double getBvalue()
          Bvalue for features filtration
 java.lang.String getDirectory()
          Type of datas to display at screen, could be :
- 'select' : selection of microarrays
- 'imag' : visualization of image of microarray quantification
- 'cart' : download of gene datas according to the gene cart
- 'file' : download of pre-formatted files for external applications
- 'chro' : visuallization of genes cart on a chromosome map
- 'graphe' : visualization of graphs concerning microarrays selected
- 'image' : modification of quantification image light and contrast
 DisplayParams getDisplayParams()
          DisplayParams Object contains informations about displaying images (directory : 'file')
 GeneCart getGenecart()
          GeneCart Object for this ImageManager Object
 java.lang.String getGroupe(java.lang.String oligo_id, java.lang.String name, double b, double logFC)
           
 java.util.Hashtable getHashCalcul()
          Hashtable containing values of calcul asked by user
 java.util.Hashtable getHashColor()
          Hashtable containing values of color mapping
 java.util.Hashtable getHashCourbes()
           
 java.util.Hashtable getHashDatas()
          Hashtable containing Quantification_file Object
 java.util.Hashtable getHashFile()
          Hashtable containing Files path downloadables
 java.util.Hashtable getHashImage()
          Hashtable containing Images path displayed on screen
 java.util.Hashtable getHashMap()
          Hashtable containing Html Maps for Images displayed on screen
 java.util.Hashtable getHashPoints()
          This function proceed to the creation of the Hashtable needed for the makeImage function of ImageManager.
 java.util.Hashtable getHashPointsToptable()
          This function proceed to the creation of the Hashtable needed for the makeImage function of ImageManager.
 java.lang.String[] getLabRefList()
          String[] containing distinct labeling references among the Project_order Object concerned
 double getLogFC()
          logFC for features filtration
 int getNb_bloc()
          Numero of the bloc to display at the screen
 boolean getOnlyCart()
          True if only genes in cart must be displayed on the visualization graph (directory : 'graph')
 double getPearson(java.util.Hashtable hashPoints)
           
 Project_order getProject_order()
          Project_order Object concerning this ImageManager Object
 Rstat getRstat()
          Rstat
 int getSize_spot()
          Size of spot for features illustration
 java.lang.String getToptable()
          Toptable for features filtration
 java.lang.String getType_graphe()
          Type of graph for visualization (directory : 'graph')
 int getUser_id()
          ID of User owning this ImageManager Object
 java.util.Vector getVectorMicroarrays()
          Vector containing Microarray Objects selected for visualization
 void loadHashColor()
          This function load Graph Colors for User.
 void loadLabRefList(int project_order_id)
          This function load attribute labRefList with distinct labbeling reference among the Project_order Object
 void makeBgDistribGraph()
           
 void makeChromoImage()
          This function proceed to the creation of the image of chromosomes according to the Gene Object stored in the cart parameter.
 void makeGraphs(java.util.Hashtable hashPoints, boolean as_line)
          This function proceed to the generation of graphe image.
 void proceed()
          This function proceed to Image creation in the visualization directory 'imag'.
 void proceedCalcul(java.lang.String type)
          This function proceed to the calcul of Quality Control defined in the type parameter received.
 void proceedGraphs()
           
 void proceedPlate384(int index)
          This function proceed to the creation of an image reformatting the Plate384 Object from the image of the Microarray hybridization.
 void proceedPlate96(int index)
          This function proceed to the creation of an image reformatting the Plate96 Object from the image of the Microarray hybridization.
 void resetCart()
           
 void resetImages()
          This function reset images Path from the hastable this.hashImage
 void saveCart(java.lang.String desciption)
           
 void saveHashColor(int user_id)
          This function save or update Graph Colors for User.
 void setAppli(java.lang.String appli)
           
 void setArray_1(int array_1)
           
 void setArray_2(int array_2)
           
 void setBvalue(double Bvalue)
           
 void setDirectory(java.lang.String directory)
           
 void setDisplayParams(DisplayParams displayParams)
           
 void setGenecart(GeneCart genecart)
           
 void setHashCalcul(java.util.Hashtable hashCalcul)
           
 void setHashColor(java.util.Hashtable hashColor)
           
 void setHashDatas(java.util.Hashtable hashDatas)
           
 void setHashFile(java.util.Hashtable hashFile)
           
 void setHashImage(java.util.Hashtable hashImage)
           
 void setHashMap(java.util.Hashtable hashMap)
           
 void setLabRefList(java.lang.String[] labRefList)
           
 void setLogFC(double logFC)
           
 void setNb_bloc(int nb_bloc)
           
 void setOnlyCart(boolean onlyCart)
           
 void setProject_order(Project_order project_order)
           
 void setRstat(Rstat rstat)
           
 void setSize_spot(int size_spot)
           
 void setStaticParams(java.util.Hashtable configFields)
          Initialize static parameters from the configuration file
- pathMicroarray
- pathSpotting
- pathImages
- pathTmp
 void setToptable(java.lang.String toptable)
           
 void setType_graphe(java.lang.String type_graphe)
           
 void setUser_id(int user_id)
           
 void setVectorMicroarrays(java.util.Vector vectorMicroarrays)
           
 void update(java.lang.String slide_code)
          This function update the list of Microarrays in the attribute this.vectorMicroarrays
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

project_order

private Project_order project_order
Project_order Object concerning this ImageManager Object


vectorMicroarrays

private java.util.Vector vectorMicroarrays
Vector containing Microarray Objects selected for visualization


genecart

private GeneCart genecart
GeneCart Object for this ImageManager Object


user_id

private int user_id
ID of User owning this ImageManager Object


nb_bloc

private int nb_bloc
Numero of the bloc to display at the screen


directory

private java.lang.String directory
Type of datas to display at screen, could be :
- 'select' : selection of microarrays
- 'imag' : visualization of image of microarray quantification
- 'cart' : download of gene datas according to the gene cart
- 'file' : download of pre-formatted files for external applications
- 'chro' : visuallization of genes cart on a chromosome map
- 'graphe' : visualization of graphs concerning microarrays selected
- 'image' : modification of quantification image light and contrast


appli

private java.lang.String appli
External application reference for download file (directory : 'file')


hashMap

private java.util.Hashtable hashMap
Hashtable containing Html Maps for Images displayed on screen


hashImage

private java.util.Hashtable hashImage
Hashtable containing Images path displayed on screen


hashFile

private java.util.Hashtable hashFile
Hashtable containing Files path downloadables


hashCalcul

private java.util.Hashtable hashCalcul
Hashtable containing values of calcul asked by user


hashDatas

private java.util.Hashtable hashDatas
Hashtable containing Quantification_file Object


labRefList

private java.lang.String[] labRefList
String[] containing distinct labeling references among the Project_order Object concerned


displayParams

private DisplayParams displayParams
DisplayParams Object contains informations about displaying images (directory : 'file')


array_1

private int array_1
Int concerning the first microarray for graph visualization (directory : 'graph')


array_2

private int array_2
Int concerning the second microarray for graph visualization (directory : 'graph')


type_graphe

private java.lang.String type_graphe
Type of graph for visualization (directory : 'graph')


title_graph

private java.lang.String title_graph
Title of graph


onlyCart

private boolean onlyCart
True if only genes in cart must be displayed on the visualization graph (directory : 'graph')


toptable

private java.lang.String toptable

Bvalue

private double Bvalue

logFC

private double logFC

size_spot

private int size_spot

twoarraygraph

private boolean twoarraygraph

rstat

private Rstat rstat

pathMicroarray

protected static java.lang.String pathMicroarray

pathSpotting

protected static java.lang.String pathSpotting

pathImages

protected static java.lang.String pathImages

pathTmp

protected static java.lang.String pathTmp

hashColor

protected static java.util.Hashtable hashColor

hashLegend

protected static java.util.Hashtable hashLegend
Constructor Detail

ImageManager

public ImageManager()
Default constructor


ImageManager

public ImageManager(int user_id,
                    Project_order project_order)
Constructs an ImageManager object

Parameters:
user_id - ID of existing User Object
project_order - Project_order Object to visualize
See Also:
Project_order, DisplayParams
Method Detail

setStaticParams

public void setStaticParams(java.util.Hashtable configFields)
Initialize static parameters from the configuration file
- pathMicroarray
- pathSpotting
- pathImages
- pathTmp


getUser_id

public int getUser_id()
ID of User owning this ImageManager Object


setUser_id

public void setUser_id(int user_id)

getNb_bloc

public int getNb_bloc()
Numero of the bloc to display at the screen


setNb_bloc

public void setNb_bloc(int nb_bloc)

getDirectory

public java.lang.String getDirectory()
Type of datas to display at screen, could be :
- 'select' : selection of microarrays
- 'imag' : visualization of image of microarray quantification
- 'cart' : download of gene datas according to the gene cart
- 'file' : download of pre-formatted files for external applications
- 'chro' : visuallization of genes cart on a chromosome map
- 'graphe' : visualization of graphs concerning microarrays selected
- 'image' : modification of quantification image light and contrast


setDirectory

public void setDirectory(java.lang.String directory)

getAppli

public java.lang.String getAppli()
External application reference for download file (directory : 'file')


setAppli

public void setAppli(java.lang.String appli)

getGenecart

public GeneCart getGenecart()
GeneCart Object for this ImageManager Object


setGenecart

public void setGenecart(GeneCart genecart)

getHashMap

public java.util.Hashtable getHashMap()
Hashtable containing Html Maps for Images displayed on screen


setHashMap

public void setHashMap(java.util.Hashtable hashMap)

getHashImage

public java.util.Hashtable getHashImage()
Hashtable containing Images path displayed on screen


setHashImage

public void setHashImage(java.util.Hashtable hashImage)

getHashFile

public java.util.Hashtable getHashFile()
Hashtable containing Files path downloadables


setHashFile

public void setHashFile(java.util.Hashtable hashFile)

getHashCalcul

public java.util.Hashtable getHashCalcul()
Hashtable containing values of calcul asked by user


setHashCalcul

public void setHashCalcul(java.util.Hashtable hashCalcul)

getHashColor

public java.util.Hashtable getHashColor()
Hashtable containing values of color mapping


setHashColor

public void setHashColor(java.util.Hashtable hashColor)

getProject_order

public Project_order getProject_order()
Project_order Object concerning this ImageManager Object


setProject_order

public void setProject_order(Project_order project_order)

getVectorMicroarrays

public java.util.Vector getVectorMicroarrays()
Vector containing Microarray Objects selected for visualization


setVectorMicroarrays

public void setVectorMicroarrays(java.util.Vector vectorMicroarrays)

getDisplayParams

public DisplayParams getDisplayParams()
DisplayParams Object contains informations about displaying images (directory : 'file')


setDisplayParams

public void setDisplayParams(DisplayParams displayParams)

getArray_1

public int getArray_1()
Int concerning the first microarray for graph visualization (directory : 'graph')


setArray_1

public void setArray_1(int array_1)

getArray_2

public int getArray_2()
Int concerning the second microarray for graph visualization (directory : 'graph')


setArray_2

public void setArray_2(int array_2)

getType_graphe

public java.lang.String getType_graphe()
Type of graph for visualization (directory : 'graph')


setType_graphe

public void setType_graphe(java.lang.String type_graphe)

getOnlyCart

public boolean getOnlyCart()
True if only genes in cart must be displayed on the visualization graph (directory : 'graph')


setOnlyCart

public void setOnlyCart(boolean onlyCart)

getLabRefList

public java.lang.String[] getLabRefList()
String[] containing distinct labeling references among the Project_order Object concerned


setLabRefList

public void setLabRefList(java.lang.String[] labRefList)

getHashDatas

public java.util.Hashtable getHashDatas()
Hashtable containing Quantification_file Object


setHashDatas

public void setHashDatas(java.util.Hashtable hashDatas)

getToptable

public java.lang.String getToptable()
Toptable for features filtration


setToptable

public void setToptable(java.lang.String toptable)

getBvalue

public double getBvalue()
Bvalue for features filtration


setBvalue

public void setBvalue(double Bvalue)

getLogFC

public double getLogFC()
logFC for features filtration


setLogFC

public void setLogFC(double logFC)

getSize_spot

public int getSize_spot()
Size of spot for features illustration


setSize_spot

public void setSize_spot(int size_spot)

getRstat

public Rstat getRstat()
Rstat


setRstat

public void setRstat(Rstat rstat)

resetCart

public void resetCart()

addToCart

public void addToCart()

addToCart

public void addToCart(int i)

saveCart

public void saveCart(java.lang.String desciption)

loadLabRefList

public void loadLabRefList(int project_order_id)
This function load attribute labRefList with distinct labbeling reference among the Project_order Object

Parameters:
project_order_id - ID of Project_order concerning this ImageManager Object

resetImages

public void resetImages()
This function reset images Path from the hastable this.hashImage


update

public void update(java.lang.String slide_code)
This function update the list of Microarrays in the attribute this.vectorMicroarrays

Parameters:
slide_code - slide_code of the microarray concerned
See Also:
Microarray, Microarray.Microarray(String)

proceed

public void proceed()
             throws java.lang.Exception
This function proceed to Image creation in the visualization directory 'imag'.
Two case of Image creation :
- by blocs
- by spots
Initialization of hashMap and hashImage with the key "V"

Throws:
java.lang.Exception
See Also:
bubbleSearch(String[]), Feature, Microarray, Microarray.Microarray(int), Spotting, Spotting.Spotting(int), Scan

bubbleSearch

public java.lang.String[] bubbleSearch(java.lang.String[] symbol)
This function proceed to a bubble sort on a String[]

Parameters:
symbol - String[] which this function make a bubble sort
Returns:
retour String[] sorted

createDatasFile

public void createDatasFile(java.util.Hashtable hashParams)
This function proceed to the creation of the Datas files.

Parameters:
hashParams - Hastable containing all informations for creating the datas file, .xls format

createApplicationFile

public void createApplicationFile(java.util.Hashtable hashParams)
This function proceed to the creation of the External Application files.

Parameters:
hashParams - Hastable containing all informations for creating the External Application file, .tar.gz format

createGEOFile

public void createGEOFile(java.util.Vector vectorMicroarray)
This function proceed to the creation of GEO submission file.

Parameters:
vectorMicroarray - Vector of microarray Object for which we have to create a .gz archive for GEO submission

createGeneAnovaFile

public void createGeneAnovaFile(java.util.Vector vectorMicroarray)
This function proceed to the creation of GeneAnova analysis.

Parameters:
vectorMicroarray - Vector of microarray Object for which we have to create a .gz archive for GeneAnova analysis

createMEVFile

public void createMEVFile(java.util.Vector vectorMicroarray)
This function proceed to the creation of .

Parameters:
vectorMicroarray - Vector of microarray Object for which we have to create a .gz archive for MEV application

createLimmaFile

public void createLimmaFile(java.util.Vector vectorMicroarray)
This function proceed to the creation of the Limma Application file.

Parameters:
vectorMicroarray - Vector of microarray Object for which we have to create a .gz archive for Limma Application

createMageFile

public void createMageFile(java.util.Vector vectorMicroarray)
This function proceed to the creation of the ArrayExpress submission files.

Parameters:
vectorMicroarray - Vector of microarray Object for which we have to create a .gz archive for ArrayExpress submission

createIngenuityFile

public void createIngenuityFile(Toptable toptable)
This function proceed to the creation of Ingenuity file.

Parameters:
toptable - toptable Object for which we need an Ingenuity file.

makeChromoImage

public void makeChromoImage()
                     throws java.lang.Exception
This function proceed to the creation of the image of chromosomes according to the Gene Object stored in the cart parameter.

Throws:
java.lang.Exception

proceedPlate384

public void proceedPlate384(int index)
                     throws java.lang.Exception
This function proceed to the creation of an image reformatting the Plate384 Object from the image of the Microarray hybridization.

Parameters:
index - Number of the Plate384 in the .BCR file of the Spotting Object from which we begin to reformt the Plate384 OBject and the next 8 Plate384.
Throws:
java.lang.Exception
See Also:
Microarray, Spotting, Plate, Plate384, Scan

proceedPlate96

public void proceedPlate96(int index)
                    throws java.lang.Exception
This function proceed to the creation of an image reformatting the Plate96 Object from the image of the Microarray hybridization.

Parameters:
index - Number of the Plate96 in the .BCR file of the Spotting Object from which we begin to reformt the Plate96 OBject and the next 8 Plate96.
Throws:
java.lang.Exception
See Also:
Microarray, Spotting, Plate, Plate96, Scan

proceedGraphs

public void proceedGraphs()

makeGraphs

public void makeGraphs(java.util.Hashtable hashPoints,
                       boolean as_line)
                throws java.lang.Exception
This function proceed to the generation of graphe image.

Parameters:
hashPoints - Hashtable of Point Object concerned by this graph.
as_line - boolean true if we need Point object to be link with line onto the graph image produced.
Throws:
java.lang.Exception
See Also:
Point

getHashPoints

public java.util.Hashtable getHashPoints()
                                  throws java.lang.Exception
This function proceed to the creation of the Hashtable needed for the makeImage function of ImageManager.

Returns:
hashPoint Hashtable of Point Object concerned by the graph to be created by the makeImage function of ImageManager.
Throws:
java.lang.Exception
See Also:
Microarray, Microarray.Microarray(int), Microarray_project_type, Microarray_project_type.getShortRef(), Scan, Point

getHashPointsToptable

public java.util.Hashtable getHashPointsToptable()
                                          throws java.lang.Exception
This function proceed to the creation of the Hashtable needed for the makeImage function of ImageManager.

Returns:
hashPoint Hashtable of Point Object concerned by the graph to be created by the makeImage function of ImageManager.
Throws:
java.lang.Exception
See Also:
Microarray, Microarray.Microarray(int), Microarray_project_type, Microarray_project_type.getShortRef(), Scan, Point

makeBgDistribGraph

public void makeBgDistribGraph()
                        throws java.lang.Exception
Throws:
java.lang.Exception

getGroupe

public java.lang.String getGroupe(java.lang.String oligo_id,
                                  java.lang.String name,
                                  double b,
                                  double logFC)

getHashCourbes

public java.util.Hashtable getHashCourbes()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

proceedCalcul

public void proceedCalcul(java.lang.String type)
                   throws java.lang.Exception
This function proceed to the calcul of Quality Control defined in the type parameter received.

Parameters:
type - Type of calcul to be performed.
Throws:
java.lang.Exception
See Also:
Microarray

getPearson

public double getPearson(java.util.Hashtable hashPoints)

loadHashColor

public void loadHashColor()
This function load Graph Colors for User.


saveHashColor

public void saveHashColor(int user_id)
This function save or update Graph Colors for User.


createGEOMatrix

public void createGEOMatrix(java.util.Vector vectorMicroarray)
This function proceed to the creation of GEO matrix submission file.

Parameters:
vectorMicroarray - Vector of Microarray Object for creating GEO matrix submission file, .tar.gz format