Skip to content

Commit

Permalink
introduce uint64_t hash key concatenating chrome and base
Browse files Browse the repository at this point in the history
  • Loading branch information
MPIBR-tushevg committed Oct 13, 2016
1 parent 49fd900 commit c7525ac
Show file tree
Hide file tree
Showing 5 changed files with 153 additions and 165 deletions.
40 changes: 10 additions & 30 deletions config.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@ const char PROGRAM_NAME[] = "PASSFinder";
void aux_init(aux_config_t *aux)
{
/* initialize default auxiliary values */
aux->input = NULL;
aux->polymask = NULL;
aux->output = NULL;
aux->window = AUX_DEFAULT_WINDOW;
aux->depth = AUX_DEFAULT_DEPTH;
aux->file_in = NULL;
aux->file_mask = NULL;
aux->polysize = AUX_DEFAULT_POLYSIZE;
aux->maskspan = AUX_DEFAULT_MASKSPAN;
aux->masksize = AUX_DEFAULT_MASKSIZE;
aux->mapq = AUX_DEFAULT_MAPQ;

return;
Expand Down Expand Up @@ -50,46 +47,29 @@ int aux_parse(aux_config_t *aux, int argc, const char *argv[])
i += 1;
aux->mapq = (uint32_t)strtoul(argv[i], NULL, 10);
}
else if((PARAMETER_CHECK("-w", 2, parameterLength)) || (PARAMETER_CHECK("--window", 8, parameterLength)))
{
i += 1;
aux->window = (uint32_t)strtoul(argv[i], NULL, 10);
}
else if((PARAMETER_CHECK("-d", 2, parameterLength)) ||
(PARAMETER_CHECK("--depth", 7, parameterLength)))
{
i += 1;
aux->depth = (uint32_t)strtoul(argv[i], NULL, 10);
}
else if((PARAMETER_CHECK("-p", 2, parameterLength)) ||
(PARAMETER_CHECK("--polysize", 10, parameterLength)))
{
i += 1;
aux->polysize = (uint32_t)strtoul(argv[i], NULL, 10);
}
else if((PARAMETER_CHECK("-s", 2, parameterLength)) ||
(PARAMETER_CHECK("--maskspan", 10, parameterLength)))
else if((PARAMETER_CHECK("-m", 2, parameterLength)) ||
(PARAMETER_CHECK("--masksize", 10, parameterLength)))
{
i += 1;
aux->maskspan = (uint32_t)strtoul(argv[i], NULL, 10);
aux->masksize = (uint32_t)strtoul(argv[i], NULL, 10);
}
else if((PARAMETER_CHECK("-i", 2, parameterLength)) ||
(PARAMETER_CHECK("--input", 7, parameterLength)))
{
i += 1;
aux->input = argv[i];
}
else if((PARAMETER_CHECK("-m", 2, parameterLength)) ||
(PARAMETER_CHECK("--maskpoly", 10, parameterLength)))
{
i += 1;
aux->polymask = argv[i];
aux->file_in = argv[i];
}
else if((PARAMETER_CHECK("-o", 2, parameterLength)) ||
(PARAMETER_CHECK("--output", 8, parameterLength)))
else if((PARAMETER_CHECK("-r", 2, parameterLength)) ||
(PARAMETER_CHECK("--regions", 10, parameterLength)))
{
i += 1;
aux->output = argv[i];
aux->file_mask = argv[i];
}
else
{
Expand Down
13 changes: 4 additions & 9 deletions config.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@

// define some constants
#define MAX_LENGTH 1024
#define AUX_DEFAULT_WINDOW 200
#define AUX_DEFAULT_DEPTH 5
#define AUX_DEFAULT_POLYSIZE 3
#define AUX_DEFAULT_MASKSPAN 3
#define AUX_DEFAULT_MASKSIZE 3
#define AUX_DEFAULT_MAPQ 0

// define MIN & MAX macros
Expand All @@ -32,12 +30,9 @@
// define parameters
typedef struct _aux_config_t
{
const char *input;
const char *polymask;
const char *output;
uint32_t window;
uint32_t depth;
uint32_t maskspan;
const char *file_in;
const char *file_mask;
uint32_t masksize;
uint32_t polysize;
uint32_t mapq;
} aux_config_t;
Expand Down
Loading

0 comments on commit c7525ac

Please sign in to comment.