Repository navigation
Example Tests
The public example data can be used to check a released SGAtools installation
on Linux. These are functional examples rather than quick --version checks.
The first run downloads the required runtime database archives and caches them
for later commands.
Download and extract the public FAA and FNA examples:
wget https://raw.githubusercontent.com/stsnsn/SGAtools/main/examples/SGAtools_examples.tar.gz
tar -xzf SGAtools_examples.tar.gzThis downloads only the example archive, not the complete source repository.
The example inputs are paired by sample name:
examples/
├── faa_dir/ # predicted proteins
└── fna_dir/ # nucleotide genomes
Start with one protein FASTA:
sga-mapper examples/faa_dir/HIMB59.faa \
--output-dir test-results/mapper-HIMB59 \
--threads 4Check that the annotation table was created:
test -s test-results/mapper-HIMB59/sga_mapper.tsv
head test-results/mapper-HIMB59/sga_mapper.tsvThis first mapper run downloads the OG HMM archive if it is not already in the runtime cache.
Use the matching protein FASTA to test marker extraction and alignment without EPA-ng placement or ANI:
sga-classify examples/faa_dir/HIMB59.faa \
--onlyalign \
--output-dir test-results/alignment-HIMB59 \
--threads 4Check the main outputs:
test -s test-results/alignment-HIMB59/alignment.faa
test -s test-results/alignment-HIMB59/marker_summary.tsvThis command downloads the SAR11_165 marker HMM archive on first use.
Full classification adds EPA-ng placement and nearest-genome fastANI. Supplying the matching FAA reuses the existing protein predictions:
sga-classify examples/fna_dir/HIMB59.fna \
--proteins examples/faa_dir/HIMB59.faa \
--output-dir test-results/classifier-HIMB59 \
--threads 4Check the classification output:
test -s test-results/classifier-HIMB59/sga_classification.tsv
head test-results/classifier-HIMB59/sga_classification.tsvThe first full classification can also download the reference-genome archive. EPA-ng placement with the full reference alignment is memory intensive; SGAtools prints a warning when detected physical memory is below 128 GiB.
To include Prodigal, mapper, classification, and the combined run report in one
test, omit --proteins:
sga-run examples/fna_dir/HIMB59.fna \
--output-dir test-results/run-HIMB59 \
--threads 4Check the component and top-level outputs:
test -s test-results/run-HIMB59/mapper/sga_mapper.tsv
test -s test-results/run-HIMB59/classifier/sga_classification.tsv
test -s test-results/run-HIMB59/report.json
test -s test-results/run-HIMB59/run.logAfter the single-sample checks, the complete example directories can be used to exercise batch input:
sga-mapper examples/faa_dir \
--output-dir test-results/mapper-batch \
--threads 4
sga-classify examples/faa_dir \
--onlyalign \
--output-dir test-results/alignment-batch \
--threads 4Expected aggregate outputs include:
test -s test-results/mapper-batch/batch_sga_mapper.tsv
test -s test-results/alignment-batch/batch_alignment.faaFull batch classification and sga-run are available as described in the
Command Reference, but require substantially more time and memory
than the mapper and alignment-only checks above.