Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## baseCode.bio.geneset
Class GeneAnnotations

    java.lang.Object
      baseCode.bio.geneset.GeneAnnotations

public class GeneAnnotations
extends java.lang.Object

Reads tab-delimited file to create maps of probes to classes, classes to probes, probes to genes, genes to probes.

Maintains the following important data structures, all derived from the input file:

                                                        probe->Classes -- each value is a Set of the Classes that a probe belongs to.
                                                        Classes->probe -- each value is a Set of the probes that belong to a class
                                                        probe->gene -- each value is the gene name corresponding to the probe.
                                                        gene->list of probes -- each value is a list of probes corresponding to a gene
                                                        probe->description -- each value is a text description of the probe (actually...of the gene)

Copyright (c) 2004 Columbia University

Version:
  $Id: GeneAnnotations.java,v 1.7 2004/12/27 22:25:56 pavlidis Exp $
Author:
  Paul Pavlidis, Shamhil Merchant, Homin Lee

Constructor Summary
`GeneAnnotations(GeneAnnotations geneData, java.util.Set activeProbes)` This is for creating GeneAnnotations by pruning a copy.
`GeneAnnotations(java.io.InputStream stream, java.util.Set activeGenes, StatusViewer messenger)` Make a new GeneAnnotations that only includes the probes in the parameter 'probes'.
`GeneAnnotations(java.lang.String fileName, java.util.Set activeGenes, StatusViewer messenger)`
`GeneAnnotations(java.lang.String filename, StatusViewer messenger)` This is for creating GeneAnnotations by reading from a file

