<commit_before>#include <iostream>
#include "Overlap.h"
#include "params.h"
#include "ReadTrim.h"
#include "Graph.h"
#include "OverlapUtils.h"
#include "IO.h"
#include "GraphUtils.h"
#include "UnitigUtils.h"
#include "dotter.h"

Unitigs runAlgorithm(const std::string & overlapsPath, const std::string & readsPath){
    Overlaps overlaps;
    Params   params( getDefaultParams());

    std::cout << "1) Reading overlaps" << std::endl;
//    convertPAFtoDIM(overlapsPath,overlapsPath.substr(0,overlapsPath.size()-4)+".dim");
//            exit(0);
//    loadPAF( overlaps, overlapsPath, params );
    loadDIM( overlaps, overlapsPath, params );

    TIMER_START("Algorithm");
    std::cout << "2) Proposing read trims" << std::endl;

    ReadTrims readTrims;
    proposeReadTrims( readTrims, overlaps, params );

    std::cout << "3) Trimming reads" << std::endl;
    trimReads( overlaps, readTrims, params );

    std::cout << "4) Filtering internal reads" << std::endl;
    filterInternalReads( overlaps, readTrims, params );

    std::cout << "5) Chimering reads" << std::endl;
    filterChimeric( overlaps, readTrims, params );

    std::cout << "6) Filtering contained reads" << std::endl;
    filterContained( overlaps, readTrims, params );

    std::cout << "7) Generating graph" << std::endl;
    Graph g;
    generateGraph( g, overlaps, readTrims, params );

    std::cout << "8) Filtering transitive edges" << std::endl;<commit_msg>Switch dim with paf for easier outside running<commit_after>#include <iostream>
#include "Overlap.h"
#include "params.h"
#include "ReadTrim.h"
#include "Graph.h"
#include "OverlapUtils.h"
#include "IO.h"
#include "GraphUtils.h"
#include "UnitigUtils.h"
#include "dotter.h"

Unitigs runAlgorithm(const std::string & overlapsPath, const std::string & readsPath){
    Overlaps overlaps;
    Params   params( getDefaultParams());

    std::cout << "1) Reading overlaps" << std::endl;
//    convertPAFtoDIM(overlapsPath,overlapsPath.substr(0,overlapsPath.size()-4)+".dim");
//            exit(0);
    loadPAF( overlaps, overlapsPath, params );
//    loadDIM( overlaps, overlapsPath, params );

    TIMER_START("Algorithm");
    std::cout << "2) Proposing read trims" << std::endl;

    ReadTrims readTrims;
    proposeReadTrims( readTrims, overlaps, params );

    std::cout << "3) Trimming reads" << std::endl;
    trimReads( overlaps, readTrims, params );

    std::cout << "4) Filtering internal reads" << std::endl;
    filterInternalReads( overlaps, readTrims, params );

    std::cout << "5) Chimering reads" << std::endl;
    filterChimeric( overlaps, readTrims, params );

    std::cout << "6) Filtering contained reads" << std::endl;
    filterContained( overlaps, readTrims, params );

    std::cout << "7) Generating graph" << std::endl;
    Graph g;
    generateGraph( g, overlaps, readTrims, params );

    std::cout << "8) Filtering transitive edges" << std::endl;
{'fraction_non_alphanumeric': 0.1558530724339169, 'fraction_numerical': 0.007552351527634741, 'mean_word_length': 4.278985507246377, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 5, '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': '172290', 'n_tokens_mistral': 993, 'n_tokens_neox': 941, 'n_words': 238}