Skip to content

Commit

Permalink
Merge branch 'hotfix/1.13.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
David Jones committed Mar 10, 2018
2 parents 60a8d97 + e65da72 commit 635c7e2
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 27 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGES

## 1.13.1

* Ensure all `sentinel` calls return non-zero exit code.

## 1.13.0

* Overlapping reads now handled #78
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CAVEMAN_VERSION=1.13.0
CAVEMAN_VERSION=1.13.1
TEST_REF?=""
#Compiler
CC?=gcc
Expand Down
2 changes: 1 addition & 1 deletion src/alg_bean.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ alg_bean_t *alg_bean_read_file(FILE *file){
bean->lane = lanes_list;
bean->lane_size = List_count(lanes_list);
}else{
sentinel("Unrecognised id passed: %s.",text_id);
sentinel("Unrecognised id passed: %s.",text_id,1);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/cn_access.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ int8_t cn_access_get_copy_number_for_location(char *file_loc,char *chr,uint32_t
}
}
}else{
sentinel("Somehow copy number for location %s:%d was not available.",chr,pos);
sentinel("Somehow copy number for location %s:%d was not available.",chr,pos,1);
}
return cn;
error:
Expand Down
4 changes: 2 additions & 2 deletions src/config_file_access.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ int config_file_access_read_config_file(FILE *file, char *tum_bam_file, char *no
check(chk!=NULL,"Error retrieving CWD when reading config file.");
if(strcmp(cur_wd,value)!=0){
sentinel("Your current working directory '%s' is not the same as the directory you setup CaVEMan: '%s'. Please change to that directory and try again.",
cur_wd,value);
cur_wd,value,1);
}
}else if(strcmp(MUT_TUM,key)==0){
strcpy(tum_bam_file,value);
Expand Down Expand Up @@ -118,7 +118,7 @@ int config_file_access_read_config_file(FILE *file, char *tum_bam_file, char *no
}else if(strcmp(TUM_CN_KEY,key)==0){
strcpy(tum_cn,value);
}else{
sentinel("Unrecognised key in config file '%s'.",key);
sentinel("Unrecognised key in config file '%s'.",key,1);
}
}

