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 |
This function generates plots of adjusted p-values, raw p-values and selected FDR level
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)
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)
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 (" |
niter |
Number of permutations |
method |
Method used to adjust for the multiplicity |
control.opt |
Option for the control doses if |
set.seed |
Specify seed |
vars |
Variable(s) used to subset the data |
FDR |
The desired FDR to control |
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
.
This function generates plots of adjusted p-values, raw p-values and selected FDR for both directions (up and down) of the trend
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.
# 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 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)
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.
FrCtrl(data.nm, data.control, id, nano, dose, end, end.cat, unit, unit.cat, vars)
FrCtrl(data.nm, data.control, id, nano, dose, end, end.cat, unit, unit.cat, vars)
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 |
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
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
# 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")
# 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")
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
Frtab(data, x, cat, val, opt=c("un", "list", "obs", "ls.obs"), na.rm=FALSE)
Frtab(data, x, cat, val, opt=c("un", "list", "obs", "ls.obs"), na.rm=FALSE)
data |
Dataset |
x |
Variable(s) to be explored |
cat |
Variable used to group or subset the data |
val |
Specific value of variable |
opt |
Options for the result: If |
na.rm |
If |
This function generates the number of unique values, the list of unique values, or the number of observations of specified variable(s).
# 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")
# 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")
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.
Frtab.sub(data.nm, data.control, id, nano, dose, end, end.cat, unit, unit.cat, control.opt=c("same","all"), x)
Frtab.sub(data.nm, data.control, id, nano, dose, end, end.cat, unit, unit.cat, control.opt=c("same","all"), x)
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 " |
x |
Variable to be explored |
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
.
This function generates a table containing the number of observations for each unique value of a variable on a subset of data
# 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")
# 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")
This dataset contains the result of genetic toxicity in vitro studies and variables related to the experiments for several different nanomaterials.
data(geninvitro)
data(geninvitro)
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
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.
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/
data(geninvitro)
data(geninvitro)
This function creates plot(s) of the observations, the sample means and the fitted isotonic regression curve for one or more nanomaterials simultaneously
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")
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")
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 |
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 |
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
.
This function produces plot(s) consisting of observation data points, sample mean for each dose and fitted isotonic regression curve
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.
# 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)
# 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)
This function generates a dose-response plot (scatter plot) of the observations, sample means and fitted isotonic regression curve for one nanomaterial
IsoPlot.nm(data.nm, dose, response, type = c("continuous", "ordinal"), add.curve = TRUE, nano.cat = NULL, xlabel="Dose", ylabel="Response")
IsoPlot.nm(data.nm, dose, response, type = c("continuous", "ordinal"), add.curve = TRUE, nano.cat = NULL, xlabel="Dose", ylabel="Response")
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 |
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.
This function produces a plot of the observations, sample means and fitted isotonic regression curve for one nanomaterial
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.
#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")
#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")
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.
IsoPval.nm(data.nm, dose, response, stat=c("E2", "Williams","Marcus", "M", "ModM"), niter, nano.cat=NULL)
IsoPval.nm(data.nm, dose, response, stat=c("E2", "Williams","Marcus", "M", "ModM"), niter, nano.cat=NULL)
data.nm |
Nanomaterial dataset |
dose |
Dose or concentration (with the same unit of measurement) |
response |
Response (a certain endpoint value) |
stat |
Test statistics (" |
niter |
Number of permutations |
nano.cat |
Name of the nanomaterial |
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.
This value provides p-values based on the permutation, the plot of the null distribution and the observed test statistics.
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.
#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)
#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)
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.
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)
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)
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 (" |
niter |
Number of permutations |
method |
Method used to adjust for the multiplicity (see |
control.opt |
Option for the control doses if |
set.seed |
Specify seed |
vars |
Variable(s) used to subset the data |
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
.
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.
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.
# 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"))
# 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"))
This function provides the value of the test statistics (the global likelihood test, Williams, Marcus, M or modified M test) for one nanomaterial
IsoTest.nm(data.nm, dose, response, stat=c("E2", "Williams","Marcus", "M", "ModM"))
IsoTest.nm(data.nm, dose, response, stat=c("E2", "Williams","Marcus", "M", "ModM"))
data.nm |
Nanomaterial dataset |
dose |
Dose or concentration (with the same unit of measurement) |
response |
Response (a certain endpoint value) |
stat |
Test statistics (" |
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.
This function calculates the value of the specified test statistics for one nanomaterial
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.
#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")
#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")
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.
data(nm400)
data(nm400)
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
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/
data(nm400)
data(nm400)
This function generates scatter plots of the dose and the response for each nanomaterial in the dataset
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)
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)
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 (" |
control.opt |
Option for the control doses if |
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) |
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
.
This function produces plots of the dose and the response for each nanomaterial in the dataset
# 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"))
# 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"))
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.
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)
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)
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 (" |
control.opt |
Option for the control doses if |
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) |
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
.
This function produces scatter plots of the dose and the response, grouped by a certain variable
# 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)
# 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)
This function generates scatter plots of the dose and the response for every unique value of a specified variable
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)
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)
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 |
type |
Type of the dose to be plotted (" |
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 " |
nrow |
Number of rows in the plotting space (default is 1) |
ncol |
Number of columns in the plotting space (default is 1) |
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
.
This function produces scatter plots of the dose and the response for every unique value of a specified variable
# 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 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)
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.
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)
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)
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 |
x.cat |
Variable used to differentiate the colour of the data points in the plot(s) |
type |
Type of the dose to be plotted (" |
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 " |
nrow |
Number of rows in the plotting space (default is 1) |
ncol |
Number of columns in the plotting space (default is 1) |
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
.
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
# 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)
# 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)
This function splits the data of each nanomaterial into different subsets of data according to the unique values of selected variable(s)
SplitData(data.nm, data.control, id, nano, dose, end, end.cat, unit, unit.cat, control.opt=c("same","all"), vars)
SplitData(data.nm, data.control, id, nano, dose, end, end.cat, unit, unit.cat, control.opt=c("same","all"), vars)
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 |
vars |
Variables used to split the data |
This function splits the data of each nanomaterial into different subsets of data according to the unique values of selected variable(s)
# 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")
# 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")
This function creates a subset of dataset according to specified criteria.
SubsetData(data, x, x.cat, include = TRUE)
SubsetData(data, x, x.cat, include = TRUE)
data |
Data, structured in a dataframe |
x |
Variable(s) used to subset the data |
x.cat |
Specific criteria (value(s)) of |
include |
Include/exclude value specified in |
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
This function returns a subset of data
# 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"))
# 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"))