Method Summary
`void` | `addClass(java.lang.String id, java.util.ArrayList probesForNew)` Add a class
`boolean` | `geneSetExists(java.lang.String id)` Returns true if the class is in the classToProbe map
`java.util.Map` | `geneSetToRedundantMap()`
`java.util.ArrayList` | `getClassToProbes(java.lang.String id)`
`java.util.ArrayList` | `getGeneProbeList(java.lang.String g)` Get a list of the probes that correspond to a particular gene.
`java.lang.String` | `getGeneSetByIndex(int i)` Get a class by an integer index i from the sorted list.
`java.util.Map` | `getGeneSetToGeneMap()`
`java.util.Map` | `getGeneSetToProbeMap()`
`java.util.Map` | `getGeneToGeneSetMap()`
`java.util.Map` | `getGeneToProbeList()`
`java.lang.String` | `getProbeDescription(java.lang.String p)` Get the description for a gene.
`java.lang.String` | `getProbeGeneName(java.lang.String p)` Get the gene that a probe belongs to.
`java.util.Map` | `getProbeToGeneMap()`
`java.util.Map` | `getProbeToGeneSetMap()`
`java.util.List` | `getSelectedProbes()`
`java.util.List` | `getSelectedSets()`
`void` | `modifyClass(java.lang.String classId, java.util.ArrayList probesForNew)` Redefine a class.
`int` | `numAnnotatedGenes()` Compute how many genes have Gene set annotations.
`int` | `numGenes()` How many genes are in the file?
`int` | `numGeneSets()` Get the number of classes.
`int` | `numGenesInGeneSet(java.lang.String id)` Get the number of genes in a gene set, identified by id.
`int` | `numProbesForGene(java.lang.String g)` Get how many probes point to the same gene.
`int` | `numProbesInGeneSet(java.lang.String id)` Get the number of probes in a gene set, identified by id.
`void` | `print(java.io.Writer out)` Print out the gene annotations in the same format we got them in, but if the gene sets have been modified, this will be reflected.
`void` | `removeClassFromMaps(java.lang.String id)` Remove a gene set (class) from all the maps that reference it.
`void` | `resetSelectedProbes()` Set the selected gene set to be the entire set.
`void` | `resetSelectedSets()` Set the selected gene set to be the entire set.
`int` | `selectedProbes()`
`int` | `selectedSets()`
`void` | `selectProbes(java.lang.String searchOn)` Create a selected probes list based on a search string.
`void` | `selectSets(java.lang.String searchOn, GONames goData)`
`void` | `sortGeneSets()` Sort the gene sets, filling out the sortedGeneSets.
`java.util.List` | `sortGeneSetsBySize()`
`javax.swing.table.TableModel` | `toTableModel()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### GeneAnnotations

    public GeneAnnotations(java.lang.String filename,
                           StatusViewer messenger)
                    throws java.io.IOException

  This is for creating GeneAnnotations by reading from a file

Parameters:
  `filename` - String
  `messenger` - StatusViewer to print status updates to.
Throws:
  `java.io.IOException`

### GeneAnnotations

    public GeneAnnotations(GeneAnnotations geneData,
                           java.util.Set activeProbes)

  This is for creating GeneAnnotations by pruning a copy.

Parameters:
  `geneData` - GeneAnnotations copy to prune from
  `activeProbes` - Set only include these probes

### GeneAnnotations

    public GeneAnnotations(java.io.InputStream stream,
                           java.util.Set activeGenes,
                           StatusViewer messenger)
                    throws java.io.IOException

  Make a new GeneAnnotations that only includes the probes in the parameter 'probes'.

Parameters:
  `stream` -
  `activeGenes` - Only genes in this set are left.
Throws:
  `java.io.IOException`

### GeneAnnotations

    public GeneAnnotations(java.lang.String fileName,
                           java.util.Set activeGenes,
                           StatusViewer messenger)
                    throws java.io.IOException

Parameters:
  `fileName` -

Method Detail

### getProbeToGeneMap

    public java.util.Map getProbeToGeneMap()

  Returns:
    Map

### getGeneToProbeList

    public java.util.Map getGeneToProbeList()

  Returns:
    Map

### getGeneSetToProbeMap

    public java.util.Map getGeneSetToProbeMap()

  Returns:
    Map

### getClassToProbes

    public java.util.ArrayList getClassToProbes(java.lang.String id)

  Parameters:
    `id` - String class id
  Returns:
    ArrayList list of probes in class

### sortGeneSets

    public void sortGeneSets()

  Sort the gene sets, filling out the sortedGeneSets. This should be called after any changes have been made to the classToProbeMap. The sort is just in order of id.

### sortGeneSetsBySize

    public java.util.List sortGeneSetsBySize()

  Returns:

### getProbeToGeneSetMap

    public java.util.Map getProbeToGeneSetMap()

  Returns:
    Map

### geneSetToRedundantMap

    public java.util.Map geneSetToRedundantMap()

  Returns:
    Map

### getProbeGeneName

    public java.lang.String getProbeGeneName(java.lang.String p)

  Get the gene that a probe belongs to.

  Parameters:
    `p` - String
  Returns:
    String

### getProbeDescription

    public java.lang.String getProbeDescription(java.lang.String p)

  Get the description for a gene.

  Parameters:
    `p` - String
  Returns:
    String

### getGeneProbeList

    public java.util.ArrayList getGeneProbeList(java.lang.String g)

  Get a list of the probes that correspond to a particular gene.

  Parameters:
    `g` - String a gene name
  Returns:
    ArrayList list of the probes for gene g

### getGeneSetByIndex

    public java.lang.String getGeneSetByIndex(int i)

  Get a class by an integer index i from the sorted list.

  Parameters:
    `i` -
  Returns:

### geneSetExists

    public boolean geneSetExists(java.lang.String id)

  Returns true if the class is in the classToProbe map

  Parameters:
    `id` - String a class id
  Returns:
    boolean

### numProbesForGene

    public int numProbesForGene(java.lang.String g)

  Get how many probes point to the same gene. This is like the old "numReplicates".

  Parameters:
    `g` -
  Returns:

### numGeneSets

    public int numGeneSets()

  Get the number of classes. This is computed from the sortedGeneSets.

  Returns:

### numGenes

    public int numGenes()

  How many genes are in the file?

### numProbesInGeneSet

    public int numProbesInGeneSet(java.lang.String id)

  Get the number of probes in a gene set, identified by id.

  Parameters:
    `id` - String a class id
  Returns:
    int number of probes in the class

### numGenesInGeneSet

    public int numGenesInGeneSet(java.lang.String id)

  Get the number of genes in a gene set, identified by id.

  Parameters:
    `id` - String a class id
  Returns:
    int number of genes in the class

### addClass

    public void addClass(java.lang.String id,
                         java.util.ArrayList probesForNew)

  Add a class

  Parameters:
    `id` - String class to be added
    `probesForNew` - ArrayList user-defined list of members.

### modifyClass

    public void modifyClass(java.lang.String classId,
                            java.util.ArrayList probesForNew)

  Redefine a class.

  Parameters:
    `classId` - String class to be modified
    `probesForNew` - ArrayList current user-defined list of members. The "real" version of the class is modified to look like this one.

### toTableModel

    public javax.swing.table.TableModel toTableModel()

  Returns:

### selectProbes

    public void selectProbes(java.lang.String searchOn)

  Create a selected probes list based on a search string.

  Parameters:
    `searchOn` - A string to be searched.

### resetSelectedProbes

    public void resetSelectedProbes()

  Set the selected gene set to be the entire set.

### getSelectedProbes

    public java.util.List getSelectedProbes()

  Returns:
    the list of selected probes.

### selectedProbes

    public int selectedProbes()

  Returns:
    the number of probes currently on the 'selected' list.

### selectSets

    public void selectSets(java.lang.String searchOn,
                           GONames goData)

  Parameters:
    `searchOn` -
    `goData` -

### resetSelectedSets

    public void resetSelectedSets()

  Set the selected gene set to be the entire set.

### getSelectedSets

    public java.util.List getSelectedSets()

  Returns:
    list of selected sets.

### selectedSets

    public int selectedSets()

  Returns:
    the number of sets currently on the 'selected' list.

### print

    public void print(java.io.Writer out)
               throws java.io.IOException

  Print out the gene annotations in the same format we got them in, but if the gene sets have been modified, this will be reflected.

  Parameters:
    `out` -
  Throws:
    `java.io.IOException`

### getGeneSetToGeneMap

    public java.util.Map getGeneSetToGeneMap()

  Returns:
    Returns the classToGeneMap.

### getGeneToGeneSetMap

    public java.util.Map getGeneToGeneSetMap()

  Returns:
    Returns the geneToClassMap.

### numAnnotatedGenes

    public int numAnnotatedGenes()

  Compute how many genes have Gene set annotations.

  Returns:

### removeClassFromMaps

    public void removeClassFromMaps(java.lang.String id)

  Remove a gene set (class) from all the maps that reference it.

  Parameters:
    `id` -

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2005 Columbia University. All Rights Reserved.