SPIMDatasetProvider: SPIM private data

Description Super classes Methods Examples

Description

SPIM private data

SPIM private data

Super classes

ukcovidtools::PassthroughFilesystemCache -> ukcovidtools::DataProvider -> ukcovidtools::CovidTimeseriesProvider -> SPIMDatasetProvider

Methods

Public methods

Inherited methods

Method new()

Usage
SPIMDatasetProvider$new(providerController, fileProvider, ...)

Method getPaths()

Search a file path for the

Usage
SPIMDatasetProvider$getPaths(...)
Arguments
path

- path to the line list file

Returns

raw line list data set


Method getLatest()

Usage
SPIMDatasetProvider$getLatest(search)

Method getNewerThan()

Usage
SPIMDatasetProvider$getNewerThan(search, date = as.Date("2020-01-01"))

Method getSpecificDates()

Usage
SPIMDatasetProvider$getSpecificDates(search, dates)

Method getLatestRawFile()

Usage
SPIMDatasetProvider$getLatestRawFile(filter, to = getwd())

Method getOneOneOne()

Load 111 data

Usage
SPIMDatasetProvider$getOneOneOne(...)
Returns

a covidTimeseriesFormat dataframe


Method getOneOneOneLineList()

Usage
SPIMDatasetProvider$getOneOneOneLineList(dateFrom = Sys.Date() - 28, ...)

Method getOneOneOneIncidence()

Usage
SPIMDatasetProvider$getOneOneOneIncidence(dateFrom = Sys.Date() - 28, ...)

Method getDeathsLineList()

Load line list

Usage
SPIMDatasetProvider$getDeathsLineList(...)
Arguments
path

- path to the line list file

Returns

raw line list data set


Method getDeathsLineListIncidence()

Load deaths data from linelist - does not preserve ethnicity

Usage
SPIMDatasetProvider$getDeathsLineListIncidence(
  ageBreaks = NULL,
  deathOrReport = "death",
  cutoff = 28,
  subgroup = NULL,
  gender = FALSE,
  filterExpr = !(is.na(death_type28) & is.na(death_type60cod) & is.na(covidcod)),
  codeTypes = c("CTRY", "NHSER"),
  truncate = NULL,
  ...
)
Arguments
ageBreaks

- a list of ages which form the cut points for breaking continuous ages into ranges (or NULL for a single age category)

Returns

a covidTimeseriesFormat dataframe


Method getVoc351LineList()

Usage
SPIMDatasetProvider$getVoc351LineList(...)

Method getVAMLineList()

Usage
SPIMDatasetProvider$getVAMLineList(...)

Method getCTASLineList()

Usage
SPIMDatasetProvider$getCTASLineList(...)

Method getImmunizationLineList()

Load immunizations line list

Usage
SPIMDatasetProvider$getImmunizationLineList(...)
Returns

raw line list data set


Method getImmunizationLineListIncidence()

Load incidence from line list

Usage
SPIMDatasetProvider$getImmunizationLineListIncidence(
  ll = NULL,
  ageBreaks = NULL,
  filterExpr = NULL,
  subgroup = "string_dose_number",
  ...
)
Arguments
ageBreaks

- a list of ages which form the cut points for breaking continuous ages into ranges (or NULL for a single age category)

Returns

a covidTimeseriesFormat dataframe


Method getImmunizationFraction()

Usage
SPIMDatasetProvider$getImmunizationFraction(ageBreaks = NULL, ...)

Method getSGeneLineList()

Load line list

Usage
SPIMDatasetProvider$getSGeneLineList(...)
Returns

raw line list data set Interpret S gene status according to various cut off values function to help interpret S gene CT values in context of N gene and ORF gene to give S gene status. With the defaults this produces the same result as the sgtf_30 column in the source SGTF line list Defaults are S:30,ORF:30,N:30,Control:Inf


Method interpretSGene()

Usage
SPIMDatasetProvider$interpretSGene(
  sGeneLineList,
  S_CT = 30,
  ORF1ab_CT = 30,
  N_CT = 30,
  Control_CT = Inf,
  ...
)
Arguments
sGeneLineList

- a dataframe includeing

S_CT

- S gene detected when P2CH3CQ <= this value

ORF1ab_CT

- ORF1ab gene detected when P2CH1CQ <= this value

N_CT

- N gene detected when P2CH2CQ <= this value

Control_CT

- control sample is positive when P2CH4CQ <= this value

Returns

- the same dataframe with additional columns including "sGene" and "result"

Examples
coxData = coxData %>% interpretSGene()

Method getSGeneEras()

Usage
SPIMDatasetProvider$getSGeneEras(
  cutoff = 28,
  S_CT = 30,
  ORF1ab_CT = 30,
  N_CT = 30,
  Control_CT = Inf,
  ...
)

Method getSDropoutFreqency()

Usage
SPIMDatasetProvider$getSDropoutFreqency(
  codeTypes = c("NHSER"),
  ageBreaks = NULL,
  S_CT = 30,
  ORF1ab_CT = 30,
  N_CT = 30,
  equivocal.rm = TRUE,
  window = 7,
  ll = NULL,
  sgll = NULL,
  ...
)

Method getLineList()

Load line list

Usage
SPIMDatasetProvider$getLineList(...)
Returns

raw line list data set


Method augmentLineListWithLSOA()

Usage
SPIMDatasetProvider$augmentLineListWithLSOA(
  ll,
  ltlaCodeCol = "LTLA_code",
  imdRankCol = "imd_rank"
)

Method getLineListIncidence()

Load incidence from line list

Usage
SPIMDatasetProvider$getLineListIncidence(
  ll = NULL,
  ageBreaks = NULL,
  gender = FALSE,
  specimenOrReport = "specimen",
  subgroup = "pillar",
  filterExpr = NULL,
  codeTypes = c("CTRY", "NHSER"),
  truncate = NULL,
  ...
)
Arguments
ageBreaks

- a list of ages which form the cut points for breaking continuous ages into ranges (or NULL for a single age category)

Returns

a covidTimeseriesFormat dataframe


Method getInfectionEpisodes()

Combine line list and S-gene line list to get a list of infection episodes

this defines how long between tests before two tests are regarded as a new episode. if the tests are sgtf equivocal double this is allowed. calculate the individual episodes of covid resulting from runs of sequential positive tests <28 days apart.

Usage
SPIMDatasetProvider$getInfectionEpisodes(
  cutoff = 28,
  S_CT = 30,
  ORF1ab_CT = 30,
  N_CT = 30,
  Control_CT = Inf,
  ...
)
Arguments
cutoff

- the time gap between sequential tests after which two tests are said to be from a new episode

S_CT

- S gene detected when P2CH3CQ <= this value

ORF1ab_CT

- ORF1ab gene detected when P2CH1CQ <= this value

N_CT

- N gene detected when P2CH2CQ <= this value

Control_CT

- control sample is positive when P2CH4CQ <= this value

Returns

a covidTimeseriesFormat dataframe


Method getNegatives()

Usage
SPIMDatasetProvider$getNegatives(
  codeTypes = c("CTRY", "NHSER"),
  truncate = NULL,
  ...
)

Method getSeroprevalence()

Load the seroprevalance file

Usage
SPIMDatasetProvider$getSeroprevalence(...)
Returns

raw FF100 data set


Method getSeroprevalenceTestIncidence()

Load seroprevalence data from linelist

Usage
SPIMDatasetProvider$getSeroprevalenceTestIncidence(ageBreaks = NULL, ...)
Arguments
ageBreaks

- a list of ages which form the cut points for breaking continuous ages into ranges (or NULL for a single age category)

Returns

a covidTimeseriesFormat dataframe


Method getFF100()

Load ff100 file

Usage
SPIMDatasetProvider$getFF100()
Returns

raw FF100 data set


Method getCHESS()

Load the CHESS dataset from a path

Usage
SPIMDatasetProvider$getCHESS()
Arguments
path

- a path to the chess csv file

Returns

raw CHESS data set


Method getSARI()

Load the CHESS dataset from a path

Usage
SPIMDatasetProvider$getSARI()
Arguments
path

- a path to the chess csv file

Returns

raw CHESS data set


Method getCHESSSummary()

Load Chess summary file

Usage
SPIMDatasetProvider$getCHESSSummary()

Method getSARISummary()

Load Sari summary file

Usage
SPIMDatasetProvider$getSARISummary(truncate = NULL, ...)

Method getFourNationsCases()

Usage
SPIMDatasetProvider$getFourNationsCases(truncate = NULL, ...)

Method getSPIMextract()

Load the SPI-M aggregated data spreadsheet

Usage
SPIMDatasetProvider$getSPIMextract(truncate = NULL, ...)
Returns

a covidTimeseriesFormat dataframe


Method getTheSPIMFireHose()

Load the SPI-M and public data

Usage
SPIMDatasetProvider$getTheSPIMFireHose(...)
Returns

a covidTimeseriesFormat dataframe


Method clone()

The objects of this class are cloneable with this method.

Usage
SPIMDatasetProvider$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

1
2
3
4
5
## ------------------------------------------------
## Method `SPIMDatasetProvider$interpretSGene`
## ------------------------------------------------

coxData = coxData %>% interpretSGene()

terminological/uk-covid-datatools documentation built on June 24, 2021, 8:16 p.m.