iRefIndex Output and Statistics

From irefindex
Revision as of 11:53, 5 March 2009 by PaulBoddie (talk | contribs) (Moved PSI_MI_TAB_Maker details to this page. Added report generation details.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The production of output and statistics involves two separate programs: PSI_MI_TAB_Maker and BioPSI_Suplimenter.

Building PSI_MI_TAB_Maker

The PSI_MI_TAB_Maker.jar file needs to be obtained or built.

  1. Get the program's source code from this location:

    Using CVS with the appropriate CVSROOT setting, run the following command:

    cvs co bioscape/bioscape/modules/interaction/Sabry/PSI_MI_TAB_Maker

    The CVSROOT environment variable should be set to the following for this to work:

    export CVSROOT=:ext:<username>@hfaistos.uio.no:/mn/hfaistos/storage/cvsroot
    (The <username> should be replaced with your actual username.)
  2. Obtain the program's dependencies. This program uses the MySQL Connector/J library which can be found at the following location:
  3. Extract the dependencies:
    tar zxf mysql-connector-java-5.1.6.tar.gz

    This will produce a directory called mysql-connector-java-5.1.6 containing a file called mysql-connector-java-5.1.6-bin.jar which should be placed in the lib directory in the PSI_Writer directory...

      mkdir lib
      cp mysql-connector-java-5.1.6/mysql-connector-java-5.1.6-bin.jar lib/

    You may instead choose to copy the library from the BioPSI_Suplimenter/lib directory:

      mkdir lib
      cp ../BioPSI_Suplimenter/lib/mysql-connector-java-5.1.6-bin.jar lib/

    Alternatively, the external libraries can also be found in the following location:

    /biotek/dias/donaldson3/iRefIndex/External_libraries
  4. Edit the main method in the src/psi/no/uio/biotek/PSI_MI_Tab.java file and change the following variables:
    • Change the host, database, username and password used in the database connection. For example:
      Connect con = new Connect("myhost", "irefindex", "irefindex", "mysecretpassword");
    • Change the output files. For example:
      LogAppend log = new LogAppend("/home/irefindex/logs/" + date + "PSI_tab_writer.log");
      String file = "/home/irefindex/output/<taxid>.mitab." + date + ".txt";  //Proprietary
      String zipfile = "/home/irefindex/output/<taxid>.mitab." + date + ".txt";
      
    • Make sure that the output directory has been created. For example:
      mkdir /home/irefindex/output
  5. Compile the source code. In order to build the software on a computer which does not have the NetBeans IDE installed, copy the generic build file into the PSI_MI_TAB_Maker directory:
    cp Build_files/build.xml .

    Compile and create the .jar file as follows:

    ant jar

Running PSI_MI_TAB_Maker

In order to run the program, some additional database tables are required. One way of ensuring that such tables exist and are suitable is to drop any existing tables within the database being built, then to copy existing tables from a previously built database:

use <database>;
drop table mapping_intDitection;
drop table mapping_intType;
drop table mapping_partidentification;
create table mapping_intDitection like <old_database>.mapping_intDitection;
create table mapping_intType like <old_database>.mapping_intType;
create table mapping_partidentification like <old_database>.mapping_partidentification;
insert into mapping_intDitection select * from <old_database>.mapping_intDitection;
insert into mapping_intType select * from <old_database>.mapping_intType;
insert into mapping_partidentification select * from <old_database>.mapping_partidentification;

For example:

use irefindex;
drop table mapping_intDitection;
drop table mapping_intType;
drop table mapping_partidentification;
create table mapping_intDitection like old_db.mapping_intDitection;
create table mapping_intType like old_db.mapping_intType;
create table mapping_partidentification like old_db.mapping_partidentification;
insert into mapping_intDitection select * from old_db.mapping_intDitection;
insert into mapping_intType select * from old_db.mapping_intType;
insert into mapping_partidentification select * from old_db.mapping_partidentification;

Run the program as follows:

java -jar -Xms256m -Xmx256m build/jar/PSI_MI_TAB_Maker.jar

Follow the instructions, supplying the requested arguments when running the program again.

Running BioPSI_Suplimenter to Produce Statistics

This program was already built and run in the iRefIndex Build Process, but it needs to be run again in order to produce statistics for the system. The basic details of running the program are described in Running BioPSI_Suplimenter.

Create reports

Upon selecting this option in the running program, complete the fields as previously described. The reports will be written to the designated log file directory.