Expand Down
28 changes: 14 additions & 14 deletions src/estep.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void estep_setup_options(int argc, char *argv[]){

case 'M':
if(sscanf(optarg, "%i", &cn) != 1){
sentinel("Error parsing -M argument '%s'. Should be an integer > 0",optarg);
sentinel("Error parsing -M argument '%s'. Should be an integer > 0",optarg,1);
}
cn_access_set_max_cn(cn);
break;
Expand All @@ -215,79 +215,79 @@ void estep_setup_options(int argc, char *argv[]){

case 'n':
if(sscanf(optarg, "%i", &normal_copy_number) != 1){
sentinel("Error parsing -n argument '%s'. Should be an integer > 0",optarg);
sentinel("Error parsing -n argument '%s'. Should be an integer > 0",optarg,1);
}
break;

case 't':
if(sscanf(optarg, "%i", &tumour_copy_number) != 1){
sentinel("Error parsing -t argument '%s'. Should be an integer > 0",optarg);
sentinel("Error parsing -t argument '%s'. Should be an integer > 0",optarg,1);
}
break;

case 'i':
if(sscanf(optarg, "%i", &idx) != 1){
sentinel("Error parsing -i argument '%s'. Should be an integer > 0",optarg);
sentinel("Error parsing -i argument '%s'. Should be an integer > 0",optarg,1);
}
break;

case 'm':
if(sscanf(optarg, "%i", &min_bq) != 1){
sentinel("Error parsing -m argument '%s'. Should be an integer >= 0",optarg);
sentinel("Error parsing -m argument '%s'. Should be an integer >= 0",optarg,1);
}
break;

case 'k':
if(sscanf(optarg, "%f", &norm_contam) != 1){
sentinel("Error parsing -k argument '%s'. Should be a float >= 0.0.",optarg);
sentinel("Error parsing -k argument '%s'. Should be a float >= 0.0.",optarg,1);
}
break;

case 'd':
if(sscanf(optarg, "%f", &prior_snp_prob) != 1){
sentinel("Error parsing -d argument '%s'. Should be a float > 0.0.",optarg);
sentinel("Error parsing -d argument '%s'. Should be a float > 0.0.",optarg,1);
}
break;

case 'c':
if(sscanf(optarg, "%f", &prior_mut_prob) != 1){
sentinel("Error parsing -c argument '%s'. Should be a float > 0.0.",optarg);
sentinel("Error parsing -c argument '%s'. Should be a float > 0.0.",optarg,1);
}
break;

case 'b':
if(sscanf(optarg, "%f", &ref_bias) != 1){
sentinel("Error parsing -b argument '%s'. Should be a float >= 0.0.",optarg);
sentinel("Error parsing -b argument '%s'. Should be a float >= 0.0.",optarg,1);
}
break;

case 'p':
if(sscanf(optarg, "%f", &min_mut_prob) != 1){
sentinel("Error parsing -p argument '%s'. Should be a float >= 0.0.",optarg);
sentinel("Error parsing -p argument '%s'. Should be a float >= 0.0.",optarg,1);
}
break;

case 'q':
if(sscanf(optarg, "%f", &min_snp_prob) != 1){
sentinel("Error parsing -q argument '%s'. Should be a float >= 0.0.",optarg);
sentinel("Error parsing -q argument '%s'. Should be a float >= 0.0.",optarg,1);
}
break;

case 'x':
if(sscanf(optarg, "%i", &min_tum_cvg) != 1){
sentinel("Error parsing -x argument '%s'. Should be an integer > 0",optarg);
sentinel("Error parsing -x argument '%s'. Should be an integer > 0",optarg,1);
}
break;

case 'y':
if(sscanf(optarg, "%i", &min_norm_cvg) != 1){
sentinel("Error parsing -y argument '%s'. Should be an integer > 0",optarg);
sentinel("Error parsing -y argument '%s'. Should be an integer > 0",optarg,1);
}
break;

case 'a':
if(sscanf(optarg, "%i", &split_size) != 1){
sentinel("Error parsing -a argument '%s'. Should be an integer >= 0",optarg);
sentinel("Error parsing -a argument '%s'. Should be an integer >= 0",optarg,1);
}
break;

Expand Down
2 changes: 1 addition & 1 deletion src/generateCavemanVCFUnmatchedNormalPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ List *gen_panel_get_list_of_samples_and_locs(){
bamchar = strtok(bam_file_locs,",");
LIST_FOREACH(samples, first, next, cur){
if(bamchar == NULL){
sentinel("List of sample names and bam locations are not equal in length.");
sentinel("List of sample names and bam locations are not equal in length.",1);
}
((sample_bam *)cur->value)->bam_file = malloc(sizeof(char) * (strlen(bamchar) + 1));
check_mem(((sample_bam *)cur->value)->bam_file);
Expand Down
2 changes: 1 addition & 1 deletion src/genotype.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void genotype_add_base_to_count(genotype_t *geno, const char base){
break;

default:
sentinel("Incorrect base passed to add: %c",base);
sentinel("Incorrect base passed to add: %c",base,1);
break;
};
return;
Expand Down
2 changes: 1 addition & 1 deletion src/ignore_reg_access.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ int ignore_reg_access_get_ign_reg_for_chr(char *ign_file,char *chr, int entry_co
}
}else{
free(chr_nom);
sentinel("Incorrect line read from ignore file %s.",rd);
sentinel("Incorrect line read from ignore file %s.",rd,1);
}
free(chr_nom);
}
Expand Down
6 changes: 3 additions & 3 deletions src/mstep.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,19 @@ void mstep_setup_options(int argc, char *argv[]){

case 'i':
if(sscanf(optarg, "%i", &idx) != 1){
sentinel("Error parsing -i argument '%s'. Should be an integer > 0",optarg);
sentinel("Error parsing -i argument '%s'. Should be an integer > 0",optarg,1);
}
break;

case 'm':
if(sscanf(optarg, "%i", &min_bq) != 1){
sentinel("Error parsing -m argument '%s'. Should be an integer >= 0",optarg);
sentinel("Error parsing -m argument '%s'. Should be an integer >= 0",optarg,1);
}
break;

case 'a':
if(sscanf(optarg, "%i", &split_size) != 1){
sentinel("Error parsing -a argument '%s'. Should be an integer > 0",optarg);
sentinel("Error parsing -a argument '%s'. Should be an integer > 0",optarg,1);
}
break;

Expand Down
4 changes: 2 additions & 2 deletions src/split.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ void split_setup_options(int argc, char *argv[]){

case 'i':
if(sscanf(optarg, "%i", &idx) != 1){
sentinel("Error parsing -i argument '%s'. Should be an integer > 0",optarg);
sentinel("Error parsing -i argument '%s'. Should be an integer > 0",optarg,1);
}
break;

case 'e':
if(sscanf(optarg, "%i", &max_read_count) != 1){
sentinel("Error parsing -e argument '%s'. Should be an integer > 0",optarg);
sentinel("Error parsing -e argument '%s'. Should be an integer > 0",optarg,1);
}
break;

Expand Down

0 comments on commit 635c7e2

Please sign in to comment.