Commit d0f94927 authored by Romain Feron's avatar Romain Feron
Browse files

Setup before implementing frequencies

parent dbcc36d5
......@@ -104,3 +104,4 @@ data/*
html/*
bin/
build/
TODO.txt
......@@ -15,7 +15,8 @@ HEADERS += \
src/utils.h \
src/sequence_file.h \
src/popmap_file.h \
src/subset.h
src/subset.h \
src/frequencies.h
SOURCES += \
src/main.cpp \
......@@ -26,4 +27,5 @@ SOURCES += \
src/utils.cpp \
src/sequence_file.cpp \
src/popmap_file.cpp \
src/subset.cpp
src/subset.cpp \
src/frequencies.cpp
#include "frequencies.h"
void frequencies(Parameters &parameters) {
}
#pragma once
#include <string>
#include <vector>
#include <fstream>
#include <unordered_map>
#include "utils.h"
#include "parameters.h"
#include "popmap_file.h"
#include "output.h"
// Main function implementing the analysis
void frequencies(Parameters& parameters);
......@@ -21,6 +21,7 @@ struct Parameters {
Parameter("n_threads", "Number of threads", "-t", "1", "int", "int", "", false),
Parameter("min_cov", "Minimum coverage to consider a marker", "-c", "1", "int", "int", "", false),
Parameter("popmap_file_path", "Path to a popmap file", "-p", "", "string", "ifile", "", true),
Parameter("barcodes_file_path", "Path to a barcodes file", "-b", "", "string", "ifile", "", true),
Parameter("min_males", "Minimum number of males in the subset", "--min-males", "0", "int", "int", "", false),
Parameter("min_females", "Minimum number of females in the subset", "--min-females", "0", "int", "int", "", false),
Parameter("max_males", "Maximum number of males in the subset", "--max-males", "n.males", "int", "int", "", false),
......
......@@ -5,6 +5,7 @@
#include "sex_distribution.h"
#include "process_reads.h"
#include "subset.h"
#include "frequencies.h"
class RadSex {
......@@ -20,19 +21,22 @@ class RadSex {
Parameters parameters;
// Define all analyses
std::map<std::string, Analysis> analyses { {"sex_distribution", Analysis("sex_distribution",
"Computes a matrix of sequences distribution between sexes",
std::map<std::string, Analysis> analyses { {"sex_distribution", Analysis("sex_distribution", "Compute a matrix of sequences distribution between sexes",
std::vector<std::string> {"input_file_path", "output_file_path", "min_cov", "popmap_file_path"},
sex_distribution)},
{"process_reads", Analysis("process_reads",
"Computes a matrix of coverage from a set of demultiplexed reads files",
{"process_reads", Analysis("process_reads", "Compute a matrix of coverage from a set of demultiplexed reads files",
std::vector<std::string> {"input_dir_path", "output_file_path", "n_threads", "min_cov"},
process_reads)},
{"subset", Analysis("subset",
"Extracts a subset of the coverage matrix",
{"subset", Analysis("subset", "Extract a subset of the coverage matrix",
std::vector<std::string> {"input_file_path", "output_file_path", "min_cov", "popmap_file_path",
"min_males", "min_females", "max_males", "max_females"},
subset)}
subset)},
{"frequencies", Analysis("frequencies", "Calculate the frequency of markers in the population",
std::vector<std::string> {"input_file_path", "output_file_path", "min_cov"},
frequencies)},
{"demultiplexing", Analysis("demultiplexing", "Demultiplexes a set of reads files",
std::vector<std::string> {"input_file_path", "output_file_path", "min_cov", "barcodes_file_path"},
demultiplexing)},
};
// In the constructor, the type of analysis is detected and all analysis objects are initialized
......
Supports Markdown
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