Commit 6da11427 authored by Mikaël Salson's avatar Mikaël Salson

Merge branch 'feature-a/3307-json-fwd' into 'dev'

Feature a/3307 json fwd

Closes #3307

See merge request !229
parents 5a25394d bc08111a
Pipeline #32517 passed with stages
in 50 seconds
......@@ -22,6 +22,7 @@
*/
#include "cluster-junctions.h"
#include "../lib/json.hpp"
#include<cstdlib>
bool MySort(const pair<int, string>& lh, const pair<int, string>& rh){
......
......@@ -9,7 +9,7 @@
#include <ctime>
#include "dynprog.h"
#include "windows.h"
#include "../lib/json.hpp"
#include "../lib/json_fwd.hpp"
using namespace std ;
using json = nlohmann::json;
......
......@@ -98,7 +98,6 @@ BioReader FilterWithACAutomaton::filterBioReaderWithACAutomaton(
sorted map */
}else{
/* sort map */
typedef function<bool(pair<KmerAffect, int>, pair<KmerAffect, int>)> Comparator;
Comparator compFunctor = [](pair<KmerAffect, int> elem1 ,pair<KmerAffect, int> elem2){
return (elem1.second == elem2.second) ? elem1.first > elem2.first : elem1.second > elem2.second;
};
......
......@@ -3,6 +3,8 @@
#include "bioreader.hpp"
#include "automaton.hpp"
typedef function<bool(pair<KmerAffect, int>, pair<KmerAffect, int>)> Comparator;
class FilterWithACAutomaton {
private:
......
#include "filter.h"
#include "germline.h"
#include "automaton.hpp"
#include "../lib/json.hpp"
#include <fstream>
#include <ctype.h>
......
......@@ -9,7 +9,7 @@
#include "automaton.hpp"
#include "stats.h"
#include "tools.h"
#include "../lib/json.hpp"
#include "../lib/json_fwd.hpp"
#include "kmerstorefactory.hpp"
#include "bioreader.hpp"
#include "filter.h"
......
......@@ -24,6 +24,7 @@
#include <cassert>
#include "segment.h"
#include "tools.h"
#include "../lib/json.hpp"
#include "affectanalyser.h"
#include <sstream>
#include <cstring>
......
......@@ -11,7 +11,7 @@
#include "kmerstore.h"
#include "kmeraffect.h"
#include "affectanalyser.h"
#include "../lib/json.hpp"
#include "../lib/json_fwd.hpp"
#include "filter.h"
// #define DEBUG_EVALUE
......
......@@ -22,6 +22,7 @@
*/
#include "similarityMatrix.h"
#include "../lib/json.hpp"
#include <cassert>
#include <limits>
#include <math.h>
......
......@@ -6,7 +6,7 @@
#include <iostream>
#include <iomanip>
#include "json.h"
#include "../lib/json.hpp"
#include "../lib/json_fwd.hpp"
using namespace std;
using json = nlohmann::json;
......
......@@ -3,6 +3,7 @@
#include <iomanip>
#include <algorithm>
#include "tools.h"
#include "../lib/json.hpp"
string seed_contiguous(int k)
{
......
......@@ -37,7 +37,7 @@
#include <vector>
#include "bioreader.hpp"
#include "kmeraffect.h"
#include "../lib/json.hpp"
#include "../lib/json_fwd.hpp"
using json = nlohmann::json;
using namespace std;
......
#include <iostream>
#include <string>
#include "tools.h"
#include "../lib/json.hpp"
#include "windows.h"
#include "representative.h"
#include "segment.h"
......
......@@ -19,7 +19,7 @@
#include "read_score.h"
#include "representative.h"
#include "stats.h"
#include "../lib/json.hpp"
#include "../lib/json_fwd.hpp"
#define NB_BINS 30
#define MAX_VALUE_BINS 500
......
#ifndef NLOHMANN_JSON_FWD_HPP
#define NLOHMANN_JSON_FWD_HPP
#include <cstdint> // int64_t, uint64_t
#include <map> // map
#include <memory> // allocator
#include <string> // string
#include <vector> // vector
/*!
@brief namespace for Niels Lohmann
@see https://github.com/nlohmann
@since version 1.0.0
*/
namespace nlohmann
{
/*!
@brief default JSONSerializer template argument
This serializer ignores the template arguments and uses ADL
([argument-dependent lookup](http://en.cppreference.com/w/cpp/language/adl))
for serialization.
*/
template<typename = void, typename = void>
struct adl_serializer;
template<template<typename U, typename V, typename... Args> class ObjectType =
std::map,
template<typename U, typename... Args> class ArrayType = std::vector,
class StringType = std::string, class BooleanType = bool,
class NumberIntegerType = std::int64_t,
class NumberUnsignedType = std::uint64_t,
class NumberFloatType = double,
template<typename U> class AllocatorType = std::allocator,
template<typename T, typename SFINAE = void> class JSONSerializer =
adl_serializer>
class basic_json;
/*!
@brief JSON Pointer
A JSON pointer defines a string syntax for identifying a specific value
within a JSON document. It can be used with functions `at` and
`operator[]`. Furthermore, JSON pointers are the base for JSON patches.
@sa [RFC 6901](https://tools.ietf.org/html/rfc6901)
@since version 2.0.0
*/
template<typename BasicJsonType>
class json_pointer;
/*!
@brief default JSON class
This type is the default specialization of the @ref basic_json class which
uses the standard template types.
@since version 1.0.0
*/
using json = basic_json<>;
}
#endif
......@@ -2,6 +2,7 @@
#include "core/filter.h"
#include "core/germline.h"
#include "core/tools.h"
#include <algorithm>
/*
Create an artificial BioReader to experiment tests.
......
......@@ -8,6 +8,7 @@
#include "core/bioreader.hpp"
#include "core/segment.h"
#include "core/windowExtractor.h"
#include "lib/json.hpp"
using namespace std;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment