Differences between revisions 7 and 70 (spanning 63 versions)
Revision 7 as of 2007-05-17 04:29:19
Size: 2875
Editor: cpe-066-057-229-060
Comment:
Revision 70 as of 2025-09-03 21:15:28
Size: 8095
Editor: JakeGordon
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
The New Ranker Program for Babase was designed by Dr Jun Yang of Duke's Computer Science Department and Tyler Brock, Senior at Duke University as his graduation project.
Line 4: Line 3:
== Running the Ranker ==
This section describes how to run the ranker normally without the need to make changes to or see the code.
== Ranker v2, "anubis" ==
Line 7: Line 5:
Go to https://papio.biology.duke.edu and click on the ranker.jnlp, the program should launch
 * Make sure you say that you trust the certificate
To access Ranker 2, go to [[https://ranker.biology.duke.edu]] and log in with your Babase credentials. Instructions for how to use Ranker 2 are attached to this page. Developer notes are also available but are not public. For more information, ask a database manager or project leader.
Line 10: Line 7:
== Making Changes and Running the Program == The source code for this version of Ranker is available in the baboon project's [[https://github.com/amboseli/|GitHub repositories]]. There are separate repositories for the [[https://github.com/amboseli/anubis_client|client]] and the [[https://github.com/amboseli/anubis_server|server]].
Line 12: Line 9:
=== Install Software === == Ranker v1 ==

''All of the below text refers to the initial version of Ranker, version 1.n, which we used from ~2007-2024. This information is retained for archival purposes only.''

The latest version of Ranker 1 (v1.4) was mostly developed by [[KarlPinc|Karl O. Pinc]], with recent modifications done by [[JakeGordon]|Jake Gordon]]. It consists of minor changes and a major bug fix to the version developed by [[JunYang|Jun Yang]]. This version was based on an earlier version developed by [[JunYang|Jun Yang]] and [[TylerBrock|Tyler J. Brock]] from Fall 2006 to Spring 2007. It was Tyler's "Graduation with Distinction" project when he graduated from Duke University in 2007. Tyler's thesis has been attached to this page and includes visuals of the program as well as conceptual visuals describing how the program works.

The focus of Tyler's thesis was how to rank automatically, but for stability reasons this functionality is not in the current version of Ranker.

=== Prerequisites to Running Ranker ===
 * If your computer is not connected to Duke's network--where Papio is hosted--you must first connect to Duke via [[DukeVPN|Duke's VPN]].
  * __Important__: Until 2018, a different VPN (see [[BabaseVPN]]) was required by most users to use Ranker. That VPN will no longer work. Anyone who is not at Duke __must__ use the Duke VPN.
 * You must have a Babase login.
 * Your computer must have Java Standard Edition 5 or later.

=== Downloading Ranker ===
A compiled and zipped version of Ranker is available to download at https://papio.biology.duke.edu/ranker.tgz. Download and unzip it; this should yield a folder called "ranker". Save this "ranker" folder in an easily-accessible place on your computer (e.g. your Desktop).

