| save_transform_models | R Documentation | 
Save the transform models in the cell_data_set to the specified directory by writing the R objects to RDS files and the nearest neighbor indices to index files. save_transform_models saves transform models made by running the preprocess_cds and reduce_dimension functions on an initial cell_data_set. Subsequent cell_data_sets are transformed into the reduced dimension space of the initial cell_data_set by loading the new data into a new cell_data_set, loading the initial data set transform models into the new cell_data_set using the load_transform_models function, and applying those transform models to the new data set using the preprocess_transform() and reduce_dimension_transform() functions. In this case, do not run the preprocess_cds() or reduce_dimension() functions on the new cell_data_set. Additionally, save_transform_models() saves nearest neighbor indices when the preprocess_cds() and reduce_dimension() functions are run with the make_nn_index=TRUE parameter. These indices are used to find matches between cells in the new processed cell_data_set and the initial cell_data_set using index search functions. For more information see the help for transfer_cell_labels(). save_transform_models() saves the models to a directory given by the directory_path parameter.
save_transform_models(
  cds,
  directory_path,
  comment = "",
  verbose = TRUE,
  archive_control = list()
)
| cds | a cell_data_set with existing models. | 
| directory_path | a string giving the name of the directory in which to write the model files. | 
| comment | a string with optional notes that is saved with the objects. | 
| verbose | a boolean determining whether to print information about the saved files. | 
| archive_control | a list that is used to control archiving the output directory. The archive_control parameters are 
 | 
none.
The R tar archive function used by Monocle3 may have a limited output file size of 8 GB. If you encounter this problem, you can set the environment variable "tar" to a tar executable that has no size limit, for example, gnu tar. You can do this in the $HOME/.monoclerc file by adding a line consisting of Sys.setenv('tar' = paste(Sys.getenv("TAR"), "-H", "gnu")). See the R 'tar' documentation for more information.
  ## Not run: 
    cds <- load_a549()
    cds <- preprocess_cds(cds)
    cds <- reduce_dimension(cds)
    save_transform_models(cds, 'tm')
  
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.