Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Thopic committed Sep 7, 2024
1 parent ce6c94c commit 43258b5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-latest]
os: [windows-latest]

steps:
- uses: actions/checkout@v4
Expand Down
12 changes: 6 additions & 6 deletions src/trie_container.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class TrieContainer{

vecs seqs;

seq string_to_seqence(const std::string& s) {
seq string_to_sequence(const std::string& s) {
seq sequence = seq(s.size());
for (short unsigned int i=0; i<s.size(); i++)
for (short unsigned int j=0; j<alphabet.size(); j++)
Expand Down Expand Up @@ -48,7 +48,7 @@ class TrieContainer{
}

void insert(const std::string& str_seq){
seq d = string_to_seqence(str_seq);
seq d = string_to_sequence(str_seq);
seqs.push_back(str_seq);
tr.insert(d.begin(), d.end(), seqs.size()-1);
}
Expand All @@ -59,12 +59,12 @@ class TrieContainer{
}

void remove(const std::string& str_seq){
seq d = string_to_seqence(str_seq);
seq d = string_to_sequence(str_seq);
tr.remove(d.begin(), d.end());
}

bool contain(const std::string& str_seq){
seq d = string_to_seqence(str_seq);
seq d = string_to_sequence(str_seq);
return tr.contain(d.begin(), d.end());
}

Expand All @@ -84,7 +84,7 @@ class TrieContainer{
}

vecs hamming_neighbours(const std::string& str_seq, std::size_t hamming_distance){
seq d = string_to_seqence(str_seq);
seq d = string_to_sequence(str_seq);
std::vector<std::size_t> nb_neighbours;
tr.hamming_neighbours(d.begin(), d.end(), hamming_distance, nb_neighbours);

Expand Down Expand Up @@ -112,7 +112,7 @@ class TrieContainer{
}
next_nodes.clear();
for(std::size_t ii: current_nodes){
tmp_dna = string_to_seqence(seqs[ii]);
tmp_dna = string_to_sequence(seqs[ii]);
tr.hamming_neighbours(tmp_dna.begin(), tmp_dna.end(), hamming_distance, next_nodes);
for(std::size_t jj: next_nodes){
remove(seqs[jj]);
Expand Down
2 changes: 1 addition & 1 deletion src/try.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ int main(){
for (std::string n : ng) std::cout << n << "\n";

std::cout << "Cluster test\n";
std::unordered_map<str, std::size_t> cluster = trie.hamming_clusters(1);
std::unordered_map<std::string, std::size_t> cluster = trie.hamming_clusters(1);
for (auto& it: cluster) {
// Do stuff
std::cout << it.first << ": " << it.second << "\n";
Expand Down

0 comments on commit 43258b5

Please sign in to comment.