Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2 createMQF() entered infinite loop #96

Open
mr-eyes opened this issue Mar 21, 2022 · 0 comments
Open

v2 createMQF() entered infinite loop #96

mr-eyes opened this issue Mar 21, 2022 · 0 comments

Comments

@mr-eyes
Copy link
Member

mr-eyes commented Mar 21, 2022

When I used this FASTA file with the following script, createMQF() and createBMQF() functions entered an infinite loop.

head100_tr.zip

#include <iostream>
#include "kDataFrame.hpp"
#include <string>
#include <vector>
#include "algorithms.hpp"
#include <math.h>
#include "kDataframes/kDataFrameMQF.hpp"
#include "kDataframes/kDataFrameSTL.hpp"



int main(int argc, char** argv) {
    string file_name = argv[1];
    int chunk_size = 10;
    int kSize = 25;

    readingModes RM = KMERS;
    hashingModes HM = integer_hasher;

    auto* KF = kDataFrameFactory::createPHMAP(kSize, HM);
    kmerDecoder* KD = kmerDecoder::getInstance(file_name, chunk_size, RM, HM, { {"kSize", kSize} });

    while (!KD->end()) {
        KD->next_chunk();
        for (const auto& seq : *KD->getKmers())
            for (const auto& kmer : seq.second)
                KF->insert(kmer.hash);
    }

    cout << "converting to MQF..." << endl;
    kDataFrame* kf_mqf = kDataFrameFactory::createMQF(KF);
    kf_mqf->save("test");

}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant