[42555b]: / docs / getting-started.md

Download this file

199 lines (128 with data), 6.0 kB

Getting Started

A video tutorial covering the instructions below is also available.

System Requirements

  • JDK 17+
  • A JAVA_HOME environment variable pointing to your JDK, or the Java executable in your PATH
  • Gradle (included)

Build & Run

The easiest way to run the program on Windows is by using the executable file located in the releases section to install the program, build gradle and run the GUI.

  • We use Gradle for building. The Gradle wrapper takes care of downloading dependencies, testing, compiling, linking, and packaging the code.
Windows The easiest way to run the program on Windows is by using the executable file located in the [releases](https://github.com/VerisimilitudeX/DNAnalyzer/releases/latest) section to install the program, build gradle and run the GUI.
.\gradlew build
### Usage
<executable> <arguments>
#### Executable
java -jar build/libs/DNAnalyzer.jar
#### Arguments DNAnalyzer uses CLI arguments instead of `stdin`. For example, you can do:
assets/dna/random/dnalong.fa --amino=arg --min=16450 --max=520218 -r
### Example
java -jar build/libs/DNAnalyzer.jar assets/dna/random/dnalong.fa --amino=ser --min=16450 --max=520218 -r
#### Gradle Run If you prefer, you can also run it directly from Gradle:
.\gradlew run --args="assets/dna/random/dnalong.fa --amino=ser --min=10 --max=100"
#### GUI DNAnalyzer also comes with a (very basic) GUI; to start DNAnalyzer with the GUI, run:
.\gradlew run --args="--gui assets/dna/random/dnalong.fa"
Then: * Enter the file name of the DNA file in the text field * Set min and max * Click analyze * Note: Ensure you have Java [17](https://www.oracle.com/java/technologies/downloads/#java17) or higher installed and a `JAVA_HOME` path variable set for the program to function correctly! The results of your analysis will be shown in the right pane.
Linux & macOS ### DNAnalyzer & Java Download To run DNAnaylzer on Linux, you'll need to download the DNAnalyzer source code and download and install Java 17. First, download the zip or tar.gz file from [DNAnalyzer releases](https://github.com/VerisimilitudeX/DNAnalyzer/releases/latest) and unzip it using the native utility. Then, download [Java 17](https://www.oracle.com/ca-en/java/technologies/downloads/#java17), find the download at https://www.oracle.com/ca-en/java/technologies/downloads/#java17, ensure you choose the Linux option and get the one for your correct processor architecture. ### Java installation
wget https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.tar.gz
Next, unzip it.
tar -xvzf jdk-17_linux-x64_bin.tar.gz
Then map the `JAVA_HOME` path. Fill it in with your JAVA directory where JAVA is unzipped.
export JAVA_HOME="{YOUR JAVA DIRECTORY HERE}/jdk-17.0.7" && export PATH=$JAVA_HOME/bin:$PATH
Example of a full path command.
export JAVA_HOME="/workspaces/DNAnalyzer/jdk-17.0.7"
./gradlew build
If you see `Task :compileJava FAILED`, the program cannot find your Java installation. You may need to export your JAVA_HOME path again. ## OpenAI API Key We use GPT-4 API to display the results of the analysis. To use the API, you'll need to get an API key from OpenAI. You can get one [here](https://platform.openai.com/). **Note, this is an optional step.** If you don't want to use the API, you can still use the program, but you won't be able to see the results of the analysis. To set the API key on Linux or macOS, run `export OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxx` where `sk-xxxxxxxxxxxxxxxxxxxxxxxx` is your API key. For Windows, use `setx OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxx` instead. ### Usage
<executable> <arguments>
#### Executable
java -jar build/libs/DNAnalyzer.jar
#### Arguments DNAnalyzer uses CLI arguments instead of `stdin`. For example, you can do:
assets/dna/random/dnalong.fa --amino=arg --min=16450 --max=520218 -r
### Example
java -jar build/libs/DNAnalyzer.jar assets/dna/random/dnalong.fa --amino=ser --min=16450 --max=520218 -r
#### Gradle Run If you prefer, you can also run it directly from Gradle:
./gradlew run --args="assets/dna/random/dnalong.fa --amino=ser --min=10 --max=100"
#### GUI DNAnalyzer also comes with a (very basic) GUI; to start DNAnalyzer with the GUI, run:
./gradlew run --args="--gui assets/dna/random/dnalong.fa"
Then: * Enter the file name of the DNA file in the text field * Set min and max * Click analyze The results of your analysis will be shown in the right pane.

Available Commands

Usage: DNAnalyzer [-hrV] --amino=<aminoAcid> [--find=<proteinFile>]
                  [--max=<maxCount>] [--min=<minCount>] DNA
A program to analyze DNA sequences.
      DNA                    The FASTA file to be analyzed.
      --amino=<aminoAcid>    The amino acid representing the start of a gene.
      --find=<proteinFile>   The DNA sequence to be found within the FASTA file.
  -h, --help                 Show this help message and exit.
      --max=<maxCount>       The maximum count of the reading frame.
      --min=<minCount>       The minimum count of the reading frame.
  -r, --reverse              Reverse the DNA sequence before processing.
  -V, --version              Print version information and exit.