Skip to content

Commit 246df00

Browse files
committed
v11.0 - added mistake-proofing for the step parameter
1 parent 20346cd commit 246df00

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

src/freec

-10.2 KB
Binary file not shown.

src/main.cpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -816,13 +816,20 @@ int main(int argc, char *argv[])
816816

817817

818818
if (WESanalysis == false) {
819-
if (step != NA) {
820-
sampleCopyNumber.setStep(step);
821-
}
822819
if (has_sample_mateCopyNumberFile) {
823820
sampleCopyNumber.readCopyNumber(sample_MateCopyNumberFile);
824-
step = sampleCopyNumber.getStep();
821+
int step_fromProfile = sampleCopyNumber.getStep();
822+
if (step!= NA && step_fromProfile !=step) {
823+
cerr << "Error: according to " << sample_MateCopyNumberFile<< " your step paramter is equal to step_fromProfile\n";
824+
cerr << "However, you set step=" <<step<< " in your config file\n";
825+
cerr << "This created this error. Either delete \"step\" from your config or set it to the right value of "<<sample_MateCopyNumberFile<<"\n";
826+
exit (-1);
827+
}
828+
step=step_fromProfile;
825829
} else {
830+
if (step != NA) {
831+
sampleCopyNumber.setStep(step);
832+
}
826833
if (!sample_copyNumber_pileup_read && has_window) {
827834
sampleCopyNumber.readCopyNumber(sample_MateFile, sample_inputFormat, sample_mateOrientation,chrLenFile, window, step);
828835
} else if (!sample_copyNumber_pileup_read && !has_window) {

src/myFunc.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2617,8 +2617,9 @@ MateOrientation getMateOrientation(std::string const& matesOrientation)
26172617
if (matesOrientation.compare("FF") == 0 || matesOrientation.compare("RR") == 0 || matesOrientation.compare("FF/RR") == 0 || matesOrientation.compare("RR/FF") == 0) {
26182618
return SOLID_MATE_PAIRS;
26192619
}
2620-
2621-
return UNKNOWN_MATE_ORIENTATION;
2620+
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";
2621+
exit(1);
2622+
return SINGLE_END_SORTED_SAM; // instead of UNKNOWN_MATE_ORIENTATION;
26222623
}
26232624

26242625
InputFormat getInputFormat(std::string const& inputFormat)

src/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#define VERSION_H
44

55
const double VERSION_OFFSET = 3;
6-
const double FREEC_VERSION = 10.9;
6+
const double FREEC_VERSION = 11.0;
77
const double CONTROL_FREEC_VERSION = FREEC_VERSION - VERSION_OFFSET;
88

99
#endif

0 commit comments

Comments
 (0)