Skip to content

Missing documentation for vector_field_function #633

@Baschdl

Description

@Baschdl

I would like to use the function f(x) like you describe it in the "10min to dynamo" tutorial [1] to get the velocity for unseen gene expression vectors x. Unfortunately, the dynamo.vf.vector_field_function (which I guess is f) is missing it's documentation on readthedocs [2] despite having a docstring:

def vector_field_function(
x: np.ndarray,
vf_dict: VecFldDict,
dim: Optional[Union[int, np.ndarray]] = None,
kernel: str = "full",
X_ctrl_ind: Optional[List] = None,
**kernel_kwargs,
) -> np.ndarray:
"""vector field function constructed by sparseVFC.
Reference: Regularized vector field learning with sparse approximation for mismatch removal, Ma, Jiayi, etc. al, Pattern Recognition
Args:
x: Set of cell expression state samples
vf_dict: VecFldDict with stored parameters necessary for reconstruction
dim: Index or indices of dimensions of the K gram matrix to return. Defaults to None.
kernel: one of {"full", "df_kernel", "cf_kernel"}. Defaults to "full".
X_ctrl_ind: Indices of control points at which kernels will be centered. Defaults to None.
Raises:
ValueError: If the kernel value specified is not one of "full", "df_kernel", or "cf_kernel"
Returns:
np.ndarray storing the `dim` dimensions of m x m gram matrix K storing the kernel evaluated at each pair of control points
"""

I tried running it according to this documentation but it's unclear to me what vf_dict is. Probably something generated from dyn.vf.VectorField:

|-----> <insert> velocity_S_SparseVFC to layers in AnnData Object.
|-----> <insert> VecFld to uns in AnnData Object.
|-----> <insert> control_point to obs in AnnData Object.
|-----> <insert> inlier_prob to obs in AnnData Object.
|-----> <insert> obs_vf_angle to obs in AnnData Object.

[1] https://dynamo-release.readthedocs.io/en/latest/ten_minutes_to_dynamo.html#vector-field-reconstruction
[2] https://dynamo-release.readthedocs.io/en/latest/_autosummary/dynamo.vf.vector_field_function.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    StalebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions