<commit_before>__version__ = "0.2"

import _khmer
from _khmer import new_ktable
from _khmer import new_hashtable
from _khmer import _new_hashbits
from _khmer import new_readmask
from _khmer import new_minmax
from _khmer import consume_genome
from _khmer import forward_hash, forward_hash_no_rc, reverse_hash
from _khmer import set_reporting_callback
from _khmer import do_intersection_partition

from filter_utils import filter_fasta_file_any, filter_fasta_file_all, filter_fasta_file_limit_n

###

def new_hashbits(k, starting_size, n_tables=8):
    primes = get_n_primes_above_x(n_tables, starting_size)
    print primes
#    primes = [ 22906493, 22906519, 22906561, 22906567,
#               22906619, 22906649, 22906657, 22906661 ]
    
    return _new_hashbits(k, primes)

def _default_reporting_callback(info, n_reads, other):
    print '...', info, n_reads, other

def reset_reporting_callback():
    set_reporting_callback(_default_reporting_callback)

reset_reporting_callback()<commit_msg>set default # of hts to 2<commit_after>__version__ = "0.2"

import _khmer
from _khmer import new_ktable
from _khmer import new_hashtable
from _khmer import _new_hashbits
from _khmer import new_readmask
from _khmer import new_minmax
from _khmer import consume_genome
from _khmer import forward_hash, forward_hash_no_rc, reverse_hash
from _khmer import set_reporting_callback
from _khmer import do_intersection_partition

from filter_utils import filter_fasta_file_any, filter_fasta_file_all, filter_fasta_file_limit_n

###

def new_hashbits(k, starting_size, n_tables=2):
    primes = get_n_primes_above_x(n_tables, starting_size)
    print primes
    
    return _new_hashbits(k, primes)

def _default_reporting_callback(info, n_reads, other):
    print '...', info, n_reads, other

def reset_reporting_callback():
    set_reporting_callback(_default_reporting_callback)

reset_reporting_callback()
{'fraction_non_alphanumeric': 0.05640484976278334, 'fraction_numerical': 0.03742751713231418, 'mean_word_length': 6.3, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7427237', 'n_tokens_mistral': 705, 'n_tokens_neox': 637, 'n_words': 157}