EcoliWiki:Gene Association File: Difference between revisions

From EcoliWiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(28 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[File:GAF Pipeline.jpg|right|frame|See text for description.]]
==Overview==
[[EcoliWiki]] and [[EcoCyc]] contribute to the [[Gene Ontology (GO)]] by monthly submitting our annotations.  
[[EcoliWiki]] and [[EcoCyc]] contribute to the [[Gene Ontology (GO)]] by monthly submitting our annotations.  


The two sites' annotations are prepared by the EcoliWiki team (mostly [[User:DanielRenfro|Daniel,) and submitted via [[wikipedia:CVS|CVS]] to the GO Consortium. The figure at right shows the four basic steps to this process:
__TOC__
 
=Format=
The '''gene_assocation''' file format has two versions. The [http://www.geneontology.org/GO.format.annotation.shtml Gene Ontology's documentation page] describes these quite well. Below are some notes, some specific to the EcoCyc/EcoliWiki version of the gaf.
{| class="tableEdit"
|-
! Column Number
! Name
! Notes
! Cardinality
|-
| 1
| Database
| This is the database that the identifiers come from. We are using [[EcoCyc]] identifiers, so this column will always be "EcoCyc."
| 1
|-
| 2
| db_object_id
|
Unique identifier from the database in column1.
 
We are using the EcoCyc database identifiers for historical reasons. These accessions are pulled out of the 'Gene_accessions_table' on the Gene page. These EcoCyc accessions ''must be up to date'' or the entire set of annotations for a particular protein can be lost.
| 1
|-
| 3
| db_object_symbol
|
A unique and valid symbol. This is the ''canonical name'' of the subject of the annotation (a gene or protein name, ORF, etc.) In this case it is the name of the gene product. We use the standard ''E. coli'' systematic nomenclature and capitolize the first letter of this symbol to make it clear this is a '''product.'''
 
This is where a lot of collision between EcoliWiki and EcoCyc happens. After the two files of correct annotations from the two databases are combined, the names in this column usually conflict with each other -- meaning there is more than one db_object_symbol for a particular db_object_id.
| 1
|-
| 4
| Qualifier
|
The qualifier. These three are nonstandard and must be removed:
# obsolote_go_term - flag
# under_review  - we think this should be recurated
# deprecated  - we've looked at it and it needs to be removed
# ...probably others...
| 0, 1, >1
|-
| 5
| GO id
|
| 1
|-
| 6
| Reference
| A valid database prefix is required
| 1
|-
| 7
| Evidnece
| Three letter abbreviation
| 1
|-
| 8
| With/From
| column of variable content, depending on the situation. See the [http://www.geneontology.org/GO.format.gaf-2_0.shtml#with_from Gene Ontology gaf2.0 specification page] for more info.
| 0, 1
|-
| 9
| Aspect
| one of three: P, F, C
| 1
|-
| 10
| db_object_name
| name of the gene or gene product. free text
| 0, 1
|-
| 11
| db_object_synonym
| a pipe-delimited list of synonyms for this subject. Comes from the synonyms field in the 'Product_nomenclature_table'.
| 0, 1, >1
|-
| 12
| db_object_type
| A description of the type of gene product being annotated.
* If column 17 is used, this column refers to that, otherwise, it refers to column 2
| 1
|-
| 13
| taxon
| integer value of the taxon. It is not quite clear which taxon we are annotating to. See. [[EcoliWiki:Gene Association File#Taxon Controversy]]
| 1
|-
| 14
| date
| Date on which the annotation was made. IEAs older than a year should be removed.
| 1
|-
| 15
| assigned by
| the database which made the annotation. Not the person. One of the values in the GO list of valid database identifiers.
| 1
|-
| 16
| annotation extension
| contains cross-references to other ontologies that can be used to qualify or enhance the annotation. prefaced by an appropriate GO relationship
| 0, 1, >1
|-
| 17
| isoform/product form
| as the db_object_id (column 2) must be a canonical entry - something that has a 1:1 relationship to a gene - this field allows the annotation of "specific variants of that gene or gene product." EcoliWiki as of July 2010 has no way of annotating to a specific variant of a gene product. This column must contain a standard DB:ID identifier.
| ?
|}
 
=Generation=
[[File:GAF Pipeline.jpg|right|frame|See text for description.]]
The two sites' annotations are prepared by the EcoliWiki team (mostly [[User:DanielRenfro|Daniel]],) and submitted via [[wikipedia:CVS|CVS]] to the GO Consortium. The figure at right shows the four basic steps to this process:
# Obtain annotations from EcoCyc (quarterly)
# Obtain annotations from EcoCyc (quarterly)
# Obtain annotations from EcoliWiki (monthly)
# Obtain annotations from EcoliWiki (monthly)
Line 9: Line 118:
# Submit to the GO
# Submit to the GO


==Detailed Description==
There are actually two files that get submitted each month. The <tt>gene association</tt> file and the <tt>gp2protein</tt> file. A detailed description of each can be found in the [http://www.geneontology.org/GO.contents.doc.shtml GO Consortium's documentation].


===Step 0.5 - Setup the environment===
==Taxon Identifier(s)==
* EcoCyc consistenly uses <tt>taxon:511145</tt> (Escherichia coli str. K-12 substr. MG1655)<ref>Personal correspondence. https://mail.google.com/mail/?hl=en&shva=1#label/gaf/1266d5c79b4c8bc7</ref>.
* EcoliWiki consistenly uses <tt>taxon:83333</tt> (Escherichia coli K-12). We made this decision because we don't deal exclusively with MG1655. Now that we have other strains in the wiki (REL606, DH10B, and soon to be BL21) we'll have to decide what taxon to use for annotations to genes that are in differenent strains.
 
Peter Karp says:
: "It will cause great confusion to try to curate several strains together with no separation.  You may have several strains in the wiki, but I believe they should be separated, and each strain should have its own set of GO annotations.  Therefore I believe you should be using taxon:511145."
Jim Hu says:
: "The literature-based curation is based on a corpus of papers describing experiments that are done in a mix of E. coli lab strains, not just MG1655 and its direct descendants.  Large fractions of the work on K-12 strains is based on W3110 derivatives. MG1655 and W3110 are both covered by taxid 83333.  However, this excludes all of the work done with E. coli B derivatives, including, I believe, all of the early work from the CSHL phage group, all of the work from Engelsberg on arabinose, and most of the work from Fred Neidhardt's group.
: From the model organism perspective, the vast majority of the work we expect people to curate is inferred to apply to a more generic lab E. coli, not just the strain where the work was done.  The exception would be studies comparing pathogens and nonpathogens, restriction-modification, or strains with or without lambda or F.  For this reason, I think we should use 562 unless the annotation is based on a study of what makes K-12 different from other E. coli clades, or MG1655 different from other K-12 strains."
 
* Currently we leave the annotations alone, meaning there is a mix of annotations to Ecoli K-12 and subst. MG1655.
 
 
 
==Detailed Description of File Generation==
===Step 0 - Setup the environment===
The process requires some files and scripts from the GO Consortium. Instead of do this by hand each month, Daniel wrote a script to handle this part of the process. To use this [[wikipedia:bash|bash]] script, copy this code into a file and make it executable. On our servers it is named <tt>gaf_setup.sh</tt>.
The process requires some files and scripts from the GO Consortium. Instead of do this by hand each month, Daniel wrote a script to handle this part of the process. To use this [[wikipedia:bash|bash]] script, copy this code into a file and make it executable. On our servers it is named <tt>gaf_setup.sh</tt>.


The first step is to run this script. Alternatively, you can follow the directions below to do this by hand.  
The first step is to run this script. Alternatively, you can follow the directions below to do this by hand.  
 
<div id="gaf_setup.sh" class="switch:closed" title="gaf_setup.sh">
====gaf_setup.sh====
<php>
<php>
#!/bin/bash
#!/bin/bash
Line 30: Line 151:


working_dir=$(date "+%Y-%m-%d")
working_dir=$(date "+%Y-%m-%d")
#prefix="/usr/local/phpwikibots/trunk/PDB_Table"              # absolute path bad.
prefix=`dirname "$0"`  
prefix=`dirname "$0"`                                         # relative path good.


# make the working directory
# make the working directory
Line 65: Line 185:
chmod +x check-abbr-ga-file.pl filter-gene-association.pl
chmod +x check-abbr-ga-file.pl filter-gene-association.pl


echo "setup complete."</php>
echo "setup complete."
</php>
</div>


====manual setup====
<div id="manual_setup" class="switch:closed" title="manual instructions">
Make a new directory to work in.
Make a new directory to work in.
  cd /usr/local/working/GAF/
  cd /usr/local/working/GAF/
Line 96: Line 218:
  mv gene_ontology_edit.obo ontology/
  mv gene_ontology_edit.obo ontology/
  mv GO.xrf_abbs doc/
  mv GO.xrf_abbs doc/
 
</div>


===Step 1 - EcoCyc annotation===
===Step 1 - EcoCyc annotation===
EcoCyc's quarterly releases contain their annotations in the gene_association file format. The file is typically named <tt>gene_associations.ecocyc...</tt>. (<small>Notice the plural on association'''s''')</small>. In order to prepare their annotations, we must first parse the annotations for validity.
EcoCyc's quarterly releases contain their annotations in the gene_association file format. The file is typically named <tt>gene_associations.ecocyc...</tt>. (<small>Notice the plural on association'''s''')</small>. In order to prepare their annotations, we must first parse the annotations for validity. Using the script(s) we downloaded in the setup section, parse the most recent EcoCyc release's annotation file. For a more detailed description of the script, see http://www.geneontology.org/GO.format.annotation.shtml#script. These scripts can be run with the option to print the erroneous lines with short descriptions of the problem. Some of these errors will be easy to fix and will not have any biological significance. A common error is misspellings or disallowed entries in the ''Assigned_by'' column (column 15.) Other errors are non-trivial and should be kept track of for further curation.
 
To change this information, just edit the file from the CVS checkout and resubmit it. It will get prepended to the gene_assocation file automatically.
 
 
Using the script(s) we downloaded in the setup section, parse the most recent EcoCyc release's annotation file. For a more detailed description of the script, see http://www.geneontology.org/GO.format.annotation.shtml#script.
./filter-gene-association.pl -i gene_associations.ecocyc-13.0 -p nocheck -e
 
This script will print the erroneous lines with short descriptions of the problem. Some of these errors will be easy to fix and will not have any biological significance. A common error is misspellings or disallowed entries in the ''Assigned_by'' column (column 15.) Other errors are non-trivial and should be kept track of for further curation.  
{{Info|I need to make sure this information gets back to EcoCyc. <br />--[[User:DanielRenfro|Daniel]] 22:43, 8 March 2010 (UTC)}}


Get the ''good'' lines from the EcoCyc release, for later inclusion into the GAF.  
Copy the downloaded EcoCyc file to our working directory
  ./filter-gene-association.pl -i gene_association.ecocyc-13.0 -p nocheck -w > good_lines.ecocyc
cp ./path/to/ecocyc/data/14.0/gene_associations.ecocyc-14.0-corrected ./ecocyc.annotations.all
Change the permissions to read-only.
chmod 444 ecocyc.annotations.all
Fix some very common errors with the EcoCyc file[
''/path/to/code/gene_ontology/''fix_ecocyc_gene_associations_file.pl < ecocyc.annotation.all > ecocyc.annotations.valid
Validate
./check-abbr-ga-file.pl      -i ecocyc.annotations.valid -p nocheck -w > a; mv a ecocyc.annotations.valid;
  ./filter-gene-association.pl -i ecocyc.annotations.valid -p nocheck -w > a; mv a ecocyc.annotations.valid;


===Step 2 - EcoliWiki annotations===
===Step 2 - EcoliWiki annotations===
Get the annotations from EcoliWiki. We use a custom-written script to pull annotations from the wiki, named ''mine_annotations.php.''
We use a custom-written script to pull annotations from the wiki, named ''mine_annotations.php.'' This is then validated, and the errors sent to our curators.  
php5 mine_annotations.php -w ecoliwiki/colipedia > gene_associations.ecoliwiki
 
Just like with the EcoCyc annotations, we must validate the annotations. The lack of restrictions in the annotation table makes for some interesting errors, most of which can be fixed by hand. These errors need to be fixed in the wiki as well, or they will show up again next month.
 
./filter-gene-association.pl -i gene_associations.ecoliwiki -p nocheck -e > bad_lines.ecoliwiki
 
Using a text editor, the errors are fixed. Some sample errors are:
a.) unprintable character found on this line, may not be this column
b.) Line identical to previous line
c.) Qualifier column=4 allowed type not present, found "Deprecated"
d.) DB:Reference column=6 format of reference not DB:REFID
Some characters, such as 'β', cannot be included as there is no standard encoding for the GAF and they can become garbled. Also, EcoliWiki does not enforce strict reference notation, so some lines may need a PubMed number.
 
EcoliWiki uses some non-standard qualifiers such as ''deprecated'' and ''under_review''. These are internal qualifiers meant to tag annotations for later curation. To get a list of these, run the following command (requires [[wikipedia:ack|ack]]).
 
ack -A1 "column=4" bad_lines.ecoliwiki | ack -v '^[-\d]' > other_qualifiers.ecoliwiki
 
{{Info|I need to also make sure that these annotations are curated and/or sent to EcoCyc.}}


After the file has been fixed to an acceptable degree, the good lines are obtained for inclusion into the GAF.
Get all annotations using PHP
  ./filter-gene-association.pl -i gene_associations.ecoliwiki -p nocheck -w > good_lines.ecoliwiki
php /path/to/mine_annotations.php -w ecoliwiki > ecoliwiki.annotations.all
Validate
./check-abbr-ga-file.pl      -i ecoliwiki.annotations.all -p nocheck -w > ecoliwiki.annotations.valid
  ./filter-gene-association.pl -i ecoliwiki.annotations.valid -p nocheck -w > a; mv a ecoliwiki.annotations.valid;


===Step 3 - Merge===
===Step 3 - Merge===
The names of the products to which the annotations are made sometimes do not match. This needs manual curation and is the most time consuming part of the GAF file preparation.
First, some background:<br />
* To facilitate inter-website information exchange EcoliWiki uses the EcoCyc internal naming scheme to refer to the annotations.
* For example, in the [[dnaJ:Gene_Product(s)#Accessions_in_Other_Databases|''DnaJ'' accessions table]] there is a link to EcoCyc's ''DnaJ'' page ([http://biocyc.org/ECOLI/NEW-IMAGE?type=NIL&object=EG10240-MONOMER EcoCyc:EG10240-MONOMER].)
* This is the internal EcoCyc name for that product. EcoliWiki thus puts <tt>EG10240-MONOMER</tt> in column 2 in its gene_associations.ecoliwiki file. This is to make merging easier.
* Column 2 in the GAF spec is '''db_object_id''' -- the internal name used.
* Column 3 in the GAF spec is '''db_object_symbol''' -- this can be thought of as the common-name of the product, in this case: ''DnaJ''.
Problems arise when EcoliWiki and EcoCyc use different '''db_object_symbol'''s/common-names for the same '''db_object_id'''. (Column 2 matches, but column 3 doesn't.) The GO filter script counts this as an error.  
Problems arise when EcoliWiki and EcoCyc use different '''db_object_symbol'''s/common-names for the same '''db_object_id'''. (Column 2 matches, but column 3 doesn't.) The GO filter script counts this as an error.  


To successfully merge the two websites' files, we first concatenate them together.
Combine the two sets of valid annotations.
  cat good_lines.ecocyc good_lines.ecoliwiki > combined_good_lines.gaf
  cat *.valid > combined.annotations.all
 
The next step is to run the filter script, save the output and fix the file by hand.  
The next step is to run the filter script, save the output and fix the file by hand.  
  ./filter-gene-association.pl -i combined_good_lines.gaf -p nocheck -e > name_conflicts.txt
  ./filter-gene-association.pl -i combined_good_lines.gaf -p nocheck -e > name_conflicts.txt
After fixing naming issues, validate
./check-abbr-ga-file.pl      -i combined.annotations.all    -p nocheck -w > combined.annotations.valid
./filter-gene-association.pl -i combined.annotations.valid  -p nocheck -w > a; mv a combined.annotations.valid


Using the <tt>name_conflicts.txt</tt> file, we can find all the occurrences where naming differences resulted in errors. Below is a table listing some of the common name-conflicts encountered. Where there was a discrepancy between EcoliWiki and EcoCyc, the name was looked up in EcoGene and in the literature.
===Step 4 - Submit===


{{Info|Make a full list of things I've come across and send to Markus at EcoCyc. <br /> --[[User:DanielRenfro|Daniel]] 23:39, 8 March 2010 (UTC)}}
====header information====
Occasionally the header information in the gene_association file needs to be updated. This information can be found in the <tt>gene_assocation.ecocyc.conf</tt> file in the <tt>go/gene-associations/submission/</tt> directory of the [http://www.geneontology.org/GO.downloads.ftp.cvs.shtml GO CVS]. To change this information, just edit the file from the CVS checkout and resubmit it. It will get prepended to the gene_assocation file automatically. As of March 2010 the file looks like this:
project_name=EcoCyc and EcoliWiki collaborative annotation for E. coli K-12
contact_email=biocyc-support@ai.sri.com
contact_email=ecoliwiki@gmail.com
project_url=http://ecoliwiki.net
project_url=http://ecocyc.org
funding_source=GM077678
funding_source=NIGMS U24GM088849
email_report=ecoliwiki@gmail.com
ecocyc_version=14.0


{|class="wikitable"
====gp2protein.ecocyc====
|-
Aside from the gene_association file, the gp2protein file needs to be submitted. This can be made on-the-fly each month from a custom script that pulls the necessary information from EcoliWiki.  
!|DB_object_ID!!EcoCyc id!!EcoliWiki id!!EcoGene id!!what I did in<br />this case...
|-
|
LACTALDDEHYDROG-MONOMER
|
Ald
|
AldA
|
AldA
|
changed Ald to AldA
|-
|
G8209-MONOMER
|
MolR_3
|
molR_3 (molR)
|
yehH'
|
MolR_3
 
|-
|
TRANSKETOI-MONOMER
|
Tkt
|
TktA
|
TktA
|
changed to TktA
|-
|
THREDEHYDCAT-MONOMER
|
Tdc
|
TdcB
|
TdcB
|
TdcB
|-
|
G7743-MONOMER
|
Hsp15
|
HslR
|
HslR
|
HslR
That's an L, not a 1
|-
|
G7744-MONOMER
|
Hsp33
|
HslO
|
HslO
|
HslO 
|-
|
EG10600-MONOMER
|
GroE
|
GroES
|
---
|
GroES<br />
based on what is in the description and literature
|-
|
EG10599-MONOMER
|
---
|
GroEL product
|
---
|
removed the "product" 
|-
|
EG12859-MONOMER
|
[http://biocyc.org/ECOLI/NEW-IMAGE?type=NIL&object=EG12859-MONOMER&redirect=T MdoD]
|
[http://ecoliwiki.net/colipedia/index.php/opgD:Gene_Product(s) OpgD]
|
[http://ecogene.org/geneinfo.php?eg_id=EG12859 OpgD]
|
OpgD
|-
|
EG10427
|
[http://biocyc.org/ECOLI/NEW-IMAGE?type=GENE&object=EG10427 HemA]
|
[http://ecoliwiki.net/colipedia/index.php/gtrA GtrA]
|
[http://ecogene.org/geneinfo.php?eg_id=EG10427 HemA]
|
HemA
|-
|
G7158-MONOMER
|
[http://biocyc.org/ECOLI/NEW-IMAGE?type=GENE&object=G7158 YfaU]
|
[http://ecoliwiki.net/colipedia/index.php/rhmA:Quickview RhmA]
|
[http://ecogene.org/geneinfo.php?eg_id=EG14083 RhmA]
|
RhmA
 
 
|}
 
 
The last editing step before the submissions is to remove the IEA annotations that are older than 1 year.
 
 
===gp2protein.ecocyc===
 
 
====Step 4 - Submit====
 
====header information====
Occasionally the header information in the gene_association file needs to be updated. This information can be found in the <tt>gene_assocation.ecocyc.conf</tt> file in the <tt>go/gene-associations/submission/</tt> directory of the [http://www.geneontology.org/GO.downloads.ftp.cvs.shtml GO CVS].


====submission via CVS====
====submission via CVS====
The files () are <tt>sort</tt>ed and <tt>uniq</tt>ed using the appropriate Unix commands. They are then <tt>gzip</tt>ped and moved into the CVS directory.  
The files are <tt>sort</tt>ed and <tt>uniq</tt>ed using the appropriate Unix commands. They are then <tt>gzip</tt>ped and moved into the CVS directory.  
  cd ~/CVS/
  cd ~/CVS/
  CVS submit
  CVS submit


==See Also==
==See Also==
* [[Help:Annotation Pipeline|How EcoliWiki incorporates EcoCyc's annotations]]
* GO Consortium's specification for the GAF - http://www.geneontology.org/GO.format.annotation.shtml
* GO Consortium's specification for the GAF - http://www.geneontology.org/GO.format.annotation.shtml
* gp2protein file notes - http://wiki.geneontology.org/index.php/Gp2protein
* gp2protein file notes - http://wiki.geneontology.org/index.php/Gp2protein
[[Category:Documentation]]
[[Category:Gene Ontology]]

Latest revision as of 01:08, 14 July 2011

EcoliWiki and EcoCyc contribute to the Gene Ontology (GO) by monthly submitting our annotations.

Format

The gene_assocation file format has two versions. The Gene Ontology's documentation page describes these quite well. Below are some notes, some specific to the EcoCyc/EcoliWiki version of the gaf.

Column Number Name Notes Cardinality
1 Database This is the database that the identifiers come from. We are using EcoCyc identifiers, so this column will always be "EcoCyc." 1
2 db_object_id

Unique identifier from the database in column1.

We are using the EcoCyc database identifiers for historical reasons. These accessions are pulled out of the 'Gene_accessions_table' on the Gene page. These EcoCyc accessions must be up to date or the entire set of annotations for a particular protein can be lost.

1
3 db_object_symbol

A unique and valid symbol. This is the canonical name of the subject of the annotation (a gene or protein name, ORF, etc.) In this case it is the name of the gene product. We use the standard E. coli systematic nomenclature and capitolize the first letter of this symbol to make it clear this is a product.

This is where a lot of collision between EcoliWiki and EcoCyc happens. After the two files of correct annotations from the two databases are combined, the names in this column usually conflict with each other -- meaning there is more than one db_object_symbol for a particular db_object_id.

1
4 Qualifier

The qualifier. These three are nonstandard and must be removed:

  1. obsolote_go_term - flag
  2. under_review - we think this should be recurated
  3. deprecated - we've looked at it and it needs to be removed
  4. ...probably others...
0, 1, >1
5 GO id 1
6 Reference A valid database prefix is required 1
7 Evidnece Three letter abbreviation 1
8 With/From column of variable content, depending on the situation. See the Gene Ontology gaf2.0 specification page for more info. 0, 1
9 Aspect one of three: P, F, C 1
10 db_object_name name of the gene or gene product. free text 0, 1
11 db_object_synonym a pipe-delimited list of synonyms for this subject. Comes from the synonyms field in the 'Product_nomenclature_table'. 0, 1, >1
12 db_object_type A description of the type of gene product being annotated.
  • If column 17 is used, this column refers to that, otherwise, it refers to column 2
1
13 taxon integer value of the taxon. It is not quite clear which taxon we are annotating to. See. EcoliWiki:Gene Association File#Taxon Controversy 1
14 date Date on which the annotation was made. IEAs older than a year should be removed. 1
15 assigned by the database which made the annotation. Not the person. One of the values in the GO list of valid database identifiers. 1
16 annotation extension contains cross-references to other ontologies that can be used to qualify or enhance the annotation. prefaced by an appropriate GO relationship 0, 1, >1
17 isoform/product form as the db_object_id (column 2) must be a canonical entry - something that has a 1:1 relationship to a gene - this field allows the annotation of "specific variants of that gene or gene product." EcoliWiki as of July 2010 has no way of annotating to a specific variant of a gene product. This column must contain a standard DB:ID identifier. ?

Generation

See text for description.

The two sites' annotations are prepared by the EcoliWiki team (mostly Daniel,) and submitted via CVS to the GO Consortium. The figure at right shows the four basic steps to this process:

  1. Obtain annotations from EcoCyc (quarterly)
  2. Obtain annotations from EcoliWiki (monthly)
  3. Merge them and resolve name-conflicts
  4. Submit to the GO


Taxon Identifier(s)

  • EcoCyc consistenly uses taxon:511145 (Escherichia coli str. K-12 substr. MG1655)[1].
  • EcoliWiki consistenly uses taxon:83333 (Escherichia coli K-12). We made this decision because we don't deal exclusively with MG1655. Now that we have other strains in the wiki (REL606, DH10B, and soon to be BL21) we'll have to decide what taxon to use for annotations to genes that are in differenent strains.

Peter Karp says:

"It will cause great confusion to try to curate several strains together with no separation. You may have several strains in the wiki, but I believe they should be separated, and each strain should have its own set of GO annotations. Therefore I believe you should be using taxon:511145."

Jim Hu says:

"The literature-based curation is based on a corpus of papers describing experiments that are done in a mix of E. coli lab strains, not just MG1655 and its direct descendants. Large fractions of the work on K-12 strains is based on W3110 derivatives. MG1655 and W3110 are both covered by taxid 83333. However, this excludes all of the work done with E. coli B derivatives, including, I believe, all of the early work from the CSHL phage group, all of the work from Engelsberg on arabinose, and most of the work from Fred Neidhardt's group.
From the model organism perspective, the vast majority of the work we expect people to curate is inferred to apply to a more generic lab E. coli, not just the strain where the work was done. The exception would be studies comparing pathogens and nonpathogens, restriction-modification, or strains with or without lambda or F. For this reason, I think we should use 562 unless the annotation is based on a study of what makes K-12 different from other E. coli clades, or MG1655 different from other K-12 strains."
  • Currently we leave the annotations alone, meaning there is a mix of annotations to Ecoli K-12 and subst. MG1655.


Detailed Description of File Generation

Step 0 - Setup the environment

The process requires some files and scripts from the GO Consortium. Instead of do this by hand each month, Daniel wrote a script to handle this part of the process. To use this bash script, copy this code into a file and make it executable. On our servers it is named gaf_setup.sh.

The first step is to run this script. Alternatively, you can follow the directions below to do this by hand.

<php>

  1. !/bin/bash
  2. -------------------------------------------------------------------------------
  3. gaf_setup.sh Daniel Renfro 01/2010
  4. This script sets up a working directory for the montly creation of the
  5. gene-associations file and the gp2protein file for EcoliWiki.
  6. -------------------------------------------------------------------------------

working_dir=$(date "+%Y-%m-%d") prefix=`dirname "$0"`

  1. make the working directory

mkdir $working_dir cd $working_dir

  1. make some necessary directory

echo "Creating directories..." mkdir ontology mkdir doc

  1. download the stuff from GO

echo "Downloading files from the Gene Ontology..." ncftp ftp://ftp.geneontology.org/pub/go/software/utilities/ <<END_SCRIPT get filter-gene-association.pl get check-abbr-ga-file.pl quit END_SCRIPT ncftp ftp://ftp.geneontology.org/pub/go/ontology <<END_SCRIPT get gene_ontology_edit.obo quit END_SCRIPT ncftp ftp://ftp.geneontology.org/pub/go/doc/ <<END_SCRIPT get GO.xrf_abbs quit END_SCRIPT

  1. put the files in the right places

mv gene_ontology_edit.obo ontology mv GO.xrf_abbs doc

  1. set the permissions on the executable files.

chmod +x check-abbr-ga-file.pl filter-gene-association.pl

echo "setup complete." </php>

Make a new directory to work in.

cd /usr/local/working/GAF/
mkdir YYYY-MM-DD
chmod 775 YYYY-MM-DD
cd YYYY-MM-DD

Look through the wiki and find things that are wrong and can be fixed and fix them.

php5 /usr/local/phpwikibots/trunk/find_GO_terms_with_changed_names.php -w /Library/WebServer/WebServer/Documents/ecoliwiki/colipedia 
php5 /usr/local/phpwikibots/trunk/find_obsolete_categories_and_annotations.php -w /Library/WebServer/WebServer/Documents/ecoliwiki/ -C -A 

Make some directories for use later

mkdir {doc, ontology}

Download some scripts and some files. Here we are using the ncftp commandline tool, you can use whichever tool you are comfortable with.

ncftp ftp://ftp.geneontology.org/pub/go/software/utilities/
  get filter-gene-association.pl
  get check-abbr-ga-file.pl
  quit
ncftp ftp://ftp.geneontology.org/pub/go/ontology
  get gene_ontology_edit.obo
  quit
ncftp ftp://ftp.geneontology.org/pub/go/doc/
  get GO.xrf_abbs
  quit

Move some of those files into the directories.

mv gene_ontology_edit.obo ontology/
mv GO.xrf_abbs doc/

Step 1 - EcoCyc annotation

EcoCyc's quarterly releases contain their annotations in the gene_association file format. The file is typically named gene_associations.ecocyc.... (Notice the plural on associations). In order to prepare their annotations, we must first parse the annotations for validity. Using the script(s) we downloaded in the setup section, parse the most recent EcoCyc release's annotation file. For a more detailed description of the script, see http://www.geneontology.org/GO.format.annotation.shtml#script. These scripts can be run with the option to print the erroneous lines with short descriptions of the problem. Some of these errors will be easy to fix and will not have any biological significance. A common error is misspellings or disallowed entries in the Assigned_by column (column 15.) Other errors are non-trivial and should be kept track of for further curation.

Copy the downloaded EcoCyc file to our working directory

cp ./path/to/ecocyc/data/14.0/gene_associations.ecocyc-14.0-corrected ./ecocyc.annotations.all 

Change the permissions to read-only.

chmod 444 ecocyc.annotations.all

Fix some very common errors with the EcoCyc file[

/path/to/code/gene_ontology/fix_ecocyc_gene_associations_file.pl < ecocyc.annotation.all > ecocyc.annotations.valid

Validate

./check-abbr-ga-file.pl      -i ecocyc.annotations.valid -p nocheck -w > a; mv a ecocyc.annotations.valid;
./filter-gene-association.pl -i ecocyc.annotations.valid -p nocheck -w > a; mv a ecocyc.annotations.valid;

Step 2 - EcoliWiki annotations

We use a custom-written script to pull annotations from the wiki, named mine_annotations.php. This is then validated, and the errors sent to our curators.

Get all annotations using PHP

php /path/to/mine_annotations.php -w ecoliwiki > ecoliwiki.annotations.all

Validate

./check-abbr-ga-file.pl      -i ecoliwiki.annotations.all -p nocheck -w > ecoliwiki.annotations.valid
./filter-gene-association.pl -i ecoliwiki.annotations.valid -p nocheck -w > a; mv a ecoliwiki.annotations.valid;

Step 3 - Merge

Problems arise when EcoliWiki and EcoCyc use different db_object_symbols/common-names for the same db_object_id. (Column 2 matches, but column 3 doesn't.) The GO filter script counts this as an error.

Combine the two sets of valid annotations.

cat *.valid > combined.annotations.all 

The next step is to run the filter script, save the output and fix the file by hand.

./filter-gene-association.pl -i combined_good_lines.gaf -p nocheck -e > name_conflicts.txt

After fixing naming issues, validate

./check-abbr-ga-file.pl      -i combined.annotations.all    -p nocheck -w > combined.annotations.valid
./filter-gene-association.pl -i combined.annotations.valid  -p nocheck -w > a; mv a combined.annotations.valid

Step 4 - Submit

header information

Occasionally the header information in the gene_association file needs to be updated. This information can be found in the gene_assocation.ecocyc.conf file in the go/gene-associations/submission/ directory of the GO CVS. To change this information, just edit the file from the CVS checkout and resubmit it. It will get prepended to the gene_assocation file automatically. As of March 2010 the file looks like this:

project_name=EcoCyc and EcoliWiki collaborative annotation for E. coli K-12
contact_email=biocyc-support@ai.sri.com
contact_email=ecoliwiki@gmail.com
project_url=http://ecoliwiki.net
project_url=http://ecocyc.org
funding_source=GM077678
funding_source=NIGMS U24GM088849
email_report=ecoliwiki@gmail.com
ecocyc_version=14.0

gp2protein.ecocyc

Aside from the gene_association file, the gp2protein file needs to be submitted. This can be made on-the-fly each month from a custom script that pulls the necessary information from EcoliWiki.

submission via CVS

The files are sorted and uniqed using the appropriate Unix commands. They are then gzipped and moved into the CVS directory.

cd ~/CVS/
CVS submit

See Also