Add a TODO note
Check reverse complement of references.

New times including references' reverse complement in the filter:

$ time samtools view 7261_6.bam | python blooming_reads.py -c all_mito.fas -k 20 -m 1 -f sam -o /dev/null
Hashing circular references in all_mito.fas
Have 127390 unique k-mers before consider fuzzy matches
Adding deletions brings this to 631660 unique k-mers
Adding 1 mis-matches per k-mer, have 7517711 unique k-mers
Adding inserts brings this to 13718828 unique k-mers
Set and bloom filter of 20-mers created (95955 k-mers considered, 13718828 unique)
Using Bloom filter with capacity 13718828 and error rate 0.01
Building filters took 40.1s
Processed 100000 reads, kept 12426 (12.4%), taken 4.0s (of which 3.2s in filter)
Processed 200000 reads, kept 24704 (12.4%), taken 8.0s (of which 6.4s in filter)
Processed 300000 reads, kept 36982 (12.3%), taken 12.0s (of which 9.6s in filter)
Processed 400000 reads, kept 49120 (12.3%), taken 16.0s (of which 12.9s in filter)
Processed 500000 reads, kept 61392 (12.3%), taken 20.0s (of which 16.1s in filter)
Processed 600000 reads, kept 73698 (12.3%), taken 24.0s (of which 19.4s in filter)
Processed 700000 reads, kept 85890 (12.3%), taken 28.0s (of which 22.6s in filter)
Processed 800000 reads, kept 97772 (12.2%), taken 32.0s (of which 25.8s in filter)
Processed 900000 reads, kept 109902 (12.2%), taken 36.0s (of which 29.1s in filter)
Processed 1000000 reads, kept 122140 (12.2%), taken 40.0s (of which 32.3s in filter)
Processed 1100000 reads, kept 134212 (12.2%), taken 44.0s (of which 35.5s in filter)
...

Before worrying about the reverse complement:

$ time samtools view 7261_6.bam | python blooming_reads.py -c all_mito.fas -k 20 -m 1 -f sam -o /dev/null
Hashing circular references in all_mito.fas
Have 63695 unique k-mers before consider fuzzy matches
Adding deletions brings this to 567965 unique k-mers
Adding 1 mis-matches per k-mer, have 3959400 unique k-mers
Adding inserts brings this to 7058737 unique k-mers
Set and bloom filter of 20-mers created (95955 k-mers considered, 7058737 unique)
Using Bloom filter with capacity 7058737 and error rate 0.01
Building filters took 19.8s
Processed 100000 reads, kept 7738 (7.7%), taken 3.9s (of which 3.1s in filter)
Processed 200000 reads, kept 15198 (7.6%), taken 7.9s (of which 6.3s in filter)
Processed 300000 reads, kept 22680 (7.6%), taken 11.8s (of which 9.5s in filter)
Processed 400000 reads, kept 30090 (7.5%), taken 15.7s (of which 12.6s in filter)
Processed 500000 reads, kept 37574 (7.5%), taken 19.6s (of which 15.7s in filter)
Processed 600000 reads, kept 45030 (7.5%), taken 23.5s (of which 18.9s in filter)
Processed 700000 reads, kept 52462 (7.5%), taken 27.4s (of which 22.0s in filter)
Processed 800000 reads, kept 59648 (7.5%), taken 31.3s (of which 25.2s in filter)
Processed 900000 reads, kept 66818 (7.4%), taken 35.2s (of which 28.3s in filter)
Processed 1000000 reads, kept 74314 (7.4%), taken 39.2s (of which 31.4s in filter)
Processed 1100000 reads, kept 81572 (7.4%), taken 43.1s (of which 34.6s in filter)
...

i.e. Building the filter is slower (40s vs 20s), but still trivial compared to the
filtering of the reads which is about the same speed.