Creates an MIF object for use in spatialIF functions
create_mif(
clinical_data,
sample_data,
spatial_list = NULL,
patient_id = "patient_id",
sample_id = "image_tag"
)
A data frame containing patient level data with one row per participant.
A data frame containing sample level data with one row per sample. Should at a minimum contain a 2 columns: one for sample names and one for the corresponding patient name.
A named list of data frames with the spatial data from each sample making up each individual data frame
A character string indicating the column name for patient id in sample and clinical data frames.
A character string indicating the column name for sample id in the sample data frame
Returns a custom MIF
Data frame of clinical data
Data frame of sample data
Named list of spatial data
List of data derived using the MIF object
The column name for sample id in the sample data frame with the clinical data
The column name for sample id in the sample data frame to merge with the spatial data
#Create mif object
library(dplyr)
x <- create_mif(clinical_data = example_clinical %>%
mutate(deidentified_id = as.character(deidentified_id)),
sample_data = example_summary %>%
mutate(deidentified_id = as.character(deidentified_id)),
spatial_list = example_spatial,
patient_id = "deidentified_id",
sample_id = "deidentified_sample")