Create a flag_tech_failure()
function to allow a user to define a sample manually as a technical failure/outlier from a HermesData
object.
#Creating the HermesData object from the example SummarizedExperiment object. result <- HermesData(summarized_experiment) #Collect sample names/IDs from the HermesData object. samples <- colnames(object) #Match user specified technical failure IDs to the sample IDs. match(sample_ids, samples) #Change technical failure flag in the HermesData object. colData(result)$TechnicalFailureFlag[sample_ids] <- TRUE #Putting the final function together. flag_tech_failure <- function(object, sample_ids){ assert_that( is_hermes_data(object), is_character_vector(sample_ids) ) samples <- colnames(object) matches <- match(sample_ids, samples) colData(object)$TechnicalFailureFlag[matches] <- TRUE object }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.