Skip to content

Commit 39a765c

Browse files
Revise README for Unicorn version and command filters
Updated Unicorn version in README and modified filter parameters for commands.
1 parent c727d2b commit 39a765c

1 file changed

Lines changed: 30 additions & 47 deletions

File tree

README.md

Lines changed: 30 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,14 @@
88

99
- [Install](#install)
1010
- [From Conda](#from-conda)
11-
- [Requirements](#conda-requirements)
1211
- [From Source](#from-source)
13-
- [Requirements](#source-requirements)
1412
- [Run](#run)
15-
- [Commands](#commands)
1613
- [refstats](#refstats)
17-
- [Parameters](#refstats-parameters)
18-
- [Run](#run-refstats)
19-
- [Filters](#refstats-filters)
20-
- [Write BAM After Filtering](#write-bam-after-filtering)
21-
- [Add Taxonomy To BAM Files](#add-taxonomy-to-bam-files)
2214
- [taxstats](#taxstats)
23-
- [Parameters](#taxstats-parameters)
24-
- [Run](#run-taxstats)
25-
- [Filters](#taxstats-filters)
26-
- [Relation To refstats Taxonomy Tags](#relation-to-refstats-taxonomy-tags)
2715
- [alnfilt](#alnfilt)
28-
- [Parameters](#alnfilt-parameters)
29-
- [Output Columns](#output-columns)
16+
- [Output](#output-columns)
3017
- [Taxonomy Files](#taxonomy-files)
3118
- [Input Notes](#input-notes)
32-
- [Testing](#testing)
3319

3420
Unicorn computes alignment-based statistics from SAM/BAM files. It is aimed at
3521
metagenomic and reference-screening workflows where the same alignment file may
@@ -107,34 +93,34 @@ command for reference-level filtering, coverage metrics, and adding taxonomy tag
10793
to filtered BAM files.
10894

10995
```bash
110-
unicorn refstats -h
111-
unicorn 2.5.0 c414a07
112-
May 27 2026 13:08:46
96+
unicorn 2.5.1 b53cd7e
97+
Jun 4 2026 13:36:20
11398
./unicorn refstats [options] -b <in.bam>|<in.sam>
11499
Options:
115100
-b <str> Input bam|sam [Required]
116101
-t <int>, --threads <int> Number of threads [4]
117102
-o <str>, --outbam <str> Output BAM file with filtered references
118-
--outstat <str> Output statistics file
119-
--[FILTER] <PARAM> Apply reference filter "FILTER" with parameter "PARAM"
120-
For example "--minreads 100" to filter out references with
121-
less than 100 reads.
122-
Available filters:
123-
- minrefl <int> Minimum reference length to consider [1]
124-
- minreads <int> Minimum number of reads per reference [1]
125-
- minalnas <int> Minimum alignment score [-Inf]
126-
- maxdust <int> Maximum alignment dust score [100]
103+
-k <int>, --ksize <int> kmer size for duplicity computation [17]
104+
--outstat <str> Print statistics to file <str> [stdout]
105+
--[FILTER] <PARAM> Apply filter "FILTER" with parameter "PARAM"
106+
Example: "--minreads 100" to filter out references with
107+
less than 100 reads.
108+
Filters:
109+
- minreflen <int> Minimum reference length to consider [1]
110+
- minreads <int> Minimum number of reads per reference [1]
111+
- minalnas <int> Minimum alignment score [-Inf]
112+
- maxdust <int> Maximum alignment dust score [100]
127113
--names <str> Taxonomy nodeid to name mapping file.
128114
--nodes <str> Taxonomy nodeid to parent nodeid mapping file.
129-
--acc2tax <str> Accession to taxid mapping file or .khash file.
130-
-k <int> kmer size for duplicity computation [17]
115+
--acc2tax <str> Accession to taxid mapping file.
131116
Report taxid of reference sequence. Enabled automatically when
132117
--acc2tax, --names and --nodes are provided.
133118
taxid is reported in bam records in custom:
134119
XT:i:<taxid> tag and
135-
XR:i:<taxid> tag
136-
In column 2 in the output statistics file.
137-
--rank <str> Taxonomic rank for XR tag. [genus]
120+
XR:i:<taxid> tag in.
121+
taxid column 2 in the output statistics file.
122+
--rank <str> Taxonomic rank for XR tag. [genus]
123+
--qsize <int> Size of queue for coordinate sorted input bam files [1024]
138124
--verbose Print libunicorn's messages.
139125
-h print this help message
140126
```
@@ -195,33 +181,30 @@ can either assign alignments to taxa from an accession map, or consume BAM files
195181
that already contain Unicorn `XT` and `XR` tags.
196182
197183
```bash
198-
unicorn 2.5.0 c414a07
199-
May 27 2026 13:08:46
184+
unicorn 2.5.1 b53cd7e
185+
Jun 4 2026 13:36:20
200186
./unicorn taxstats [options] -b <in.bam>|<in.sam>
201187
Options:
202188
-b <str> Input bam|sam
203-
-a <str> | --acc2tax <str> Accession to taxid mapping file or .khash file.
204-
Providing a .khash file is much faster.
205-
If omitted, taxonomy names/nodes are still loaded but accession lookup is disabled.
206-
-n <str> | --names <str> Taxonomy names file.
207-
-d <str> | --nodes <str> Taxonomy nodes file
208-
-k <int> kmer size for duplicity computation [17]
209189
-t <int>, --threads <int> Number of threads [4]
210-
--qsize <int> Size of queue for taxstats computation [1024]
211-
--outstat <str> Output statistics file [/dev/stdout]
190+
-k <int>, --ksize <int> kmer size for duplicity computation [17]
191+
--outstat <str> Print statistics to file <str> [stdout]
212192
--[FILTER] <PARAM> Apply filter "FILTER" with parameter "PARAM"
213193
For example "--minreads 100" to filter out taxids with
214194
less than 100 reads.
215195
Available filters:
216-
- minrefl <int> Minimum reference length. [0]
196+
- minrefl <int> Minimum reference length. [1]
217197
- minreads <int> Minimum number of reads per taxid. [1]
218198
- minmani <float> Minimum mean ANI per taxid. [0]
219199
- minalnas <int> Minimum alignment score [-Inf]
220200
- maxdust <int> Maximum alignment dust score [100]
221-
--rank <str> Taxonomic rank to summarize by. [genus]
222-
--verbose Prints libunicorn's messages.
223-
-h Print this help message
224-
[unicorn::unicorn_taxstats] Total time: 0.000025 seconds
201+
--acc2tax <str> Accession to taxid mapping file or .khash file.
202+
--names <str> Taxonomy names file.
203+
--nodes <str> Taxonomy nodes file
204+
--rank <str> Taxonomic rank to summarize by. [genus]
205+
--qsize <int> Size of queue for XR sorted input bam files [1024]
206+
--verbose Prints libunicorn's messages.
207+
-h Print this help message
225208
```
226209

227210
Run `taxstats` from an accession map:

0 commit comments

Comments
 (0)