|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--GeneList
The GeneList class manipulate lists of genes (clones, oligos, etc).
A GeneList contains a subset of all genes in the database. It contains
both a GeneBitSet bitset and an mList[0:length-1] containing MIDs sorted
by whatever criteria are desired. The the index of mList[] does NOT imply
the 1:1 ordering of genes as it is for midStaticCL.mList[] and
GridCoords.gid2fgrc[].
Note: all gene GeneList instances have a GeneBitSet but may or
may not have a mList[].
This class represents an individual gene list entry.
Note: gene sets are part of GeneLists and are implemented as GeneBitSet instances. Binary set operations are handled at the bit set level and are order N/64 using 64-bit long-word logical operations instead being O(N*N) if convolving mList[]'s are required.
In the places where we must work with an explicit mList[], the mList[] is defined otherwise it is set to null. Therefore, operations which update the bitSet will also update the mList[] if it is not null.
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/.
Field Summary | |
(package private) GeneBitSet |
bitSet
|
(package private) java.lang.String |
cName
instance: name of gene list |
private static GeneList[] |
geneSets
list of all gene lists |
(package private) int |
length
# of genes used in this gene list |
private MAExplorer |
mae
link to global MAExplorer instance |
(package private) int |
MAX_GENE_LISTS
max # of gene lists(or sets) to allow |
(package private) static int |
maxGeneListSize
& number of geneSets |
(package private) static int |
maxGeneSets
# of gene sets - keep title in gene set |
(package private) int |
maxSize
maximum allocation size |
(package private) Gene[] |
mList
instance: (opt) sorted list of Gene objects. |
private static GeneList |
tempSetCL
temporary GeneList used in set operations |
(package private) static int |
useGeneSetIndex
GeneSet to use for Current Gene Class. |
Constructor Summary | |
(package private) |
GeneList(MAExplorer mae,
int maxGeneListSize)
GeneList() - constructor to specify list sizes with both mList[] and bitSet. |
(package private) |
GeneList(MAExplorer mae,
int maxGeneListSize,
java.lang.String cName)
GeneList() - constructor to make new Gene named list with both mList[] and bitSet. |
(package private) |
GeneList(MAExplorer mae,
int maxGeneListSize,
java.lang.String cName,
boolean createMlistFlag)
GeneList() - constructor to make new Gene named list with bitSet but optional mList[]. |
Method Summary | |
(package private) boolean |
addGene(Gene c)
addGene() - add Gene to gene list bitSet, and mList[] if it exists. |
private void |
allocGeneList(int maxGeneListSize,
java.lang.String cName,
boolean createMlistFlag)
allocGeneList() - constructor to make new Gene named list with bitSet, but optional mList[]. |
(package private) void |
cleanup()
cleanup() - cleanup global static allocated variables in this class. |
(package private) boolean |
clear()
clear() - clear gene list length and bitSet, but keep mList[] data |
(package private) boolean |
clearMlist()
clearMlist() - clear gene mList[] entries to null. |
(package private) boolean |
clearNull()
clearNull() - clear bitSet and gene mList[], set entries to null. |
(package private) boolean |
compressGeneList()
compressGeneList() - compress the mList[] by removing nulls if any. |
(package private) boolean |
copy(GeneList c1,
GeneList c2)
copy() - copy GeneList mList[] and bitSets of c2 to c1. |
(package private) boolean |
copySorted(GeneList c1,
GeneList c2)
copySorted() - copy GeneList mList[] sorted, and bitSets of c2 to c1. |
(package private) boolean |
difference(GeneList c1,
GeneList c2,
GeneList c3)
difference() - compute difference of gene lists (c2 - c1)==> c3. |
(package private) Gene[] |
getGeneList()
getGeneList() - get gene mList[] data as Gene[]. |
(package private) GeneList |
getGeneListByName(java.lang.String geneListName)
getGeneListByName() - get GeneList if geneListName is a valid GeneList cName. |
(package private) boolean |
intersection(GeneList c1,
GeneList c2,
GeneList c3)
intersection() - compute intersection of GeneLists (c1 & c2) ==> c3. |
(package private) boolean |
isGeneInGeneList(Gene c)
isGeneInGeneList() - test if gene is in GeneList. |
(package private) boolean |
isGIDinGeneList(int gid)
isGIDinGeneList() - test if GridCoords gid in GeneList. |
(package private) boolean |
isMIDinGeneList(int mid)
isMIDinGeneList() - test if Gene id (mid) is in GeneList. |
(package private) boolean |
rmvGene(Gene c)
rmvGene() - remove Gene from gene list and bitSet. |
(package private) boolean |
setGene(Gene c,
int idx)
setGene() - set Gene to specific gene list mList[idx]. |
(package private) boolean |
setGeneListFromGeneNameArray(java.lang.String[] geneNameList)
setGeneListFromGeneNameArray() - set the GeneList from array of gene names. |
(package private) boolean |
shortenGeneList()
shortenGeneList() - shorten the mList[] to save space. |
(package private) boolean |
union(GeneList c1,
GeneList c2,
GeneList c3)
union() - compute union of gene lists (c1 & c2) ==> c3. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private MAExplorer mae
final int MAX_GENE_LISTS
static int maxGeneSets
static int useGeneSetIndex
static int maxGeneListSize
private static GeneList[] geneSets
private static GeneList tempSetCL
java.lang.String cName
Gene[] mList
GeneBitSet bitSet
int maxSize
int length
Constructor Detail |
GeneList(MAExplorer mae, int maxGeneListSize)
mae
- is instance of MAExplorermaxGeneListSize
- is max size of any gene listallocGeneList(int, java.lang.String, boolean)
GeneList(MAExplorer mae, int maxGeneListSize, java.lang.String cName)
mae
- is instance of MAExplorermaxGeneListSize
- is max size of any gene listcName
- is name of the gene listallocGeneList(int, java.lang.String, boolean)
GeneList(MAExplorer mae, int maxGeneListSize, java.lang.String cName, boolean createMlistFlag)
mae
- is instance of MAExplorermaxGeneListSize
- is max size of any gene listcName
- is name of the gene listcreateMlistFlag
- creates the mList[] if trueallocGeneList(int, java.lang.String, boolean)
Method Detail |
private void allocGeneList(int maxGeneListSize, java.lang.String cName, boolean createMlistFlag)
maxGeneListSize
- is max size of any gene listcName
- is name of the gene listcreateMlistFlag
- creates the mList[] if trueGeneBitSet
boolean setGene(Gene c, int idx)
c
- is the gene instanceidx
- is the index of where to put it in the mList[]GeneBitSet.setItem(int)
boolean addGene(Gene c)
c
- is the gene instanceGeneBitSet.addItem(int)
,
GeneBitSet.isItemInGeneBitSet(int)
boolean rmvGene(Gene c)
c
- is the gene instanceGeneBitSet.isItemInGeneBitSet(int)
,
GeneBitSet.rmvItem(int)
boolean setGeneListFromGeneNameArray(java.lang.String[] geneNameList)
geneNameList
- is the string list of gene namesGipoTable.getAllMIDsForGene(java.lang.String, int)
,
addGene(Gene)
,
clear()
boolean shortenGeneList()
boolean compressGeneList()
GeneBitSet.copyCLtoBS(GeneBitSet, GeneList, boolean)
boolean isGeneInGeneList(Gene c)
c
- is the Gene to testGeneBitSet.isItemInGeneBitSet(int)
boolean isMIDinGeneList(int mid)
mid
- is the MID of gene to testGeneBitSet.isItemInGeneBitSet(int)
boolean isGIDinGeneList(int gid)
gid
- is the GID of gene to testGeneBitSet.isItemInGeneBitSet(int)
Gene[] getGeneList()
GeneBitSet.cvtBStoCL(GeneList)
GeneList getGeneListByName(java.lang.String geneListName)
boolean clear()
GeneBitSet.clearNull()
boolean clearMlist()
boolean clearNull()
GeneBitSet.clearNull()
,
clearMlist()
boolean copySorted(GeneList c1, GeneList c2)
c1
- is first gene listc2
- is 2nd gene listGeneBitSet.copyBStoBS(GeneBitSet, GeneBitSet)
boolean copy(GeneList c1, GeneList c2)
c1
- is first gene listc2
- is 2nd gene listGeneBitSet.copyBStoBS(GeneBitSet, GeneBitSet)
,
GeneBitSet.copyBStoCL(GeneList, GeneBitSet)
boolean union(GeneList c1, GeneList c2, GeneList c3)
c1
- is first gene listc2
- is 2nd gene listc3
- is 2nd gene listGeneBitSet.copyBStoBS(GeneBitSet, GeneBitSet)
,
GeneBitSet.copyBStoCL(GeneList, GeneBitSet)
,
GeneBitSet.union(GeneBitSet, GeneBitSet, GeneBitSet)
boolean intersection(GeneList c1, GeneList c2, GeneList c3)
c1
- is first gene listc2
- is 2nd gene listc3
- is 2nd gene listGeneBitSet.copyBStoBS(GeneBitSet, GeneBitSet)
,
GeneBitSet.copyBStoCL(GeneList, GeneBitSet)
,
GeneBitSet.intersection(GeneBitSet, GeneBitSet, GeneBitSet)
boolean difference(GeneList c1, GeneList c2, GeneList c3)
c1
- is first gene listc2
- is 2nd gene listc3
- is 2nd gene listGeneBitSet.copyBStoBS(GeneBitSet, GeneBitSet)
,
GeneBitSet.copyBStoCL(GeneList, GeneBitSet)
,
GeneBitSet.difference(GeneBitSet, GeneBitSet, GeneBitSet)
void cleanup()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |