N50 with conda

This tiny post is to celebrate my first Bioconda release, the handy n50 utility, that as the name implies calculates N50 from either FASTA or FASTQ files. The main use I did of this script was to quickly feed the output in bash scripts like:

CHECK=$(n50 contigs.fasta)

But now it has a whole range of output options including JSON, TSV, CSV and this fancy human friendly alternative:

.----------------------------------------------------------------.
| File               | Seqs   | Total bp   | N50   | min | max   |
+--------------------+--------+------------+-------+-----+-------+
| test_fasta_grep.fa |      1 |         80 |    80 |  80 |    80 |
| small_test.fa      |      6 |        130 |    65 |   4 |    65 |
| rdp_16s_v16.fa     | 13,212 | 19,098,167 | 1,467 | 320 | 2,210 |
'--------------------+--------+------------+-------+-----+-------'

How to get it

From Miniconda: Install with Conda Conda (channel only)

conda install -c bioconda n50

or with CPANminus:

cpanm Proch::N50
Written on August 19, 2019