Skip to contents

Create folder(s) with heatmaps extracted from zip files optionally organized by a factor

Usage

extract_heatmap(
  path_to_folder,
  factor = NULL,
  output_path = "Heatmap",
  verbose = TRUE,
  force = FALSE,
  heatmap_file_name = "_carte_thermique_",
  ...
)

Arguments

path_to_folder

Path to folder

factor

(character, default NULL) Set to a column name to create subfolder for each levels of the modality. If left to NULL, all heatmaps are extracted in the same folder.

output_path

(default = "Heatmap")

verbose

(Logical, default = TRUE) If TRUE, the function print additional information.

force

Force overwriting the path to output_path

heatmap_file_name

Name of the heatmap file in the zip file. Default is "carte_thermique" (sorry for french).

...

Other params for be passed on to import_mitemap()

Value

Nothing. Create files in folders.

Author

Adrien Taudière

Examples

extract_heatmap(system.file("extdata", "mitemap_example", package = "MiteMapTools"),
  factor = "Treatment"
)
#> Warning: 1390 file(s) described in metadata were not present in the list of csv files
#> Warning: 1 file(s) present in the list of csv files were not described in metadata
#> 
#> The final number of samples for folder is 76032.
#> Rows removed when clearing for run with times sup to maximum_time: 0 (0 runs)
#> Rows removed when clearing the first secondes: 603
#> Rows removed when clearing bad x range: 2798 (2 runs)
#> Rows removed when clearing bad y range: 0 (0 runs)
#> Rows removed when clearing bad x values: 1960
#> Rows removed when clearing bad y values: 26
#> 
#> Total rows after filtering: 70828 (from 76032)
#> Total runs after filtering: 50 (from 53)
extract_heatmap(system.file("extdata", "mitemap_example", package = "MiteMapTools"),
  factor = "Biomol_sp", force = TRUE
)
#> Warning: 1390 file(s) described in metadata were not present in the list of csv files
#> Warning: 1 file(s) present in the list of csv files were not described in metadata
#> 
#> The final number of samples for folder is 76032.
#> Rows removed when clearing for run with times sup to maximum_time: 0 (0 runs)
#> Rows removed when clearing the first secondes: 603
#> Rows removed when clearing bad x range: 2798 (2 runs)
#> Rows removed when clearing bad y range: 0 (0 runs)
#> Rows removed when clearing bad x values: 1960
#> Rows removed when clearing bad y values: 26
#> 
#> Total rows after filtering: 70828 (from 76032)
#> Total runs after filtering: 50 (from 53)
extract_heatmap(system.file("extdata", "mitemap_example", package = "MiteMapTools"),
  clean = FALSE, force = TRUE
)
#> Warning: 1390 file(s) described in metadata were not present in the list of csv files
#> Warning: 1 file(s) present in the list of csv files were not described in metadata
#> 
#> The final number of samples for folder is 76032.
unlink("Heatmap", recursive = TRUE)