go-find-enriched-terms.pl -d go -h localhost -field synonym YNL116W YNL030W YNL126W go-find-enriched-terms.pl -d go -h localhost -field acc -i gene-ids.txt
Performs a term enrichment analysis. Uses hypergeometric distribution, takes entire DAG into account.
First the database will be queried for matching gene products. Any filters in place will be applied (or you can pass in a list of gene products previously fetched, eg using $apph->get_products).
The matching products count as the *sample*. This is compared against the gene products in the database that match any pre-set filters (statistics may be more meaningful when a filter is set to a particular taxon or speciesdb-source).
We then examine terms that have been used to annotate these gene products. Filters are taken into account (ie if !IEA is set, then no IEA associations will count). The DAG is also taken into account - so anything annotated to a process will count as being annotated to biological_process. This means the fake root "all" will always have p-val=1. Currently the entire DAG is traversed, relationship types are ignored (in future it may be possible to specify deduction rules - this will be useful when the number of relations in GO progresses beyond 2, or when this code is used with other ontologies)
Results are returned as a hash-of-hashes, outer hash keyed by term acc, inner hash specifying the fields:
Arguments are either connection arguments, generic to all go-db-perl scripts, and arguments specific to this script
Specify db connect arguments first; these are:
name of database; usually "go" but you may want point at a test/dvlp database
name of user to connect to database as; optional
password to connect to database with; optional
name of server where the database server lives; see http://www.godatabase.org/dev/database for details of which servers are active. or you can just specify "localhost" if you have go-mysql installed locally
May be: acc, name, synonym
a file of ids or symbols to search with; newline separated
see GO::AppHandle for explanation of filters
multiple args can be passed:
-filter taxid=7227 -filter 'evcode=!IEA'
filter by source database
multiple args can be passed
-e SGD -e FB
filter by evidence code
negative arguments can be passed
this opt can be passed multiple times:
-e ISS -s IDA -e IMP
p-value report threshold
The default output produces tab-delimited rows with the following data: