de.ipk.agbi.flarex.service
Class FlarexMart

java.lang.Object
  extended byde.ipk.agbi.flarex.service.FlarexMart
All Implemented Interfaces:
FlarexMartInt, java.rmi.Remote

public class FlarexMart
extends java.lang.Object
implements FlarexMartInt


Constructor Summary
FlarexMart()
           
 
Method Summary
 int[] getAllExperimentIDs(java.lang.String user, java.lang.String password)
          Get all experiment ID's.
 java.lang.String[] getECForCloneID(java.lang.String cloneID, java.lang.String user, java.lang.String pass)
          Get all EC-ID's for a given Clone-ID.
 java.lang.String[][] getECForListOfCloneIDs(java.lang.String[] cloneIDs, java.lang.String user, java.lang.String pass)
          The same procedures like getECForCloneID, but for a list(array) of cloneID's.
 java.lang.String[] getECmappingByEmblID(java.lang.String emblID, java.lang.String user, java.lang.String pass)
           Get mapping from a list of Embl-ID's to the corresponding EC-ID's.
 java.lang.String[] getEmblForCloneID(java.lang.String cloneID, java.lang.String user, java.lang.String pass)
          Get all Embl-ID's for a given Clone-ID.
 java.lang.String[][] getEmblForListOfCloneIDs(java.lang.String[] cloneIDs, java.lang.String user, java.lang.String pass)
          The same procedure like getEmblForCloneID, but for a list(array) of cloneID's.
 java.lang.String[][] getExperimentDetails(int experimentID, java.lang.String user, java.lang.String password)
           Get some details for a given experiment id.
 int[] getExperimentIDsOfProvider(int providerID, java.lang.String user, java.lang.String password)
           Get all experiment ID's for a given providerID.
 java.lang.String[] getGOAccForCloneID(java.lang.String cloneID)
          Get all GO annotation for one Clone-ID.
 java.lang.String[][] getGOAccForListOfCloneIDs(java.lang.String[] cloneIDs)
          Get all GO annotation for many Clone-ID's.
 int[] getHybridisationIDsOfExperiment(int experimentID, java.lang.String user, java.lang.String password)
           Get all hybridisation id's of an experiment.
 java.lang.String[][] getLabeledProbeDetailsForExperiment(int experimentID, java.lang.String user, java.lang.String pass)
           Get a summary of details for used labeled probe's of an experiment.
 java.lang.String[][] getLabeledProbeDetailsForProbeName(int experimentID, java.lang.String labeledProbeName, java.lang.String user, java.lang.String pass)
           Get all details for the given labeled probe name.
 int[] getLabeledProbeIDsOfHybridisationID(int hybridisationID, java.lang.String user, java.lang.String pass)
           Get the ProbeID's for a HybridisationID.
 java.lang.String[][] getLabeledProbeRawDetailsForID(int labeledProbeID, java.lang.String user, java.lang.String pass)
           Get all details for the given labeled probe id.
 java.lang.String[][] getNormalisationDetails(int normalizationMethodID, java.lang.String user, java.lang.String password)
           Get all informations about a normalisation.
 int[] getNormalisationIDsOfExperiments(int experimentID, java.lang.String user, java.lang.String password)
           Get all normalisations id's for an experiment.
 java.lang.String[][] getNormalizedGeneIntensities(int normalizationID, java.lang.String user, java.lang.String pass)
           Get the list of gene intensities with embl accession numbers.
 java.lang.String[][] getProviderDetails(int providerID)
           Get a list of all available provider details for the given providerID (Surname, Name, Street, Zip, City, Country, Tel., Fax, Url, ..., Number of Arrays).
 int[] getProviderIDs()
           Get a list of all available providers stored in the FLAREX Database.
 int[][] getReplicaGroupsOfExperiment(int experimentID, java.lang.String user, java.lang.String password)
           Get all replica groups for an experiment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlarexMart

public FlarexMart()
Method Detail

getAllExperimentIDs

public int[] getAllExperimentIDs(java.lang.String user,
                                 java.lang.String password)
                          throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt
Get all experiment ID's.

Query:
select exp_id
from FS_EXPERIMENTS

Specified by:
getAllExperimentIDs in interface FlarexMartInt
Parameters:
user - VPD Username
password - VPD password
Returns:
Return a list (array) of integer number's
It looks like:

new int[]{1,2,3,4,...}

Throws:
java.rmi.RemoteException

getECForCloneID

public java.lang.String[] getECForCloneID(java.lang.String cloneID,
                                          java.lang.String user,
                                          java.lang.String pass)
                                   throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt
Get all EC-ID's for a given Clone-ID.

Query:
select distinct b.ec
from CLONE_EMBLACC_ANNOTATION a, EMBLACC_EC_ANNOTATION b
where a.embl_acc = b.embl_acc and clone_id = ???

Specified by:
getECForCloneID in interface FlarexMartInt
Parameters:
cloneID - For which Clone-ID you want the EC-ID's
user - VPD Username
pass - VPD password
Returns:
A list of Clone-ID's. If no mapping is possible, then the array will be empty It looks like:

new String[]{"CloneID","1.6.5.3","1.9.3.1","3.6.3.14",...}

Throws:
java.rmi.RemoteException

getECForListOfCloneIDs

public java.lang.String[][] getECForListOfCloneIDs(java.lang.String[] cloneIDs,
                                                   java.lang.String user,
                                                   java.lang.String pass)
                                            throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt
The same procedures like getECForCloneID, but for a list(array) of cloneID's. The return type is a 2-dimensional array of strings.

Query:
select distinct b.ec
from CLONE_EMBLACC_ANNOTATION a, EMBLACC_EC_ANNOTATION b
where a.embl_acc = b.embl_acc and clone_id in ???

Specified by:
getECForListOfCloneIDs in interface FlarexMartInt
Parameters:
cloneIDs -
user - VPD Username
pass - VPD password
Returns:
A 2-dimensional array of strings. The array is regular. This means if the 1. Clone-ID have only 1 EC-ID and the 2. have 3 then the the rest of Clone-ID 1 is fullfilled with empty string. For example like this array:

new String[][]{
new String[]{"CloneID1","1.6.5.3","",""},
new String[]{"CloneID2","1.6.5.3","1.7.6.4","1.8.5.5"},
... }

Throws:
java.rmi.RemoteException

getECmappingByEmblID

public java.lang.String[] getECmappingByEmblID(java.lang.String emblID,
                                               java.lang.String user,
                                               java.lang.String pass)
                                        throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt

Get mapping from a list of Embl-ID's to the corresponding EC-ID's.

Query:
select distinct embl_acc , ec
from emblacc_ec_annotation
where embl_acc = '???'

Specified by:
getECmappingByEmblID in interface FlarexMartInt
Parameters:
emblID - The EMBL-ID
user - VPD Username
pass - VPD password
Returns:
A array which contains EC-ID's (if available) for given Embl-ID
If there is no mapping you get an empty array.
It looks like:

new String[]{"EmblID","1.6.5.3","1.9.3.1","3.6.3.14",...}

Throws:
java.rmi.RemoteException

getEmblForCloneID

public java.lang.String[] getEmblForCloneID(java.lang.String cloneID,
                                            java.lang.String user,
                                            java.lang.String pass)
                                     throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt
Get all Embl-ID's for a given Clone-ID.

Query:
select embl_acc
from CLONE_EMBLACC_ANNOTATION
where clone_id = ???

Specified by:
getEmblForCloneID in interface FlarexMartInt
Parameters:
cloneID - For which Clone-ID you want the Embl-ID'S
user - VPD Username
pass - VPD password
Returns:
A list of Embl-ID's. If no mapping is possible, then the array will be empty.
It looks like:

new String[]{"CloneID","AF060551","AF216203","X59282",...};

Throws:
java.rmi.RemoteException

getEmblForListOfCloneIDs

public java.lang.String[][] getEmblForListOfCloneIDs(java.lang.String[] cloneIDs,
                                                     java.lang.String user,
                                                     java.lang.String pass)
                                              throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt
The same procedure like getEmblForCloneID, but for a list(array) of cloneID's. The return type is a 2-dimensional array of strings.

Query:
select embl_acc
from CLONE_EMBLACC_ANNOTATION
where clone_id in ???

Specified by:
getEmblForListOfCloneIDs in interface FlarexMartInt
Parameters:
cloneIDs -
user - VPD Username
pass - VPD password
Returns:
A 2-dimensional array of strings. The array is regular. This means if the 1. Clone-ID have only 1 Embl-ID and the 2. have 3 then the the rest of Clone-ID 1 is fullfilled with empty string. For example like this array:

new String[][]{
new String[]{"CloneID1","Embl1","",""},
new String[]{"CloneID2","Embl1","Embl2","Embl3"},
... }

