Package 'NMTox'

Title: Dose-Response Relationship Analysis of Nanomaterial Toxicity
Description: Perform an exploration and a preliminary analysis on the dose- response relationship of nanomaterial toxicity. Several functions are provided for data exploration, including functions for creating a subset of dataset, frequency tables and plots. Inference for order restricted dose- response data is performed by testing the significance of monotonic dose-response relationship, using Williams, Marcus, M, Modified M and Likelihood ratio tests. Several methods of multiplicity adjustment are also provided. Description of the methods can be found in <https://github.com/rahmasarina/dose-response-analysis/blob/main/Methodology.pdf>.
Authors: Rahmasari Nur Azizah [aut, cre], Geert Verheyen [aut, ths], Sabine Van Miert [aut, ths], Ziv Shkedy [aut, ths]
Maintainer: Rahmasari Nur Azizah <[email protected]>
License: GPL-3
Version: 0.1.0
Built: 2024-10-14 04:16:58 UTC
Source: https://github.com/cran/NMTox

Help Index


Plot the adjusted p-values, raw p-values and FDR level

Description

This function generates plots of adjusted p-values, raw p-values and selected FDR level

Usage

adjPlot(data.nm, data.control, id, nano, response, dose, end, end.cat,
  unit, unit.cat, stat=c("E2","Williams","Marcus","M","ModM"), niter,
  method=c("BH","BY"), control.opt=c("same","all"), set.seed, vars, FDR)

Arguments

data.nm

Data containing the result of toxicity study

data.control

Data of control values

id

Identifier of the experiment

nano

Name of the nanomaterial

response

Response (endpoint value)

dose

Dose or concentration

end

Toxicity endpoint

end.cat

Specific toxicity endpoint of interest

unit

Unit of measurement of the dose

unit.cat

Specific unit of measurement of the dose

stat

Test statistics ("E2" for the global likelihood test, "Williams" for Williams test, "Marcus" for Marcus test, "M" for M test or "ModM" for modified M test)

niter

Number of permutations

method

Method used to adjust for the multiplicity

control.opt

Option for the control doses if unit and unit.cat are specified. If only control doses with the same unit of measurement as the non-control ones are included, then specify "same" in the control.opt. If all control doses with any units of measurement are included, then specify "all".

set.seed

Specify seed

vars

Variable(s) used to subset the data

FDR

The desired FDR to control

Details

  • This function calculates the p-values for each nanomaterial in the dataset (or for each subset of data). The different types of nanomaterials are identified by their names. Therefore, if some control values are named differently (see: geninvitro dataset and the Examples), a separate dataset containing only these values first needs to be created. Controls in the new dataset can be linked to the non-control observations belonging to the same experiment through the identifier of the experiment (the linking is performed inside this function). In this situation, it is necessary to have an indicator that can identify different experiments (such as experiment ID).

  • If all controls in the dataset are named according to the related nanomaterial names, data.control and id do not need to be specified.

  • If doses used in the experiment are all measured in the same unit of measurement, then specify "same" in control.opt.

  • Plots can also be generated for subsets of data in each nanomaterial, by specifying the variables used to split the data in vars.

Value

This function generates plots of adjusted p-values, raw p-values and selected FDR for both directions (up and down) of the trend

References

Lin D., Pramana, S., Verbeke, T., and Shkedy, Z. (2015). IsoGene: Order-Restricted Inference for Microarray Experiments. R package version 1.0-24. https://CRAN.R-project.org/package=IsoGene

Lin D., Shkedy Z., Yekutieli D., Amaratunga D., and Bijnens, L. (editors). (2012) Modeling Doseresponse Microarray Data in Early Drug Development Experiments Using R. Springer.

Examples

# Create a dataset containing controls (which are named differently)
# from geninvitro dataset:
controldata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
             "medium", "medium + BSA", "untreated"))

# Exclude controls (which are named differently) from geninvitro dataset:
invitrodata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
             "medium", "medium + BSA", "untreated"), include=FALSE)
#
adjPlot(data.nm=invitrodata, data.control=controldata, id="experimentID",
nano="name", response="value", dose="concentration", end="endpoint",
end.cat="DNA STRAND BREAKS", unit="concentration_unit", unit.cat="ug/cm2",
stat="E2", niter=1000, method="BH", control.opt="same",
set.seed = 1234, FDR=0.05)

Create a frequency table of the control values

Description

This function provides a table containing the frequencies of the control values and the number of available data in the specified dataset. Since it is possible to have a dose with different units of measurement in one dataset, this function helps in showing how many control values are available for each nanomaterial for a specific unit of measurement of the dose.

Usage

FrCtrl(data.nm, data.control, id, nano, dose, end, end.cat, unit,
  unit.cat, vars)

Arguments

data.nm

Data containing the result of toxicity study

data.control

Data of control values

id

Identifier of the experiment

nano

Name of the nanomaterial

dose

Dose or concentration

end

Toxicity endpoint

end.cat

Specific toxicity endpoint of interest

unit

Unit of measurement of the dose

unit.cat

Specific unit of measurement of the dose

vars

Variables used to subset the data

Details

  • This function performs data exploration for each nanomaterial in the dataset (or for each subset of data). The different types of nanomaterials are identified by their names. Therefore, if some control values are named differently (see: geninvitro dataset and the Examples), a separate dataset containing only these values first needs to be created. Controls in the new dataset can be linked to the non-control observations belonging to the same experiment through the identifier of the experiment (the linking is performed inside this function). In this situation, it is necessary to have an indicator that can identify different experiments (such as experiment ID).

  • If all controls in the dataset are named according to the related nanomaterial names, data.control and id do not need to be specified.

  • The exploration can also be performed on the subsets of data by splitting the data of each nanomaterial according to the variable(s) specified in vars

Value

The value returned from FrCtrl is a table containing:

  • Freq(Dose=0.0).same: frequency of control values with dose measured in unit.cat

  • Freq(obs).same: number of observations with dose measured in unit.cat

  • Freq(Dose=0.0).all: frequency of control values with dose measured unit.cat and in other units of measurement

  • Freq(obs).all: number of observations with dose measured in unit.cat and control dose measured in any units,

for each nanomaterial or subset of data

Examples

# Create a dataset containing controls (which are named differently)
# from geninvitro dataset:
controldata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
             "medium", "medium + BSA", "untreated"))

# Exclude controls (which are named differently) from geninvitro dataset:
invitrodata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
             "medium", "medium + BSA", "untreated"), include=FALSE)

# Frequency of controls for each nanomaterial in geninvitro dataset
# with DNA STRAND BREAKS as the toxicity endpoint and concentration
# measured in "ug/cm2":
#
FrCtrl(data.nm=invitrodata, data.control=controldata, nano="name",
       end="endpoint", end.cat="DNA STRAND BREAKS", id="experimentID",
       dose="concentration", unit="concentration_unit", unit.cat="ug/cm2")

# Frequency of controls for each cell type in each nanomaterial
# (in geninvitro dataset) with DNA STRAND BREAKS as the toxicity
# endpoint and concentration measured in "ug/cm2":
#
FrCtrl(data.nm=invitrodata, data.control=controldata, nano="name",
       end="endpoint", end.cat="DNA STRAND BREAKS", id="experimentID",
       dose="concentration", unit="concentration_unit", unit.cat="ug/cm2",
       vars="celltype")

Generate the number of unique values, the list of unique values, or the number of observations of specified variable(s)

Description

This function produces the number of unique values, the list of unique values, or the number of observations of certain variable(s) in the dataset

Usage

Frtab(data, x, cat, val, opt=c("un", "list", "obs", "ls.obs"),
  na.rm=FALSE)

Arguments

data

Dataset

x

Variable(s) to be explored

cat

Variable used to group or subset the data

val

Specific value of variable cat. If val is specified, then only result for this value will be shown.

opt

Options for the result: If opt is un, then the number of unique values of x will be counted. If opt is list, then the list of unique values of x will be generated. If opt is obs, then the number of observations of x will be counted. If opt is ls.obs, then the number of observations for each unique value will be generated.

na.rm

If na.rm is FALSE (the default), then missing values are not removed from the dataset. If na.rm=TRUE, then missing values are removed from the dataset

Value

This function generates the number of unique values, the list of unique values, or the number of observations of specified variable(s).

Examples

# List of nanomaterial in geninvitro dataset:
Frtab(data=geninvitro, x="name", opt="list")

# How many types of endpoint are measured in geninvitro data?
Frtab(data=geninvitro, x="endpoint", opt="un")

# How many observations are available for variable "unit"?
Frtab(data=geninvitro, x="unit", opt="obs")

# How many types of endpoint and nanomaterial are available in geninvitro data?
Frtab(data=geninvitro, x=c("name","endpoint"), opt="un")

# How many types of endpoint are available for each nanomaterial
# in geninvitro data?
Frtab(data=geninvitro, x="endpoint", cat="name", opt="un")

# How many observations are available for each endpoint in each nanomaterial?
Frtab(data=geninvitro, x=c("name","endpoint"), opt="ls.obs")

# How many observations with "DNA STRAND BREAKS" as the endpoint are available
# for each nanomaterial in geninvitro data?
Frtab(data=geninvitro, x="name", cat="endpoint", val="DNA STRAND BREAKS",
opt="ls.obs")

Count the number of observations for each unique value of a variable on a subset of data

Description

This function counts the number of observations for each unique value of a variable on a subset of data. The subset of data is created according to the specified endpoint and unit of measurement of the dose.

Usage

Frtab.sub(data.nm, data.control, id, nano, dose, end, end.cat, unit,
  unit.cat, control.opt=c("same","all"), x)

Arguments

data.nm

Data containing the result of toxicity study

data.control

Data of control values

id

Identifier of the experiment

nano

Name of the nanomaterial

dose

Dose or concentration

end

Toxicity endpoint

end.cat

Specific toxicity endpoint of interest

unit

Unit of measurement of the dose

unit.cat

Specific unit of measurement of the dose

control.opt

Option for the control doses. If only control doses with the same unit of measurement as the non-control ones are included, then specify "same" in the control.opt. If all control doses with any units of measurement are included, then specify "all".

x

Variable to be explored

Details

  • This function counts for each nanomaterial in the dataset. The different types of nanomaterials are identified by their names. Therefore, if some control values are named differently (see: geninvitro dataset and the Examples), a separate dataset containing only these values first needs to be created. Controls in the new dataset can be linked to the non-control observations belonging to the same experiment through the identifier of the experiment (the linking is performed inside this function). In this situation, it is necessary to have an indicator that can identify different experiments (such as experiment ID).

  • If all controls in the dataset are named according to the related nanomaterial names, data.control and id do not need to be specified.

  • If doses used in the experiment are all measured in the same unit of measurement, then specify "same" in control.opt.

Value

This function generates a table containing the number of observations for each unique value of a variable on a subset of data

Examples

# Create a dataset containing controls (which are named differently)
# from geninvitro dataset:
controldata<-SubsetData(data=geninvitro, x="name", x.cat=c("control",
             "Control", "medium", "medium + BSA", "untreated"))

# Exclude controls (which are named differently) from geninvitro dataset:
invitrodata<-SubsetData(data=geninvitro, x="name", x.cat=c("control",
             "Control", "medium", "medium + BSA", "untreated"), include=FALSE)

