apply_median_filtering: apply_median_filtering

Description Usage Arguments Value Examples

View source: R/noise_reduction.R

Description

Apply a median filtering to the expression matrix within each tumor bounds

Usage

1
2
3
4
5
6
apply_median_filtering(
  infercnv_obj,
  window_size = 7,
  on_observations = TRUE,
  on_references = TRUE
)

Arguments

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).

Value

infercnv_obj with median filtering applied to observations

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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

infercnv documentation built on Nov. 8, 2020, 11:10 p.m.