Difference between revisions of "Bklein7 Week 14"

From LMU BioDB 2015
Jump to: navigation, search
(added gtr link)
(Added electronic lab notebook for species profile creation)
Line 1: Line 1:
==Coding Progress==
+
==Species Profile Creation for Bordetella Pertussis==
===Species Profile Creation===
+
 
 +
To begin the work below, I opened the ''gmbuilder'' project within the ''Java perspective'' using the program ''Eclipse''. The details regarding the developer rig I used can be found on my [[Bklein7 Week 12| Week 12 Assignment Page]].
 +
 
 +
=== Creating the Species Profile ===
 +
 
 +
# I exposed the contents of the ''src'' folder.
 +
# I 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:''' <code>BordetellaPertussisUniProtSpeciesProfile</code>
 +
#* '''Superclass:''' <code>edu.lmu.xmlpipedb.gmbuilder.databasetoolkit.profiles.UniProtSpeciesProfile</code>
 +
# I clicked ''Finish''. This created a new ' file entitled ''BordetellaPertussisUniProtSpeciesProfile.java'' within the ''edu.lmu.xmlpipedb.gmbuilder.databasetoolkit.profiles'' package.
 +
 
 +
=== Customizing the Species Profile ===
 +
 
 +
* I opened ''BordetellaPertussisUniProtSpeciesProfile.java'', which appeared in the editor region of Eclipse.
 +
* I overrode the method that supplies the name of the species and the description of the profile by adding the following constructor block right below the ''public class'' line in the new file.
 +
public BordetellaPertussisUniProtSpeciesProfile() {
 +
    super("Bordetella pertussis", 257313, "This profile customizes the GenMAPP Builder export for " +
 +
            "Bordetella pertussis" +
 +
            " data loaded from a UniProt XML file.");
 +
}
 +
* To customize the species profile with the species name in the OrderedLocusNames record of the Systems table as well as a link query for that same record, I added the following method block right below the constructor block:
 +
@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.genedb.org/gene/~;jsessionid=A06A0EFE93C64E476380393D4CBEFA69?actionName=%2FQuery%2FquickSearch&resultsSize=1&taxonNodeName=Bpertussis" }
 +
    });
 +
 +
    return tableManager;
 +
}
 +
* At this point, my code had several red error badges. To fix this, I chose ''Organize Imports'' from the ''Source'' menu.
 +
* I saved the file, at which point the red error badges disappeared.
 +
 
 +
=== Adding the Species Profile to the Catalog of Known Species Profiles ===
 +
 
 +
In order to have GenMAPP Builder recognize my new species profile, I had to edit an existing file:
 +
* 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 ''Bordetella pertussis'' species profile that I just created to this block. The modified code looked 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(),
 +
    new BordetellaPertussisUniProtSpeciesProfile() });
 +
* I saved my changes. No errors were present in the code.
 +
 
 +
=== Build, Test, and Possibly Commit ===
 +
 
 +
# Create a new distribution of GenMAPP Builder based on [[#Creating a Distribution|Creating a Distribution]].
 +
# Perform a new export run with this version of GenMAPP Builder (you can skip the import steps and use the same PostgreSQL database if it’s available).
 +
# Check the ''Systems'' table in the resulting ''.gdb'' to see if it contains the custom information:
 +
#* Open the ''.gdb'' in Microsoft Access, then open the ''Systems'' table.
 +
#* Look for the record for ''OrderedLocusNames''. Your species name should appear under the ''Species'' column and your link URL should appear under the ''Link'' column.
 +
# If all goes well, commit your code as described in [[#Updating and Committing Code|Updating and Committing Code]].  You have now officially contributed to the XMLPipeDB project ''':)'''
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 
New version of gmbuilder including ''Bordetella pertussis'' custom class: [[File:Dist cw20151201.zip]].
 
New version of gmbuilder including ''Bordetella pertussis'' custom class: [[File:Dist cw20151201.zip]].
 
GTR 2: [[Gene Database Testing Report- cw20151201]]
 
GTR 2: [[Gene Database Testing Report- cw20151201]]
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
 
==Links==
 
==Links==

Revision as of 00:21, 3 December 2015

Species Profile Creation for Bordetella Pertussis

To begin the work below, I opened the gmbuilder project within the Java perspective using the program Eclipse. The details regarding the developer rig I used can be found on my Week 12 Assignment Page.

Creating the Species Profile

  1. I exposed the contents of the src folder.
  2. I right-clicked on the edu.lmu.xmlpipedb.gmbuilder.databasetoolkit.profiles package and chose New > Class from the popup menu.
  3. In the dialog that appears, I entered the following:
    • Name: BordetellaPertussisUniProtSpeciesProfile
    • Superclass: edu.lmu.xmlpipedb.gmbuilder.databasetoolkit.profiles.UniProtSpeciesProfile
  4. I clicked Finish. This created a new ' file entitled BordetellaPertussisUniProtSpeciesProfile.java within the edu.lmu.xmlpipedb.gmbuilder.databasetoolkit.profiles package.

Customizing the Species Profile

  • I opened BordetellaPertussisUniProtSpeciesProfile.java, which appeared in the editor region of Eclipse.
  • I overrode the method that supplies the name of the species and the description of the profile by adding the following constructor block right below the public class line in the new file.
public BordetellaPertussisUniProtSpeciesProfile() {
    super("Bordetella pertussis", 257313, "This profile customizes the GenMAPP Builder export for " +
            "Bordetella pertussis" +
            " data loaded from a UniProt XML file.");
}
  • To customize the species profile with the species name in the OrderedLocusNames record of the Systems table as well as a link query for that same record, I added the following method block right below the constructor block:
@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.genedb.org/gene/~;jsessionid=A06A0EFE93C64E476380393D4CBEFA69?actionName=%2FQuery%2FquickSearch&resultsSize=1&taxonNodeName=Bpertussis" }
    });

    return tableManager;
}
  • At this point, my code had several red error badges. To fix this, I chose Organize Imports from the Source menu.
  • I saved the file, at which point the red error badges disappeared.

Adding the Species Profile to the Catalog of Known Species Profiles

In order to have GenMAPP Builder recognize my new species profile, I had to edit an existing file:

  • 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 Bordetella pertussis species profile that I just created to this block. The modified code looked 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(),
    new BordetellaPertussisUniProtSpeciesProfile() });
  • I saved my changes. No errors were present in the code.

Build, Test, and Possibly Commit

  1. Create a new distribution of GenMAPP Builder based on Creating a Distribution.
  2. Perform a new export run with this version of GenMAPP Builder (you can skip the import steps and use the same PostgreSQL database if it’s available).
  3. Check the Systems table in the resulting .gdb to see if it contains the custom information:
    • Open the .gdb in Microsoft Access, then open the Systems table.
    • Look for the record for OrderedLocusNames. Your species name should appear under the Species column and your link URL should appear under the Link column.
  4. If all goes well, commit your code as described in Updating and Committing Code. You have now officially contributed to the XMLPipeDB project :)


















New version of gmbuilder including Bordetella pertussis custom class: File:Dist cw20151201.zip. GTR 2: Gene Database Testing Report- cw20151201






Links

Assignments Pages

Individual Journal Entries

Shared Journal Entries