Throws:
java.rmi.RemoteException

getExperimentDetails

public java.lang.String[][] getExperimentDetails(int experimentID,
                                                 java.lang.String user,
                                                 java.lang.String password)
                                          throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt

Get some details for a given experiment id.
The list of information contain: ProviderID, Providername, Description

Query:
select name, ex.prv_prv_id as prv_id, LASTNAME ||', '||firstname as prv_name, description
from FS_EXPERIMENTS ex
join providers prv on prv.prv_id = ex.prv_prv_id
where exp_id = ?

Specified by:
getExperimentDetails in interface FlarexMartInt
Parameters:
experimentID -
user - VPD Username
password - VPD password
Returns:
A 2-dimensional array looks like:


new String[][]{
new String[]{"NAME","PEA Seed"},
new String[]{"ID","19"},{"DESCRIPTION","something"},
... }

Throws:
java.rmi.RemoteException

getExperimentIDsOfProvider

public int[] getExperimentIDsOfProvider(int providerID,
                                        java.lang.String user,
                                        java.lang.String password)
                                 throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt

Get all experiment ID's for a given providerID.

Query:
select exp_id
from FS_EXPERIMENTS
where prv_prv_id = ?

Specified by:
getExperimentIDsOfProvider in interface FlarexMartInt
Parameters:
providerID - For which provder you want the information!
user - VPD Username
password - VPD password
Returns:
A list(array) of interger values.
It looks like:

new int[]{1,2,3,4,...}

Throws:
java.rmi.RemoteException

getGOAccForCloneID

public java.lang.String[] getGOAccForCloneID(java.lang.String cloneID)
                                      throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt
Get all GO annotation for one Clone-ID.

Note for developers: Authentication not necessary

Query:
select distinct acc
from IPKEST.EST_SEQ_GOAN a,
IPKEST.MV_GO_TERM b,
IPKEST.EST_SEQ c,
IPKEST.EST_BLAST d
where c.clone_id = ???
and a.GO_DB_ID = b.ID
and c.est_seq_id = d.est_seq_id
and a.est_blast_id = d.est_blast_id

Specified by:
getGOAccForCloneID in interface FlarexMartInt
Parameters:
cloneID -
Returns:
A list (attay of strings) of go annotation numbers

new String[]{"GO:1","GO:2",...}

Throws:
java.rmi.RemoteException

getGOAccForListOfCloneIDs

public java.lang.String[][] getGOAccForListOfCloneIDs(java.lang.String[] cloneIDs)
                                               throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt
Get all GO annotation for many Clone-ID's.

Note for developers: Authentication not necessary

Query:
select distinct acc
from IPKEST.EST_SEQ_GOAN a,
IPKEST.MV_GO_TERM b,
IPKEST.EST_SEQ c,
IPKEST.EST_BLAST d
where c.clone_id = ???
and a.GO_DB_ID = b.ID
and c.est_seq_id = d.est_seq_id
and a.est_blast_id = d.est_blast_id

Specified by:
getGOAccForListOfCloneIDs in interface FlarexMartInt
Parameters:
cloneIDs -
Returns:
A 2-dimensional array of strings. The array is regular. This means if the 1. Clone-ID have only 1 GO-ID and the 2. have 3 then the the rest of Clone-ID 1 is fullfilled with empty string. For example like this array:

new String[][]{
new String[]{"CloneID1","GO:1","",""},
new String[]{"CloneID2","GO:2","GO:11","GO:12"},
... }

Throws:
java.rmi.RemoteException

getHybridisationIDsOfExperiment

public int[] getHybridisationIDsOfExperiment(int experimentID,
                                             java.lang.String user,
                                             java.lang.String password)
                                      throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt

Get all hybridisation id's of an experiment.

Query:
select hyb_hyb_id
from FS_EXPERIMENT_ITEMS
where exp_exp_id = ?

Specified by:
getHybridisationIDsOfExperiment in interface FlarexMartInt
Parameters:
experimentID -
user - VPD Username
password - VPD password
Returns:
A list (array) of integer values.
It looks like:

new int[]{1,2,3,4,...}

Throws:
java.rmi.RemoteException

getLabeledProbeDetailsForExperiment

public java.lang.String[][] getLabeledProbeDetailsForExperiment(int experimentID,
                                                                java.lang.String user,
                                                                java.lang.String pass)
                                                         throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt

Get a summary of details for used labeled probe's of an experiment.

Query:
select fs_util.getExp_Values_of_Exp(?expID?) from dual

