Class GipoTable

java.lang.Object
  |
  +--SimpleTable
        |
        +--Table
              |
              +--GipoTable

class GipoTable
extends Table

The GipoTable class read sthe tab-delimited GipoTable file. GIPO is Gene In Plate Order file or the array Print file (sometimes called GAL or Gene Array List, etc). It then sets up the gene mappings in the Maps.midStaticCL.mList[0:maxGenes-1] gene list. The GipoTable maps FRGC coordinates and Plate data to Gene Id data, genomic ID and gene name data.

It reads the GeneInPlateOrder table includeing gene (clone, oligo) data from a FILE/URL. This table is obtained (possibly edited) derived from the array maker (vendor) for the corresponding micro array.

 This is a tab delimited file consisting of the following fields
 (which may not all be present or may have different names):
   (opt) "field", 
   "grid", "grid col", "grid row", "plate", "plate row",
   "plate col", "Clone ID", 

NOTE: (J. Powell, mAdb/CIT), Clone_ID's may be "IMAGE:#", "ATCC:#", or an unknown # (eg. Pl#R#C#", etc).

The (opt) "NAME_GCR" and (opt) "QualCheck" are used by NIA.

Note either "grid", "grid col", "grid row" or "NAME_GCR" must be specified.

The following fields extend the GIPO file (Fields formerly in GeneNames class reading the GeneNames.txt file). "Unigene cluster ID", "Gene Class", "Unigene cluster name"

The following fields extend the GIPO file: "GenBankAcc", "dbEst5", "GenBankAcc5'", "dbEst3'", "GeneBankAcc3'"

Note: there may be additional fields that are included in thye GIPO file that could be used by Plugins, etc.

This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The MAExplorer Mozilla and Legal files are available on http://maexplorer.sourceforge.net/.

Version:
$Date: 2003/07/07 21:40:41 $ $Revision: 1.11 $
Author:
P. Lemkin (NCI), G. Thornwall (SAIC), NCI-Frederick, Frederick, MD
See Also:
MAExplorer Home, Table

Field Summary
private  Config cfg
          link to global Config instance
(package private)  int cloneIdIdx
          index for "Clone ID"
(package private)  int dbESTid3Idx
          index for "dbEst3'"
(package private)  int dbESTid5Idx
          index for "dbEst5'"
(package private)  int fieldIdx
          index for "field"
(package private)  int GenBankAcc3Idx
          index for "GenBankAcc3'" or "GeneBankAcc3'"
(package private)  int GenBankAcc5Idx
          index for "GenBankAcc5'" or "GeneBankAcc5'"
(package private)  int GenBankAccIdx
          index for "GenBankAcc" or "GeneBankAcc"
(package private)  int Gene_ClassIdx
          index for "Gene Class"
(package private)  int GeneNameIdx
          index for "GeneName"
(package private)  int[] gid2GipoTableRow
          contains index of row in tData[], lookup by grid index (gid), of size maxGTmapSize
(package private)  int grid_colIdx
          index for "grid col"
(package private)  int grid_rowIdx
          index for "grid row"
(package private)  int gridIdx
          index for "grid"
(package private) static int GT_BAD_MID
          analyzable bad clone id, good gene name
(package private) static int GT_BAD_SPOT
          non-analyzable gene,, e.g.
(package private) static int GT_DUP_SPOT
          analyzable genes, duplicated gene.
(package private) static int GT_GOOD
          analyzable, good gene/clone id.
(package private)  int locationIdx
          index for "Location"
(package private)  int LocusLinkIdIdx
          index for "LocusID"
private  MAExplorer mae
          link to global MAExplorer instance
private  java.lang.String maeTbl
          name of remapped table name
private  Maps map
          link to global Maps instance
(package private)  int masterIdIdx
          generic Master_ID index
(package private)  int masterNameIdx
          generic Master_Gene_Name index
(package private)  int maxGTmapSize
          Sizeof gid2GipoTableRow[1:map.maxSpots]
(package private)  int nameGRCIdx
          index for "NAME_GRC" - NIA
private  int nGenesUpdated
          when copy data to static gene list
(package private)  int OmimIdIdx
          index for "OMIM" ID
(package private)  int plate_colIdx
          index for "plate col"
(package private)  int plate_rowIdx
          index for "plate row"
(package private)  int plateIdx
          index for "plate name"
(package private)  int qualCheckIdx
          index for "QualCheck" - NIA
(package private)  int RefSeqIdIdx
          index for "RefSeq" ID
(package private)  int SwissProtIdx
          index for "SwissProtID"
(package private)  int Unigene_cluster_IDidx
          index for "Unigene cluster ID"
(package private)  int Unigene_cluster_nameIdx
          index for "Unigene cluster name"
 
Fields inherited from class Table
bufSize, fileOKflag, fio
 
Fields inherited from class SimpleTable
fileName, msg, tCols, tData, tFields, title, tRows
 
Constructor Summary
(package private) GipoTable(MAExplorer mae, java.lang.String fileName)
          GipoTable() - constructor to read the GIPO table.
 
Method Summary
(package private)  boolean copyGBCTdataToStaticGeneDB()
          copyGBCTdataToStaticGeneDB() - setupMaster_ID mid to GipoTable table row lookup table.
(package private)  boolean copyGeneNamesTableFile()
          copyGeneNamesTableFile() - copy gene names into static Gene database map.midStaticCL.mList
(package private)  int[] getAllMIDsForGene(java.lang.String name, int matchByIdx)
          getAllMIDsForGene() - get Gene midList[] for gene name.
(package private)  int getMIDfromMaster_IDhashTable(java.lang.String Master_ID)
          getMIDfromMaster_IDhashTable() - get Gene index (mid) given Master_ID.
private  void setupFieldIndexes()
          setupFieldIndexes() - lookup field name indexes for GIPO Table fields
private  void setupMapLookupTables()
          setupMapLookupTables() - reparse FGRC to GipoTable table row idx from tData[][].
 
Methods inherited from class Table
copyTable, createFileTable, getArrayOfTabDelimitedTokens, getData, getTableRowsSubset, getTableRowsSubset, insertTblInULHCtable, lookupFieldIdxAndRemapFieldName, makeTabDelimReport, readTable, storeDataBufParser
 
Methods inherited from class SimpleTable
freeTable, getTableRowFieldByRowIdx, getTableRowFieldIdxByRowIdx, lookupFieldIdx, setFieldData, setRowData, trimWhitespace
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

mae

private MAExplorer mae
link to global MAExplorer instance

map

private Maps map
link to global Maps instance

cfg

private Config cfg
link to global Config instance

maeTbl

private final java.lang.String maeTbl
name of remapped table name

locationIdx

int locationIdx
index for "Location"

plateIdx

int plateIdx
index for "plate name"

plate_rowIdx

int plate_rowIdx
index for "plate row"

plate_colIdx

int plate_colIdx
index for "plate col"

fieldIdx

int fieldIdx
index for "field"

gridIdx

int gridIdx
index for "grid"

grid_colIdx

int grid_colIdx
index for "grid col"

grid_rowIdx

int grid_rowIdx
index for "grid row"

LocusLinkIdIdx

int LocusLinkIdIdx
index for "LocusID"

cloneIdIdx

int cloneIdIdx
index for "Clone ID"

OmimIdIdx

int OmimIdIdx
index for "OMIM" ID

RefSeqIdIdx

int RefSeqIdIdx
index for "RefSeq" ID

nameGRCIdx

int nameGRCIdx
index for "NAME_GRC" - NIA

qualCheckIdx

int qualCheckIdx
index for "QualCheck" - NIA

GeneNameIdx

int GeneNameIdx
index for "GeneName"

Unigene_cluster_IDidx

int Unigene_cluster_IDidx
index for "Unigene cluster ID"

Unigene_cluster_nameIdx

int Unigene_cluster_nameIdx
index for "Unigene cluster name"

Gene_ClassIdx

int Gene_ClassIdx
index for "Gene Class"

dbESTid3Idx

int dbESTid3Idx
index for "dbEst3'"

dbESTid5Idx

int dbESTid5Idx
index for "dbEst5'"

GenBankAccIdx

int GenBankAccIdx
index for "GenBankAcc" or "GeneBankAcc"

GenBankAcc3Idx

int GenBankAcc3Idx
index for "GenBankAcc3'" or "GeneBankAcc3'"

GenBankAcc5Idx

int GenBankAcc5Idx
index for "GenBankAcc5'" or "GeneBankAcc5'"

SwissProtIdx

int SwissProtIdx
index for "SwissProtID"

masterIdIdx

