🚧 fcount-rs is under active development. Caveat emptor. 🚧
Ultrafast feature counting for RNA-seq data. A high-performance Rust alternative to featureCounts.
fcount-rs is significantly faster than featureCounts, especially with multiple threads:
| Command | Mean [s] | Relative |
|---|---|---|
| featureCounts (1 thread) | 2.41 ± 0.01 | 7.67× slower |
| featureCounts (8 threads) | 0.84 ± 0.01 | 2.68× slower |
| fcount-rs (1 thread) | 1.16 ± 0.02 | 3.70× slower |
| fcount-rs (8 threads) | 0.31 ± 0.01 | 1.00 |
Benchmark: chr22 subset (~1.4M paired-end reads), measured with hyperfine. featureCounts v2.0.6, Subread.
cargo install fcount-rsOr build from source:
git clone https://github.com/rnabioco/fcount-rs
cd fcount-rs
cargo build --release# Basic usage
fcount -a annotation.gtf -o counts.txt sample.bam
# Paired-end mode
fcount -a annotation.gtf -o counts.txt -p sample.bam
# Multiple samples with custom names
fcount -a annotation.gtf -o counts.txt -p control=ctrl.bam treated=treat.bam
# With 8 threads, strand-specific, primary alignments only
fcount -a annotation.gtf -o counts.txt -p -t 8 -s 2 --primary sample.bamInput/Output:
-a, --annotation <GTF> GTF/GFF annotation file
-o, --output <FILE> Output count matrix file
Paired-End:
-p, --paired Count fragments instead of reads
-B, --both-aligned Require both ends aligned
-C, --no-chimeric Exclude chimeric fragments
Filtering:
-Q, --min-mapq <INT> Minimum mapping quality [default: 0]
--primary Count primary alignments only
--ignore-dup Ignore duplicate reads
Strandedness:
-s, --strand <MODE> 0=unstranded, 1=stranded, 2=reversely stranded [default: 0]
Multi-mapping:
-M, --multi-mapping Count multi-mapping reads
--fraction Fractional counting (1/NH) for multi-mappers
Overlap:
-O, --multi-overlap Allow reads to overlap multiple features
--min-overlap <INT> Minimum overlapping bases [default: 1]
--largest-overlap Assign to feature with largest overlap
Performance:
-t, --threads <INT> Number of threads (0 = auto) [default: 0]
See the full documentation for all options and examples.
MIT