=== Running Ranker ===
 * Verify that you are connected to Duke's network, either by being at Duke or by connecting via VPN.
 * Now, you need to make a connection directly with the server.
  * __Important__: This step is '''not''' an alternative to the requirement to be at Duke or use its VPN. This is a discrete requirement for Ranker to work, entirely separate from the requirement to connect to Duke's network. (The connection to Duke is required for this step to work, however.)
 Open a terminal (WindowsUsersClickHere) and enter the following (all on one line):
 {{{
ssh -L 5432:localhost:5432 MYNETID@papio.biology.duke.edu
}}}
 You will be prompted for your NetID password. After entering this, your connection to the server is complete and you likely won't need the terminal anymore. Feel free to hide or minimize it (but don't close it!).
 * To launch Ranker, the steps vary a little, depending on your operating system.
  * Windows
   * Hold the "Shift" key and right click on the "ranker" folder that (above) you unzipped and stored in an accessible place. In the window that opens, select "Open Command Window Here".
   * In the Command Prompt Window that opens, enter this command:
   {{{
java -cp ranker.jar;lib\jcalendar-1.3.2.jar;lib\postgresql-8.2-506.jdbc3.jar;lib\TableLayout.jar babase.ranker.Main
}}}
   * As above, feel free to hide or minimize this Command Prompt window (but don't close it!)
  * macOS, Unix
   * Open a terminal (a different one from the one you've opened to connect to Papio) and navigate to the "ranker" directory, that (above) you unzipped and stored in an accessible place.
    * If you're on a Mac and saved it to your Desktop, you might enter:
    {{{
cd ~/Desktop/ranker
}}}
   * Enter the following command:
   {{{
java -cp ranker.jar:lib/jcalendar-1.3.2.jar:lib/postgresql-8.2-506.jdbc3.jar:lib/TableLayout.jar babase.ranker.Main
}}}
   * As above, feel free to hide or minimize this terminal window (but don't close it!)

  * You may get a security warning about papio's certificate; click "Yes" to continue.
  * You may get a security warning about the application's digital signature; click "Run" to proceed.
 * When the "Welcome" window appears, choose "Create/load ranking from Babase". A login screen will appear.
  * The "Host" is {{{localhost}}}.
  * The "Port" is {{{5432}}}.
  * The "Use SSL?" field should stay unchecked.
  * The "User Name" and "Password" are your __Babase__ credentials.
  * The "Database" defaults to "babase". You should probably leave this as-is unless you know that you want to connect to a different database.
 * Hit "Connect" to log in.
 * You take it from here!
 * When you're done using Ranker, you can close the terminal/command prompt window you used to launch it (your OS may close it by itself). Next, return to the terminal you used to SSH into Papio and enter, simply:
 {{{
exit
}}}
 You're now free to close the terminal window and disconnect from the VPN.

=== Software Development for Ranker ===

The Ranker code currently resides under {{{~junyang/ranker/}}} on {{{papio.biology.duke.edu}}}. It should be managed by a source control system eventually.

==== Development Environment ====
Line 15: Line 78:
 * Sun Java JDK with version greater than 5.0 available http://java.sun.com
 * Eclipse Software Development Version 3.2 available http://www.eclipse.org
 * Java version 5.0 or later, available at http://java.sun.com/
 * Ant version 1.7 or later, available at http://ant.apache.org/
 * A copy of the code; tarballs are attached to this page
 * Obtain the following third-party libraries:
  * PostgeSQL JDBC Driver, at http://jdbc.postgresql.org/
  * TableLayout manager, at https://tablelayout.dev.java.net/
  * jcalendar, at http://www.toedter.com/en/jcalendar/
Line 18: Line 86:
=== Import Project ===
Once the JDK and Eclipse are installed you can unzip the code for the project and open eclipse. Then, if you import->general->existing project into workspace and select the project file within the extracted folder, the project should appear within your eclipse workspace.
==== Sign the JAR file ====
See instructions in signature/README.txt in the ranker development directory on papio. The signed JAR file can now be copied under install/, a symbolic link to the installation directory on papio. Note that all third-party jars must be signed by the same certificate as well, as per Java security policy. The Makefile does all these automatically.
Line 21: Line 89:
=== Change Log ===
Ranker version 1.4 (2018-07-26)
Line 22: Line 92:
=== Make Changes ===
After the project is open one can make changes to the code within the eclipse environment, most of which is within the babase.ranker package.
In version 1.4, the "Interaction Start Date" and "Interaction End Date" fields have been removed from the "Chooser" UI. We have never needed to use Rank dates that were different from the Interact dates, so it was tedious and redundant entering the same dates in both the Rank Start/End Date fields and the Interaction Start/End Date fields.
Line 25: Line 94:
=== Compile and Run Program With Changes ===
To run the program, make sure you are connected to the VPN bring the ranker.java file to the focus of the editor and click on the run menu. From there, select to run as a Java application. Before the program runs, the changes are compiled.
Ranker version 1.3 (2018-03-27)
Line 28: Line 96:
== Updating the Ranker Program ==
=== Exporting the JAR files ===
Export the project choosing Java->Jar File as the type of exported file.
Ranker version 1.3 contains a few updates to reflect changes that have occurred to the database and/or the VM that hosts it.
Line 32: Line 98:
=== Get the libraries ===
You can find the libraries in the lib folder within the archive of the code.
Details:
Line 35: Line 100:
=== Put it in the right spot ===
 * Make sure the ranker.jar and the library JARs in the same folder.
 * Changed the default "Host" in the Welcome UI to {{{localhost}}}.
 * In the tooltip that appears when hovering over an individual's sname:
  * Removed "Dcauseconfidence" column
  * Added the following columns:
   * Dcausenatureconfidence
   * Dcauseagentconfidence
   * Entrydate
   * Entrytype
  * Changed Bstatus data type from integer to "Bigdecimal"
Line 38: Line 110:
=== Create the Keys ===
From the command line in Mac OS X this can be accomplished by doing the following:
Ranker version 1.2 (2012-11-19)
Line 41: Line 112:
Typing the following into the terminal
 * keytool -genkey -alias babase -keyStore babasestore.ks
Ranker version 1.2 contains a major bug fix.
Line 44: Line 114:
It will ask you for a password
 * Type babase as the password
Detail:
Line 47: Line 116:
Then it will ask for information regarding the certificate
 * Fill out the information.
 * Program was not sorting by anything when loading ranks by the db, resulting in a ranking that was often but not always the rank, depending on the order in which rows were saved and the order in which the db happened to return rows. Fixed by sorting by rank when loading arrays.
Line 50: Line 118:
When asked "Enter key password for <babase> (RETURN if same as keystore password):"
 * Simply hit enter and the keystore will be generated.
Ranker version 1.1
Line 53: Line 120:
=== Sign the JARs ===
From the command line in Mac OS X this can be accomplished by doing the following:
Ranker version 1.1 corresponds to the release of Babase 3.0 and contains the necessary fixes to account for backwards incompatible changes.
Line 56: Line 122:
Change directories to the folder containing both the JARs and the keystore file babasestore.ks and type the following for each JAR file to sign that particular JAR. (All of them must be signed)
* jarsigner -keystore babasestore.ks -storepass babase jarname.jar babase
Detail:
Line 59: Line 124:
The JAR file is now signed and can be uploaded to the webserver.  * Change the BIOGRAPH.Dcausestatus column name to Dcauseconfidence.

Ranker

Ranker v2, "anubis"

To access Ranker 2, go to https://ranker.biology.duke.edu and log in with your Babase credentials. Instructions for how to use Ranker 2 are attached to this page. Developer notes are also available but are not public. For more information, ask a database manager or project leader.

The source code for this version of Ranker is available in the baboon project's GitHub repositories. There are separate repositories for the client and the server.

Ranker v1

All of the below text refers to the initial version of Ranker, version 1.n, which we used from ~2007-2024. This information is retained for archival purposes only.

The latest version of Ranker 1 (v1.4) was mostly developed by Karl O. Pinc, with recent modifications done by Jake Gordon. It consists of minor changes and a major bug fix to the version developed by Jun Yang. This version was based on an earlier version developed by Jun Yang and Tyler J. Brock from Fall 2006 to Spring 2007. It was Tyler's "Graduation with Distinction" project when he graduated from Duke University in 2007. Tyler's thesis has been attached to this page and includes visuals of the program as well as conceptual visuals describing how the program works.

The focus of Tyler's thesis was how to rank automatically, but for stability reasons this functionality is not in the current version of Ranker.

Prerequisites to Running Ranker

  • If your computer is not connected to Duke's network--where Papio is hosted--you must first connect to Duke via Duke's VPN.

    • Important: Until 2018, a different VPN (see BabaseVPN) was required by most users to use Ranker. That VPN will no longer work. Anyone who is not at Duke must use the Duke VPN.

  • You must have a Babase login.
  • Your computer must have Java Standard Edition 5 or later.

Downloading Ranker

A compiled and zipped version of Ranker is available to download at https://papio.biology.duke.edu/ranker.tgz. Download and unzip it; this should yield a folder called "ranker". Save this "ranker" folder in an easily-accessible place on your computer (e.g. your Desktop).

Running Ranker

  • Verify that you are connected to Duke's network, either by being at Duke or by connecting via VPN.
  • Now, you need to make a connection directly with the server.
    • Important: This step is not an alternative to the requirement to be at Duke or use its VPN. This is a discrete requirement for Ranker to work, entirely separate from the requirement to connect to Duke's network. (The connection to Duke is required for this step to work, however.)

    Open a terminal (WindowsUsersClickHere) and enter the following (all on one line):

    ssh -L 5432:localhost:5432 MYNETID@papio.biology.duke.edu
    You will be prompted for your NetID password. After entering this, your connection to the server is complete and you likely won't need the terminal anymore. Feel free to hide or minimize it (but don't close it!).
  • To launch Ranker, the steps vary a little, depending on your operating system.
    • Windows
      • Hold the "Shift" key and right click on the "ranker" folder that (above) you unzipped and stored in an accessible place. In the window that opens, select "Open Command Window Here".
      • In the Command Prompt Window that opens, enter this command:
        java -cp ranker.jar;lib\jcalendar-1.3.2.jar;lib\postgresql-8.2-506.jdbc3.jar;lib\TableLayout.jar babase.ranker.Main
      • As above, feel free to hide or minimize this Command Prompt window (but don't close it!)
    • macOS, Unix
      • Open a terminal (a different one from the one you've opened to connect to Papio) and navigate to the "ranker" directory, that (above) you unzipped and stored in an accessible place.
        • If you're on a Mac and saved it to your Desktop, you might enter:
          cd ~/Desktop/ranker
      • Enter the following command:
        java -cp ranker.jar:lib/jcalendar-1.3.2.jar:lib/postgresql-8.2-506.jdbc3.jar:lib/TableLayout.jar babase.ranker.Main
      • As above, feel free to hide or minimize this terminal window (but don't close it!)
    • You may get a security warning about papio's certificate; click "Yes" to continue.
    • You may get a security warning about the application's digital signature; click "Run" to proceed.
  • When the "Welcome" window appears, choose "Create/load ranking from Babase". A login screen will appear.
    • The "Host" is localhost.

    • The "Port" is 5432.

    • The "Use SSL?" field should stay unchecked.
    • The "User Name" and "Password" are your Babase credentials.

    • The "Database" defaults to "babase". You should probably leave this as-is unless you know that you want to connect to a different database.
  • Hit "Connect" to log in.
  • You take it from here!
  • When you're done using Ranker, you can close the terminal/command prompt window you used to launch it (your OS may close it by itself). Next, return to the terminal you used to SSH into Papio and enter, simply:
    exit
    You're now free to close the terminal window and disconnect from the VPN.

Software Development for Ranker

The Ranker code currently resides under ~junyang/ranker/ on papio.biology.duke.edu. It should be managed by a source control system eventually.

Development Environment

You will need the following environment in order to be able to make changes to the ranker code:

Sign the JAR file

See instructions in signature/README.txt in the ranker development directory on papio. The signed JAR file can now be copied under install/, a symbolic link to the installation directory on papio. Note that all third-party jars must be signed by the same certificate as well, as per Java security policy. The Makefile does all these automatically.

Change Log

Ranker version 1.4 (2018-07-26)

In version 1.4, the "Interaction Start Date" and "Interaction End Date" fields have been removed from the "Chooser" UI. We have never needed to use Rank dates that were different from the Interact dates, so it was tedious and redundant entering the same dates in both the Rank Start/End Date fields and the Interaction Start/End Date fields.

Ranker version 1.3 (2018-03-27)

Ranker version 1.3 contains a few updates to reflect changes that have occurred to the database and/or the VM that hosts it.

Details:

  • Changed the default "Host" in the Welcome UI to localhost.

  • In the tooltip that appears when hovering over an individual's sname:
    • Removed "Dcauseconfidence" column
    • Added the following columns:
      • Dcausenatureconfidence
      • Dcauseagentconfidence
      • Entrydate
      • Entrytype
    • Changed Bstatus data type from integer to "Bigdecimal"

Ranker version 1.2 (2012-11-19)

Ranker version 1.2 contains a major bug fix.

Detail:

  • Program was not sorting by anything when loading ranks by the db, resulting in a ranking that was often but not always the rank, depending on the order in which rows were saved and the order in which the db happened to return rows. Fixed by sorting by rank when loading arrays.

Ranker version 1.1

Ranker version 1.1 corresponds to the release of Babase 3.0 and contains the necessary fixes to account for backwards incompatible changes.

Detail:

  • Change the BIOGRAPH.Dcausestatus column name to Dcauseconfidence.

RankerProgram (last edited 2025-09-03 21:15:28 by JakeGordon)

Wiki content based upon work supported by the National Science Foundation under Grant Nos. 0323553 and 0323596. Any opinions, findings, conclusions or recommendations expressed in this material are those of the wiki contributor(s) and do not necessarily reflect the views of the National Science Foundation.