# Frequency of each unique value of the dose for each nanomaterial
# in geninvitro dataset, with DNA STRAND BREAKS as the toxicity endpoint
# and only observations with concentration measured in "ug/cm2" are considered:
#
Frtab.sub(data.nm=invitrodata, data.control=controldata, nano="name",
           end="endpoint", end.cat="DNA STRAND BREAKS", id="experimentID",
           dose="concentration", unit="concentration_unit", unit.cat="ug/cm2",
           control.opt="same", x="concentration")

Genetic toxicity in vitro dataset

Description

This dataset contains the result of genetic toxicity in vitro studies and variables related to the experiments for several different nanomaterials.

Usage

data(geninvitro)

Format

A data frame with columns:

  • name: Project-assigned name of the nanomaterial

  • publicname: A widely accepted unique identifier

  • supplier: Supplier/project where the data is originated from

  • experimentID: Identifier of the experiment

  • method: Method/assay used in the experiment

  • studyprovider: Study provider

  • endpoint: Toxicity endpoint measure

  • value: Endpoint value

  • unit: Unit of the endpoint

  • celltype: Type of the cell used in the experiment

  • treatment: Indicator of the treatment

  • exptimeunit: Unit of measurement of the exposure time

  • exptime: Exposure time

  • concentration_unit: Unit of measurement of the concentration in variable concentration

  • concentration: Concentration of the nanomaterial

  • concentration_ml_unit: Unit of measurement of the concentration in variable concentration_ml

  • concentration_ml: Concentration of the nanomaterial in amount per ml

Details

Since some of the controls in geninvitro dataset are not named according to the nanomaterial names, the experiment identifier (ID) can be used to identify which control values are related to which nanomaterial.

Source

This dataset was obtained from https://www.anses.fr/en/content/nanogenotox-project (NanoGenotox project) and it was extracted from eNanoMapper database https://search.data.enanomapper.net/

The NANOGENOTOX Joint Action received funding from the European Union, in the framework of the Health Programme under Grant Agreement n2009 21.

Supported by European Union's Horizon 2020 research and innovation programme under grant agreement No 814426 - NanoInformaTIX https://www.nanoinformatix.eu/

Examples

data(geninvitro)

Create plot(s) of the observations, the sample means and the fitted isotonic regression curve

Description

This function creates plot(s) of the observations, the sample means and the fitted isotonic regression curve for one or more nanomaterials simultaneously

Usage

Isoplot(data.nm, data.control, id, nano, response, dose, end, end.cat,
  unit, unit.cat, dose.type=c("dose","log"), type = c("continuous",
  "ordinal"), control.opt=c("same","all"), add.curve = TRUE, vars, nrow=1,
  ncol=1, xlabel="Dose", ylabel="Response")

Arguments

data.nm

Data containing the result of toxicity study

data.control

Data of control values

id

Identifier of the experiment

nano

Name of the nanomaterial

response

Response (endpoint value)

dose

Dose or concentration

end

Toxicity endpoint

end.cat

Specific toxicity endpoint of interest

unit

Unit of measurement of the dose

unit.cat

Specific unit of measurement of the dose

dose.type

Type of the dose to be plotted ("dose" for dose and "log" for log(dose))

type

Type of the dose (continuous or ordinal)

control.opt

Option for the control doses if unit and unit.cat are specified. If only control doses with the same unit of measurement as the non-control ones are included, then specify "same" in the control.opt. If all control doses with any units of measurement are included, then specify "all".

add.curve

Adding curve to the plot

vars

Variable(s) used to subset the data

nrow

Number of row in the plotting space

ncol

Number of column in the plotting space

xlabel

Label for x-axis

ylabel

Label for y-axis

Details

  • This function performs data exploration for each nanomaterial in the dataset (or for each subset of data). The different types of nanomaterials are identified by their names. Therefore, if some control values are named differently (see: geninvitro dataset and the Examples), a separate dataset containing only these values first needs to be created. Controls in the new dataset can be linked to the non-control observations belonging to the same experiment through the identifier of the experiment (the linking is performed inside this function). In this situation, it is necessary to have an indicator that can identify different experiments (such as experiment ID).

  • If all controls in the dataset are named according to the related nanomaterial names, data.control and id do not need to be specified.

  • If doses used in the experiment are all measured in the same unit of measurement, then specify "same" in control.opt.

  • Dose-response plot can also be generated for subsets of data in each nanomaterial by specifying the variables used to split the data in vars.

Value

This function produces plot(s) consisting of observation data points, sample mean for each dose and fitted isotonic regression curve

References

Lin D., Pramana, S., Verbeke, T., and Shkedy, Z. (2015). IsoGene: Order-Restricted Inference for Microarray Experiments. R package version 1.0-24. https://CRAN.R-project.org/package=IsoGene

Lin D., Shkedy Z., Yekutieli D., Amaratunga D., and Bijnens, L. (editors). (2012) Modeling Doseresponse Microarray Data in Early Drug Development Experiments Using R. Springer.

Examples

# Example 1:
# Create a dataset containing controls (which are named differently)
# from geninvitro dataset:
controldata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
             "medium", "medium + BSA", "untreated"))

# Exclude controls (which are named differently) from geninvitro dataset:
invitrodata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
             "medium", "medium + BSA", "untreated"), include=FALSE)
#
# Generate dose-response plots for geninvitro, with DNA STRAND BREAKS
# as the endpoint, concentrations measured in "ug/cm2"
# and control doses measured in any units of measurement:
#
Isoplot(data.nm=invitrodata, data.control=controldata, id="experimentID",
        nano="name", response="value", dose="concentration", end="endpoint",
        end.cat="DNA STRAND BREAKS", unit="concentration_unit", unit.cat="ug/cm2",
        dose.type="dose", control.opt="all")

# Example 2:
# Split geninvitro data according to the cell type, method, study provider and
# unit of the concentration and generate dose-response plot for each subset
# of data with DNA STRAND BREAKS as the endpoint:
#
Isoplot(data.nm=invitrodata, data.control=controldata, id="experimentID",
        nano="name", response="value", dose="concentration", end="endpoint",
        end.cat="DNA STRAND BREAKS",  dose.type="dose",
        vars=c("celltype","method","studyprovider","concentration_unit"),
        nrow=2, ncol=2)

Create a plot of the observations, sample means and fitted isotonic regression curve for one nanomaterial

Description

This function generates a dose-response plot (scatter plot) of the observations, sample means and fitted isotonic regression curve for one nanomaterial

Usage

IsoPlot.nm(data.nm, dose, response, type = c("continuous", "ordinal"),
  add.curve = TRUE, nano.cat = NULL, xlabel="Dose", ylabel="Response")

Arguments

data.nm

Dataset of a particular nanomaterial

dose

Dose or concentration (with the same unit of measurement)

response

Response (a certain endpoint value)

type

Type of the dose

add.curve

Adding curve to the plot

nano.cat

Title of the plot (referring to the name of the nanomaterial)

xlabel

label for the x-axis of the plot

ylabel

label for the y-axis of the plot

Details

This function is intended to be used inside the function Isoplot. However, it can also be used to generate a plot for one nanomaterial, with a particular unit of measurement of the dose and for a certain toxicity endpoint.

Value

This function produces a plot of the observations, sample means and fitted isotonic regression curve for one nanomaterial

References

Lin D., Pramana, S., Verbeke, T., and Shkedy, Z. (2015). IsoGene: Order-Restricted Inference for Microarray Experiments. R package version 1.0-24. https://CRAN.R-project.org/package=IsoGene

Lin D., Shkedy Z., Yekutieli D., Amaratunga D., and Bijnens, L. (editors). (2012) Modeling Doseresponse Microarray Data in Early Drug Development Experiments Using R. Springer.

Examples

#nm400 contains the result of genetic toxicity in vitro study of NM-400
#(Multi-walled carbon nanotubes) with associated controls
IsoPlot.nm(data.nm=nm400, dose="concentration", response="value",
           nano.cat="Multi-walled carbon nanotubes", xlabel="Concentration",
           ylabel="DNA STRAND BREAKS")

Calculate p-values based on permutation for both increasing and decreasing ordered alternatives

Description

This function calculates p-values based on permutation. The plots of the null distribution and the observed test statistic under increasing and decreasing ordered alternatives are also given.

Usage

IsoPval.nm(data.nm, dose, response, stat=c("E2", "Williams","Marcus",
  "M", "ModM"), niter, nano.cat=NULL)

Arguments

data.nm

Nanomaterial dataset

dose

Dose or concentration (with the same unit of measurement)

response

Response (a certain endpoint value)

stat

Test statistics ("E2" for the global likelihood test, "Williams" for Williams test, "Marcus" for Marcus test, "M" for M test or "ModM" for modified M test)

niter

Number of permutations

nano.cat

Name of the nanomaterial

Details

This function is intended to be used inside the function Isotest. However, it can also be used to calculate p-values and generate the plot for one nanomaterial, with a particular unit of measurement of the dose, for a certain toxicity endpoint.

Value

This value provides p-values based on the permutation, the plot of the null distribution and the observed test statistics.

References

Lin D., Pramana, S., Verbeke, T., and Shkedy, Z. (2015). IsoGene: Order-Restricted Inference for Microarray Experiments. R package version 1.0-24. https://CRAN.R-project.org/package=IsoGene

Lin D., Shkedy Z., Yekutieli D., Amaratunga D., and Bijnens, L. (editors). (2012) Modeling Doseresponse Microarray Data in Early Drug Development Experiments Using R. Springer.

See Also

Isotest

Examples

#nm400 contains the result of genetic toxicity in vitro study of NM-400
#(Multi-walled carbon nanotubes) with associated controls
IsoPval.nm(data.nm=nm400, dose="concentration", response="value",
           stat="E2", niter=1000)

Calculate the test statistics and p-values for testing monotonic trend

Description

This function provides the value of the test statistics, p-values, plot of the null distribution and the observed test statistics, and adjusted p-values according to the method chosen.

Usage

Isotest(data.nm, data.control, id, nano, response, dose, end, end.cat,
  unit, unit.cat, stat=c("E2","Williams","Marcus","M","ModM"), niter,
  method=p.adjust.methods, control.opt=c("same","all"), set.seed, vars)

Arguments

data.nm

Data containing the result of toxicity study

data.control

Data of control values

id

Identifier of the experiment

nano

Name of the nanomaterial

response

Response (endpoint value)

dose

Dose or concentration

end

Toxicity endpoint

end.cat

Specific toxicity endpoint of interest

unit

Unit of measurement of the dose

unit.cat

Specific unit of measurement of the dose

stat

Test statistics ("E2" for the global likelihood test, "Williams" for Williams test, "Marcus" for Marcus test, "M" for M test or "ModM" for modified M test)

niter

Number of permutations

method

Method used to adjust for the multiplicity (see p.adjust.methods)

control.opt

Option for the control doses if unit and unit.cat are specified. If only control doses with the same unit of measurement as the non-control ones are included, then specify "same" in the control.opt. If all control doses with any units of measurement are included, then specify "all".

set.seed

Specify seed

vars

Variable(s) used to subset the data

Details

  • This function performs trend testing for each nanomaterial in the dataset (or for each subset of data). The different types of nanomaterials are identified by their names. Therefore, if some control values are named differently (see: geninvitro dataset and the Examples), a separate dataset containing only these values first needs to be created. Controls in the new dataset can be linked to the non-control observations belonging to the same experiment through the identifier of the experiment (the linking is performed inside this function). In this situation, it is necessary to have an indicator that can identify different experiments (such as experiment ID).

  • If all controls in the dataset are named according to the related nanomaterial names, data.control and id do not need to be specified.

  • If doses used in the experiment are all measured in the same unit of measurement, then specify "same" in control.opt.

  • Trend testing can also be performed for subsets of data in each nanomaterial, by specifying the variables used to split the data in vars.

Value

This function calculates the value for the test statistics, the p-value (and its plot) based on the permutation, the adjusted p-value and the more likely direction of the monotonic trend.

References

Lin D., Pramana, S., Verbeke, T., and Shkedy, Z. (2015). IsoGene: Order-Restricted Inference for Microarray Experiments. R package version 1.0-24. https://CRAN.R-project.org/package=IsoGene

Lin D., Shkedy Z., Yekutieli D., Amaratunga D., and Bijnens, L. (editors). (2012) Modeling Doseresponse Microarray Data in Early Drug Development Experiments Using R. Springer.

Examples

# Example 1:
# Create a dataset containing controls (which are named differently)
# from geninvitro dataset:
controldata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
             "medium", "medium + BSA", "untreated"))

# Exclude controls (which are named differently) from geninvitro dataset:
invitrodata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
             "medium", "medium + BSA", "untreated"), include=FALSE)
#
# Perform test for the monotonic trend in geninvitro, with DNA STRAND BREAKS
# as the endpoint, concentrations measured in "ug/cm2" and control doses
# measured in any units of measurement:
#
Isotest(data.nm=invitrodata, data.control=controldata, id="experimentID",
        nano="name", response="value", dose="concentration", end="endpoint",
        end.cat="DNA STRAND BREAKS", unit="concentration_unit", unit.cat="ug/cm2",
        stat="E2", niter=1000, method="BH", control.opt="all", set.seed=1234)

#' # Example 2:
# Split geninvitro according to the endpoint and unit of the concentration
# and then perform test for the monotonic trend for each subset of data:
#
Isotest(data.nm=invitrodata, data.control=controldata,
        id="experimentID", nano="name", dose="concentration",
        response="value", stat="E2", niter=1000, method="BH", set.seed=1234,
        vars=c("endpoint","concentration_unit"))

Calculate the value of the test statistics for testing monotonic trend

Description

This function provides the value of the test statistics (the global likelihood test, Williams, Marcus, M or modified M test) for one nanomaterial

Usage

IsoTest.nm(data.nm, dose, response, stat=c("E2", "Williams","Marcus",
  "M", "ModM"))

Arguments

data.nm

Nanomaterial dataset

dose

Dose or concentration (with the same unit of measurement)

response

Response (a certain endpoint value)

stat

Test statistics ("E2" for the global likelihood test, "Williams" for Williams test, "Marcus" for Marcus test, "M" for M test or "ModM" for modified M test)

Details

This function is intended to be used inside the function Isotest. However, it can also be used to obtain the value of a specified test statistics for one nanomaterial, with a particular unit of measurement of the dose, for a certain toxicity endpoint.

Value

This function calculates the value of the specified test statistics for one nanomaterial

References

Lin D., Pramana, S., Verbeke, T., and Shkedy, Z. (2015). IsoGene: Order-Restricted Inference for Microarray Experiments. R package version 1.0-24. https://CRAN.R-project.org/package=IsoGene

Lin D., Shkedy Z., Yekutieli D., Amaratunga D., and Bijnens, L. (editors). (2012) Modeling Doseresponse Microarray Data in Early Drug Development Experiments Using R. Springer.

See Also

Isotest

Examples

#nm400 contains the result of genetic toxicity in vitro study of NM-400
#(Multi-walled carbon nanotubes) with associated controls
IsoTest.nm(data.nm=nm400, dose="concentration", response="value", stat="E2")

NM-400 in vitro dataset

Description

This dataset contains the result of genetic toxicity in vitro study of NM-400 (Multi-walled carbon nanotubes) with associated controls and variables related to the experiments.

Usage

data(nm400)

Format

A data frame with columns:

  • name: Project-assigned name of the nanomaterial

  • publicname: A widely accepted unique identifier

  • supplier: Supplier/project where the data is originated from

  • experimentID: Identifier of the experiment

  • method: Method/assay used in the experiment

  • studyprovider: Study provider

  • endpoint: Toxicity endpoint measure

  • value: Endpoint value

  • unit: Unit of the endpoint

  • celltype: Type of the cell used in the experiment

  • treatment: Indicator of the treatment

  • exptimeunit: Unit of measurement of the exposure time

  • exptime: Exposure time

  • concentration_unit: Unit of measurement of the concentration in variable concentration

  • concentration: Concentration of the nanomaterial

  • concentration_ml_unit: Unit of measurement of the concentration in variable concentration_ml

  • concentration_ml: Concentration of the nanomaterial in amount per ml

Source

This dataset was obtained from https://www.anses.fr/en/content/nanogenotox-project (NanoGenotox project) and it was extracted from eNanoMapper database https://search.data.enanomapper.net/

The NANOGENOTOX Joint Action received funding from the European Union, in the framework of the Health Programme under Grant Agreement n2009 21.

Supported by European Union's Horizon 2020 research and innovation programme under grant agreement No 814426 - NanoInformaTIX https://www.nanoinformatix.eu/

Examples

data(nm400)

Create plots of the dose and the response for each nanomaterial in the dataset

Description

This function generates scatter plots of the dose and the response for each nanomaterial in the dataset

Usage

