Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Chris Jewell
covid19uk
Commits
4afc60f0
Commit
4afc60f0
authored
Mar 17, 2021
by
Chris Jewell
Browse files
`next_generation_matrix` --> `reproduction_number`
parent
215a0ee0
Changes
3
Hide whitespace changes
Inline
Side-by-side
covid/ruffus_pipeline.py
View file @
4afc60f0
...
...
@@ -14,7 +14,7 @@ from covid.tasks import (
assemble_data
,
mcmc
,
thin_posterior
,
next_generation_matrix
,
reproduction_number
,
overall_rt
,
predict
,
summarize
,
...
...
@@ -91,11 +91,11 @@ def run_pipeline(global_config, results_directory, cli_options):
rf
.
transform
(
input
=
[[
process_data
,
thin_samples
]],
filter
=
rf
.
formatter
(),
output
=
wd
(
"
ngm
.nc"
),
)(
next_generation_matrix
)
output
=
wd
(
"
reproduction_number
.nc"
),
)(
reproduction_number
)
rf
.
transform
(
input
=
next_generation_matrix
,
input
=
reproduction_number
,
filter
=
rf
.
formatter
(),
output
=
wd
(
"national_rt.xlsx"
),
)(
overall_rt
)
...
...
@@ -146,7 +146,7 @@ def run_pipeline(global_config, results_directory, cli_options):
# Summarisation
rf
.
transform
(
input
=
next_generation_matrix
,
input
=
reproduction_number
,
filter
=
rf
.
formatter
(),
output
=
wd
(
"rt_summary.csv"
),
)(
summarize
.
rt
)
...
...
@@ -221,7 +221,7 @@ def run_pipeline(global_config, results_directory, cli_options):
insample7
,
insample14
,
medium_term
,
next_generation_matrix
,
reproduction_number
,
]
],
rf
.
formatter
(),
...
...
covid/tasks/__init__.py
View file @
4afc60f0
...
...
@@ -3,7 +3,7 @@
from
covid.tasks.assemble_data
import
assemble_data
from
covid.tasks.inference
import
mcmc
from
covid.tasks.thin_posterior
import
thin_posterior
from
covid.tasks.next_generation_matrix
import
next_generation_matrix
from
covid.tasks.next_generation_matrix
import
reproduction_number
from
covid.tasks.overall_rt
import
overall_rt
from
covid.tasks.predict
import
predict
import
covid.tasks.summarize
as
summarize
...
...
@@ -18,7 +18,7 @@ __all__ = [
"assemble_data"
,
"mcmc"
,
"thin_posterior"
,
"
next_generation_matrix
"
,
"
reproduction_number
"
,
"overall_rt"
,
"predict"
,
"summarize"
,
...
...
covid/tasks/next_generation_matrix.py
View file @
4afc60f0
...
...
@@ -47,7 +47,7 @@ def calc_posterior_rit(samples, initial_state, times, covar_data):
)
def
next_generation_matrix
(
input_files
,
output_file
):
def
reproduction_number
(
input_files
,
output_file
):
covar_data
=
xarray
.
open_dataset
(
input_files
[
0
],
group
=
"constant_data"
)
...
...
@@ -101,4 +101,4 @@ if __name__ == "__main__":
)
args
=
parser
.
parse_args
()
next_generation_matrix
([
args
.
data
,
args
.
samples
],
args
.
output
)
reproduction_number
([
args
.
data
,
args
.
samples
],
args
.
output
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment