| apply_median_filtering {infercnv} | R Documentation |
Apply a median filtering to the expression matrix within each tumor bounds
apply_median_filtering( infercnv_obj, window_size = 7, on_observations = TRUE, on_references = TRUE )
infercnv_obj |
infercnv_object |
window_size |
Size of the window side centered on the data point to filter (default = 7). |
on_observations |
boolean (default=TRUE), run on observations data (tumor cells). |
on_references |
boolean (default=TRUE), run on references (normal cells). |
infercnv_obj with median filtering applied to observations
# data(infercnv_data_example)
# data(infercnv_annots_example)
# data(infercnv_genes_example)
# infercnv_object_example <- infercnv::CreateInfercnvObject(raw_counts_matrix=infercnv_data_example,
# gene_order_file=infercnv_genes_example,
# annotations_file=infercnv_annots_example,
# ref_group_names=c("normal"))
# infercnv_object_example <- infercnv::run(infercnv_object_example,
# cutoff=1,
# out_dir=tempfile(),
# cluster_by_groups=TRUE,
# denoise=TRUE,
# HMM=FALSE,
# num_threads=2,
# no_plot=TRUE)
data(infercnv_object_example)
infercnv_object_example <- infercnv::apply_median_filtering(infercnv_object_example)
# plot result object