dtangle
=======

.. py:module:: dtangle


Attributes
----------

.. autoapisummary::

   dtangle.__version__


Functions
---------

.. autoapisummary::

   dtangle.deconvolut


Package Contents
----------------

.. py:data:: __version__
   :type:  str

.. py:function:: deconvolut(Y, references, reference_annotation_col, n_markers = None, data_type = None, gamma = None, markers = None, marker_method = 'ratio', summary_fn = np.mean, *, layer = None, var_key = None, key_added = 'dtangle', copy = False)

   Estimate cell type mixing proportions using a dtangle-style estimator.

   :param Y: Mixture expression AnnData with shape (samples, genes).
   :param references: Reference expression AnnData where each row is a pure sample.
   :param reference_annotation_col: AnnData .obs column in references containing cell
                                    type annotations used to group pure samples.
   :param n_markers: Marker count control. Supports scalar integer, per-type integer
                     vector, scalar fraction in (0,1), or per-type fraction vector.
   :param data_type: Optional data type key used to choose built-in gamma.
   :param gamma: Optional explicit gamma overriding data_type.
   :param markers: Optional marker indices per cell type. If omitted, markers are
                   computed internally using marker_method.
   :param marker_method: Marker ranking method: ratio, regression, diff, p.value.
   :param summary_fn: Summary function used by baseline and per-sample aggregation.
   :param layer: Optional AnnData layer key to use instead of X.
   :param var_key: Optional adata.var key used for feature alignment and marker names.
   :param key_added: Output key for AnnData mode.
   :param copy: Return modified AnnData in AnnData mode.

   :returns: None (in-place) or AnnData if copy=True. Results are written to
             adata.obsm[key_added] and adata.uns[key_added].


