Learn R Programming

⚠️There's a newer version (1.2.4) of this package.Take me there.

dynwrap: Representing and Inferring Single-Cell Trajectories

ℹ️ Tutorials     ℹ️ Reference documentation

dynwrap contains the code for a common model of single-cell trajectories. The package can:

  • Wrap the input data of a trajectory inference method, such as expression and prior information
  • Run a trajectory inference method in R, in a docker container or a singularity container
  • Wrap the output of a trajectory inference method, such as the pseudotime, a clustering or a branch network, and convert it into a common trajectory model
  • Further postprocess and adapt the trajectory model, such as labelling the milestones and rooting the trajectory

Documentation and the API reference for dynwrap can be found at the dyvnerse documentation website: https://dynverse.org/ .

dynwrap was used to wrap 50+ trajectory inference method within docker containers in dynmethods.

The advantage of using a common model is that it allows:

  • Comparison between a prediction and a gold standard, eg. using dyneval
  • Comparing two predictions
  • Easily visualise the trajectory, eg. using dynplot
  • Extracting relevant features/genes, eg. using dynfeature

Latest changes

Check out news(package = "dynwrap") or NEWS.md for a full list of changes.

Recent changes in dynwrap 1.2.2

  • MAJOR CHANGE convert_milestone_percentages_to_progressions(): Rewrite implementation to attain significant speedup.

  • MINOR CHANGE infer_trajectory(): Infer command (Rscript/python) from file extension if possible and avoid using shebang to execute script, because R CMD check for R 4.0 puts Rscript and R dummy executables on the path before R CMD check. This means #!/usr/bin/env Rscript does not work anymore.

  • MINOR CHANGE add_feature_importance(): Add a function for adding feature importance scores to a trajectory.

  • BUG FIX project_waypoints(): Rename milestone waypoints such that the names are unique.

  • BUG FIX infer_trajectory(): Fix error message printing.

  • BUG FIX: dyndimred is used conditionally.

  • BUG FIX: wrap_expression() and add_expression(): Do not override feature_info when it already exists in dataset.

Recent changes in dynwrap 1.2.1 (2020-05-11)

  • BUG FIX project_trajectory(): Correctly pass parameters.

  • MINOR CHANGES select_waypoints(): Do not recompute waypoints if trajectory already contains some.

  • MINOR CHANGES convert_progressions_to_milestone_percentages(): Solve tapply issues ahead of dplyr 1.0 release.

Dynverse dependencies

Copy Link

Version

Install

install.packages('dynwrap')

Monthly Downloads

408

Version

1.2.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Robrecht Cannoodt

Last Published

March 23rd, 2021

Functions in dynwrap (1.2.2)

add_attraction

Add attraction of cells using RNA velocity
add_expression

Add count and normalised expression values to a dataset
add_dimred

Add or create a dimensionality reduction
add_cluster_graph

Constructs a trajectory using a cell grouping and a network between groups. Will use an existing grouping if it is present in the dataset.
add_cell_graph

Constructs a trajectory using a graph between cells, by mapping cells onto a set of backbone cells.
add_linear_trajectory

Constructs a linear trajectory using pseudotime values
add_cell_waypoints

Add or select waypoint cells of a trajectory
add_prior_information

Add or compute prior information for a trajectory
add_timings

Add timings to a trajectory
add_feature_importance

Add a feature importance to a dataset
add_grouping

Add a cell grouping to a dataset
create_ti_method_container

Create a TI method from a docker / singularity container
calculate_pseudotime

Add or calculate pseudotime as distance from the root
generate_parameter_documentation

Generate the parameter documentation of a method, use with @eval
gather_cells_at_milestones

Gather cells to their closest milestones
create_ti_method_definition

Create a TI method from a local method definition file
add_regulatory_network

Add a GRN to a dynwrap object
calculate_average_by_group

Calculate average values of a matrix
add_root

Root the trajectory
get_ti_methods

Return all TI that are installed in one or more packages
get_default_parameters

Get the default parameters of a method
calculate_attraction

Calculate the attraction of cells to other cells using velocity
allowed_outputs

All allowed outputs for a TI method
create_ti_method_r

Create a TI method from an R function wrapper
def_author

Meta information on an author
example_trajectory

Example trajectory
convert_milestone_percentages_to_progressions

Conversion between milestone percentages and progressions
convert_progressions_to_milestone_percentages

Conversion between milestone percentages and progressions
add_tde_overall

Add information on overall differentially expressed features
calculate_geodesic_distances

Calculate geodesic distances between cells in a trajectory
add_trajectory

Construct a trajectory given its milestone network and milestone percentages or progressions
select_waypoints

Add or create waypoints to a trajectory
convert_definition

Convert a definition loaded in from a yaml
common_param

Common param
group_from_trajectory

Create a grouping from a trajectory
def_parameters

Meta information on the parameters of the TI method
priors

Metadata on priors
allowed_inputs

All allowed inputs for a TI method
infer_trajectories

Infer one or more trajectories from a single-cell dataset
def_container

Meta information on the container in which the wrapper resides
flip_edges

Flip a set of edges of the milestone network
reexports

Objects exported from other packages
simplify_igraph_network

Simplify an igraph network such that consecutive linear edges are removed
random_seed

Generate a random seed
dynwrap

Inferring and adapting single-cell trajectories
def_manuscript

Meta information on the manuscript
example_dataset

Example dataset
project_waypoints

Project waypoints of a trajectory (e.g. milestones) into a space defined by cells (e.g. expression or a dimensionality reduction)
calculate_trajectory_dimred

Layout the trajectory and its cells in 2 dimensions using a graph layout
classify_milestone_network

Classify a milestone network
def_method

Define meta information on the TI method.
def_package

Meta information on the package in which the TI function resides
definition

Create a definition
wrap_expression

Create a wrapper object with expression and counts
simplify_trajectory

Simplify a trajectory by removing transient milestones
label_milestones

Label milestones either manually (label_milestones) or using marker genes (label_milestones_markers)
prior_usages

Metadata on prior usages
.method_process_definition

Method process definition
trajectory_type_dag

A DAG connecting different trajectory types
wrapper_types

Metadata on wrapper types
wrap_data

A data wrapper for datasets and trajectories
project_trajectory

Project a trajectory onto a dimensionality reduction
def_wrapper

Meta information on the wrapper
trajectory_types

Metadata on the trajectory types
add_end_state_probabilities

Constructs a multifurcating trajectory using end state probabilities
add_cyclic_trajectory

Constructs a circular trajectory using the pseudotime values of each cell.
add_dimred_projection

Constructs a trajectory by projecting cells within a dimensionality reduction
add_branch_trajectory

Construct a trajectory given its branch network and the pseudotime of the cells on one of the branches.