组装的基因组压缩器
Assembled Genomes Compressor (AGC) is a tool designed to compress collections of de-novo assembled genomes. It can be used for various types of datasets: short genomes (viruses) as well as long (humans).
The tool offers high compression ratios, especially for high-quality genomes. For example the 96 haplotype sequences from the Human Pangenome Project (47 samples), GRCh 38 reference, and CHM13 v.1.1 assembly containing about 290Gb are squeezed to less than 1.5GB. The compressed samples are easily accessible as agc offers extraction of single samples or contigs in a few seconds. The compression is also fast. On a AMD TR 3990X-based machine (32 threads used) it takes about 12 minutes to compress the HPP collection.
…agc should be downloaded from https://github.com/refresh-bio/agc and compiled. The supported OS are:
For better performance gzipped input is readed using isa-l library for x64 CPUs.
This, however, requires NASM compiler to be installed (you can install it from GitHub or are nasm package, e.g., sudo apt install nasm).
If NASM is not present (or at ARM-based CPUs), the zlib-ng is used.
Compilation with default options optimizes the tool for the native platform. If you want more control, you can specify the platform:
make PLATFORM=arm8 # compilation for ARM-based machines (turns on `-march=armv8-a`)
make PLATFORM=m1 # compilation for M1/M2/... (turns on `-march=armv8.4-a`)
make PLATFORM=sse2 # compilation for x64 CPUs with SSE2 support
make PLATFORM=avx # compilation for x64 CPUs with AVX support
make PLATFORM=avx2 # compilation for x64 CPUs with AVX2 supportYou can also specify the g++ compiler version (if installed):
make CXX=g++-11
make CXX=g++-12The release contains a set of precompiled binaries for Windows, Linux, and OS X.
The software is also available on Bioconda:
conda install -c bioconda agcFor detailed instructions on how to set up Bioconda, please refer to the Bioconda manual.
bin directory.agc [options]
Command:
create - create archive from FASTA filesappend - add FASTA files to existing archivegetcol - extract all samples from archivegetset - extract sample from archivegetctg - extract contig from archivelistref - list reference sample name in archivelistset - list sample names in archivelistctg - list sample and contig names in archiveinfo - show some statistics of the compressed dataagc create [options] [ ...] >
Options:
-a - adaptive mode (default: false)-b - batch size (default: 50; min: 1; max: 1000000000)-c - concatenated genomes in a single file (default: false)-d - do not store cmd-line (default: false)-f - fraction of fall-back minimizers (default: 0.000000; min: 0.000000; max: 0.050000)-i - file with FASTA file names (alternative to listing file names explicitly in command line)-k - k-mer length (default: 31; min: 17; max: 32)-l - min. match length (default: 20; min: 15; max: 32)-o - output to file (default: output is sent to stdout)-s - expected segment size (default: 60000; min: 100; max: 1000000)-t - no. of threads (default: no. logical cores / 2; min: 1; max: no. logical. cores)-v - verbosity level (default: 0; min: 0; max: 2)FASTA files can be optionally gzipped. It is, however, recommended (for performance reasons) to use uncompressed reference FASTA file.
If all samples are given in a single file (concatenated genomes mode) the reference must be given in a separate file.
Setting parameters allows difference compromises, usually between compressed size and decompression time. The impact of the most important options is discussed below.
create mode, so it cannot be changed later, when the archive is extended.agc append [options] [ ...] >
Options:
-c - concatenated genomes in a single file (default: false)-d - do not store cmd-line (default: false)-f - fraction of fall-back minimizers (default: 0.000000; min: 0.000000; max: 0.050000)-i - file with FASTA file names (alternative to listing file names explicitly in command line)-o - output to file (default: output is sent to stdout)-t - no. of threads (default: no. logical cores / 2; min: 1; max: no. logical. cores)-v - verbosity level (default: 0; min: 0; max: 2)FASTA files can be optionally gzipped.
agc getcol [options] >
Options:\n";
-g - optional gzip with given level (default: 0; min: 0; max: 9)-l - line length (default: 80; min: 40; max: 2000000000)-o - output to files at path (default: output is sent to stdout)-t - no. of threads (default: no. logical cores / 2; min: 1; max: no. logical. cores)-v - verbosity level (default: 0; min: 0; max: 2)If output path is specified then it must be an existing directory.
Each sample will be stored in a separate file (the files in the directory will be overwritten if their names are the same as sample name).
Samples can be gzipped when -g flag is provided.
agc getset [options] [ ...] >
Options:
-g - optional gzip with given level (default: 0; min: 0; max: 9)-l - line length (default: 80; min: 40; max: 2000000000)-o - output to file (default: output is sent to stdout)-s - enable streaming mode (slower but needs less memory)-t - no. of threads (default: no. logical cores / 2; min: 1; max: no. logical. cores)-p - disable file prefetching (useful for short genomes)-v - verbosity level (default: 0; min: 0; max: 2)Samples can be gzipped when -g flag is provided.
agc getctg [options] [ ...] >
agc getctg [options] [ ...] >
agc getctg [options] [ ...] >
agc getctg [options] [ ...] >
Options:
-g - optional gzip with given level (default: 0; min: 0; max: 9)-l - line length (default: 80; min: 40; max: 2000000000)-o - output to file (default: output is sent to stdout)-s - enable streaming mode (slower but needs less memory)-t - no. of threads (default: no. logical cores / 2; min: 1; max: no. logical. cores)-p - disable file prefetching (useful for short queries)-v - verbosity level (default: 0; min: 0; max: 2)Contigs can be gzipped when -g flag is provided.
agc listref [options] >
Options:
-o 暂无开放 Issues,或尚未同步最近议题。