impute_met_files {Melissa} | R Documentation |
Make predictions of missing methylation states, i.e. perfrom
imputation using Melissa. Each file in the directory will be used as input
and a new file will be created in outdir
with an additional column
containing the predicted met state (value between 0 and 1). Note that
predictions will be made only on annotation regions
that were used
for training Melissa. Check impute_test_met
, if you want to
make predictions only on test data.
impute_met_files( met_dir, outdir = NULL, obj, anno_region, basis = NULL, is_predictive = TRUE, no_cores = NULL )
met_dir |
Directory of methylation files, each file corresponds to a
single cell. It should contain three columns <chr> <pos> <met_state>
(similar to the input required by |
outdir |
Directory to store the output files for each cell with exactly the same name. If NULL, then a directory called 'imputed' inside 'met_dir' will be created by default. |
obj |
Output of Melissa inference object. |
anno_region |
Annotation region object. This will be the outpuf of
|
basis |
Basis object, if NULL we perform imputation using Melissa,
otherwise using BPRMeth (then |
is_predictive |
Logical, use predictive distribution for imputation, or choose the cluster label with the highest responsibility. |
no_cores |
Number of cores to be used for parallel processing of data. |
A new directory outdir
containing files (cells) with predicted
/ imputed methylation states per CpG location.
C.A.Kapourani C.A.Kapourani@ed.ac.uk
create_melissa_data_obj
, melissa
,
filter_regions
## Not run: # Met directory met_dir <- "name_of_met_dir" # Annotation file name anno_file <- "name_of_anno_file" # Create data object melissa_data <- create_melissa_data_obj(met_dir, anno_file) # Run Melissa melissa_obj <- melissa(X = melissa_data$met, K = 2) # Annotation object anno_region <- melissa_data$anno_region # Peform imputation impute_met_dir <- "name_of_met_dir_for_imputing_cells" out <- impute_met_files(met_dir = impute_met_dir, obj = melissa_obj, anno_region = anno_region) ## End(Not run)