|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.cs.sb.core.GoAnnotations
public class GoAnnotations
The class encapsulates the data and functions related to the Gene Ontology and gene set enrichment analysis
Nested Class Summary | |
---|---|
class |
GoAnnotations.GORankingComparator
Compartor for two profile ranking records |
static class |
GoAnnotations.GoRec
Stores GO enrichment results for one category |
static class |
GoAnnotations.GoResults
Encapsulates a set of GO enrichment results |
static class |
GoAnnotations.ProfileGORankingRec
Stores info about a profile's ranking according to the current order by criteria |
static class |
GoAnnotations.Rec
Rec is a Gene Ontology hierarchy record a GO ID will map to the record A record contains a name and a set of parent records |
static class |
GoAnnotations.RecCompare
Comparator for GoRec based on actual size p-value |
static class |
GoAnnotations.RecCompareBinom
Comparator for GoRec based on expected size p-value |
static class |
GoAnnotations.RecCount
A count of the total count of the number of genes in a set (dtotal) and the number selected based on the ordering criteria (dmatch) |
static class |
GoAnnotations.RecIDpval
A record containing a GO ID and a p-val |
static class |
GoAnnotations.RecIDpval2
A record containing a GO ID and an actual and an expected size p-val |
Field Summary | |
---|---|
java.util.ArrayList |
algoAll
Arraylist of hash sets of GO categories of each unique gene |
java.util.ArrayList |
algoAllbase
Arraylist of hash sets of GO categories of each unique gene |
boolean |
bactual
boolean as to whether the profile enrichment should be actual size based (true) or expected size based (false) |
boolean |
bcluster
Whether the current order by ID are for a cluster of profiles (true) or profiles (false) |
boolean |
bcontoval
boolean as to whether to include cellular component annotations |
boolean |
bfontoval
boolean as to whether to include molecular function annotations |
boolean |
bpontoval
boolean as to whether to include biological process annotations |
boolean |
brandomgoval
boolean as to whether actual size based enrichment correction should be based on randomization (true) or Bonferroni false |
java.util.ArrayList |
extragenes
List of extra gene ids to add to the base set from the szextraval file i^th index of extra genes should correspond to i^th index of extraprobes |
java.util.ArrayList |
extraprobes
List of extra probe ids to add to the base set from the szextraval file |
java.util.HashSet[] |
goAll
Array of hash sets of GO categories of each unique gene |
java.util.HashMap |
htAlt
Maps alternative IDs to the ID used in the hierarchy |
java.util.HashMap |
htAncestors
Maps a GO ID to it set of ancestor IDs |
java.util.HashMap |
htFullCount
Maps a category to the total number of genes annotated as belonging to the category. |
java.util.HashMap |
htGeneNames
Maps every gene name to a boolean as to whether or not it is selected in the define gene set menu. |
java.util.HashMap |
htGO
Maps go category ids to their records contains their name and parents |
java.util.HashMap |
htGoLabels
Maps a gene ID to a list of go categories for which it is annotated. |
java.util.HashMap |
htIDCategory
Maps ids in the categoryID file to category names |
int |
nGeneSet
Stores a count of the number |
int |
nlegalgo
The number of GO Categories |
int |
nmaxsize
Contains the maximum number of genes in any category |
int |
nmingo
The minimum number of genes in a set and belonging to a category for the category to be included in a GO analysis table |
int |
nmingolevel
The minimum GO level to include inthe analysis, where level 1 is the molecular function, biological process, and cellular location level |
int |
nsamplespval
The number a samples to use when the multiple hypothesis correction is based on randomization. |
int |
numcategory
Contains the total number of GO categories |
int |
numtotalgenes
The total number of non-duplicate genes on the array |
java.lang.String |
szcategoryIDval
The name of the file which maps category IDs to category names that are not official gene ontology categories. |
java.lang.String |
szevidenceval
The evidence code input string consisting of evidence codes of annotations to filter, delimited by a comma, pipe, or semicolon |
java.lang.String |
szextraval
The name of the file with additional genes to add to the base set. |
java.lang.String |
szGoCategoryFile
This file has the gene Hierarchy |
java.lang.String |
szGoFile
This file has the gene annotations |
java.lang.String |
szorganismsourceval
Source of the GO annotations |
java.lang.String |
szSelectedGO
A string containing the GO ID the profiles are currently sorted by |
java.lang.String |
szsortcommand
A string containing the current sort command |
java.lang.String |
sztaxonval
The taxon input string consisting of taxons of which to restrict annotations delimited by a comma, pipe, or semicolon |
java.lang.String |
szxrefsourceval
Source of the cross-reference |
java.lang.String |
szxrefval
The name of the file with cross-references equating two or more gene symbols. |
GoAnnotations.RecIDpval[] |
theClusterRecIDpval
An array of record of GO categories and their best actual enrichment p-values for any cluster of profiles based on last DataSet invoked with |
GoAnnotations.RecIDpval2[] |
theRecIDpval
An array of record of GO categories and their best actual and expected enrichment p-values for any profile based on last DataSet invoked with |
GoAnnotations.ProfileGORankingRec[] |
tpgr
An array of profiles GO enrichment records ordered based on their enrichment to a GO category |
Constructor Summary | |
---|---|
GoAnnotations(java.lang.String szorganismsourceval,
java.lang.String szxrefsourceval,
java.lang.String szxrefval,
java.lang.String szGoFile,
java.lang.String szGoCategoryFile,
java.lang.String[] baseGenes1,
java.lang.String[] baseProbes1,
int nsamplespval,
int nmingo,
int nmingolevel,
java.lang.String szextraval,
java.lang.String szcategoryIDval,
boolean bspotincluded,
java.lang.String szevidenceval,
java.lang.String sztaxonval,
boolean bpontoval,
boolean bcontoval,
boolean bfontoval,
boolean brandomgoval)
Constructs a GoAnnotation object. |
Method Summary | |
---|---|
void |
addgenesgo(java.lang.String szannotation,
java.lang.String szGoPortion,
java.util.HashSet removedterms,
java.util.HashSet htgenes,
java.util.HashMap htxref)
Add go annotations to szannotation or its cross-reference for every entry in szGoPortion delimited by tabs, semiclons, commas, pipes, or double quotes. |
void |
addgenesgocategory(java.lang.String szcategory,
java.util.HashSet removedterms,
java.util.HashSet gocategories)
Adds szcategory or its alternative ID to gocategories, provide it is not in removedterms also if this category has not been seen before add the ID and its name if available to htGO. |
void |
addOfficialLine(java.util.StringTokenizer stwtabs,
java.util.HashSet removedterms,
java.util.HashSet htgenes,
java.util.HashMap htxref,
java.util.HashMap htProbetoGene)
Maps annotations to GO categories for offical 15 column GO annotation files. |
void |
addprobegenemap(java.lang.String szprobefull,
java.lang.String szgenefull,
java.util.HashMap htProbetoGene,
java.util.HashSet htgenes)
Adds a mapping of probe symbols to gene IDs, where the probe symbols are the sub-entries while the gene entry is the full field to htProbetoGene. |
void |
buildxref(java.util.HashSet htgenes,
java.util.HashMap htxref)
Builds a cross reference mapping which as keys is alternative identifiers that map to a subset of genes in htgenes |
GoAnnotations.GoResults |
computePValues(java.util.HashMap htGoCounts,
double dselect)
Returns a record with GoResults, included corrected and uncorrected p-values for actual size enrichment for the category counts in htGoCounts |
GoAnnotations.GoResults |
computePValues(java.util.HashMap htGoCounts,
double dselect,
double dexpect)
Returns a record with GoResults, included corrected and uncorrected p-values for expected size enrichment for the category counts in htGoCounts |
GoAnnotations.GoResults |
computePValuesBase(java.util.HashMap htGoCounts,
java.util.HashMap htBaseCount,
double dselect,
int nbaseselect,
boolean[] binbase)
Returns a record with GoResults, included corrected and uncorrected p-values for actual size enrichment for the category counts in htGoCounts |
boolean |
containsTaxon(java.lang.String sztaxonval,
java.lang.String szTaxon)
Returns true if an entry in sztaxonval is also an entry in szTaxon or after prepending a 'taxon:' szTaxon entries are delimited by pipes sztaxonval entries are delimited by semicolons, commas, and pipes |
boolean |
geneIsOfType(java.lang.String szID,
java.lang.String szCategory)
Returns true if the gene ID szID is of type szCategory any sub entry or the entire string could match where entries are delimited by semicolons, pipes, or commas |
GoAnnotations.GoResults |
getCategory(java.util.ArrayList ids,
java.lang.String[] genenames,
java.util.ArrayList[] assignments,
boolean bqueryset,
java.util.HashSet htinames)
Returns the GO results for actual size based enrichment for a set where the indicies of the set of genes in the set is ids If bqueryset is true, then only genes also in the query set will be used If htinames is non-null, then only genes also in htinames will be used |
GoAnnotations.GoResults |
getCategory(java.util.ArrayList ids,
java.lang.String[] genenames,
java.util.ArrayList[] assignments,
boolean bqueryset,
java.util.HashSet htinames,
double dexpected)
Returns the GO results for expected size based enrichment for a set where the indicies of the set of genes in the set is ids If dexpected is <0, returns an actual size based enrichment If bqueryset is true, then only genes also in the query set will be used If htinames is non-null, then only genes also in htinames will be used |
GoAnnotations.GoResults |
getCategory(java.lang.String[] genenames,
boolean[] binbase,
boolean[] binset)
Returns the GO results for actual size based enrichment for a set where the set of genes in the set are those with positive weight |
GoAnnotations.GoResults |
getCategory(java.lang.String[] genenames,
double[] weight)
Returns the GO results for actual size based enrichment for a set where the set of genes in the set are those with positive weight |
java.util.HashSet |
getgocategories(java.lang.String szannotation)
Returns the HashSet of gocategories for szannotation If such a set does not exist creates it |
int |
getLevel(java.lang.String szTerm,
java.util.HashSet pathvisited)
Returns the level of the GO ID of szTerm level is defined in terms of maximum length to a root |
protected void |
hashtoList1(java.util.HashMap hIDpval,
GoAnnotations.RecIDpval[] currRecIDA)
Iterates over hIDpval storing its contents in currRecIDA, and then sorting currRecIDA. |
protected void |
hashtoList2(java.util.HashMap hIDpval,
GoAnnotations.RecIDpval2[] currRecIDA)
Iterates over hIDpval storing its contents in currRecIDA, and then sorting currRecIDA. |
protected GoAnnotations.RecCount |
incrementSelectData(java.util.ArrayList assignedgenes,
java.lang.String[] genesprobes,
java.util.ArrayList[] assignments,
boolean breallyquery,
java.lang.String szRankBy)
Counts the total weight of assignments in assignedgenes. |
boolean |
isOrder(java.lang.String szGene)
Returns true if the profiles are sorted based on a GO category or user defined gene set and szGene is part of that category or gene set. |
java.util.HashSet |
labelsForID(java.lang.String szID)
Given a string of delimited IDs, returns any categories which map to an entry of the string or the whole string |
java.util.HashSet |
levelGO()
Returns a HashSet of GO IDs with level below nmingolevel Removes those IDs from htGO |
void |
loadID(java.lang.String baseGene)
Adds genes to htGeneNames, updates the numtotalgenes count htFullCounts, and adds to algoAll |
void |
loadIDbase(java.lang.String baseGene,
java.util.HashMap htBase,
java.util.ArrayList algoAllbase)
Updates htBase for all categories of baseGene. |
void |
loadIDCategory()
Maps ids to category names for non-official go categories specified in the file szcategoryIDval in the htIDCategory hash map. |
void |
printLevel()
Procedure prints the level of every category in htAncestors |
protected void |
updateBest(java.util.HashMap htGoCounts,
java.util.HashMap hIDpval,
int numtotalgenes,
java.util.HashMap htFullCount,
double dselect)
Iterates over all the entries in htGoCounts seeing if the current enrichment beats the enrichment in hIDpval and if so updates it |
protected void |
updateBestHyperBinom(java.util.HashMap htGoCounts,
java.util.HashMap hIDpval,
int numtotalgenes,
java.util.HashMap htFullCount,
double dselect,
double dnumexpected)
Iterates over all the entries in htGoCounts seeing if the current enrichment beats the enrichment in hIDpval for either the actual size enrichment or expected size enrichment and if so updates it |
boolean |
validEvidence(java.lang.String szevidenceval,
java.lang.String szEvidence)
Returns true if szEvidence is not in szevidenceval where the entries of szevidenceval are delimited by a semicolon, comma, or pipe |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.String szorganismsourceval
public java.lang.String szxrefsourceval
public java.lang.String szcategoryIDval
public java.lang.String szextraval
public java.lang.String szxrefval
public java.util.HashMap htGoLabels
public java.util.HashMap htFullCount
public java.util.HashMap htGeneNames
public java.util.HashMap htGO
public java.util.HashMap htAlt
public java.util.HashMap htAncestors
public java.util.HashMap htIDCategory
public boolean bcluster
public int numcategory
public int numtotalgenes
public int nmaxsize
public int nGeneSet
public int nlegalgo
public java.lang.String szsortcommand
public java.lang.String szSelectedGO
public boolean bactual
public int nsamplespval
public int nmingo
public int nmingolevel
public boolean bpontoval
public boolean bcontoval
public boolean bfontoval
public java.lang.String szevidenceval
public java.lang.String sztaxonval
public boolean brandomgoval
public java.util.ArrayList extraprobes
public java.util.ArrayList extragenes
public GoAnnotations.ProfileGORankingRec[] tpgr
public java.util.ArrayList algoAllbase
public java.util.ArrayList algoAll
public java.util.HashSet[] goAll
public GoAnnotations.RecIDpval2[] theRecIDpval
public GoAnnotations.RecIDpval[] theClusterRecIDpval
public java.lang.String szGoFile
public java.lang.String szGoCategoryFile
Constructor Detail |
---|
public GoAnnotations(java.lang.String szorganismsourceval, java.lang.String szxrefsourceval, java.lang.String szxrefval, java.lang.String szGoFile, java.lang.String szGoCategoryFile, java.lang.String[] baseGenes1, java.lang.String[] baseProbes1, int nsamplespval, int nmingo, int nmingolevel, java.lang.String szextraval, java.lang.String szcategoryIDval, boolean bspotincluded, java.lang.String szevidenceval, java.lang.String sztaxonval, boolean bpontoval, boolean bcontoval, boolean bfontoval, boolean brandomgoval) throws java.io.FileNotFoundException, java.io.IOException, java.lang.IllegalArgumentException
java.io.FileNotFoundException
java.io.IOException
java.lang.IllegalArgumentException
Method Detail |
---|
public void printLevel()
public java.util.HashSet levelGO()
public int getLevel(java.lang.String szTerm, java.util.HashSet pathvisited)
public void buildxref(java.util.HashSet htgenes, java.util.HashMap htxref) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public void addprobegenemap(java.lang.String szprobefull, java.lang.String szgenefull, java.util.HashMap htProbetoGene, java.util.HashSet htgenes)
public void addOfficialLine(java.util.StringTokenizer stwtabs, java.util.HashSet removedterms, java.util.HashSet htgenes, java.util.HashMap htxref, java.util.HashMap htProbetoGene)
public boolean validEvidence(java.lang.String szevidenceval, java.lang.String szEvidence)
public boolean containsTaxon(java.lang.String sztaxonval, java.lang.String szTaxon)
public java.util.HashSet getgocategories(java.lang.String szannotation)
public void addgenesgocategory(java.lang.String szcategory, java.util.HashSet removedterms, java.util.HashSet gocategories)
public void loadIDCategory()
public void addgenesgo(java.lang.String szannotation, java.lang.String szGoPortion, java.util.HashSet removedterms, java.util.HashSet htgenes, java.util.HashMap htxref)
public void loadIDbase(java.lang.String baseGene, java.util.HashMap htBase, java.util.ArrayList algoAllbase)
public void loadID(java.lang.String baseGene)
public java.util.HashSet labelsForID(java.lang.String szID)
public boolean isOrder(java.lang.String szGene)
public boolean geneIsOfType(java.lang.String szID, java.lang.String szCategory)
public GoAnnotations.GoResults getCategory(java.util.ArrayList ids, java.lang.String[] genenames, java.util.ArrayList[] assignments, boolean bqueryset, java.util.HashSet htinames)
public GoAnnotations.GoResults getCategory(java.lang.String[] genenames, boolean[] binbase, boolean[] binset)
public GoAnnotations.GoResults computePValuesBase(java.util.HashMap htGoCounts, java.util.HashMap htBaseCount, double dselect, int nbaseselect, boolean[] binbase)
public GoAnnotations.GoResults getCategory(java.lang.String[] genenames, double[] weight)
public GoAnnotations.GoResults getCategory(java.util.ArrayList ids, java.lang.String[] genenames, java.util.ArrayList[] assignments, boolean bqueryset, java.util.HashSet htinames, double dexpected)
public GoAnnotations.GoResults computePValues(java.util.HashMap htGoCounts, double dselect)
public GoAnnotations.GoResults computePValues(java.util.HashMap htGoCounts, double dselect, double dexpect)
protected GoAnnotations.RecCount incrementSelectData(java.util.ArrayList assignedgenes, java.lang.String[] genesprobes, java.util.ArrayList[] assignments, boolean breallyquery, java.lang.String szRankBy)
protected void hashtoList1(java.util.HashMap hIDpval, GoAnnotations.RecIDpval[] currRecIDA)
protected void hashtoList2(java.util.HashMap hIDpval, GoAnnotations.RecIDpval2[] currRecIDA)
protected void updateBest(java.util.HashMap htGoCounts, java.util.HashMap hIDpval, int numtotalgenes, java.util.HashMap htFullCount, double dselect)
protected void updateBestHyperBinom(java.util.HashMap htGoCounts, java.util.HashMap hIDpval, int numtotalgenes, java.util.HashMap htFullCount, double dselect, double dnumexpected)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |