level1 <- invitroTKstats::clint_L1
# Scenario 1: Pass in data.in and exclusion.info data frame from R session
# Create a exclusion criteria data frame
# Use the excluded samples found in \code{invitroTKstats::clint_L2_heldout}
# If more than one variable is used to define a set of samples to be excluded,
# enter them as one string, separate the Variables with a vertical bar, "|",
# and do the same for Values.
excluded_level2 <- invitroTKstats::clint_L2_heldout
exclusion_criteria <- data.frame(
Variables = paste("Compound.Name", "Lab.Sample.Name", sep = "|"),
Values = paste(excluded_level2[,"Compound.Name"], excluded_level2[,"Lab.Sample.Name"], sep = "|"),
Message = excluded_level2[,"Verified"]
)
# Run the verification function.
my.level2 <- sample_verification(data.in=level1,
exclusion.info = exclusion_criteria,
output.res = FALSE)
# Scenario 2: Import 'tsv' as input data and do not pass in an exclusion.info data frame
if (FALSE) {
# Write the level-1 file to some folder
# Will need to replace with desired export folder location.
# The needs to already exist.
write.table(level1,
file=here::here("/Smeltz-Clint-Level1.tsv"),
sep="\t",
row.names=FALSE,
quote=FALSE)
# Run the verification function.
# Specify the path to import level-1 data with INPUT.DIR.
# Will need to replace INPUT.DIR = with chosen output
# folder location from above
# If no exclusion.info data frame is used, will label all samples as verified.
# A level-2 file is also exported to INPUT.DIR when OUTPUT.DIR is not specified.
my.level2 <- sample_verification(FILENAME="Smeltz",
assay="Clint", INPUT.DIR = here::here(""))
}
Run the code above in your browser using DataLab