Kevin Wyllie Week 9
Contents
- 1 Export Information
- 2 Pre-requisites
- 3 Download and Extract Data Source Files
- 4 Download or Update GenMAPP Builder
- 5 Create New Database in PostgreSQL
- 6 Configuring GenMAPP Builder to Connect to your PostgreSQL Database
- 7 Importing Data into the PostgreSQL Database
- 8 Exporting a GenMAPP Gene Database (.gdb)
- 9 Checking the Quality of your Exported Gene Database
- 10 TallyEngine
- 11 Using XMLPipeDB match to Validate the XML Results from the TallyEngine
- 12 Using SQL Queries to Validate the PostgreSQL Database Results from the TallyEngine
- 13 OriginalRowCounts Comparison
- 14 Visual Inspection
- 15 .gdb Use in GenMAPP
- 16 Compare Gene Database to Outside Resource
- 17 Links
Export Information
Version of GenMAPP Builder: 5
Computer on which export was run: HP Compaq 8300 Elite SFF FC
Postgres Database name: pgAdminIII
UniProt XML filename (give filename and upload and link to compressed file): uniprot-organism%3A243277
- UniProt XML version (The version information can be found at the UniProt News Page):
- UniProt XML download link: http://www.uniprot.org/uniprot/?query=organism:243277
- Time taken to import: 3.02 minutes
- Note:
GO OBO-XML filename (give filename and upload and link to compressed file): go_daily-termdb.obo-xml
- GO OBO-XML version (The version information can be found in the file properties after the file downloaded from the GO Download page has been unzipped):
- GO OBO-XML download link: http://geneontology.org/page/download-ontology#Legacy_Downloads
- Time taken to import: 7.68 minutes
- Time taken to process: 4.48
- Note:
GOA filename (give filename and upload and link to compressed file): 46.V_cholerae_ATCC_39315.goa
- GOA version (News on this page records past releases; current information can be found in the Last modified field on the FTP site):
- GOA download link:
- Time taken to import: 0.06
- Note:
Name of .gdb file (give filename and upload and link to compressed file):
- Time taken to export:
- Start time: 2:40pm
- End time: 3:52pm
Note:
Pre-requisites
This tutorial assumes that you are working in a Windows environment. While it is possible to run GenMAPP Builder under the Mac or Linux OS, the end product, a GenMAPP-compatible Gene Database (.gdb), can only be used with the GenMAPP program, which can only be run on Windows. This set of software has already been installed on the computers in the Seaver 120 computer lab. If you want to perform this procedure on your own machine, you must set up your working environment with:
- Any tool that can unpack .gz and .zip files
- We use 7-zip
- Note that we have found that the native Windows utility cannot reliably unpack .gz files or .zip files containing .jar files.
- PostgreSQL on Windows (http://www.enterprisedb.com/products-services-training/pgdownload)
- This tutorial was written using PostgreSQL 9.4.x.
- GenMAPP Builder (https://sourceforge.net/projects/xmlpipedb/files/)
- Java JDK 1.8 64-bit
- Download page
- File to download is: jdk-8u65-windows-x64.exe
- GenMAPP 2 can be downloaded here. The file to download is "GenMAPPv2Setup.exe".
- XMLPipeDB match utility (https://sourceforge.net/projects/xmlpipedb/files/) for counting IDs in XML files
- Microsoft Access or any other tool that can read .mdb files
Download and Extract Data Source Files
- Download UniProt XML, GOA, and GO OBO-XML files.
UniProt XML
- Go to the UniProt Complete Proteomes page.
- Browse to the complete proteome download page for your species of interest. For example, to get to Vibrio cholerae page, first filter the list by clicking on the link for "Bacteria" under the "Superkingdom" heading.
- Further filter the results for those species with a "Reference proteome".
- Scroll through the results (you might need to click through several pages) until you find your organism of interest, e.g. Vibrio cholerae serotype O1 (strain ATCC 39315 / El Tor Inaba N16961).
- Click on the link for "UniProtKB", e.g. Vibrio cholerae serotype O1 (strain ATCC 39315 / El Tor Inaba N16961).
- Click the "Download" button at the top of the page. It will open a small dialog box. You need to select the following options:
- Select the radio button to "Download all"
- Choose "XML" from the "Format" drop-down menu.
- Select the radio button for "Compressed" format.
- Click the "Go" button.
GOA
- This is the UniProt-GOA home page.
- The current and previous UniProt-GOA files can be downloaded from the UniProt-GOA ftp site.
- In the directory that appears, click the link to the "proteomes" directory.
- Note that it may take some time to load this page.
- Find your organism of interest and right-click on the link to download the GO annotations and select "Save target as" or "Save link as" and save the GOA file. For example, this is the link for Vibrio cholerae.
- Note: Since the GOA file is a text file, your browser will not automatically download it when you left-click on the link. Instead, it will try to open the file in your browser window. Since it is a large file, this could take a long time if your internet connection is slow.
- The version information can be found on displayed in the ftp file directory under the "Last modified" column. You will need this information for your Gene Database Testing Report.
GO OBO-XML
- Download the GO OBO-XML formatted file from the Gene Ontology download page. Click on the link for "obo-xml.gz" under the heading "Legacy Downloads."
- This file is updated daily. You can get the day/time that the file was created from the file properties after you have unzipped the file.
Extract the UniProt XML and GO OBO-XML files
- Extract the UniProt XML and GO OBO-XML .gz files using 7-zip or other utility.
Download or Update GenMAPP Builder
- Visit the XMLPipeDB releases page on GitHub.
- Extract the GenMAPP Builder folder using 7-zip or other utility.
- We suggest that you move the extracted folder to the "T:" drive on the computers in Seaver 120. This folder is a "Thawspace", the contents of which will not be deleted by the program Deep Freeze when the computer is restarted.
Create New Database in PostgreSQL
NOTE: if you have already performed this step and want to use GenMAPP Builder functions with a database you previously created in PostgreSQL, you can skip this step.
- Launch pgAdmin III.
- Double-click on PostgreSQL 9.4 (localhost:5432) on the upper left hand side of the window.
- This is the equivalent of connecting you to the server and you may be asked for a password at this point.
- Right click on "Databases" and Select "New Database..."
- Give the database a name in the "Name" field and click OK.
- Take some care in selecting a meaningful name. It is good practice to at least include the species and today's date in the name.
- Double-left-click on your new database name in the treeview on the left.
- Click on the SQL icon in the toolbar at the top of the window.
- The SQL Editor tab will be open and there may be leftover query text in the upper pane. Delete this text. You are now going to use an XMLPipeDB query to create the tables in the database.
- Click on the Open File icon in the toolbar (the yellow folder with an arrow).
- Navigate to the folder in which you unzipped GenMAPP Builder.
- Open the sql folder and open the file gmbuilder.sql. You should see SQL code appear in the SQL Editor tab.
- Click the Execute Query icon which looks like a green "Play" triangle button.
- You should get a series of NOTICE messages in the Messages tab at the bottom of the window, concluding with a message like "Query returned successfully with no result in 15583 ms" in the end. This query now created all the tables in the database (although there is still no data in them).
- Close the query window (you don't need to save the query because you have already run it).
- To double check that all is OK, click the + sign for the database, then the + sign for Schemas, then finally the + sign for public. Under the Tables section, you should see a count of 167 in parentheses.
Configuring GenMAPP Builder to Connect to your PostgreSQL Database
- Launch gmbuilder.bat.
- If the program does not detect a database configuration, you will see a message window to this effect and the configuation dialog will open automatically once you close the message window. Otherwise:
- Select the menu item File > Configure Database...
- Under the Database Connections tab the Database Driver defaults to PostgreSQL. Enter information in the following fields:
- Host or address: localhost
- Port number: 5432
- Database name: <enter the name of the PostgreSQL database you created above>
- Username: <enter the username of the PostgreSQL database you created above>; in S120, this username is "postgres"
- Password: <enter the password of the PostgreSQL database you created above>; in S120, ask the instructors for the password.
- Click the OK button.
Importing Data into the PostgreSQL Database
- Select File > Import UniProt XML...
- Navigate to the UniProt XML file that you extracted previously and click the Open button.
- This should take about 5-10 minutes, but may take longer depending on the size of the file, processor speed, and available memory of the machine. When the process has completed, record the elapsed time from the message window that appears.
- ?
- Select File > Import GO OBO-XML...
- Navigate to the GO OBO-XML file that you extracted previously. Click the Open button.
- This should take about 5-10 minutes, but may take longer depending on the size of the file, processor speed, and available memory of the machine. When the process has completed, record the elapsed time from the message window that appears.
- 6.88 min
Click OK to the message asking you to process the GO data.
- This should take about 5-10 minutes, but may take longer depending on the size of the file, processor speed, and available memory of the machine. When the process has completed, record the elapsed time from the message window that appears.
- 4.49 min
- Select File > Import GOA...
- Navigate to the GOA file that you downloaded previously and click the Import button. This process should only take a minute or so.
- 0.06 min
Exporting a GenMAPP Gene Database (.gdb)
- Select File > Export to GenMAPP Gene Database...
- Type a name in the Owner field (or else it won't let you export).
- When doing the individual exercise for the Week 9 assignment, use your own name. When doing this for your team project, use your team's name.
- GenMAPP Builder scans your PostgreSQL database to see what species are available. Click on the species that you would like to export, then click Next to continue.
- Create GenMAPP Database: click on the "Save GenMAPP Database File As..." button.
- In the Save dialog box that appears, navigate to the "T:" drive, and then modify the default file name by appending your initials. Click the "Save" button
- Leave the boxes checked for exporting all Molecular Function, Cellular Component, and Biological Process Gene Ontology Terms.
- Click the "Next" button to begin teh export process.
- Record the starting and ending times from the black console window. This will take 1-2 hours for a typical bacterial genome, depending on the size of the database, the processor speed, and available memory. Large eukaryotic genomes (like Arabidopsis thaliana) or genomes with many GO annotations (like Saccharomyces cerevisiae) can take much longer, in the range of 12-24 hours.
- NOTE: the progress bar is not accurate.
Checking the Quality of your Exported Gene Database
- It is a good idea to check the quality of your exported Gene Database to make sure that all of the data from the XML files made it into the PostgreSQL database and was then exported to the GenMAPP Gene Database. We have created a Gene Database Testing Report Sample to help guide you through this process.
TallyEngine
- Run the TallyEngine in GenMAPP Builder and record the number of records for UniProt and GO in the XML data and in the Postgres databases.
- Choose the menu item Tallies > Run XML and Database Tallies for UniProt and GO...
- Take a screenshot of the results. Upload the image to the wiki and display it on this page.
- For more information, see this page.
Using XMLPipeDB match to Validate the XML Results from the TallyEngine
Follow the instructions found on this page to run XMLPipeDB match.
- Are your results the same as you got for the TallyEngine? Why or why not?
- Using the command:
java - jar xmlpipedb-match-1.1.1.jar "VC_A?[0-9][0-9][0-9][0-9]" < uniprot-organism%3A243277.xml
, the command line returnsTotal unique matches: 3831
. These number of Gene ID's is the same as for the Tally Engine result.
- Using the command:
Using SQL Queries to Validate the PostgreSQL Database Results from the TallyEngine
For more information, see this page.
You can also look for counts at the SQL level, using some variation of a select count(*) query. This requires some knowledge of which table received what data. Here’s an initial tip: the gene/name tags in the XML file land in the genenametype table. A query on this table counting values from this table that were marked as ordered locus in the XML file matching the pattern VC_[0-9][0-9][0-9][0-9] would look like this:
select count(*) from genenametype where type = 'ordered locus' and value ~ 'VC_[0-9][0-9][0-9][0-9]';
In pgAdmin III, you can issue these queries by clicking on the pencil/SQL icon in the toolbar, typing the query into the SQL Editor tab, then clicking on the green triangular Play button to run.
- Are your results the same as reported by the TallyEngine? Why or why not?
- The above command returns 2737 gene ID's, because it does not account for ID's "VC_A####"
- However, using the command
select count(*) from genenametype where type = 'ordered locus' and value ~ 'VC_A?[0-9][0-9][0-9][0-9]'
returns 3831 gene ID's, which is the same as for the XMLPipeDB Match and Tally Engine Results.
OriginalRowCounts Comparison
Within the .gdb file, look at the OriginalRowCounts table to see if the database has the expected tables with the expected number of records. Compare the tables and records with a benchmark .gdb file.
Benchmark .gdb file:
Copy the OriginalRowCounts table from the benchmark and new gdb and paste them here:
Note:
Visual Inspection
Perform visual inspection of individual tables to see if there are any problems.
- Look at the Systems table. Is there a date in the Date field for all gene ID systems present in the database?
- Open the UniProt, RefSeq, and OrderedLocusNames tables. Scroll down through the table. Do all of the IDs look like they take the correct form for that type of ID?
Note:
.gdb Use in GenMAPP
Note:
Putting a gene on the MAPP using the GeneFinder window
- Try a sample ID from each of the gene ID systems. Open the Backpage and see if all of the cross-referenced IDs that are supposed to be there are there.
Note:
Creating an Expression Dataset in the Expression Dataset Manager
- How many of the IDs were imported out of the total IDs in the microarray dataset? How many exceptions were there? Look in the EX.txt file and look at the error codes for the records that were not imported into the Expression Dataset. Do these represent IDs that were present in the UniProt XML, but were somehow not imported? or were they not present in the UniProt XML?
Note:
Coloring a MAPP with expression data
Note:
Running MAPPFinder
Note:
Compare Gene Database to Outside Resource
The OrderedLocusNames IDs in the exported Gene Database are derived from the UniProt XML. It is a good idea to check your list of OrderedLocusNames IDs to see how complete it is using the original source of the data (the sequencing organization, the MOD, etc.) Because UniProt is a protein database, it does not reference any non-protein genome features such as genes that code for functional RNAs, centromeres, telomeres, etc.
Note:
Links
- Kevin Wyllie Week 2 (See the original assignment and class journal.)
- Kevin Wyllie Week 3 (See the original assignment and class journal.)
- Kevin Wyllie Week 4 (See the original assignment and class journal.)
- Kevin Wyllie Week 5 (See the original assignment and class journal.)
- Kevin Wyllie Week 6 (See the original assignment and class journal.)
- Kevin Wyllie Week 7 (See the original assignment and class journal.)
- Kevin Wyllie Week 8 (See the original assignment and class journal.)
- Kevin Wyllie Week 9 (See the original assignment and class journal.)
- Kevin Wyllie Week 10 (See the original assignment.)
- Kevin Wyllie Week 11 (See the original assignment.)
- Kevin Wyllie Week 12 (See the original assignment.)
- Kevin Wyllie Week 14 (See the original assignment.)
- Kevin Wyllie Week 15 (See the original assignment.)