There are two builds: the one including dependences will only run on the platform for which it is built and the other can be run from the command line by adding the dependences at launch.
The latest release (2.4b, the first beta release candidate for final release) includes builds for:
Genesis2-2.4b-macArm64.jar
-- built on macOS Sonoma 14.4.1)Genesis2-2.4b-macX64.jar
-- built on macOS Monterey 12.6.8)Genesis2-2.4b-ubuntuX64.jar
-- built on Ubuntu 22.04.3 LTS)Genesis2-2.4b-winX64.jar
-- built on Windows 11)Genesis2-2.4b-Generic.jar
)and should be possible to run by double-clicking on the build in the file browser (Finder in the Mac). On Ubuntu you may need to add execute permissions. Either look at Properties in the file manager where you can set execute permission -- easy in GNOME -- or on the command line:
chmod +x Genesis2-2.4b-ubuntuX64.jar
If you wish to run from the command line, the following should work (adjusted to the JAR file for your environment):
java -jar Genesis2-2.4b-ubuntuX64.jar
You will find more information in the docs directory; the PDF file Genesis_2_documentation_V1_1_1.pdf
documents design choices and how far along the project is towards a robust, sustainable build.
A build on another platform should work, subject to checking that the right dependences for JavaFX libraries are used. The way the project is set up, Maven should automatically find them.
To run the version that does not include dependences on the command line, you need to download a version of the JavaFX SDK.
Assuming the JavaFX library is in directory named in shell variable $JAVAFX
and your JAR file is in $JARF
, you can invoke it as follows:
java --module-path $JAVAFX --add-modules javafx.controls,javafx.fxml,javafx.swing -jar $JARF
Note: the library path should go to the actual contents so if e.g. the path is /usr/local/lib/JavaFX/lib
then include the trailing part of the path after /lib
. In my examples, the libraries are not in another layer of lib
directory as this is implied by the rest of the path.
There is a Bash script genesis.sh
in this repository (in scripts
) that can run the above. To invoke, create environment variables that the script will use (it has defaults if you don’t do this). To the the above effect (modifying the paths to suit your install):
export JAVAFX=/usr/local/lib/JavaFX-21
export JARF=$HOME/Applications/Genesis2-2.4b-Generic.jar
Note: in Unix shell scripting, you can create a shell variable wuthout using the word EXPORT
but the value will not be visible to a child process, i.e., the script will not see it. The JavaFX path should contain the actual library files -- if they are in a directory called lib
append that to the path.
git clone -b Philip https://github.com/h3abionet/genesis2.git
git
-- the top-level directory (folder) should be called genesis
and NetBeans will recognize this as a projecttarget
directory (folder); you should find two JAR files:
with-dependencies.jar
should be possible to launch from the file browser (Finder on a Mac)genesis.sh
script (or a variation suitable for Windows)Data to test functionality is available in the repository in directory agm-demo/agm-genesis/sample-data/
(Windows users can rotate the slashes to suit).
Data file types available to open are:
.g2f
-- a Genesis2 project (the first thing to open, unless you want to start from scratch); you can then use
.eigenvec
-- PCA file.Q
-- Admixture file.fam
-- a FAM file.phe
-- phenotype file.eigenvec
) before anything is graphedLatest fixes:
fam
or phe
file has any rows (lines) with a differing number of columns (fields) from the first row, an error is thrown, reporting the first erroneous lineTested on a Mac: if you hold SHIFT while resizingf a window, it rescales uniformly (i.e. maintains the aspect ratio).
When you save as a different name, the project now remembers the new name so when you save again, it offers the new name not its original file name.
Earlier commits shows a lot of other fixes in the README; deleted from here for brevity.
New issues now at the top.
.fam
or phenotype file (.phe
) has any lines not the correct length, a warning is issued and setting up the new project ends; the first line that is the wrong length is given. The number of fields (columns) is set by the first line (row).May 02, 2024 8:48:49 AM
com.sun.glass.ui.mac.MacApplication
lambda$waitForReactivation$6
pom.xml
The main difficulty in correcting annotations issues is that the way annotations are implemented is clumsy. There is a single Annotations
class that represents every variation and the different annotation classes each embed this class; the proposed fix: a top-level Annotation
class that only contains the common properties of all annotations and derived classes that implement functions specific to that annotation type. This will make it easier to record the state of the annotation before edits and restore it if the edit is cancelled. It is also weird that the Annotation class is in package Model while the uses of it are in Controller. You could argue that the contents of an annotation are part of the data but why are methods to manipulate it split between the model and controller?
Rather than do this, I now focus on transferring state between JavaFX view and model classes in Xoptions.java files where X is a particular annotation type.
Another issue is the confusing way a project is implemented; some thought needs to go into re-architecting this.
Funded by the NIH, Grant U24HG006941