Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
set -e
# run script with sudo
# cleanup
apt -y autoremove
# update all security patches
apt-get -y -s dist-upgrade | grep "^Inst" | \
grep -i securi | awk -F " " {'print $2'} | \
/// K-mer counting
/// Basic Zig port of kc-c1.c from https://github.com/lh3/kmer-cnt/blob/master/kc-c1.c
///
/// zig build -Doptimize=ReleaseFast
/// wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR174/003/ERR1741363/ERR1741363_1.fastq.gz
///
/// time ./kc-c1 ERR1741363_1.fastq.gz => real 0m20,494s
/// time pigz -dc ERR1741363_1.fastq.gz | zig-out/bin/kc-z1 => real 0m20,336s
///
const std = @import("std");