Difference between revisions of "Jwoodlee Week 14"
From LMU BioDB 2015
(→Milestone 3: Species Profile Creation: added non customized procedure) |
(→Milestone 3: Species Profile Creation: added procedure) |
||
Line 1: | Line 1: | ||
=== Milestone 3: Species Profile Creation === | === Milestone 3: Species Profile Creation === | ||
+ | Majority of the procedure was from [[Coder | here]]. | ||
==== Adding a Species Profile to GenMAPP Builder ==== | ==== Adding a Species Profile to GenMAPP Builder ==== | ||
− | + | In the Java perspective within Eclipse(change perspective on the top right), the following was executed. | |
====== Create the Species Profile ====== | ====== Create the Species Profile ====== | ||
− | # | + | # I exposed the contents of the ''src'' folder in my gmbuilder project. |
− | # Right- | + | # Right-clicked on the ''edu.lmu.xmlpipedb.gmbuilder.databasetoolkit.profiles'' package and chose '''New > Class''' from the popup menu. |
− | # In the dialog that appears, | + | # In the dialog that appears, I entered the following: |
− | #* '''Name:''' <code> | + | #* '''Name:''' <code>ShigellaflexneriUniProtSpeciesProfile</code> |
− | #* '''Superclass:''' <code>edu.lmu.xmlpipedb.gmbuilder.databasetoolkit.profiles.UniProtSpeciesProfile</code> | + | #* '''Superclass:''' <code>edu.lmu.xmlpipedb.gmbuilder.databasetoolkit.profiles.UniProtSpeciesProfile</code> |
− | # | + | # Clicked ''Finish''. A new ''.java'' file within the ''edu.lmu.xmlpipedb.gmbuilder.databasetoolkit.profiles'' package was created. |
====== Customize the Species Profile ====== | ====== Customize the Species Profile ====== | ||
− | * | + | * I opened the file that I just created. |
− | * | + | * I added the following constructor block right below the ''public class'' line in the new file. |
− | public | + | public ShigellaflexneriUniProtSpeciesProfile() { |
− | super(" | + | super("Shigella flexneri", |
− | + | 623, | |
"This profile customizes the GenMAPP Builder export for " + | "This profile customizes the GenMAPP Builder export for " + | ||
− | " | + | "Shigella flexneri" + |
" data loaded from a UniProt XML file."); | " data loaded from a UniProt XML file."); | ||
} | } | ||
− | * | + | * I added the following method block right below the constructor block that I added above. |
@Override | @Override | ||
public TableManager getSystemsTableManagerCustomizations(TableManager tableManager, DatabaseProfile dbProfile) { | public TableManager getSystemsTableManagerCustomizations(TableManager tableManager, DatabaseProfile dbProfile) { | ||
Line 35: | Line 36: | ||
tableManager.submit("Systems", QueryType.update, new String[][] { | tableManager.submit("Systems", QueryType.update, new String[][] { | ||
{ "SystemCode", "N" }, | { "SystemCode", "N" }, | ||
− | { "Link", " | + | { "Link", "http://www.mgc.ac.cn/cgi-bin/ShiBASE/ShiBASE_query.cgi?synonym=~" } |
}); | }); | ||
return tableManager; | return tableManager; | ||
} | } | ||
− | * | + | * I chose ''Organize Imports'' from the ''Source'' menu to make sure I had everything imported. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
====== Add the Species Profile to the Catalog of Known Species Profiles ====== | ====== Add the Species Profile to the Catalog of Known Species Profiles ====== | ||
− | + | * Under ''edu.lmu.xmlpipedb.gmbuilder.databasetoolkit.profiles'', I opened ''UniProtDatabaseProfile.java''. | |
− | * Under ''edu.lmu.xmlpipedb.gmbuilder.databasetoolkit.profiles'', | + | |
* Near the top of the file is a block that looks like this: | * Near the top of the file is a block that looks like this: | ||
super("org.uniprot.uniprot.Uniprot", | super("org.uniprot.uniprot.Uniprot", | ||
Line 59: | Line 55: | ||
new PlasmodiumFalciparumUniProtSpeciesProfile(), | new PlasmodiumFalciparumUniProtSpeciesProfile(), | ||
new VibrioCholeraeUniprotSpeciesProfile() }); | new VibrioCholeraeUniprotSpeciesProfile() }); | ||
− | * | + | * I added the species profile that I created to the block. |
super("org.uniprot.uniprot.Uniprot", | super("org.uniprot.uniprot.Uniprot", | ||
"This profile defines the requirements " | "This profile defines the requirements " | ||
Line 68: | Line 64: | ||
new PlasmodiumFalciparumUniProtSpeciesProfile(), | new PlasmodiumFalciparumUniProtSpeciesProfile(), | ||
new VibrioCholeraeUniprotSpeciesProfile(), | new VibrioCholeraeUniprotSpeciesProfile(), | ||
− | new | + | new ShigellaflexneriUniProtSpeciesProfile() }); |
− | + | ||
− | * | + | * I saved changes and selected ''Organize Imports''. |
====== Build, Test, and Possibly Commit ====== | ====== Build, Test, and Possibly Commit ====== | ||
− | # | + | # I created a new distribution of GenMAPP Builder. |
− | # | + | #*Expanded the custom project, scrolled down the build.xml and right clicked it. In the menu that appeared I clicked on Ant Build... (with ellipses). Now in the menu that appeared I deselected dist, and selected clean, dist in that order. The build order was now clean, dist so it will wipe the current version of genmappbuilder and create a new distribution. I clicked run. |
− | # | + | # With Trixie, we performed a new export run with this custom version of GenMAPP Builder. A new .gdb was created. |
− | #* | + | # I checked the ''Systems'' table in the resulting ''.gdb'' with Microsoft Access and verified that it contained the custom information: |
− | + | #* The record ''OrderedLocusNames'' was there with the species name under the ''Species'' column and our link URL under the ''Link'' column. | |
− | # | + | # I then committed the custom version of GenMAPP builder to our GitHub branch. |
− | + | ||
− | + | ||
Revision as of 23:57, 3 December 2015
Milestone 3: Species Profile Creation
Majority of the procedure was from here.
Adding a Species Profile to GenMAPP Builder
In the Java perspective within Eclipse(change perspective on the top right), the following was executed.
Create the Species Profile
- I exposed the contents of the src folder in my gmbuilder project.
- Right-clicked on the edu.lmu.xmlpipedb.gmbuilder.databasetoolkit.profiles package and chose New > Class from the popup menu.
- In the dialog that appears, I entered the following:
- Name:
ShigellaflexneriUniProtSpeciesProfile
- Superclass:
edu.lmu.xmlpipedb.gmbuilder.databasetoolkit.profiles.UniProtSpeciesProfile
- Name:
- Clicked Finish. A new .java file within the edu.lmu.xmlpipedb.gmbuilder.databasetoolkit.profiles package was created.
Customize the Species Profile
- I opened the file that I just created.
- I added the following constructor block right below the public class line in the new file.
public ShigellaflexneriUniProtSpeciesProfile() { super("Shigella flexneri", 623, "This profile customizes the GenMAPP Builder export for " + "Shigella flexneri" + " data loaded from a UniProt XML file."); }
- I added the following method block right below the constructor block that I added above.
@Override public TableManager getSystemsTableManagerCustomizations(TableManager tableManager, DatabaseProfile dbProfile) { super.getSystemsTableManagerCustomizations(tableManager, dbProfile); tableManager.submit("Systems", QueryType.update, new String[][] { { "SystemCode", "N" }, { "Species", "|" + getSpeciesName() + "|" } }); tableManager.submit("Systems", QueryType.update, new String[][] { { "SystemCode", "N" }, { "Link", "http://www.mgc.ac.cn/cgi-bin/ShiBASE/ShiBASE_query.cgi?synonym=~" } }); return tableManager; }
- I chose Organize Imports from the Source menu to make sure I had everything imported.
Add the Species Profile to the Catalog of Known Species Profiles
- Under edu.lmu.xmlpipedb.gmbuilder.databasetoolkit.profiles, I opened UniProtDatabaseProfile.java.
- Near the top of the file is a block that looks like this:
super("org.uniprot.uniprot.Uniprot", "This profile defines the requirements " + "for any UniProt centric gene database.", new SpeciesProfile[] { new EscherichiaColiUniProtSpeciesProfile(), new ArabidopsisThalianaUniProtSpeciesProfile(), new PlasmodiumFalciparumUniProtSpeciesProfile(), new VibrioCholeraeUniprotSpeciesProfile() });
- I added the species profile that I created to the block.
super("org.uniprot.uniprot.Uniprot", "This profile defines the requirements " + "for any UniProt centric gene database.", new SpeciesProfile[] { new EscherichiaColiUniProtSpeciesProfile(), new ArabidopsisThalianaUniProtSpeciesProfile(), new PlasmodiumFalciparumUniProtSpeciesProfile(), new VibrioCholeraeUniprotSpeciesProfile(), new ShigellaflexneriUniProtSpeciesProfile() });
- I saved changes and selected Organize Imports.
Build, Test, and Possibly Commit
- I created a new distribution of GenMAPP Builder.
- Expanded the custom project, scrolled down the build.xml and right clicked it. In the menu that appeared I clicked on Ant Build... (with ellipses). Now in the menu that appeared I deselected dist, and selected clean, dist in that order. The build order was now clean, dist so it will wipe the current version of genmappbuilder and create a new distribution. I clicked run.
- With Trixie, we performed a new export run with this custom version of GenMAPP Builder. A new .gdb was created.
- I checked the Systems table in the resulting .gdb with Microsoft Access and verified that it contained the custom information:
- The record OrderedLocusNames was there with the species name under the Species column and our link URL under the Link column.
- I then committed the custom version of GenMAPP builder to our GitHub branch.
Follow the instructions in the Adding a Species Profile to GenMAPP Builder section of this wiki page in order to:
- Add a species profile to the GenMAPP Builder code base.
- Customize the species profile with the species name in the OrderedLocusNames record of the Systems table.
- Customize the Link field in the OrderedLocusNames record of the Systems table to hold a URL query with
~
standing in for the gene ID.- (with QA) The URL would need to be determined first, of course.
Milestone 4: Species Export Customization
- Based on observations from the GenMAPP User and QA, determine and document (as thoroughly as possible) any other modified export behavior that GenMAPP Builder will have to manifest for this species.
- Implement this export behavior.
- As needed, commit and push your work to your GitHub branch.
- Additional milestones will depend on how the rest of the project goes, and the bugs/features generated by that work.
- Document/log all work done, problems encountered, and how they were resolved.
- When your work is complete, issue a GitHub pull request to merge your branch into the main development line.