Skip to content
Snippets Groups Projects
Commit 133e14e6 authored by Martin Larralde's avatar Martin Larralde
Browse files

Move `kseq_ptr_t` to the `_utils.hpp` helper header

parent e54f5ccc
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@ cdef extern from "map/include/base_types.hpp" namespace "skch" nogil:
cdef cppclass QueryMetaData[ K, MV ]:
K kseq
seqno_t seqCounter
int sketchsize
int sketchSize
MV minimizerTableQuery
......
from libc.stdint cimport uint64_t
from libcpp.vector cimport vector
from libcpp.functional cimport function
from libcpp11.fstream cimport ofstream
from fastani.map.base_types cimport seqno_t, offset_t, ContigInfo, MappingResult, MappingResultsVector_t
from fastani.map.map_parameters cimport Parameters
......@@ -12,12 +13,12 @@ cdef extern from "map/include/computeMap.hpp" namespace "skch" nogil:
cdef cppclass Map:
cppclass L1_candidateLocus_t:
struct L1_candidateLocus_t:
seqno_t seqId
offset_t rangeStartPos
offset_t rangeEndPos
cppclass L2_mapLocus_t:
struct L2_mapLocus_t:
seqno_t seqId
offset_t meanOptimalPos
Sketch.MIIter_t optimalStart
......@@ -37,10 +38,4 @@ cdef extern from "map/include/computeMap.hpp" namespace "skch" nogil:
function[void(MappingResult&)] f = nullptr
)
Map(
const Parameters &p,
const Sketch &refsketch,
uint64_t &totalQueryFragments,
int queryno,
MappingResultsVector_t &r
)
void mapSingleQuerySeq[Q](Q&, MappingResultsVector_t&, ofstream&)
......@@ -7,6 +7,5 @@ cdef extern from "common/kseq.h":
size_t m
char* s
ctypedef __kseq_t kseq_t
cdef struct __kseq_t:
cdef cppclass kseq_t:
kstring_t seq
#include <iostream>
#include <ctime>
#include <chrono>
#include <functional>
#include "_utils.hpp"
skch::Map* new_map_with_result_vector(
const skch::Parameters &p,
const skch::Sketch &refsketch,
uint64_t &totalQueryFragments,
int queryno,
skch::MappingResultsVector_t &r
) {
auto fn = std::bind(skch::Map::insertL2ResultsToVec, std::ref(r), std::placeholders::_1);
return new skch::Map( p, refsketch, totalQueryFragments, queryno, fn );
}
int omp_get_thread_num(void) {
return 1; // Make the logger shut up.
}
......
#ifndef __UTILS_HPP
#define __UTILS_HPP
#include "map/include/computeMap.hpp"
#include <stdint.h>
#include <functional>
#include <chrono>
#include <limits>
#include <iostream>
#include <vector>
#include "common/kseq.h"
#include "map/include/base_types.hpp"
#include "map/include/computeMap.hpp"
skch::Map* new_map_with_result_vector(
const skch::Parameters &p,
const skch::Sketch &refsketch,
uint64_t &totalQueryFragments,
int queryno,
skch::MappingResultsVector_t &r
);
#include "map/include/winSketch.hpp"
// not needed anywhere except in `cgi::correctRefGenomeIds`
// so we can just patch them
extern int omp_get_thread_num(void);
extern int omp_get_num_threads(void);
typedef kseq_t* kseq_ptr_t;
#endif
from libc.stdint cimport uint64_t
from kseq cimport kseq_t
from fastani.map.base_types cimport MappingResultsVector_t
from fastani.map.compute_map cimport Map
from fastani.map.map_parameters cimport Parameters
......@@ -8,10 +9,7 @@ from fastani.map.win_sketch cimport Sketch
cdef extern from "_utils.hpp" nogil:
Map* new_map_with_result_vector(
const Parameters &p,
const Sketch &refsketch,
uint64_t &totalQueryFragments,
int queryno,
MappingResultsVector_t &r
)
int omp_get_thread_num()
int omp_get_num_threads()
ctypedef kseq_t* kseq_ptr_t
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment