File: nthash_spacedseeds.cpp

package info (click to toggle)
btllib 1.7.5%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,336 kB
  • sloc: cpp: 79,742; python: 941; sh: 302; makefile: 5
file content (21 lines) | stat: -rw-r--r-- 471 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "btllib/nthash.hpp"

#include <iostream>
#include <string>
#include <vector>

int
main()
{
  std::string seq = "ACGTACGT";
  std::vector<std::string> seeds = { "1001", "1111" };
  unsigned num_hashes = 2;
  btllib::SeedNtHash nthash(seq, seeds, num_hashes, 4);
  while (nthash.roll()) {
    for (int i = 0; i < seeds.size() * num_hashes; i++) {
      std::cout << std::hex << "0x" << nthash.hashes()[i] << " ";
    }
    std::cout << std::endl;
  }
  return 0;
}