https://github.com/codialab/gfaffix
GFAffix identifies walk-preserving shared affixes in variation graphs and collapses them into a non-redundant graph structure.
https://github.com/codialab/gfaffix
gfa handlegraph pangenomics
Last synced: about 2 months ago
JSON representation
GFAffix identifies walk-preserving shared affixes in variation graphs and collapses them into a non-redundant graph structure.
- Host: GitHub
- URL: https://github.com/codialab/gfaffix
- Owner: codialab
- License: mit
- Created: 2021-07-02T12:02:39.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-05-29T07:07:35.000Z (about 1 year ago)
- Last Synced: 2026-02-07T19:57:48.151Z (4 months ago)
- Topics: gfa, handlegraph, pangenomics
- Language: Rust
- Homepage:
- Size: 5.67 MB
- Stars: 37
- Watchers: 8
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://github.com/marschall-lab/GFAffix/actions/workflows/rust_build.yml) [](https://conda.anaconda.org/bioconda) [](https://anaconda.org/bioconda/gfaffix) [](https://anaconda.org/bioconda/gfaffix)
# GFAffix

GFAffix identifies walk-preserving shared affixes in variation graphs and collapses them into a non-redundant graph structure.
# Dependencies
`GFAffix` is written in RUST and requires a working RUST build system for installation. See [https://www.rust-lang.org/tools/install](https://www.rust-lang.org/tools/install) for more details.
It makes use of the following crates:
* clap
* env\_logger
* flate2
* gfa
* handlegraph
* indexmap
* log
* rayon
* regex
* rustc-hash
## Installation
### From bioconda channel
Make sure you have [conda](https://conda.io)/[mamba](https://anaconda.org/conda-forge/mamba) installed!
```
mamba install -c conda-forge -c bioconda gfaffix
```
### From binary release
#### Linux x86\_64
```
wget --no-check-certificate -c https://github.com/marschall-lab/GFAffix/releases/download/0.2.2/GFAffix-0.2.2_linux_x86_64.tar.gz
tar -xzvf GFAffix-0.2.2_linux_x86_64.tar.gz
# you are ready to go!
./GFAffix-0.2.2_linux_x86_64/gfaffix
```
#### MacOS X arm64
```
wget --no-check-certificate -c https://github.com/marschall-lab/GFAffix/releases/download/0.2.2/GFAffix-0.2.2_macos_x_arm64.tar.gz
tar -xzvf GFAffix-0.2.2_macos_x_arm64.tar.gz
# you are ready to go!
./GFAffix-0.2.2_macos_x_arm64/gfaffix
```
### From repository
```
# install GFAffix
git clone https://github.com/marschall-lab/GFAffix.git
# build program
cargo build --manifest-path GFAffix/Cargo.toml --release
# built binary is located at GFAffix/target/release/gfaffix
```
## Command Line Interface
```
$ gfaffix --help
Discover and collapse walk-preserving shared affixes of a given variation graph.
Usage: gfaffix [OPTIONS]
Arguments:
graph in GFA1 format, supports compressed (.gz) input
Options:
-o, --output_refined
Write refined graph output (GFA1 format) to supplied file instead of stdout; if file name
ends with .gz, output will be compressed [default: ]
-t, --output_transformation
Report original nodes and their corresponding walks in refined graph to supplied file
[default: ]
-c, --check_transformation
Verifies that the transformed parts of the graphs spell out the identical sequence as in the
original graph
-a, --output_affixes
Report identified affixes [default: ]
-x, --dont_collapse
Do not collapse nodes on a given paths/walks ("P"/"W" lines) that match given regular
expression [default: ]
-p, --threads
Run in parallel on N threads [default: 1]
-v, --verbose
Sets log level to debug
-h, --help
Print help
-V, --version
Print version
```
## Execution
```
gfaffix -c examples/example1.gfa > example1.gfaffixed.gfa
```