diff --git a/Compress.md b/Compress.md index dc1853d..dac6464 100644 --- a/Compress.md +++ b/Compress.md @@ -198,3 +198,18 @@ you have to switch to text mode (`--text`). Since both `--dna` and `--text` modes can be used for DNA data, which is better? Short answer: `--dna` is faster and has stronger compression. For details, see [this benchmark page](http://kirill-kryukov.com/study/naf/benchmark-text-vs-dna-Spur.html). + +## Can it compress multiple files into single archive? + +Yes, with the help of a [Multi-Multi-FASTA file format](https://github.com/KirillKryukov/mumu). +It works similarly to gzipping a tar file: +First you combine individual FASTA files into a single Multi-Multi-FASTA stream, then compress it using _ennaf_. +Example commands: + +Compressing:
+`mumu.pl --dir 'Helicobacter' 'Helicobacter pylori*' | ennaf -22 --text -o Hp.nafnaf` + +Decompressing and unpacking:
+`unnaf Hp.nafnaf | mumu.pl --unpack --dir 'Helicobacter'` + +"**nafnaf**" is the recommended filename extension for such archives containing multiple FASTA files. diff --git a/README.md b/README.md index 597b95b..3cdb969 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,20 @@ See `ennaf -h` and [Compression Manual](Compress.md) for detailed usage. See `unnaf -h` and [Decompression Manual](Decompress.md). +## Compressing multiple files + +Working with multiple files is possible using [Multi-Multi-FASTA](https://github.com/KirillKryukov/mumu) as intermediate format. +Example commands: + +Compressing:
+`mumu.pl --dir 'Helicobacter' 'Helicobacter pylori*' | ennaf -22 --text -o Hp.nafnaf` + +Decompressing and unpacking:
+`unnaf Hp.nafnaf | mumu.pl --unpack --dir 'Helicobacter'` + +Filename of NAF-compressed single file normally ends with a ".naf". +To avoid ambiguity, **".nafnaf"** is the recommended suffix for multi-file NAF archives. + ## Citation If you use NAF, please cite: