This command-line tool facilitates the creation and validation of genome assembly and gene model identifiers based on specific patterns. It is part of the AgBioData Genome Assembly and Annotation Nomenclature Working Group.
- Python 3.x
- Docker (optional, for containerized usage)
To use GAAN, you need to install its dependencies. We recommend using Poetry for managing the project dependencies.
If you don't have Poetry installed, you can do so by following the instructions on the official Poetry website.
Once Poetry is installed, navigate to the project directory and run the following command to install the dependencies:
poetry install
GAAN provides command-line functionality for creating and validating genome assembly and gene model identifiers. Here are some examples of how to use GAAN:
poetry run gaan create-assembly <tol_id> <sample_identifier> <consortium> <version> <subversion> --optional <optional>
poetry run gaan validate-assembly <assembly_id>
poetry run gaan create-gene-model <assembly_prefix> <entity> <id_number>
poetry run gaan validate-gene-model <gene_model_id>
Replace the placeholders <tol_id>
, <sample_identifier>
, <consortium>
, <version>
, <subversion>
, <optional>
, <assembly_id>
, <assembly_prefix>
, <entity>
, <id_number>
, and <gene_model_id>
with your specific values.
For more information and options, you can use the --help
flag with any of the commands, for example:
poetry run gaan create-assembly --help
For more examples, refer to the usage section above.
You can run unit tests to ensure everything is working correctly. The test suite is built using Python's unittest
.
To run tests without Docker, use the following command:
poetry run env PYTHONPATH=./src python -m unittest test_gaan.py
This will run the tests defined in test_gaan.py
using the unittest
framework.
If you prefer to run tests inside a Docker container, follow these steps:
-
Build the Docker Image
First, build the Docker image:
docker build -t gaan-tool .
-
Run the Tests Inside Docker
Then, run the tests using the Docker container:
docker run -it --entrypoint "poetry run env PYTHONPATH=./src python -m unittest test_gaan.py" gaan-tool
This will run the unit tests in the container using the same command as when running locally.
If you prefer to use Docker, you can build a Docker image locally. Ensure you have Docker installed on your machine.
To build the Docker image, run the following command in the project directory:
docker build -t gaan-tool .
To run the GAAN tool inside the Docker container, use the following syntax:
docker run -it gaan-tool [command and arguments]
For example:
docker run -it gaan-tool create-assembly ABC123 Sample1 ProjectX 1 0
Note: The Docker image is built locally and is not pushed to a container registry. This approach is suitable for local usage.