def test_get_counters_for_read(create_kmc_db):
    ' Test case for GetCountersForRead method of KMCFile. '
    kmers = create_kmc_db['kmers']
    read = 'GGCATTGCATGCAGTNNCAGTCATGCAGTCAGGCAGTCATGGCATGCGTAAACGACGATCAGTCATGGTCGAG'
    pattern = []
    kmer_len = create_kmc_db['kmer_len']
    for i in range(0, ((len(read) - kmer_len) + 1)):
        kmer = read[i:(i + kmer_len)]
        if ('N' in kmer):
            pattern.append(0)
            continue
        rev = kmer_utils.rev_comp(kmer)
        if (rev < kmer):
            kmer = rev
        if (not (kmer in kmers.keys())):
            pattern.append(0)
        else:
            pattern.append(kmers[kmer])
    kmc_file = _open_for_ra()
    res = pka.CountVec()
    kmc_file.GetCountersForRead(read, res)
    assert (res.value == pattern)
Test case for GetCountersForRead method of KMCFile.
def test_get_counters_for_read(create_kmc_db):
    '  '
    kmers = create_kmc_db['kmers']
    read = 'GGCATTGCATGCAGTNNCAGTCATGCAGTCAGGCAGTCATGGCATGCGTAAACGACGATCAGTCATGGTCGAG'
    pattern = []
    kmer_len = create_kmc_db['kmer_len']
    for i in range(0, ((len(read) - kmer_len) + 1)):
        kmer = read[i:(i + kmer_len)]
        if ('N' in kmer):
            pattern.append(0)
            continue
        rev = kmer_utils.rev_comp(kmer)
        if (rev < kmer):
            kmer = rev
        if (not (kmer in kmers.keys())):
            pattern.append(0)
        else:
            pattern.append(kmers[kmer])
    kmc_file = _open_for_ra()
    res = pka.CountVec()
    kmc_file.GetCountersForRead(read, res)
    assert (res.value == pattern)