Skip to content

Commit

Permalink
v11.0 - added mistake-proofing for the step parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
valeu committed Jul 10, 2017
1 parent 20346cd commit 246df00
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
Binary file modified src/freec
Binary file not shown.
15 changes: 11 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -816,13 +816,20 @@ int main(int argc, char *argv[])


if (WESanalysis == false) {
if (step != NA) {
sampleCopyNumber.setStep(step);
}
if (has_sample_mateCopyNumberFile) {
sampleCopyNumber.readCopyNumber(sample_MateCopyNumberFile);
step = sampleCopyNumber.getStep();
int step_fromProfile = sampleCopyNumber.getStep();
if (step!= NA && step_fromProfile !=step) {
cerr << "Error: according to " << sample_MateCopyNumberFile<< " your step paramter is equal to step_fromProfile\n";
cerr << "However, you set step=" <<step<< " in your config file\n";
cerr << "This created this error. Either delete \"step\" from your config or set it to the right value of "<<sample_MateCopyNumberFile<<"\n";
exit (-1);
}
step=step_fromProfile;
} else {
if (step != NA) {
sampleCopyNumber.setStep(step);
}
if (!sample_copyNumber_pileup_read && has_window) {
sampleCopyNumber.readCopyNumber(sample_MateFile, sample_inputFormat, sample_mateOrientation,chrLenFile, window, step);
} else if (!sample_copyNumber_pileup_read && !has_window) {
Expand Down
5 changes: 3 additions & 2 deletions src/myFunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2617,8 +2617,9 @@ MateOrientation getMateOrientation(std::string const& matesOrientation)
if (matesOrientation.compare("FF") == 0 || matesOrientation.compare("RR") == 0 || matesOrientation.compare("FF/RR") == 0 || matesOrientation.compare("RR/FF") == 0) {
return SOLID_MATE_PAIRS;
}

return UNKNOWN_MATE_ORIENTATION;
cerr << "Error: you have set an unknown read orientation: \""<<matesOrientation<<"\" ; it does not match 0, RF, FR or FF; please correct your config file.\n";
exit(1);
return SINGLE_END_SORTED_SAM; // instead of UNKNOWN_MATE_ORIENTATION;
}

InputFormat getInputFormat(std::string const& inputFormat)
Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define VERSION_H

const double VERSION_OFFSET = 3;
const double FREEC_VERSION = 10.9;
const double FREEC_VERSION = 11.0;
const double CONTROL_FREEC_VERSION = FREEC_VERSION - VERSION_OFFSET;

#endif

0 comments on commit 246df00

Please sign in to comment.