Specified by:
getLabeledProbeDetailsForExperiment in interface FlarexMartInt
Parameters:
experimentID -
user - VPD Username
pass - VPD password
Returns:
A 2-dimensional string array.
It looks like:

new String[][]{
new String[]{"LABELED_PROBE","Hybridisation","days after flowering","wild_type vs SnRK1-antisense","HYB_ID","LBP_ID","HYG_ID"},
new String[]{"WT_11_1","WT_11_1","11 days","wild_type","93","59","39"},
new String[]{"WT_11_2","WT_11_2","12 days","SnRK1-antisense","94","60","39"},
new String[]{"WT_11_3","WT_11_3","13 days","SnRK1-antisense","95","61","39"},
... }

Throws:
java.rmi.RemoteException

getLabeledProbeDetailsForProbeName

public java.lang.String[][] getLabeledProbeDetailsForProbeName(int experimentID,
                                                               java.lang.String labeledProbeName,
                                                               java.lang.String user,
                                                               java.lang.String pass)
                                                        throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt

Get all details for the given labeled probe name.

Query:
select fs_util.getExp_Values_of_Exp(?expID?,?probeName?) from dual

Specified by:
getLabeledProbeDetailsForProbeName in interface FlarexMartInt
Parameters:
experimentID - For which Experiment?
labeledProbeName - For which labeled probe you want to see details
user - VPD Username
pass - VPD password
Returns:
A 2-dimensional string array. The first row describes which experiment factors, are choosen. The following rows lists the values for the experiment factors.
It looks like:

new String[][]{
new String[]{"LABELED_PROBE","Hybridisation","days after flowering","wild_type vs SnRK1-antisense","HYB_ID","LBP_ID","HYG_ID"},
new String[]{"WT_11_1","WT_11_1","11 days","wild_type","93","59","39"},
... }

Throws:
java.rmi.RemoteException

getLabeledProbeIDsOfHybridisationID

public int[] getLabeledProbeIDsOfHybridisationID(int hybridisationID,
                                                 java.lang.String user,
                                                 java.lang.String pass)
                                          throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt

Get the ProbeID's for a HybridisationID.

Query:
select lbp_lbp_id
from resultset
where hyb_hyb_id = ???

Specified by:
getLabeledProbeIDsOfHybridisationID in interface FlarexMartInt
Parameters:
hybridisationID -
user - VPD Username
pass - VPD password
Returns:
Array of ProbeIDs.
It looks like:

new int[]{1,2,3,4,...}

Throws:
java.rmi.RemoteException

getLabeledProbeRawDetailsForID

public java.lang.String[][] getLabeledProbeRawDetailsForID(int labeledProbeID,
                                                           java.lang.String user,
                                                           java.lang.String pass)
                                                    throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt

Get all details for the given labeled probe id. The details are unsorted and maybe not very usefull. But you get an overview of the labeled probe, which you are asking for. For a better understanding which experiment factor's are standing behind the labeled probe, please use getLabeledProbeDetailsForName or getLabeledProbeDetailsForExperiment.

Query:
select *
from LABELED_PROBES join materials
on mat_mat_id = mat_id where lbp_id = ???

Specified by:
getLabeledProbeRawDetailsForID in interface FlarexMartInt
Parameters:
labeledProbeID -
user - VPD Username
pass - VPD password
Returns:
A 2-dimensional string array.
It looks like:

new String[][]{
new String[]{"NAME","something"},
new String[]{"ID","123"},
... }

Throws:
java.rmi.RemoteException

getNormalisationDetails

public java.lang.String[][] getNormalisationDetails(int normalizationMethodID,
                                                    java.lang.String user,
                                                    java.lang.String password)
                                             throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt

Get all informations about a normalisation.

Query:
select name, pap_comment, time_stamp
from FS_PIPELINE_APPLICATIONS
where pap_id = ?

Specified by:
getNormalisationDetails in interface FlarexMartInt
Parameters:
normalizationMethodID -
user - VPD Username
password - VPD password
Returns:
A 2-dimensional array of strings like this:

new String[][]{
new String[]{"NAME","Standard normalisation"},
new String[]{"PAP_COMMENT","something"},
... }

Throws:
java.rmi.RemoteException

getNormalisationIDsOfExperiments

public int[] getNormalisationIDsOfExperiments(int experimentID,
                                              java.lang.String user,
                                              java.lang.String password)
                                       throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt

Get all normalisations id's for an experiment.

Query:
select distinct pap_pap_id
from FS_NORM_RESULTS
where ers_ers_id in (
select ers_id
from FS_EXP_RESULTSET
join FS_EXPERIMENT_ITEMS exi on exi_exi_id = exi_id
where exp_exp_id = ?)

Specified by:
getNormalisationIDsOfExperiments in interface FlarexMartInt
Parameters:
experimentID -
user - VPD Username
password - VPD password
Returns:
A list (array) of integer values like this:

new int[]{1,2,3,4,...}

Throws:
java.rmi.RemoteException

getNormalizedGeneIntensities

public java.lang.String[][] getNormalizedGeneIntensities(int normalizationID,
                                                         java.lang.String user,
                                                         java.lang.String pass)
                                                  throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt

Get the list of gene intensities with embl accession numbers.

Query:
Query will be generate with the fs_util package. The used method is:
select FS_UTIL.GET_NORM_RESULTS_MATRIX_QUERY(normalizationMethodID)
from dual

Specified by:
getNormalizedGeneIntensities in interface FlarexMartInt
Parameters:
normalizationID -
user - VPD Username
pass - VPD password
Returns:
A 2-dimensional matrix enocoded as 2-dimensionl string array like this:
BiosequenceProbeID1ProbeID2ProbeID3
Clone_ID11.21.31.5
Clone_ID23.42.50.4
Clone_ID30.10.20.3

Java representation:
new String[][]{
new String[]{Biosequence","ProbeID1","ProbeID2","ProbeID3"},
new String[]{"Clone_ID1","1.2","1.3","1.5"},
new String[]{"Clone_ID2","3.4","2.5","0.4"},
new String[]{"Clone_ID3","0.1","0.2","0.3"}
... }

Throws:
java.rmi.RemoteException

getProviderDetails

public java.lang.String[][] getProviderDetails(int providerID)
                                        throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt

Get a list of all available provider details for the given providerID (Surname, Name, Street, Zip, City, Country, Tel., Fax, Url, ..., Number of Arrays).

Note for developers: The VPD username and password is hard coded!

Query:
select p.FIRSTNAME, p.LASTNAME, c.STREET, c.CITY, c.EMAIL, c.TEL, c.FAX, c.COUNTRY, m.hybridisations
from providers p, contacts c , (
Select count(*) as hybridisations
from hybridisations where PRV_PRV_ID = ???) m
where p.CNT_CNT_ID = c.CNT_ID and p.PRV_ID = ???

Specified by:
getProviderDetails in interface FlarexMartInt
Parameters:
providerID -
Returns:
2-dimensional array with details of the given providorID.

It looks like:

new String[][]{
new String[]{"Name","Scott"},
new String[]{"Surname","Edward"},
new String[]{"Phone","1234567"}
... }

Throws:
java.rmi.RemoteException

getProviderIDs

public int[] getProviderIDs()
                     throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt

Get a list of all available providers stored in the FLAREX Database.

Note for developers:The VPD username and password is hard coded!

Query:
SELECT PRV_ID
FROM PROVIDERS
order by prv_id

Specified by:
getProviderIDs in interface FlarexMartInt
Returns:
List (ID's) of providers.
new int[]{1,2,3,4,...}
Throws:
java.rmi.RemoteException

getReplicaGroupsOfExperiment

public int[][] getReplicaGroupsOfExperiment(int experimentID,
                                            java.lang.String user,
                                            java.lang.String password)
                                     throws java.rmi.RemoteException
Description copied from interface: FlarexMartInt

Get all replica groups for an experiment.

Query:
select hyg_hyg_id, hyb_hyb_id
from FS_EXPERIMENT_ITEMS
join FS_EXI_HYG on exi_id=exi_exi_id
join FS_HYB_GROUPS on hyg_id = hyg_hyg_id
where exp_exp_id = ?
and hgt_hgt_id = (select hgt_id from FS_HYB_GROUPTYPES where name ='Replica')
order by hyg_hyg_id

Specified by:
getReplicaGroupsOfExperiment in interface FlarexMartInt
Parameters:
experimentID -
user - VPD Username
password - VPD password
Returns:
A 2-dimensional array of integer values which represent the hybridisation group with his hybridisations. The first value of a row is the group id and the second the hybridisation id.

new int[][]{
new int[]{1,2}
new int[]{1,6}
new int[]{2,10}
new int[]{3,14}
... }

Throws:
java.rmi.RemoteException