nmplot(data.nm, data.control, id, nano, response, dose, end, end.cat,
  unit, unit.cat, type=c("dose","log"), control.opt=c("same","all"), vars,
  nrow=1, ncol=1)

Arguments

data.nm

Data containing the result of toxicity study

data.control

Data of control values

id

Identifier of the experiment

nano

Name of the nanomaterial

response

Response (endpoint value)

dose

Dose or concentration

end

Toxicity endpoint

end.cat

Specific toxicity endpoint of interest

unit

Unit of measurement of the dose

unit.cat

Specific unit of measurement of the dose

type

Type of the dose to be plotted ("dose" for dose and "log" for log(dose))

control.opt

Option for the control doses if unit and unit.cat are specified. If only control doses with the same unit of measurement as the non-control ones are included, then specify "same" in the control.opt. If all control doses with any units of measurement are included, then specify "all".

vars

Variables used to subset the data

nrow

Number of row in the plotting space (default is 1)

ncol

Number of column in the plotting space (default is 1)

Details

  • This function generates plots for each nanomaterial in the dataset (or for each subset of data). The different types of nanomaterials are identified by their names. Therefore, if some control values are named differently (see: geninvitro dataset and the Examples), a separate dataset containing only these values first needs to be created. Controls in the new dataset can be linked to the non-control observations belonging to the same experiment through the identifier of the experiment (the linking is performed inside this function). In this situation, it is necessary to have an indicator that can identify different experiments (such as experiment ID).

  • If all controls in the dataset are named according to the related nanomaterial names, data.control and id do not need to be specified.

  • If doses used in the experiment are all measured in the same unit of measurement, then specify "same" in control.opt.

  • Dose-response plot can also be generated for subsets of data in each nanomaterial, by specifying the variables used to split the data in vars.

Value

This function produces plots of the dose and the response for each nanomaterial in the dataset

Examples

# Example 1:
# Create a dataset containing controls (which are named differently)
# from geninvitro dataset:
controldata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
             "medium", "medium + BSA", "untreated"))

# Exclude controls (which are named differently) from geninvitro dataset:
invitrodata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
             "medium", "medium + BSA", "untreated"), include=FALSE)
#
# Generate dose-response plot for geninvitro, with DNA STRAND BREAKS as the
# endpoint, concentrations measured in ug/cm2 and controls measured in any
# units of measurement:
#
nmplot(data.nm=invitrodata, data.control=controldata, id="experimentID",
       nano="name", response="value", dose="concentration", end="endpoint",
       end.cat="DNA STRAND BREAKS", unit="concentration_unit",
       unit.cat="ug/cm2", type="dose", control.opt="all")

# Example 2:
# Split geninvitro data according to the cell type and unit of the
# concentration and generate dose-response plot for each
# subset of data with DNA STRAND BREAKS as the endpoint:
#
nmplot(data.nm=invitrodata, data.control=controldata, id="experimentID",
       nano="name", response="value", dose="concentration", end="endpoint",
       end.cat="DNA STRAND BREAKS", type="dose", nrow=2, ncol=2,
       vars=c("celltype","concentration_unit"))

Create plots of the dose and the response grouped by a variable

Description

This function generates scatter plots of the dose and the response, with the colour of the data points differentiated according to the value of a variable.

Usage

nmplot.cat(data.nm, data.control, id, nano, response, dose, end,
  end.cat, unit, unit.cat, x.cat, type = c("dose", "log"), control.opt =
  c("same", "all"), vars, nrow = 1, ncol = 1)

Arguments

data.nm

Data containing the result of toxicity study

data.control

Data of control values

id

Identifier of the experiment

nano

Name of the nanomaterial

response

Response (endpoint value)

dose

Dose or concentration

end

Toxicity endpoint

end.cat

Specific toxicity endpoint of interest

unit

Unit of measurement of the dose

unit.cat

Specific unit of measurement of the dose

x.cat

Variable used to differentiate the colour of the data points in the plot(s)

type

Type of the dose to be plotted ("dose" for dose and "log" for log(dose))

control.opt

Option for the control doses if unit and unit.cat are specified. If only control doses with the same unit of measurement as the non-control ones are included, then specify "same" in the control.opt. If all control doses with any units of measurement are included, then specify "all".

vars

Variable(s) used to subset the data

nrow

Number of rows in the plotting space (default is 1)

ncol

Number of columns in the plotting space (default is 1)

Details

  • This function generates plots for each nanomaterial in the dataset (or for each subset of data). The different types of nanomaterials are identified by their names. Therefore, if some control values are named differently (see: geninvitro dataset and the Examples), a separate dataset containing only these values first needs to be created. Controls in the new dataset can be linked to the non-control observations belonging to the same experiment through the identifier of the experiment (the linking is performed inside this function). In this situation, it is necessary to have an indicator that can identify different experiments (such as experiment ID).

  • If all controls in the dataset are named according to the related nanomaterial names, data.control and id do not need to be specified.

  • If doses used in the experiment are all measured in the same unit of measurement, then specify "same" in control.opt.

  • Dose-response plot can also be generated for subsets of data in each nanomaterial by specifying the variables used to split the data in vars.

Value

This function produces scatter plots of the dose and the response, grouped by a certain variable

Examples

# Example 1:
# Create a dataset containing controls (which are named differently)
# from geninvitro dataset:
controldata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
             "medium", "medium + BSA", "untreated"))

# Exclude controls (which are named differently) from geninvitro dataset:
invitrodata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
             "medium", "medium + BSA", "untreated"), include=FALSE)

# Generate dose-response plots for geninvitro, with DNA STRAND BREAKS as
# the endpoint, concentrations measured in "ug/cm2" and control doses
# measured in any units of measurement (different colours represent different
# study providers):
#
nmplot.cat(data.nm=invitrodata, data.control=controldata, id="experimentID",
           nano="name", response="value", dose="concentration", end="endpoint",
           end.cat="DNA STRAND BREAKS", unit="concentration_unit", unit.cat="ug/cm2",
           x.cat="studyprovider", type="dose", control.opt="all",
           nrow=1, ncol=1)

# Example 2:
# Split geninvitro data according to the method, study provider and unit of
# the concentration, and generate dose-response plot for each subset of data
# with DNA STRAND BREAKS as the endpoint (different colours represent
# different cell types):
#
nmplot.cat(data.nm=invitrodata, data.control=controldata, id="experimentID",
           nano="name", response="value", dose="concentration", end="endpoint",
           end.cat="DNA STRAND BREAKS",  x.cat="celltype", type="dose",
           vars=c("method","studyprovider","concentration_unit"),
           nrow=2, ncol=2)

Create plots of the dose and the response for every unique value of a certain variable

Description

This function generates scatter plots of the dose and the response for every unique value of a specified variable

Usage

nmplot.n(data.nm, data.control, id, nano, response, dose, end,
  end.cat, unit, unit.cat, cat, type=c("dose","log"),
  control.opt=c("same","all"), nrow=1, ncol=1)

Arguments

data.nm

Data containing the result of toxicity study

data.control

Data of control values

id

Identifier of the experiment

nano

Name of the nanomaterial

response

Response (endpoint value)

dose

Dose or concentration

end

Toxicity endpoint

end.cat

Specific toxicity endpoint of interest

unit

Unit of measurement of the dose

unit.cat

Specific unit of measurement of the dose

cat

Plot is generated for every unique value of cat

type

Type of the dose to be plotted ("dose" for dose and "log" for log(dose))

control.opt

Option for the control doses. If only control doses with the same unit of measurement as the non-control ones are included, then specify "same" in the control.opt. If all control doses with any units of measurement are included, then specify "all".

nrow

Number of rows in the plotting space (default is 1)

ncol

Number of columns in the plotting space (default is 1)

Details

  • This function generates plots for each nanomaterial in the dataset. The different types of nanomaterials are identified by their names. Therefore, if some control values are named differently (see: geninvitro dataset and the Examples), a separate dataset containing only these values first needs to be created. Controls in the new dataset can be linked to the non-control observations belonging to the same experiment through the identifier of the experiment (the linking is performed inside this function). In this situation, it is necessary to have an indicator that can identify different experiments (such as experiment ID).

  • If all controls in the dataset are named according to the related nanomaterial names, data.control and id do not need to be specified.

  • If doses used in the experiment are all measured in the same unit of measurement, then specify "same" in control.opt.

Value

This function produces scatter plots of the dose and the response for every unique value of a specified variable

Examples

# Create a dataset containing controls (which are named differently)
# from geninvitro dataset:
controldata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
             "medium", "medium + BSA", "untreated"))

# Exclude controls (which are named differently) from geninvitro dataset:
invitrodata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
             "medium", "medium + BSA", "untreated"), include=FALSE)

# Generate dose-response plots for geninvitro, with DNA STRAND BREAKS as
# the endpoint, concentrations measured in "ug/cm2" and control doses
# measured in any units of measurement (plot is generated for each study
# provider):
#
nmplot.n(data.nm=invitrodata, data.control=controldata, id="experimentID",
         nano="name", response="value", dose="concentration", end="endpoint",
         end.cat="DNA STRAND BREAKS", unit="concentration_unit",
         unit.cat="ug/cm2", cat="studyprovider", type="dose",
         control.opt ="all", nrow=1, ncol=1)

Create plots of the dose and the response differentiated by specified variables

Description

This function generates scatter plots of the dose and the response for every unique value of a certain variable, with the colour of the data points differentiated according to the value of another variable.

Usage

nmplot.ncat(data.nm, data.control, id, nano, response, dose, end,
  end.cat, unit, unit.cat,  cat, x.cat, type=c("dose","log"),
  control.opt=c("same","all"), nrow=1, ncol=1)

Arguments

data.nm

Data containing the result of toxicity study

data.control

Data of control values

id

Identifier of the experiment

nano

Name of the nanomaterial

response

Response (endpoint value)

dose

Dose or concentration

end

Toxicity endpoint

end.cat

Specific toxicity endpoint of interest

unit

Unit of measurement of the dose

unit.cat

Specific unit of measurement of the dose

cat

Plot is generated for every unique value of cat

x.cat

Variable used to differentiate the colour of the data points in the plot(s)

type

Type of the dose to be plotted ("dose" for dose and "log" for log(dose))

control.opt

Option for the control doses. If only control doses with the same unit of measurement as the non-control ones are included, then specify "same" in the control.opt. If all control doses with any units of measurement are included, then specify "all".

nrow

Number of rows in the plotting space (default is 1)

ncol

Number of columns in the plotting space (default is 1)

Details

  • This function generates plots for each nanomaterial in the dataset. The different types of nanomaterials are identified by their names. Therefore, if some control values are named differently (see: geninvitro dataset and the Examples), a separate dataset containing only these values first needs to be created. Controls in the new dataset can be linked to the non-control observations belonging to the same experiment through the identifier of the experiment (the linking is performed inside this function). In this situation, it is necessary to have an indicator that can identify different experiments (such as experiment ID).

  • If all controls in the dataset are named according to the related nanomaterial names, data.control and id do not need to be specified.

  • If doses used in the experiment are all measured in the same unit of measurement, then specify "same" in control.opt.

Value

This function produces dose-response plots for every unique value of a certain variable, with different colours of data points based on the value of another variable

Examples

# Create a dataset containing controls (which are named differently)
# from geninvitro dataset:
controldata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
             "medium", "medium + BSA", "untreated"))

# Exclude controls (which are named differently) from geninvitro dataset:
invitrodata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
             "medium", "medium + BSA", "untreated"), include=FALSE)

# Generate dose-response plots for geninvitro, with DNA STRAND BREAKS as
# the endpoint and concentrations measured in "ug/cm2" (plot is generated for
# each study provider, with different colours represent different
# experiments):
#
nmplot.ncat(data.nm=invitrodata, data.control=controldata,
            id="experimentID", nano="name", response="value",
            dose="concentration", end="endpoint", end.cat="DNA STRAND BREAKS",
            unit="concentration_unit", unit.cat="ug/cm2", cat="studyprovider",
            x.cat="experimentID", type="dose", control.opt="same", nrow=1,
            ncol=1)

Split the data of each nanomaterial into different subsets of data

Description

This function splits the data of each nanomaterial into different subsets of data according to the unique values of selected variable(s)

Usage

SplitData(data.nm, data.control, id, nano, dose, end, end.cat, unit,
  unit.cat, control.opt=c("same","all"), vars)

Arguments

data.nm

Data containing the result of toxicity study

data.control

Data of control values

id

Identifier of the experiment

nano

Name of the nanomaterial

dose

Dose or concentration

end

Toxicity endpoint

end.cat

Specific toxicity endpoint of interest

unit

Unit of measurement of the dose

unit.cat

Specific unit of measurement of the dose

control.opt

Option for the control doses if unit and unit.cat are specified. If only control doses with the same unit of measurement as the non-control ones are included, then specify "same" in the control.opt. If all control doses with any units of measurement are included, then specify "all".

vars

Variables used to split the data

Value

This function splits the data of each nanomaterial into different subsets of data according to the unique values of selected variable(s)

Examples

# Example 1:
# Create a dataset containing controls (which are named differently)
# from geninvitro dataset:
controldata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
             "medium", "medium + BSA", "untreated"))

# Exclude controls (which are named differently) from geninvitro dataset:
invitrodata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
             "medium", "medium + BSA", "untreated"), include=FALSE)
#
# Split geninvitro data according to the cell type, method, study provider,
# unit of the concentration and the type of the endpoint:
datasub<-SplitData(data.nm=invitrodata, data.control=controldata,
                   id="experimentID", nano="name", dose="concentration",
                   vars=c("celltype", "method","studyprovider",
                   "concentration_unit","endpoint"))

# Example 2:
# Split geninvitro data with DNA STRAND BREAKS as the endpoint, according
# to the cell type, method, study provider, and unit of the concentration:
datasub2<-SplitData(data.nm=invitrodata, data.control=controldata,
                    id="experimentID", nano="name", dose="concentration",
                    end="endpoint", end.cat="DNA STRAND BREAKS",
                    vars=c("celltype","method","studyprovider",
                    "concentration_unit"))

# Example 3:
# Split geninvitro data with DNA STRAND BREAKS as the endpoint and
# concentration measured in ug/cm2, according to the cell type:
datasub3<-SplitData(data.nm=invitrodata, data.control=controldata,
                    id="experimentID", nano="name", dose="concentration",
                    end="endpoint", end.cat="DNA STRAND BREAKS",
                    unit="concentration_unit", unit.cat="ug/cm2",
                    control.opt="same", vars="celltype")

Create a subset of data

Description

This function creates a subset of dataset according to specified criteria.

Usage

SubsetData(data, x, x.cat, include = TRUE)

Arguments

data

Data, structured in a dataframe

x

Variable(s) used to subset the data

x.cat

Specific criteria (value(s)) of x used to subset the data

include

Include/exclude value specified in x.cat. If include = TRUE (default value), then observations with x = x.cat are selected. If include = FALSE, then observations with value specified in x.cat will be omitted from the subset of the data.

Details

  • If there are several variable x used as criteria to subset the data, x.cat can be written as list(... , ...)

  • Values in x.cat should be specified in the same order as the x's

Value

This function returns a subset of data

Examples

# Create data of NM-400 (Multi-walled carbon nanotubes) from geninvitro dataset
data.sub<-SubsetData(data=geninvitro, x="name",
x.cat="NM-400 (Multi-walled carbon nanotubes)", include = TRUE)

# Create data of NM-400 (Multi-walled carbon nanotubes)
# with DNA STRAND BREAKS as the endpoint from geninvitro dataset
data.sub<-SubsetData(data=geninvitro, x=c("name","endpoint"),
x.cat=list("NM-400 (Multi-walled carbon nanotubes)","DNA STRAND BREAKS"),
include=TRUE)

# Exclude NM-400 (Multi-walled carbon nanotubes) from geninvitro dataset
data.sub<-SubsetData(data=geninvitro, x="name",
x.cat="NM-400 (Multi-walled carbon nanotubes)", include = FALSE)

# Create data of NM-400 (Multi-walled carbon nanotubes)
# and NM-110 (Zinc Oxide, uncoated) from geninvitro dataset
data.sub<-SubsetData(data=geninvitro, x="name",
x.cat=c("NM-400 (Multi-walled carbon nanotubes)",
"NM-110 (Zinc Oxide, uncoated)"), include = TRUE)

# Create data of NM-400 (Multi-walled carbon nanotubes)
# and NM-110 (Zinc Oxide, uncoated), with DNA STRAND BREAKS as the endpoint
data.sub<-SubsetData(data=geninvitro, x=c("name","endpoint"),
x.cat=list(c("NM-400 (Multi-walled carbon nanotubes)",
"NM-110 (Zinc Oxide, uncoated)"),"DNA STRAND BREAKS"),include = TRUE)

# Create a new dataset containing only control values from geninvitro dataset
controldata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
"medium", "medium + BSA", "untreated"))