int masterIdIdx
generic Master_ID index

masterNameIdx

int masterNameIdx
generic Master_Gene_Name index

nGenesUpdated

private int nGenesUpdated
when copy data to static gene list

maxGTmapSize

int maxGTmapSize
Sizeof gid2GipoTableRow[1:map.maxSpots]

gid2GipoTableRow

int[] gid2GipoTableRow
contains index of row in tData[], lookup by grid index (gid), of size maxGTmapSize

GT_GOOD

static final int GT_GOOD
analyzable, good gene/clone id.

GT_BAD_MID

static final int GT_BAD_MID
analyzable bad clone id, good gene name

GT_BAD_SPOT

static final int GT_BAD_SPOT
non-analyzable gene,, e.g. empty spots, or filled with internal testing material

GT_DUP_SPOT

static final int GT_DUP_SPOT
analyzable genes, duplicated gene. Only one of duplicates is flagged with this
Constructor Detail

GipoTable

GipoTable(MAExplorer mae,
          java.lang.String fileName)
GipoTable() - constructor to read the GIPO table.
Parameters:
mae - is instance of MAExplorer
fileName - is the full path name of the GIPO file
See Also:
MAExplorer.logDRYROTerr(java.lang.String), Util.popupDryrotMsgsAndQuit(), setupFieldIndexes(), setupMapLookupTables()
Method Detail

setupFieldIndexes

private void setupFieldIndexes()
setupFieldIndexes() - lookup field name indexes for GIPO Table fields
See Also:
Table.lookupFieldIdxAndRemapFieldName(java.lang.String, java.lang.String)

setupMapLookupTables

private void setupMapLookupTables()
setupMapLookupTables() - reparse FGRC to GipoTable table row idx from tData[][]. Create FGRC to GT table row lookup table gid2GipoTableRow[gid] map. Also create hash table list of Master_ID names indexed by GridCoords index (gid) by inserting (gid,masterIDname) into the
    mae.mp.gid2CloneIdHashtable.
This will only point to the first gene. If there are additional copies of that gene, then put them in a replicate gene list.

This also sets up the primary GeneList maps which are used by all other gene lists when saving gene index (mid):

    map.midStaticCL[0:maxGenes-1],
    map.gidStaticCL[0:maxSpots-1].
Update the map.gid2mid[] which maps either F1 or F2 gid to mid.
See Also:
Gene, Gene.assignMasterID(int), Gene.assignMasterGeneName(int), Gene.setplateData(java.lang.String, java.lang.String, java.lang.String), GeneList.clearNull(), GeneList.setGene(Gene, int), GridCoords.cvtNAME_GCR2FGRC(int, java.lang.String), MAExplorer.logDRYROTerr(java.lang.String), Util.popupDryrotMsgsAndQuit(), getMIDfromMaster_IDhashTable(java.lang.String)

getMIDfromMaster_IDhashTable

int getMIDfromMaster_IDhashTable(java.lang.String Master_ID)
getMIDfromMaster_IDhashTable() - get Gene index (mid) given Master_ID. NOTE: this may NOT be unique if there genes are multiple spotted and are not part of the (F1,F2) duplicates. Return MID if found, else -1 if not found.

getAllMIDsForGene

int[] getAllMIDsForGene(java.lang.String name,
                        int matchByIdx)
getAllMIDsForGene() - get Gene midList[] for gene name. NOTE: genes may not be unique if they are multiply spotted (not counting the (F1,F2) duplicates if they exist).String
Parameters:
name - - gene name
matchByIdx - - gipo.XXXXIdx value for the different fields.
Returns:
list of indices else null if not found.

copyGeneNamesTableFile

boolean copyGeneNamesTableFile()
copyGeneNamesTableFile() - copy gene names into static Gene database map.midStaticCL.mList
Returns:
true if succeed.
See Also:
GeneList.addGene(Gene), GeneClass.lookupGeneClassIdx(java.lang.String), getMIDfromMaster_IDhashTable(java.lang.String)

copyGBCTdataToStaticGeneDB

boolean copyGBCTdataToStaticGeneDB()
copyGBCTdataToStaticGeneDB() - setupMaster_ID mid to GipoTable table row lookup table. This sets up the mid2GenBankGeneDataRow[gid] map.
Returns:
true if succeed
See Also:
getMIDfromMaster_IDhashTable(java.lang.String)