[med-svn] [Git][med-team/simrisc][upstream] New upstream version 14.05.00
Frank B. Brokken (@fbb-guest)
gitlab at salsa.debian.org
Sun May 23 09:17:30 BST 2021
Frank B. Brokken pushed to branch upstream at Debian Med / simrisc
Commits:
db3173d8 by Frank B. Brokken at 2021-05-23T10:17:08+02:00
New upstream version 14.05.00
- - - - -
14 changed files:
- VERSION
- build
- changelog
- documentation/man/simrisc.yo
- main.cc
- screening/beir7err.cc → screening/beir7err1.cc
- + screening/beir7err2.cc
- + screening/errrisk1404.cc
- + screening/errrisk1405.cc
- screening/radiationrisk.cc
- screening/screening.h
- screening/screening.ih
- screening/screening1.cc
- usage.cc
Changes:
=====================================
VERSION
=====================================
@@ -1,3 +1,3 @@
#define AUTHOR "Frank B. Brokken (f.b.brokken at rug.nl)";
-#define VERSION "14.04.00"
+#define VERSION "14.05.00"
#define YEARS "2020-2021"
=====================================
build
=====================================
@@ -1,4 +1,4 @@
-#!/usr/bin/icmake -qt.
+#!/usr/bin/icmake -t.
#define LOGENV "SIMRISC"
=====================================
changelog
=====================================
@@ -1,3 +1,11 @@
+simrisc (14.05.00)
+
+ * Added option --err (-e) to select the previously used but inorrect
+ algorithm for computing the Beir7 risk vector, instead of using the
+ (now default) correct algorithm for computing the risk vector.
+
+ -- Frank B. Brokken <f.b.brokken at rug.nl> Sat, 22 May 2021 22:09:08 +0200
+
simrisc (14.04.00)
* Modalities support spread-variation. See the simriscparams(7) man-page for
=====================================
documentation/man/simrisc.yo
=====================================
@@ -91,6 +91,14 @@ filenames) are capitalized, all other single-letter options are lowercase.
also requires the specification of tt(tumor-age), and is mutually
exclusive with the tt(case) option;
+ it() loption(err) (soption(e))nl()
+ before version 14.05.00 the Beir7 risk vector was computed using an
+ incorrect algorithm. The error was fixed in simrisc 14.05.00. When it
+ is required to use the erroneous algorithm, e.g., to compare the
+ results of simulations with previously obtained results, option tt(-e)
+ must be specified. However, option tt(-e) should not be used for real
+ simulations;
+
it() loption(help) (soption(h))nl()
shows help information and terminates;
=====================================
main.cc
=====================================
@@ -9,6 +9,7 @@ Arg::LongOption g_longOpts[] =
Arg::LongOption{"config", 'C'},
Arg::LongOption{"data", 'D'},
Arg::LongOption{"death-age", 'a'},
+ Arg::LongOption{"err", 'e'},
Arg::LongOption{"help", 'h'},
Arg::LongOption{"last-case", 'l'},
Arg::LongOption{"one-analysis", 'o'},
@@ -27,7 +28,7 @@ auto const *g_longEnd = g_longOpts + size(g_longOpts);
int main(int argc, char **argv)
try
{
- Arg const &arg = Arg::initialize("a:B:l:C:D:hoP:R:S:s:t:vV",
+ Arg const &arg = Arg::initialize("a:B:el:C:D:hoP:R:S:s:t:vV",
g_longOpts, g_longEnd, argc, argv);
arg.versionHelp(usage, Icmake::version, arg.option('o') ? 0 : 1);
=====================================
screening/beir7err.cc → screening/beir7err1.cc
=====================================
=====================================
screening/beir7err2.cc
=====================================
@@ -0,0 +1,18 @@
+//#define XERR
+#include "screening.ih"
+
+// static
+double Screening::beir7Err(uint16_t age,
+ Round const &round, uint16_t biradIdx, double beta,
+ double eta, Modalities const &modalities)
+{
+ double risk = 1;
+
+ double factor = beta * pow(age / 60.0, eta) / 1000;
+
+ for (ModBase const *modBase: modalities.use(round.modalityIndices()))
+ risk *= (1 + factor * modBase->dose(biradIdx));
+
+ return risk;
+}
+
=====================================
screening/errrisk1404.cc
=====================================
@@ -0,0 +1,17 @@
+//#define XERR
+#include "screening.ih"
+
+// static
+void Screening::errRisk1404(DoubleVect &vect,
+ Modalities const &modalities,
+ Round const &round,
+ uint16_t biRadIdx,
+ double beta, double eta)
+{
+ // compute beir7Err once,
+ double error = beir7Err(round, biRadIdx, beta, eta, modalities);
+
+ // then visit all subsequent ages
+ for (uint16_t age = round.rndAge() + 1; age != END_AGE; ++age)
+ vect[age] *= error;
+}
=====================================
screening/errrisk1405.cc
=====================================
@@ -0,0 +1,14 @@
+//#define XERR
+#include "screening.ih"
+
+// static
+void Screening::errRisk1405(DoubleVect &vect,
+ Modalities const &modalities,
+ Round const &round, uint16_t biRadIdx,
+ double beta, double eta)
+{
+ // visit all subsequent ages, and compute
+ // beir7Err separately for each age
+ for (uint16_t age = round.rndAge() + 1; age != END_AGE; ++age)
+ vect[age] *= beir7Err(age, round, biRadIdx, beta, eta, modalities);
+}
=====================================
screening/radiationrisk.cc
=====================================
@@ -8,26 +8,20 @@ DoubleVect Screening::radiationRisk(
Uint16Vect const &biRadIndices,
double beta, double eta) // beir7 values
{
- DoubleVect radiationRiskVect = DoubleVect(END_AGE, 1);
+ DoubleVect vect = DoubleVect(END_AGE, 1);
for (size_t rndIdx = 0, end = d_roundVect.size(); rndIdx != end; ++rndIdx)
{
- auto const &round = d_roundVect[rndIdx]; // use round[rndIdx]
-
- // use the bi-rad index
- // of the round's age
- uint16_t biRadIdx = biRadIndices[rndIdx]; // categroy
-
- if (Random::instance().uniform() > d_rate)
- continue;
-
- double error = beir7Err(round, biRadIdx, beta, eta, modalities);
-
- for (uint16_t age = round.rndAge() + 1; age != END_AGE; ++age)
- radiationRiskVect[age] *= error;
+ if (Random::instance().uniform() <= d_rate)
+ (*d_errRiskVector)
+ (
+ vect, modalities,
+ d_roundVect[rndIdx], biRadIndices[rndIdx],
+ beta, eta
+ );
}
- return radiationRiskVect;
+ return vect;
}
=====================================
screening/screening.h
=====================================
@@ -42,6 +42,10 @@ class Screening
double d_rate;
+ // points to static members: // errRisk1404 or
+ void (*d_errRiskVector)(DoubleVect &, // errRiskA1405
+ Modalities const &,
+ Round const &, uint16_t, double, double);
public:
Screening(Modalities const &modalities);
@@ -71,9 +75,25 @@ class Screening
bool increasingAge(Round const &round) const;
+ static void errRisk1404(DoubleVect &riskVect,
+ Modalities const &modalities,
+ Round const &round, uint16_t biRadIdx,
+ double beta, double eta);
+
+ static void errRisk1405(DoubleVect &riskVect,
+ Modalities const &modalities,
+ Round const &round, uint16_t biRadIdx,
+ double beta, double eta);
+
+ // called by errRiskRelative
static double beir7Err(Round const &round, uint16_t idx, double beta,
double eta, Modalities const &modalities);
+ // called by earRisk
+ static double beir7Err(uint16_t age, Round const &round,
+ uint16_t idx, double beta, double eta,
+ Modalities const &modalities);
+
};
inline double Screening::rate() const
=====================================
screening/screening.ih
=====================================
@@ -1,13 +1,7 @@
#include "screening.h"
#include "../xerr/xerr.ih"
-//#include <cmath>
-//#include <sstream>
-
-//#include <bobcat/mstream>
-
-// #include "../enums/enums.h"
-// #include "../error/error.h"
+#include <bobcat/arg>
#include "../random/random.h"
#include "../modbase/modbase.h"
=====================================
screening/screening1.cc
=====================================
@@ -4,7 +4,8 @@
Screening::Screening(Modalities const &modalities)
:
d_modalities(modalities),
- d_base{ "Screening:", "" }
+ d_base{ "Screening:", "" },
+ d_errRiskVector(Arg::instance().option('e') ? errRisk1404 : errRisk1405)
{
setAttendanceRate();
setRounds();
=====================================
usage.cc
=====================================
@@ -25,8 +25,11 @@ Where:
'<base>/data-$.txt', use ! to suppress)
--death-age (-a) age - run one simulation using a specific natural
death-age (also requires --tumor-age)
+ --err (-e) - use the previously used Beir7 ERR function
+ (excess relative risk) instead of the
+ excess absolute risk function, using the
+ cases' subsequent simulated ages;
--help (-h) - provide this help
-
--last-case (-l) nCases - perform simulations until 'nCases' have been
analyzed and only write the data for the
final case to the data file;
View it on GitLab: https://salsa.debian.org/med-team/simrisc/-/commit/db3173d816e28070d65b35b99712d597e5e1b83e
--
View it on GitLab: https://salsa.debian.org/med-team/simrisc/-/commit/db3173d816e28070d65b35b99712d597e5e1b83e
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20210523/15cfbbac/attachment-0001.htm>
More information about the debian-med-commit
mailing list